diff options
Diffstat (limited to 'js/dojo-1.6/dijit/form')
248 files changed, 14611 insertions, 0 deletions
diff --git a/js/dojo-1.6/dijit/form/Button.js b/js/dojo-1.6/dijit/form/Button.js new file mode 100644 index 0000000..02258e2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/Button.js @@ -0,0 +1,361 @@ +/*
+ Copyright (c) 2004-2011, The 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"]){ //_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.require("dijit.form._FormWidget");
+dojo.require("dijit._Container");
+dojo.require("dijit._HasDropDown");
+
+
+
+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
+ // 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 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: dojo.cache("dijit.form", "templates/Button.html", "<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\r\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\"></span\r\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">●</span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode\"\r\n\t\t\t></span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"),
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ value: "valueNode"
+ }),
+
+ _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:
+ // 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.valueNode||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 && typeof widget._onSubmit == "function"){
+ widget._onSubmit(e);
+ break;
+ }
+ }
+ }else if(this.valueNode){
+ this.valueNode.click();
+ e.preventDefault(); // cancel BUTTON click and continue with hidden INPUT click
+ }
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ dojo.setSelectable(this.focusNode, false);
+ },
+
+ _fillContent: function(/*DomNode*/ source){
+ // Overrides _Templated._fillContent().
+ // If button label is specified as srcNodeRef.innerHTML rather than
+ // this.params.label, handle it here.
+ // TODO: remove the method in 2.0, parser will do it all for me
+ if(source && (!this.params || !("label" in this.params))){
+ this.set('label', source.innerHTML);
+ }
+ },
+
+ _setShowLabelAttr: function(val){
+ if(this.containerNode){
+ dojo.toggleClass(this.containerNode, "dijitDisplayNone", !val);
+ }
+ this._set("showLabel", val);
+ },
+
+ onClick: function(/*Event*/ e){
+ // 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 overridable function for when the button is clicked
+ },
+
+ setLabel: function(/*String*/ content){
+ // summary:
+ // Deprecated. Use set('label', ...) instead.
+ dojo.deprecated("dijit.form.Button.setLabel() is deprecated. Use set('label', ...) instead.", "", "2.0");
+ this.set("label", content);
+ },
+
+ _setLabelAttr: function(/*String*/ content){
+ // summary:
+ // Hook for set('label', ...) to work.
+ // description:
+ // Set the label (text) of the button; takes an HTML string.
+ this._set("label", content);
+ this.containerNode.innerHTML = content;
+ if(this.showLabel == false && !this.params.title){
+ this.titleNode.title = dojo.trim(this.containerNode.innerText || this.containerNode.textContent || '');
+ }
+ },
+
+ _setIconClassAttr: function(/*String*/ val){
+ // Custom method so that icon node is hidden when not in use, to avoid excess padding/margin
+ // appearing around it (even if it's a 0x0 sized <img> node)
+
+ var oldVal = this.iconClass || "dijitNoIcon",
+ newVal = val || "dijitNoIcon";
+ dojo.replaceClass(this.iconNode, newVal, oldVal);
+ this._set("iconClass", val);
+ }
+});
+
+
+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: dojo.cache("dijit.form", "templates/DropDownButton.html", "<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class='dijitReset dijitInline dijitButtonNode'\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"_buttonNode\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\r\n\t\t\trole=\"button\" aria-haspopup=\"true\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\"\r\n\t\t\t\tdojoAttachPoint=\"iconNode\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\"></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">▼</span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"),
+
+ _fillContent: function(){
+ // 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 && this.dropDownContainer){
+ var dropDownNode = dojo.query("[widgetId]", this.dropDownContainer)[0];
+ this.dropDown = dijit.byNode(dropDownNode);
+ delete this.dropDownContainer;
+ }
+ if(this.dropDown){
+ dijit.popup.hide(this.dropDown);
+ }
+
+ 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 && (!dropDown.href || dropDown.isLoaded));
+ },
+
+ loadDropDown: function(){
+ // Loads our dropdown
+ var dropDown = this.dropDown;
+ 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:
+ // 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\"\r\n\tcellspacing='0' cellpadding='0' role=\"presentation\"\r\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\" dojoAttachPoint=\"buttonNode\" dojoAttachEvent=\"ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress\"\r\n\t\t><div id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode\"\r\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><div class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" role=\"presentation\"></div\r\n\t\t></div\r\n\t\t></td\r\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\r\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\r\n\t\t\tdojoAttachEvent=\"onkeypress:_onArrowKeyPress\"\r\n\t\t\ttitle=\"${optionsTitle}\"\r\n\t\t\trole=\"button\" aria-haspopup=\"true\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">▼</div\r\n\t\t></td\r\n\t\t><td style=\"display:none !important;\"\r\n\t\t\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" dojoAttachPoint=\"valueNode\"\r\n\t\t/></td></tr></tbody\r\n></table>\r\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)
+ optionsTitle: "",
+
+ baseClass: "dijitComboButton",
+
+ // Set classes like dijitButtonContentsHover or dijitArrowButtonActive depending on
+ // mouse action over specified node
+ cssStateNodes: {
+ "buttonNode": "dijitButtonNode",
+ "titleNode": "dijitButtonContents",
+ "_popupStateNode": "dijitDownArrowButton"
+ },
+
+ _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"
+ if(!this.disabled){
+ 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
+
+ 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.set('checked', !this.checked);
+ },
+
+ _setCheckedAttr: function(/*Boolean*/ value, /*Boolean?*/ priorityChange){
+ this._set("checked", value);
+ dojo.attr(this.focusNode || this.domNode, "checked", value);
+ dijit.setWaiState(this.focusNode || this.domNode, "pressed", value);
+ this._handleOnChange(value, priorityChange);
+ },
+
+ setChecked: function(/*Boolean*/ checked){
+ // summary:
+ // Deprecated. Use set('checked', true/false) instead.
+ dojo.deprecated("setChecked("+checked+") is deprecated. Use set('checked',"+checked+") instead.", "", "2.0");
+ this.set('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.set('checked', this.params.checked || false);
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/Button.xd.js b/js/dojo-1.6/dijit/form/Button.xd.js new file mode 100644 index 0000000..df2439c --- /dev/null +++ b/js/dojo-1.6/dijit/form/Button.xd.js @@ -0,0 +1,368 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.Button"],
+["require", "dijit.form._FormWidget"],
+["require", "dijit._Container"],
+["require", "dijit._HasDropDown"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form._FormWidget");
+dojo.require("dijit._Container");
+dojo.require("dijit._HasDropDown");
+
+
+
+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
+ // 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 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: dojo.cache("dijit.form", "templates/Button.html", "<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\r\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\"></span\r\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">●</span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode\"\r\n\t\t\t></span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"),
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ value: "valueNode"
+ }),
+
+ _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:
+ // 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.valueNode||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 && typeof widget._onSubmit == "function"){
+ widget._onSubmit(e);
+ break;
+ }
+ }
+ }else if(this.valueNode){
+ this.valueNode.click();
+ e.preventDefault(); // cancel BUTTON click and continue with hidden INPUT click
+ }
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ dojo.setSelectable(this.focusNode, false);
+ },
+
+ _fillContent: function(/*DomNode*/ source){
+ // Overrides _Templated._fillContent().
+ // If button label is specified as srcNodeRef.innerHTML rather than
+ // this.params.label, handle it here.
+ // TODO: remove the method in 2.0, parser will do it all for me
+ if(source && (!this.params || !("label" in this.params))){
+ this.set('label', source.innerHTML);
+ }
+ },
+
+ _setShowLabelAttr: function(val){
+ if(this.containerNode){
+ dojo.toggleClass(this.containerNode, "dijitDisplayNone", !val);
+ }
+ this._set("showLabel", val);
+ },
+
+ onClick: function(/*Event*/ e){
+ // 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 overridable function for when the button is clicked
+ },
+
+ setLabel: function(/*String*/ content){
+ // summary:
+ // Deprecated. Use set('label', ...) instead.
+ dojo.deprecated("dijit.form.Button.setLabel() is deprecated. Use set('label', ...) instead.", "", "2.0");
+ this.set("label", content);
+ },
+
+ _setLabelAttr: function(/*String*/ content){
+ // summary:
+ // Hook for set('label', ...) to work.
+ // description:
+ // Set the label (text) of the button; takes an HTML string.
+ this._set("label", content);
+ this.containerNode.innerHTML = content;
+ if(this.showLabel == false && !this.params.title){
+ this.titleNode.title = dojo.trim(this.containerNode.innerText || this.containerNode.textContent || '');
+ }
+ },
+
+ _setIconClassAttr: function(/*String*/ val){
+ // Custom method so that icon node is hidden when not in use, to avoid excess padding/margin
+ // appearing around it (even if it's a 0x0 sized <img> node)
+
+ var oldVal = this.iconClass || "dijitNoIcon",
+ newVal = val || "dijitNoIcon";
+ dojo.replaceClass(this.iconNode, newVal, oldVal);
+ this._set("iconClass", val);
+ }
+});
+
+
+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: dojo.cache("dijit.form", "templates/DropDownButton.html", "<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class='dijitReset dijitInline dijitButtonNode'\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"_buttonNode\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\r\n\t\t\trole=\"button\" aria-haspopup=\"true\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\"\r\n\t\t\t\tdojoAttachPoint=\"iconNode\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\"></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">▼</span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"),
+
+ _fillContent: function(){
+ // 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 && this.dropDownContainer){
+ var dropDownNode = dojo.query("[widgetId]", this.dropDownContainer)[0];
+ this.dropDown = dijit.byNode(dropDownNode);
+ delete this.dropDownContainer;
+ }
+ if(this.dropDown){
+ dijit.popup.hide(this.dropDown);
+ }
+
+ 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 && (!dropDown.href || dropDown.isLoaded));
+ },
+
+ loadDropDown: function(){
+ // Loads our dropdown
+ var dropDown = this.dropDown;
+ 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:
+ // 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\"\r\n\tcellspacing='0' cellpadding='0' role=\"presentation\"\r\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\" dojoAttachPoint=\"buttonNode\" dojoAttachEvent=\"ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress\"\r\n\t\t><div id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode\"\r\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><div class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" role=\"presentation\"></div\r\n\t\t></div\r\n\t\t></td\r\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\r\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\r\n\t\t\tdojoAttachEvent=\"onkeypress:_onArrowKeyPress\"\r\n\t\t\ttitle=\"${optionsTitle}\"\r\n\t\t\trole=\"button\" aria-haspopup=\"true\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">▼</div\r\n\t\t></td\r\n\t\t><td style=\"display:none !important;\"\r\n\t\t\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" dojoAttachPoint=\"valueNode\"\r\n\t\t/></td></tr></tbody\r\n></table>\r\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)
+ optionsTitle: "",
+
+ baseClass: "dijitComboButton",
+
+ // Set classes like dijitButtonContentsHover or dijitArrowButtonActive depending on
+ // mouse action over specified node
+ cssStateNodes: {
+ "buttonNode": "dijitButtonNode",
+ "titleNode": "dijitButtonContents",
+ "_popupStateNode": "dijitDownArrowButton"
+ },
+
+ _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"
+ if(!this.disabled){
+ 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
+
+ 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.set('checked', !this.checked);
+ },
+
+ _setCheckedAttr: function(/*Boolean*/ value, /*Boolean?*/ priorityChange){
+ this._set("checked", value);
+ dojo.attr(this.focusNode || this.domNode, "checked", value);
+ dijit.setWaiState(this.focusNode || this.domNode, "pressed", value);
+ this._handleOnChange(value, priorityChange);
+ },
+
+ setChecked: function(/*Boolean*/ checked){
+ // summary:
+ // Deprecated. Use set('checked', true/false) instead.
+ dojo.deprecated("setChecked("+checked+") is deprecated. Use set('checked',"+checked+") instead.", "", "2.0");
+ this.set('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.set('checked', this.params.checked || false);
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/CheckBox.js b/js/dojo-1.6/dijit/form/CheckBox.js new file mode 100644 index 0000000..67e04ce --- /dev/null +++ b/js/dojo-1.6/dijit/form/CheckBox.js @@ -0,0 +1,205 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.ToggleButton");
+
+
+
+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: dojo.cache("dijit.form", "templates/CheckBox.html", "<div class=\"dijit dijitReset dijitInline\" role=\"presentation\"\r\n\t><input\r\n\t \t${!nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\r\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\r\n\t\tdojoAttachPoint=\"focusNode\"\r\n\t \tdojoAttachEvent=\"onclick:_onClick\"\r\n/></div>\r\n"),
+
+ baseClass: "dijitCheckBox",
+
+ // type: [private] String
+ // type attribute on <input> node.
+ // Overrides `dijit.form.Button.type`. Users should not change this value.
+ type: "checkbox",
+
+ // 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, get('value') will return either the string or false depending on
+ // whether or not the checkbox is checked.
+ //
+ // set('value', string) will check the checkbox and change the value to the
+ // specified string
+ //
+ // set('value', boolean) will change the checked state.
+ value: "on",
+
+ // 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,
+
+ // the attributeMap should inherit from dijit.form._FormWidget.prototype.attributeMap
+ // instead of ToggleButton as the icon mapping has no meaning for a CheckBox
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ readOnly: "focusNode"
+ }),
+
+ _setReadOnlyAttr: function(/*Boolean*/ value){
+ this._set("readOnly", value);
+ dojo.attr(this.focusNode, 'readOnly', value);
+ dijit.setWaiState(this.focusNode, "readonly", value);
+ },
+
+ _setValueAttr: function(/*String|Boolean*/ newValue, /*Boolean*/ priorityChange){
+ // summary:
+ // Handler for value= attribute to constructor, and also calls to
+ // set('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._set("value", newValue);
+ dojo.attr(this.focusNode, 'value', newValue);
+ newValue = true;
+ }
+ if(this._created){
+ this.set('checked', newValue, priorityChange);
+ }
+ },
+ _getValueAttr: function(){
+ // summary:
+ // Hook so get('value') works.
+ // description:
+ // If the CheckBox is checked, returns the value attribute.
+ // Otherwise returns false.
+ return (this.checked ? this.value : false);
+ },
+
+ // Override dijit.form.Button._setLabelAttr() since we don't even have a containerNode.
+ // Normally users won't try to set label, except when CheckBox or RadioButton is the child of a dojox.layout.TabContainer
+ _setLabelAttr: undefined,
+
+ 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.set('checked', this.params.checked || false);
+
+ // Handle unlikely event that the <input type=checkbox> value attribute has changed
+ this._set("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");
+ }
+ this.inherited(arguments);
+ },
+
+ _onBlur: function(){
+ if(this.id){
+ dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
+ }
+ this.inherited(arguments);
+ },
+
+ _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){
+ dojo.stopEvent(e);
+ return false;
+ }
+ return this.inherited(arguments);
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form.RadioButton",
+ dijit.form.CheckBox,
+ {
+ // summary:
+ // Same as an HTML radio, but with fancy styling.
+
+ type: "radio",
+ baseClass: "dijitRadio",
+
+ _setCheckedAttr: function(/*Boolean*/ value){
+ // If I am being checked then have to deselect currently checked radio button
+ 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.set('checked', false);
+ }
+ }
+ }
+ );
+ }
+ },
+
+ _clicked: function(/*Event*/ e){
+ if(!this.checked){
+ this.set('checked', true);
+ }
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/CheckBox.xd.js b/js/dojo-1.6/dijit/form/CheckBox.xd.js new file mode 100644 index 0000000..94b6da1 --- /dev/null +++ b/js/dojo-1.6/dijit/form/CheckBox.xd.js @@ -0,0 +1,210 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.CheckBox"],
+["require", "dijit.form.ToggleButton"]],
+defineResource: function(dojo, dijit, dojox){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.ToggleButton");
+
+
+
+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: dojo.cache("dijit.form", "templates/CheckBox.html", "<div class=\"dijit dijitReset dijitInline\" role=\"presentation\"\r\n\t><input\r\n\t \t${!nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\r\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\r\n\t\tdojoAttachPoint=\"focusNode\"\r\n\t \tdojoAttachEvent=\"onclick:_onClick\"\r\n/></div>\r\n"),
+
+ baseClass: "dijitCheckBox",
+
+ // type: [private] String
+ // type attribute on <input> node.
+ // Overrides `dijit.form.Button.type`. Users should not change this value.
+ type: "checkbox",
+
+ // 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, get('value') will return either the string or false depending on
+ // whether or not the checkbox is checked.
+ //
+ // set('value', string) will check the checkbox and change the value to the
+ // specified string
+ //
+ // set('value', boolean) will change the checked state.
+ value: "on",
+
+ // 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,
+
+ // the attributeMap should inherit from dijit.form._FormWidget.prototype.attributeMap
+ // instead of ToggleButton as the icon mapping has no meaning for a CheckBox
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ readOnly: "focusNode"
+ }),
+
+ _setReadOnlyAttr: function(/*Boolean*/ value){
+ this._set("readOnly", value);
+ dojo.attr(this.focusNode, 'readOnly', value);
+ dijit.setWaiState(this.focusNode, "readonly", value);
+ },
+
+ _setValueAttr: function(/*String|Boolean*/ newValue, /*Boolean*/ priorityChange){
+ // summary:
+ // Handler for value= attribute to constructor, and also calls to
+ // set('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._set("value", newValue);
+ dojo.attr(this.focusNode, 'value', newValue);
+ newValue = true;
+ }
+ if(this._created){
+ this.set('checked', newValue, priorityChange);
+ }
+ },
+ _getValueAttr: function(){
+ // summary:
+ // Hook so get('value') works.
+ // description:
+ // If the CheckBox is checked, returns the value attribute.
+ // Otherwise returns false.
+ return (this.checked ? this.value : false);
+ },
+
+ // Override dijit.form.Button._setLabelAttr() since we don't even have a containerNode.
+ // Normally users won't try to set label, except when CheckBox or RadioButton is the child of a dojox.layout.TabContainer
+ _setLabelAttr: undefined,
+
+ 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.set('checked', this.params.checked || false);
+
+ // Handle unlikely event that the <input type=checkbox> value attribute has changed
+ this._set("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");
+ }
+ this.inherited(arguments);
+ },
+
+ _onBlur: function(){
+ if(this.id){
+ dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
+ }
+ this.inherited(arguments);
+ },
+
+ _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){
+ dojo.stopEvent(e);
+ return false;
+ }
+ return this.inherited(arguments);
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form.RadioButton",
+ dijit.form.CheckBox,
+ {
+ // summary:
+ // Same as an HTML radio, but with fancy styling.
+
+ type: "radio",
+ baseClass: "dijitRadio",
+
+ _setCheckedAttr: function(/*Boolean*/ value){
+ // If I am being checked then have to deselect currently checked radio button
+ 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.set('checked', false);
+ }
+ }
+ }
+ );
+ }
+ },
+
+ _clicked: function(/*Event*/ e){
+ if(!this.checked){
+ this.set('checked', true);
+ }
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/ComboBox.js b/js/dojo-1.6/dijit/form/ComboBox.js new file mode 100644 index 0000000..8499601 --- /dev/null +++ b/js/dojo-1.6/dijit/form/ComboBox.js @@ -0,0 +1,1246 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.window");
+dojo.require("dojo.regexp");
+dojo.require("dojo.data.util.simpleFetch");
+dojo.require("dojo.data.util.filter");
+dojo.require("dijit._CssStateMixin");
+dojo.require("dijit.form._FormWidget");
+dojo.require("dijit.form.ValidationTextBox");
+dojo.require("dijit._HasDropDown");
+dojo.requireLocalization("dijit.form", "ComboBox", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
+
+
+
+dojo.declare(
+ "dijit.form.ComboBoxMixin",
+ dijit._HasDropDown,
+ {
+ // 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: [const] 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: 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/DropDownBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"▼ \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),
+
+ baseClass: "dijitTextBox dijitComboBox",
+
+ // dropDownClass: [protected extension] String
+ // Name of the dropdown widget class used to select a date/time.
+ // Subclasses should specify this.
+ dropDownClass: "dijit.form._ComboBoxMenu",
+
+ // Set classes like dijitDownArrowButtonHover depending on
+ // mouse action over button node
+ cssStateNodes: {
+ "_buttonNode": "dijitDownArrowButton"
+ },
+
+ // Flags to _HasDropDown to limit height of drop down to make it fit in viewport
+ maxHeight: -1,
+
+ _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 doesn't 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.domNode, "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;
+ }
+ },
+
+ _onInput: function(/*Event*/ evt){
+ // summary:
+ // Handles paste events
+ if(!this.searchTimer && (evt.type == 'paste'/*IE|WebKit*/ || evt.type == 'input'/*Firefox*/) && this._lastInput != this.textbox.value){
+ this.searchTimer = setTimeout(dojo.hitch(this, function(){
+ this._onKey({charOrCode: 229}); // fake IME key to cause a search
+ }), 100); // long delay that will probably be preempted by keyboard input
+ }
+ this.inherited(arguments);
+ },
+
+ _onKey: 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 pw = this.dropDown;
+ var dk = dojo.keys;
+ var highlighted = null;
+ this._prev_key_backspace = false;
+ this._abortQuery();
+
+ // _HasDropDown will do some of the work:
+ // 1. when drop down is not yet shown:
+ // - if user presses the down arrow key, call loadDropDown()
+ // 2. when drop down is already displayed:
+ // - on ESC key, call closeDropDown()
+ // - otherwise, call dropDown.handleKey() to process the keystroke
+ this.inherited(arguments);
+
+ if(this._opened){
+ highlighted = pw.getHighlightedOption();
+ }
+ switch(key){
+ case dk.PAGE_DOWN:
+ case dk.DOWN_ARROW:
+ case dk.PAGE_UP:
+ case dk.UP_ARROW:
+ // Keystroke caused ComboBox_menu to move to a different item.
+ // Copy new item to <input> box.
+ if(this._opened){
+ 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:
+ // if enter pressed while drop down is open, or for FilteringSelect,
+ // if we are in the middle of a query to convert a directly typed in value to an item,
+ // prevent submit, but allow event to bubble
+ if(this._opened || this._fetchHandle){
+ evt.preventDefault();
+ }
+ // fall through
+
+ case dk.TAB:
+ var newvalue = this.get('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._opened){
+ this._lastQuery = null; // in case results come back later
+ this.closeDropDown();
+ }
+ break;
+
+ case ' ':
+ if(highlighted){
+ // user is effectively clicking a choice in the drop down menu
+ dojo.stopEvent(evt);
+ this._selectOption();
+ this.closeDropDown();
+ }else{
+ // user typed a space into the input box, treat as normal character
+ doSearch = true;
+ }
+ 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.
+ //IME input produces keycode == 229.
+ 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, "_startSearchFromInput"),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){
+ // summary:
+ // Callback when a search completes.
+ // description:
+ // 1. generates drop-down list and calls _showResultList() to display it
+ // 2. if this result list is from user pressing "more choices"/"previous choices"
+ // then tell screen reader to announce new option
+ this._fetchHandle = null;
+ if( this.disabled ||
+ this.readOnly ||
+ (dataObject.query[this.searchAttr] != this._lastQuery)
+ ){
+ return;
+ }
+ var wasSelected = this.dropDown._highlighted_option && dojo.hasClass(this.dropDown._highlighted_option, "dijitMenuItemSelected");
+ this.dropDown.clearResultList();
+ if(!results.length && !this._maxOptions){ // if no results and not just the previous choices button
+ this.closeDropDown();
+ 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.dropDown.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.dropDown.highlightFirstOption();
+ }else if(-1 == dataObject.direction){
+ this.dropDown.highlightLastOption();
+ }
+ if(wasSelected){
+ this._announceOption(this.dropDown.getHighlightedOption());
+ }
+ }else if(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.
+ && !/^[*]+$/.test(dataObject.query[this.searchAttr])){
+ this._announceOption(nodes[1]); // 1st real item
+ }
+ },
+
+ _showResultList: function(){
+ // summary:
+ // Display the drop down if not already displayed, or if it is displayed, then
+ // reposition it if necessary (reposition may be necessary if drop down's height changed).
+
+ this.closeDropDown(true);
+
+ // hide the tooltip
+ this.displayMessage("");
+
+ this.openDropDown();
+
+ dijit.setWaiState(this.domNode, "expanded", "true");
+ },
+
+ loadDropDown: function(/*Function*/ callback){
+ // Overrides _HasDropDown.loadDropDown().
+ // This is called when user has pressed button icon or pressed the down arrow key
+ // to open the drop down.
+
+ this._startSearchAll();
+ },
+
+ isLoaded: function(){
+ // signal to _HasDropDown that it needs to call loadDropDown() to load the
+ // drop down asynchronously before displaying it
+ return false;
+ },
+
+ closeDropDown: function(){
+ // Overrides _HasDropDown.closeDropDown(). Closes the drop down (assuming that it's open).
+ // This method is the callback when the user types ESC or clicking
+ // the button icon while the drop down is open. It's also called by other code.
+ this._abortQuery();
+ if(this._opened){
+ this.inherited(arguments);
+ dijit.setWaiState(this.domNode, "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.get('displayedValue');
+ var pw = this.dropDown;
+ 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.set('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.closeDropDown();
+ 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
+ // set('item', value)
+ // tags:
+ // private
+ if(!displayedValue){
+ // Use labelFunc() to get displayedValue. But it may return HTML so need to convert to plain text.
+ var label = this.labelFunc(item, this.store);
+ if(this.labelType == "html"){
+ var span = this._helperSpan;
+ span.innerHTML = label;
+ displayedValue = span.innerText || span.textContent;
+ }else{
+ displayedValue = label;
+ }
+ }
+ var value = this._getValueField() != this.searchAttr? this.store.getIdentity(item) : displayedValue;
+ this._set("item", item);
+ dijit.form.ComboBox.superclass._setValueAttr.call(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.dropDown.nextButton ||
+ node == this.dropDown.previousButton){
+ newValue = node.innerHTML;
+ this.item = undefined;
+ this.value = '';
+ }else{
+ newValue = node.innerText || node.textContent || "";
+ // newValue = this.store.getValue(node.item, this.searchAttr).toString();
+ this.set('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.closeDropDown();
+ this._setCaretPos(this.focusNode, this.focusNode.value.length);
+ dijit.form._FormValueWidget.prototype._setValueAttr.call(this, this.value, true); // set this.value and fire onChange
+ },
+
+ _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){
+ // summary:
+ // Starts a search for elements matching key (key=="" means to return all items),
+ // and calls _openResultList() when the search completes, to display the results.
+ if(!this.dropDown){
+ var popupId = this.id + "_popup",
+ dropDownConstructor = dojo.getObject(this.dropDownClass, false);
+ this.dropDown = new dropDownConstructor({
+ onChange: dojo.hitch(this, this._selectOption),
+ id: popupId,
+ dir: this.dir
+ });
+ 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);
+ _this.closeDropDown();
+ },
+ 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.focus();
+ };
+ this._nextSearch = this.dropDown.onPage = dojo.hitch(this, nextSearch, this._fetchHandle);
+ }, query, this), this.searchDelay);
+ },
+
+ _setMaxOptions: function(size, request){
+ this._maxOptions = size;
+ },
+
+ _getValueField: function(){
+ // summary:
+ // 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;
+ },
+
+ //////////// INITIALIZATION METHODS ///////////////////////////////////////
+
+ constructor: function(){
+ this.query={};
+ this.fetchProperties={};
+ },
+
+ postMixInProperties: function(){
+ 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(!("value" in this.params)){
+ var item = (this.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);
+ }
+ }
+ }
+
+ // used to convert HTML to plain text
+ this._helperSpan = dojo.create("span");
+
+ 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");
+ dijit.setWaiState(this.domNode, "labelledby", label[0].id);
+
+ }
+ this.inherited(arguments);
+ },
+
+ destroy: function(){
+ dojo.destroy(this._helperSpan);
+ this.inherited(arguments);
+ },
+
+ _setHasDownArrowAttr: function(val){
+ this.hasDownArrow = val;
+ this._buttonNode.style.display = val ? "" : "none";
+ },
+
+ _getMenuLabelFromItem: function(/*Item*/ item){
+ var label = this.labelFunc(item, this.store),
+ 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 occurrence found. Override this method
+ // to implement your custom highlighting.
+ // tags:
+ // protected
+
+ var
+ // Add (g)lobal modifier when this.highlightMatch == "all" and (i)gnorecase when this.ignoreCase == true
+ modifiers = (this.ignoreCase ? "i" : "") + (this.highlightMatch == "all" ? "g" : ""),
+ i = this.queryExpr.indexOf("${0}");
+ find = dojo.regexp.escapeString(find); // escape regexp special chars
+ return this._escapeHtml(label).replace(
+ // prepend ^ when this.queryExpr == "${0}*" and append $ when this.queryExpr == "*${0}"
+ new RegExp((i == 0 ? "^" : "") + "("+ find +")" + (i == (this.queryExpr.length - 4) ? "$" : ""), modifiers),
+ '<span class="dijitComboBoxHighlightMatch">$1</span>'
+ ); // 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, "&").replace(/</gm, "<")
+ .replace(/>/gm, ">").replace(/"/gm, """);
+ return str; // string
+ },
+
+ 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.labelAttr || this.searchAttr).toString(); // String
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form._ComboBoxMenu",
+ [dijit._Widget, dijit._Templated, dijit._CssStateMixin],
+ {
+ // 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' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"
+ +"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' role='option'></li>"
+ +"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' role='option'></li>"
+ +"</ul>",
+
+ // _messages: Object
+ // Holds "next" and "previous" text for paging buttons on drop down
+ _messages: null,
+
+ baseClass: "dijitComboBoxMenu",
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this._messages = dojo.i18n.getLocalization("dijit.form", "ComboBox", this.lang);
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ // fill in template with i18n messages
+ this.previousButton.innerHTML = this._messages["previousMessage"];
+ this.nextButton.innerHTML = this._messages["nextMessage"];
+ },
+
+ _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
+ },
+
+ 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 menuitem = dojo.create("li", {
+ "class": "dijitReset dijitMenuItem" +(this.isLeftToRight() ? "" : " dijitMenuItemRtl"),
+ role: "option"
+ });
+ var labelObject = labelFunc(item);
+ 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 = " ";
+ }
+ 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);
+ 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 && dataObject.count == results.length){
+ //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
+ 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]);
+ }
+ this._blurOptionNode();
+ },
+
+ _onMouseDown: function(/*Event*/ evt){
+ dojo.stopEvent(evt);
+ },
+
+ _onMouseUp: function(/*Event*/ evt){
+ if(evt.target === this.domNode || !this._highlighted_option){
+ // !this._highlighted_option check to prevent immediate selection when menu appears on top
+ // of <input>, see #9898. Note that _HasDropDown also has code to prevent this.
+ return;
+ }else if(evt.target == this.previousButton){
+ this._blurOptionNode();
+ this.onPage(-1);
+ }else if(evt.target == this.nextButton){
+ this._blurOptionNode();
+ 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.
+ if(!this.getHighlightedOption()){
+ var fc = this.domNode.firstChild;
+ 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);
+ }else{
+ this.highlightFirstOption();
+ }
+ }
+ // scrollIntoView is called outside of _focusOptionNode because in IE putting it inside causes the menu to scroll up on mouseover
+ dojo.window.scrollIntoView(this._highlighted_option);
+ },
+
+ highlightFirstOption: function(){
+ // summary:
+ // Highlight the first real item in the list (not Previous Choices).
+ var first = this.domNode.firstChild;
+ var second = first.nextSibling;
+ this._focusOptionNode(second.style.display == "none" ? first : second); // remotely possible that Previous Choices is the only thing in the list
+ dojo.window.scrollIntoView(this._highlighted_option);
+ },
+
+ highlightLastOption: function(){
+ // summary:
+ // Highlight the last real item in the list (not More Choices).
+ this._focusOptionNode(this.domNode.lastChild.previousSibling);
+ dojo.window.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).
+ if(!this.getHighlightedOption()){
+ var lc = this.domNode.lastChild;
+ 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);
+ }else{
+ this.highlightLastOption();
+ }
+ }
+ dojo.window.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(evt){
+ // summary:
+ // Handle keystroke event forwarded from ComboBox, returning false if it's
+ // a keystroke I recognize and process, true otherwise.
+ switch(evt.charOrCode){
+ case dojo.keys.DOWN_ARROW:
+ this._highlightNextOption();
+ return false;
+ case dojo.keys.PAGE_DOWN:
+ this.pageDown();
+ return false;
+ case dojo.keys.UP_ARROW:
+ this._highlightPrevOption();
+ return false;
+ case dojo.keys.PAGE_UP:
+ this.pageUp();
+ return false;
+ default:
+ return true;
+ }
+ }
+ }
+);
+
+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 set('value', value) works.
+ // description:
+ // Sets the value of the select.
+ this._set("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;
+ if(root.tagName != "SELECT" && root.firstChild){
+ root = dojo.query("select", root);
+ if(root.length > 0){ // SELECT is a child of srcNodeRef
+ root = root[0];
+ }else{ // no select, so create 1 to parent the option tags to define selectedIndex
+ this.root.innerHTML = "<SELECT>"+this.root.innerHTML+"</SELECT>";
+ root = this.root.firstChild;
+ }
+ 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 typeof si == "number"
+ ? dojo.query("> option:nth-child(" + (si != -1 ? si+1 : 1) + ")", root)[0]
+ : null; // dojo.data.Item
+ }
+});
+//Mix in the simple fetch implementation to this class.
+dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);
+
+}
diff --git a/js/dojo-1.6/dijit/form/ComboBox.xd.js b/js/dojo-1.6/dijit/form/ComboBox.xd.js new file mode 100644 index 0000000..cab8110 --- /dev/null +++ b/js/dojo-1.6/dijit/form/ComboBox.xd.js @@ -0,0 +1,1259 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.ComboBox"],
+["require", "dojo.window"],
+["require", "dojo.regexp"],
+["require", "dojo.data.util.simpleFetch"],
+["require", "dojo.data.util.filter"],
+["require", "dijit._CssStateMixin"],
+["require", "dijit.form._FormWidget"],
+["require", "dijit.form.ValidationTextBox"],
+["require", "dijit._HasDropDown"],
+["requireLocalization", "dijit.form", "ComboBox", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw", "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"]],
+defineResource: function(dojo, dijit, dojox){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.window");
+dojo.require("dojo.regexp");
+dojo.require("dojo.data.util.simpleFetch");
+dojo.require("dojo.data.util.filter");
+dojo.require("dijit._CssStateMixin");
+dojo.require("dijit.form._FormWidget");
+dojo.require("dijit.form.ValidationTextBox");
+dojo.require("dijit._HasDropDown");
+;
+
+
+
+dojo.declare(
+ "dijit.form.ComboBoxMixin",
+ dijit._HasDropDown,
+ {
+ // 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: [const] 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: 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/DropDownBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"▼ \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),
+
+ baseClass: "dijitTextBox dijitComboBox",
+
+ // dropDownClass: [protected extension] String
+ // Name of the dropdown widget class used to select a date/time.
+ // Subclasses should specify this.
+ dropDownClass: "dijit.form._ComboBoxMenu",
+
+ // Set classes like dijitDownArrowButtonHover depending on
+ // mouse action over button node
+ cssStateNodes: {
+ "_buttonNode": "dijitDownArrowButton"
+ },
+
+ // Flags to _HasDropDown to limit height of drop down to make it fit in viewport
+ maxHeight: -1,
+
+ _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 doesn't 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.domNode, "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;
+ }
+ },
+
+ _onInput: function(/*Event*/ evt){
+ // summary:
+ // Handles paste events
+ if(!this.searchTimer && (evt.type == 'paste'/*IE|WebKit*/ || evt.type == 'input'/*Firefox*/) && this._lastInput != this.textbox.value){
+ this.searchTimer = setTimeout(dojo.hitch(this, function(){
+ this._onKey({charOrCode: 229}); // fake IME key to cause a search
+ }), 100); // long delay that will probably be preempted by keyboard input
+ }
+ this.inherited(arguments);
+ },
+
+ _onKey: 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 pw = this.dropDown;
+ var dk = dojo.keys;
+ var highlighted = null;
+ this._prev_key_backspace = false;
+ this._abortQuery();
+
+ // _HasDropDown will do some of the work:
+ // 1. when drop down is not yet shown:
+ // - if user presses the down arrow key, call loadDropDown()
+ // 2. when drop down is already displayed:
+ // - on ESC key, call closeDropDown()
+ // - otherwise, call dropDown.handleKey() to process the keystroke
+ this.inherited(arguments);
+
+ if(this._opened){
+ highlighted = pw.getHighlightedOption();
+ }
+ switch(key){
+ case dk.PAGE_DOWN:
+ case dk.DOWN_ARROW:
+ case dk.PAGE_UP:
+ case dk.UP_ARROW:
+ // Keystroke caused ComboBox_menu to move to a different item.
+ // Copy new item to <input> box.
+ if(this._opened){
+ 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:
+ // if enter pressed while drop down is open, or for FilteringSelect,
+ // if we are in the middle of a query to convert a directly typed in value to an item,
+ // prevent submit, but allow event to bubble
+ if(this._opened || this._fetchHandle){
+ evt.preventDefault();
+ }
+ // fall through
+
+ case dk.TAB:
+ var newvalue = this.get('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._opened){
+ this._lastQuery = null; // in case results come back later
+ this.closeDropDown();
+ }
+ break;
+
+ case ' ':
+ if(highlighted){
+ // user is effectively clicking a choice in the drop down menu
+ dojo.stopEvent(evt);
+ this._selectOption();
+ this.closeDropDown();
+ }else{
+ // user typed a space into the input box, treat as normal character
+ doSearch = true;
+ }
+ 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.
+ //IME input produces keycode == 229.
+ 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, "_startSearchFromInput"),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){
+ // summary:
+ // Callback when a search completes.
+ // description:
+ // 1. generates drop-down list and calls _showResultList() to display it
+ // 2. if this result list is from user pressing "more choices"/"previous choices"
+ // then tell screen reader to announce new option
+ this._fetchHandle = null;
+ if( this.disabled ||
+ this.readOnly ||
+ (dataObject.query[this.searchAttr] != this._lastQuery)
+ ){
+ return;
+ }
+ var wasSelected = this.dropDown._highlighted_option && dojo.hasClass(this.dropDown._highlighted_option, "dijitMenuItemSelected");
+ this.dropDown.clearResultList();
+ if(!results.length && !this._maxOptions){ // if no results and not just the previous choices button
+ this.closeDropDown();
+ 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.dropDown.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.dropDown.highlightFirstOption();
+ }else if(-1 == dataObject.direction){
+ this.dropDown.highlightLastOption();
+ }
+ if(wasSelected){
+ this._announceOption(this.dropDown.getHighlightedOption());
+ }
+ }else if(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.
+ && !/^[*]+$/.test(dataObject.query[this.searchAttr])){
+ this._announceOption(nodes[1]); // 1st real item
+ }
+ },
+
+ _showResultList: function(){
+ // summary:
+ // Display the drop down if not already displayed, or if it is displayed, then
+ // reposition it if necessary (reposition may be necessary if drop down's height changed).
+
+ this.closeDropDown(true);
+
+ // hide the tooltip
+ this.displayMessage("");
+
+ this.openDropDown();
+
+ dijit.setWaiState(this.domNode, "expanded", "true");
+ },
+
+ loadDropDown: function(/*Function*/ callback){
+ // Overrides _HasDropDown.loadDropDown().
+ // This is called when user has pressed button icon or pressed the down arrow key
+ // to open the drop down.
+
+ this._startSearchAll();
+ },
+
+ isLoaded: function(){
+ // signal to _HasDropDown that it needs to call loadDropDown() to load the
+ // drop down asynchronously before displaying it
+ return false;
+ },
+
+ closeDropDown: function(){
+ // Overrides _HasDropDown.closeDropDown(). Closes the drop down (assuming that it's open).
+ // This method is the callback when the user types ESC or clicking
+ // the button icon while the drop down is open. It's also called by other code.
+ this._abortQuery();
+ if(this._opened){
+ this.inherited(arguments);
+ dijit.setWaiState(this.domNode, "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.get('displayedValue');
+ var pw = this.dropDown;
+ 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.set('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.closeDropDown();
+ 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
+ // set('item', value)
+ // tags:
+ // private
+ if(!displayedValue){
+ // Use labelFunc() to get displayedValue. But it may return HTML so need to convert to plain text.
+ var label = this.labelFunc(item, this.store);
+ if(this.labelType == "html"){
+ var span = this._helperSpan;
+ span.innerHTML = label;
+ displayedValue = span.innerText || span.textContent;
+ }else{
+ displayedValue = label;
+ }
+ }
+ var value = this._getValueField() != this.searchAttr? this.store.getIdentity(item) : displayedValue;
+ this._set("item", item);
+ dijit.form.ComboBox.superclass._setValueAttr.call(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.dropDown.nextButton ||
+ node == this.dropDown.previousButton){
+ newValue = node.innerHTML;
+ this.item = undefined;
+ this.value = '';
+ }else{
+ newValue = node.innerText || node.textContent || "";
+ // newValue = this.store.getValue(node.item, this.searchAttr).toString();
+ this.set('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.closeDropDown();
+ this._setCaretPos(this.focusNode, this.focusNode.value.length);
+ dijit.form._FormValueWidget.prototype._setValueAttr.call(this, this.value, true); // set this.value and fire onChange
+ },
+
+ _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){
+ // summary:
+ // Starts a search for elements matching key (key=="" means to return all items),
+ // and calls _openResultList() when the search completes, to display the results.
+ if(!this.dropDown){
+ var popupId = this.id + "_popup",
+ dropDownConstructor = dojo.getObject(this.dropDownClass, false);
+ this.dropDown = new dropDownConstructor({
+ onChange: dojo.hitch(this, this._selectOption),
+ id: popupId,
+ dir: this.dir
+ });
+ 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);
+ _this.closeDropDown();
+ },
+ 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.focus();
+ };
+ this._nextSearch = this.dropDown.onPage = dojo.hitch(this, nextSearch, this._fetchHandle);
+ }, query, this), this.searchDelay);
+ },
+
+ _setMaxOptions: function(size, request){
+ this._maxOptions = size;
+ },
+
+ _getValueField: function(){
+ // summary:
+ // 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;
+ },
+
+ //////////// INITIALIZATION METHODS ///////////////////////////////////////
+
+ constructor: function(){
+ this.query={};
+ this.fetchProperties={};
+ },
+
+ postMixInProperties: function(){
+ 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(!("value" in this.params)){
+ var item = (this.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);
+ }
+ }
+ }
+
+ // used to convert HTML to plain text
+ this._helperSpan = dojo.create("span");
+
+ 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");
+ dijit.setWaiState(this.domNode, "labelledby", label[0].id);
+
+ }
+ this.inherited(arguments);
+ },
+
+ destroy: function(){
+ dojo.destroy(this._helperSpan);
+ this.inherited(arguments);
+ },
+
+ _setHasDownArrowAttr: function(val){
+ this.hasDownArrow = val;
+ this._buttonNode.style.display = val ? "" : "none";
+ },
+
+ _getMenuLabelFromItem: function(/*Item*/ item){
+ var label = this.labelFunc(item, this.store),
+ 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 occurrence found. Override this method
+ // to implement your custom highlighting.
+ // tags:
+ // protected
+
+ var
+ // Add (g)lobal modifier when this.highlightMatch == "all" and (i)gnorecase when this.ignoreCase == true
+ modifiers = (this.ignoreCase ? "i" : "") + (this.highlightMatch == "all" ? "g" : ""),
+ i = this.queryExpr.indexOf("${0}");
+ find = dojo.regexp.escapeString(find); // escape regexp special chars
+ return this._escapeHtml(label).replace(
+ // prepend ^ when this.queryExpr == "${0}*" and append $ when this.queryExpr == "*${0}"
+ new RegExp((i == 0 ? "^" : "") + "("+ find +")" + (i == (this.queryExpr.length - 4) ? "$" : ""), modifiers),
+ '<span class="dijitComboBoxHighlightMatch">$1</span>'
+ ); // 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, "&").replace(/</gm, "<")
+ .replace(/>/gm, ">").replace(/"/gm, """);
+ return str; // string
+ },
+
+ 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.labelAttr || this.searchAttr).toString(); // String
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form._ComboBoxMenu",
+ [dijit._Widget, dijit._Templated, dijit._CssStateMixin],
+ {
+ // 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' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"
+ +"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' role='option'></li>"
+ +"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' role='option'></li>"
+ +"</ul>",
+
+ // _messages: Object
+ // Holds "next" and "previous" text for paging buttons on drop down
+ _messages: null,
+
+ baseClass: "dijitComboBoxMenu",
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this._messages = dojo.i18n.getLocalization("dijit.form", "ComboBox", this.lang);
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ // fill in template with i18n messages
+ this.previousButton.innerHTML = this._messages["previousMessage"];
+ this.nextButton.innerHTML = this._messages["nextMessage"];
+ },
+
+ _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
+ },
+
+ 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 menuitem = dojo.create("li", {
+ "class": "dijitReset dijitMenuItem" +(this.isLeftToRight() ? "" : " dijitMenuItemRtl"),
+ role: "option"
+ });
+ var labelObject = labelFunc(item);
+ 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 = " ";
+ }
+ 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);
+ 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 && dataObject.count == results.length){
+ //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
+ 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]);
+ }
+ this._blurOptionNode();
+ },
+
+ _onMouseDown: function(/*Event*/ evt){
+ dojo.stopEvent(evt);
+ },
+
+ _onMouseUp: function(/*Event*/ evt){
+ if(evt.target === this.domNode || !this._highlighted_option){
+ // !this._highlighted_option check to prevent immediate selection when menu appears on top
+ // of <input>, see #9898. Note that _HasDropDown also has code to prevent this.
+ return;
+ }else if(evt.target == this.previousButton){
+ this._blurOptionNode();
+ this.onPage(-1);
+ }else if(evt.target == this.nextButton){
+ this._blurOptionNode();
+ 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.
+ if(!this.getHighlightedOption()){
+ var fc = this.domNode.firstChild;
+ 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);
+ }else{
+ this.highlightFirstOption();
+ }
+ }
+ // scrollIntoView is called outside of _focusOptionNode because in IE putting it inside causes the menu to scroll up on mouseover
+ dojo.window.scrollIntoView(this._highlighted_option);
+ },
+
+ highlightFirstOption: function(){
+ // summary:
+ // Highlight the first real item in the list (not Previous Choices).
+ var first = this.domNode.firstChild;
+ var second = first.nextSibling;
+ this._focusOptionNode(second.style.display == "none" ? first : second); // remotely possible that Previous Choices is the only thing in the list
+ dojo.window.scrollIntoView(this._highlighted_option);
+ },
+
+ highlightLastOption: function(){
+ // summary:
+ // Highlight the last real item in the list (not More Choices).
+ this._focusOptionNode(this.domNode.lastChild.previousSibling);
+ dojo.window.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).
+ if(!this.getHighlightedOption()){
+ var lc = this.domNode.lastChild;
+ 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);
+ }else{
+ this.highlightLastOption();
+ }
+ }
+ dojo.window.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(evt){
+ // summary:
+ // Handle keystroke event forwarded from ComboBox, returning false if it's
+ // a keystroke I recognize and process, true otherwise.
+ switch(evt.charOrCode){
+ case dojo.keys.DOWN_ARROW:
+ this._highlightNextOption();
+ return false;
+ case dojo.keys.PAGE_DOWN:
+ this.pageDown();
+ return false;
+ case dojo.keys.UP_ARROW:
+ this._highlightPrevOption();
+ return false;
+ case dojo.keys.PAGE_UP:
+ this.pageUp();
+ return false;
+ default:
+ return true;
+ }
+ }
+ }
+);
+
+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 set('value', value) works.
+ // description:
+ // Sets the value of the select.
+ this._set("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;
+ if(root.tagName != "SELECT" && root.firstChild){
+ root = dojo.query("select", root);
+ if(root.length > 0){ // SELECT is a child of srcNodeRef
+ root = root[0];
+ }else{ // no select, so create 1 to parent the option tags to define selectedIndex
+ this.root.innerHTML = "<SELECT>"+this.root.innerHTML+"</SELECT>";
+ root = this.root.firstChild;
+ }
+ 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 typeof si == "number"
+ ? dojo.query("> option:nth-child(" + (si != -1 ? si+1 : 1) + ")", root)[0]
+ : null; // dojo.data.Item
+ }
+});
+//Mix in the simple fetch implementation to this class.
+dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/ComboButton.js b/js/dojo-1.6/dijit/form/ComboButton.js new file mode 100644 index 0000000..1919aa4 --- /dev/null +++ b/js/dojo-1.6/dijit/form/ComboButton.js @@ -0,0 +1,15 @@ +/*
+ Copyright (c) 2004-2011, The 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.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");
+dojo.require("dijit.form.Button");
+
+
+
+}
diff --git a/js/dojo-1.6/dijit/form/ComboButton.xd.js b/js/dojo-1.6/dijit/form/ComboButton.xd.js new file mode 100644 index 0000000..49155db --- /dev/null +++ b/js/dojo-1.6/dijit/form/ComboButton.xd.js @@ -0,0 +1,20 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.ComboButton"],
+["require", "dijit.form.Button"]],
+defineResource: function(dojo, dijit, dojox){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");
+dojo.require("dijit.form.Button");
+
+
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/CurrencyTextBox.js b/js/dojo-1.6/dijit/form/CurrencyTextBox.js new file mode 100644 index 0000000..26308d2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/CurrencyTextBox.js @@ -0,0 +1,97 @@ +/*
+ Copyright (c) 2004-2011, The 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.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");
+dojo.require("dojo.currency");
+dojo.require("dijit.form.NumberTextBox");
+
+
+
+/*=====
+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,
+ {
+ // 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: [const] String
+ // the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
+ currency: "",
+
+ /*=====
+ // 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: {},
+ ======*/
+
+ baseClass: "dijitTextBox dijitCurrencyTextBox",
+
+ // 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,
+
+ _parser: dojo.currency.parse,
+
+ parse: function(/*String*/ value, /*Object*/ constraints){
+ // summary:
+ // Parses string value as a Currency, according to the constraints object
+ // tags:
+ // protected extension
+ var v = this.inherited(arguments);
+ if(isNaN(v) && /\d+/.test(value)){ // currency parse failed, but it could be because they are using NumberTextBox format so try its parse
+ v = dojo.hitch(dojo.mixin({}, this, { _parser: dijit.form.NumberTextBox.prototype._parser }), "inherited")(arguments);
+ }
+ return v;
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ if(!constraints.currency && this.currency){
+ constraints.currency = this.currency;
+ }
+ this.inherited(arguments, [ dojo.currency._mixInDefaults(dojo.mixin(constraints, { exponent: false })) ]); // get places
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/CurrencyTextBox.xd.js b/js/dojo-1.6/dijit/form/CurrencyTextBox.xd.js new file mode 100644 index 0000000..8efb623 --- /dev/null +++ b/js/dojo-1.6/dijit/form/CurrencyTextBox.xd.js @@ -0,0 +1,103 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.CurrencyTextBox"],
+["require", "dojo.currency"],
+["require", "dijit.form.NumberTextBox"]],
+defineResource: function(dojo, dijit, dojox){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");
+dojo.require("dojo.currency");
+dojo.require("dijit.form.NumberTextBox");
+
+
+
+/*=====
+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,
+ {
+ // 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: [const] String
+ // the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
+ currency: "",
+
+ /*=====
+ // 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: {},
+ ======*/
+
+ baseClass: "dijitTextBox dijitCurrencyTextBox",
+
+ // 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,
+
+ _parser: dojo.currency.parse,
+
+ parse: function(/*String*/ value, /*Object*/ constraints){
+ // summary:
+ // Parses string value as a Currency, according to the constraints object
+ // tags:
+ // protected extension
+ var v = this.inherited(arguments);
+ if(isNaN(v) && /\d+/.test(value)){ // currency parse failed, but it could be because they are using NumberTextBox format so try its parse
+ v = dojo.hitch(dojo.mixin({}, this, { _parser: dijit.form.NumberTextBox.prototype._parser }), "inherited")(arguments);
+ }
+ return v;
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ if(!constraints.currency && this.currency){
+ constraints.currency = this.currency;
+ }
+ this.inherited(arguments, [ dojo.currency._mixInDefaults(dojo.mixin(constraints, { exponent: false })) ]); // get places
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/DateTextBox.js b/js/dojo-1.6/dijit/form/DateTextBox.js new file mode 100644 index 0000000..74204d9 --- /dev/null +++ b/js/dojo-1.6/dijit/form/DateTextBox.js @@ -0,0 +1,41 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.Calendar");
+dojo.require("dijit.form._DateTimeTextBox");
+
+
+
+dojo.declare(
+ "dijit.form.DateTextBox",
+ 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 dijitComboBox 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`.
+ // set("value", ...) accepts either a Date object or a string.
+ value: new Date("") // value.toString()="NaN"
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/DateTextBox.xd.js b/js/dojo-1.6/dijit/form/DateTextBox.xd.js new file mode 100644 index 0000000..53b4110 --- /dev/null +++ b/js/dojo-1.6/dijit/form/DateTextBox.xd.js @@ -0,0 +1,47 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.DateTextBox"],
+["require", "dijit.Calendar"],
+["require", "dijit.form._DateTimeTextBox"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.Calendar");
+dojo.require("dijit.form._DateTimeTextBox");
+
+
+
+dojo.declare(
+ "dijit.form.DateTextBox",
+ 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 dijitComboBox 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`.
+ // set("value", ...) accepts either a Date object or a string.
+ value: new Date("") // value.toString()="NaN"
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/DropDownButton.js b/js/dojo-1.6/dijit/form/DropDownButton.js new file mode 100644 index 0000000..68203cb --- /dev/null +++ b/js/dojo-1.6/dijit/form/DropDownButton.js @@ -0,0 +1,15 @@ +/*
+ Copyright (c) 2004-2011, The 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.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");
+dojo.require("dijit.form.Button");
+
+
+
+}
diff --git a/js/dojo-1.6/dijit/form/DropDownButton.xd.js b/js/dojo-1.6/dijit/form/DropDownButton.xd.js new file mode 100644 index 0000000..6db39b1 --- /dev/null +++ b/js/dojo-1.6/dijit/form/DropDownButton.xd.js @@ -0,0 +1,20 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.DropDownButton"],
+["require", "dijit.form.Button"]],
+defineResource: function(dojo, dijit, dojox){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");
+dojo.require("dijit.form.Button");
+
+
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/FilteringSelect.js b/js/dojo-1.6/dijit/form/FilteringSelect.js new file mode 100644 index 0000000..a8759ea --- /dev/null +++ b/js/dojo-1.6/dijit/form/FilteringSelect.js @@ -0,0 +1,232 @@ +/*
+ Copyright (c) 2004-2011, The 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.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:
+ // 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)
+
+ // required: Boolean
+ // True (default) if user is required to enter a value into this field.
+ required: true,
+
+ _lastDisplayedValue: "",
+
+ _isValidSubset: function(){
+ return this._opened;
+ },
+
+ isValid: function(){
+ // Overrides ValidationTextBox.isValid()
+ return this.item || (!this.required && this.get('displayedValue') == ""); // #5974
+ },
+
+ _refreshState: function(){
+ if(!this.searchTimer){ // state will be refreshed after results are returned
+ this.inherited(arguments);
+ }
+ },
+
+ _callbackSetLabel: function(
+ /*Array*/ result,
+ /*Object*/ dataObject,
+ /*Boolean?*/ priorityChange){
+ // summary:
+ // Callback from dojo.data after lookup of user entered value finishes
+
+ // 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: don't modify display value 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._set("item", null);
+ this.validate(this._focused);
+ }else{
+ this.set('item', result[0], priorityChange);
+ }
+ },
+
+ _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
+ // Callback when a data store query completes.
+ // 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;
+ }
+ dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments);
+
+ if(this.item === undefined){ // item == undefined for keyboard search
+ // If the search returned no items that means that the user typed
+ // in something invalid (and they can't make it valid by typing more characters),
+ // so flag the FilteringSelect as being in an invalid state
+ this.validate(true);
+ }
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook for get('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 set('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? [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
+ // set('item', value)
+ // tags:
+ // private
+ 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 set('displayedValue', label) works.
+ // description:
+ // Sets textbox to display label. Also performs reverse lookup
+ // to set the hidden value.
+ //
+ // Doesn't work as expected when the FilteringSelect has a custom labelFunc(), since in that case
+ // it's impossible to do a reverse lookup (from label --> item) without a full data store scan.
+ // App must call set("displayedValue", ...) with the intended item.searchAttr, rather than
+ // labelFunc(item).
+
+ if(label == null){ label = ''; }
+
+ // This is called at initialization along with every custom setter.
+ // Usually (or always?) the call can be ignored. If it needs to be
+ // processed then at least make sure that the XHR request doesn't trigger an onChange()
+ // event, even if it returns after creation has finished
+ if(!this._created){
+ if(!("displayedValue" in this.params)){
+ return;
+ }
+ priorityChange = false;
+ }
+
+ // Do a reverse lookup to map the specified displayedValue to the hidden value.
+ // Note that if there's a custom labelFunc() this code
+ if(this.store){
+ this.closeDropDown();
+ 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.labelAttr || 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);
+ }
+ },
+
+ undo: function(){
+ this.set('displayedValue', this._lastDisplayedValue);
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/FilteringSelect.xd.js b/js/dojo-1.6/dijit/form/FilteringSelect.xd.js new file mode 100644 index 0000000..fee2a91 --- /dev/null +++ b/js/dojo-1.6/dijit/form/FilteringSelect.xd.js @@ -0,0 +1,237 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.FilteringSelect"],
+["require", "dijit.form.ComboBox"]],
+defineResource: function(dojo, dijit, dojox){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:
+ // 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)
+
+ // required: Boolean
+ // True (default) if user is required to enter a value into this field.
+ required: true,
+
+ _lastDisplayedValue: "",
+
+ _isValidSubset: function(){
+ return this._opened;
+ },
+
+ isValid: function(){
+ // Overrides ValidationTextBox.isValid()
+ return this.item || (!this.required && this.get('displayedValue') == ""); // #5974
+ },
+
+ _refreshState: function(){
+ if(!this.searchTimer){ // state will be refreshed after results are returned
+ this.inherited(arguments);
+ }
+ },
+
+ _callbackSetLabel: function(
+ /*Array*/ result,
+ /*Object*/ dataObject,
+ /*Boolean?*/ priorityChange){
+ // summary:
+ // Callback from dojo.data after lookup of user entered value finishes
+
+ // 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: don't modify display value 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._set("item", null);
+ this.validate(this._focused);
+ }else{
+ this.set('item', result[0], priorityChange);
+ }
+ },
+
+ _openResultList: function(/*Object*/ results, /*Object*/ dataObject){
+ // Callback when a data store query completes.
+ // 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;
+ }
+ dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments);
+
+ if(this.item === undefined){ // item == undefined for keyboard search
+ // If the search returned no items that means that the user typed
+ // in something invalid (and they can't make it valid by typing more characters),
+ // so flag the FilteringSelect as being in an invalid state
+ this.validate(true);
+ }
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook for get('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 set('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? [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
+ // set('item', value)
+ // tags:
+ // private
+ 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 set('displayedValue', label) works.
+ // description:
+ // Sets textbox to display label. Also performs reverse lookup
+ // to set the hidden value.
+ //
+ // Doesn't work as expected when the FilteringSelect has a custom labelFunc(), since in that case
+ // it's impossible to do a reverse lookup (from label --> item) without a full data store scan.
+ // App must call set("displayedValue", ...) with the intended item.searchAttr, rather than
+ // labelFunc(item).
+
+ if(label == null){ label = ''; }
+
+ // This is called at initialization along with every custom setter.
+ // Usually (or always?) the call can be ignored. If it needs to be
+ // processed then at least make sure that the XHR request doesn't trigger an onChange()
+ // event, even if it returns after creation has finished
+ if(!this._created){
+ if(!("displayedValue" in this.params)){
+ return;
+ }
+ priorityChange = false;
+ }
+
+ // Do a reverse lookup to map the specified displayedValue to the hidden value.
+ // Note that if there's a custom labelFunc() this code
+ if(this.store){
+ this.closeDropDown();
+ 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.labelAttr || 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);
+ }
+ },
+
+ undo: function(){
+ this.set('displayedValue', this._lastDisplayedValue);
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/Form.js b/js/dojo-1.6/dijit/form/Form.js new file mode 100644 index 0000000..662e676 --- /dev/null +++ b/js/dojo-1.6/dijit/form/Form.js @@ -0,0 +1,190 @@ +/*
+ Copyright (c) 2004-2011, The 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"]){ //_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.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.require("dijit.form._FormMixin");
+dojo.require("dijit.layout._ContentPaneResizeMixin");
+
+
+
+dojo.declare(
+ "dijit.form.Form",
+ [dijit._Widget, dijit._Templated, dijit.form._FormMixin, dijit.layout._ContentPaneResizeMixin],
+ {
+ // 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').set('value', myObj);
+ // |
+ // | myObj=dijit.byId('myForm').get('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: remove in 2.0, no longer necessary with data-dojo-params
+ if(dojo.isIE && this.srcNodeRef && this.srcNodeRef.attributes){
+ var item = this.srcNodeRef.attributes.getNamedItem('encType');
+ if(item && !item.specified && (typeof item.value == "string")){
+ this.set('encType', item.value);
+ }
+ }
+ this.inherited(arguments);
+ },
+
+ reset: function(/*Event?*/ e){
+ // summary:
+ // restores all widget values back to their init values,
+ // calls onReset() which can cancel the reset by returning false
+
+ // 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 ? e.target : this.domNode,
+ target: e ? e.target : this.domNode
+ };
+ // if return value is not exactly false, and haven't called preventDefault(), then reset
+ if(!(this.onReset(faux) === false) && faux.returnValue){
+ 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){
+ this.reset(e);
+ 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();
+ }
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/Form.xd.js b/js/dojo-1.6/dijit/form/Form.xd.js new file mode 100644 index 0000000..de626fe --- /dev/null +++ b/js/dojo-1.6/dijit/form/Form.xd.js @@ -0,0 +1,198 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.Form"],
+["require", "dijit._Widget"],
+["require", "dijit._Templated"],
+["require", "dijit.form._FormMixin"],
+["require", "dijit.layout._ContentPaneResizeMixin"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.require("dijit.form._FormMixin");
+dojo.require("dijit.layout._ContentPaneResizeMixin");
+
+
+
+dojo.declare(
+ "dijit.form.Form",
+ [dijit._Widget, dijit._Templated, dijit.form._FormMixin, dijit.layout._ContentPaneResizeMixin],
+ {
+ // 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').set('value', myObj);
+ // |
+ // | myObj=dijit.byId('myForm').get('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: remove in 2.0, no longer necessary with data-dojo-params
+ if(dojo.isIE && this.srcNodeRef && this.srcNodeRef.attributes){
+ var item = this.srcNodeRef.attributes.getNamedItem('encType');
+ if(item && !item.specified && (typeof item.value == "string")){
+ this.set('encType', item.value);
+ }
+ }
+ this.inherited(arguments);
+ },
+
+ reset: function(/*Event?*/ e){
+ // summary:
+ // restores all widget values back to their init values,
+ // calls onReset() which can cancel the reset by returning false
+
+ // 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 ? e.target : this.domNode,
+ target: e ? e.target : this.domNode
+ };
+ // if return value is not exactly false, and haven't called preventDefault(), then reset
+ if(!(this.onReset(faux) === false) && faux.returnValue){
+ 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){
+ this.reset(e);
+ 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();
+ }
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/HorizontalRule.js b/js/dojo-1.6/dijit/form/HorizontalRule.js new file mode 100644 index 0000000..c45df7a --- /dev/null +++ b/js/dojo-1.6/dijit/form/HorizontalRule.js @@ -0,0 +1,75 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit._Widget");
+dojo.require("dijit._Templated");
+
+
+
+dojo.declare("dijit.form.HorizontalRule", [dijit._Widget, dijit._Templated],
+{
+ // summary:
+ // Hash marks for `dijit.form.HorizontalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerH"></div>',
+
+ // count: Integer
+ // Number of hash marks to generate
+ count: 3,
+
+ // 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="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,
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ 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()){
+ 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{
+ 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;
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/HorizontalRule.xd.js b/js/dojo-1.6/dijit/form/HorizontalRule.xd.js new file mode 100644 index 0000000..6f0ed45 --- /dev/null +++ b/js/dojo-1.6/dijit/form/HorizontalRule.xd.js @@ -0,0 +1,81 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.HorizontalRule"],
+["require", "dijit._Widget"],
+["require", "dijit._Templated"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit._Widget");
+dojo.require("dijit._Templated");
+
+
+
+dojo.declare("dijit.form.HorizontalRule", [dijit._Widget, dijit._Templated],
+{
+ // summary:
+ // Hash marks for `dijit.form.HorizontalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerH"></div>',
+
+ // count: Integer
+ // Number of hash marks to generate
+ count: 3,
+
+ // 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="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,
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ 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()){
+ 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{
+ 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;
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/HorizontalRuleLabels.js b/js/dojo-1.6/dijit/form/HorizontalRuleLabels.js new file mode 100644 index 0000000..f1eff75 --- /dev/null +++ b/js/dojo-1.6/dijit/form/HorizontalRuleLabels.js @@ -0,0 +1,98 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.form.HorizontalRule");
+
+
+
+dojo.declare("dijit.form.HorizontalRuleLabels", dijit.form.HorizontalRule,
+{
+ // 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: 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
+ 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="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:',
+ _labelPrefix: '"><div class="dijitRuleLabel dijitRuleLabelH">',
+ _suffix: '</div></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:
+ // 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));
+ start += inc;
+ }
+ }
+ return labels;
+ },
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this.labels = this.getLabels();
+ this.count = this.labels.length;
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/HorizontalRuleLabels.xd.js b/js/dojo-1.6/dijit/form/HorizontalRuleLabels.xd.js new file mode 100644 index 0000000..901bc8b --- /dev/null +++ b/js/dojo-1.6/dijit/form/HorizontalRuleLabels.xd.js @@ -0,0 +1,103 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.HorizontalRuleLabels"],
+["require", "dijit.form.HorizontalRule"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form.HorizontalRule");
+
+
+
+dojo.declare("dijit.form.HorizontalRuleLabels", dijit.form.HorizontalRule,
+{
+ // 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: 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
+ 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="dijitRuleLabelContainer dijitRuleLabelContainerH" style="left:',
+ _labelPrefix: '"><div class="dijitRuleLabel dijitRuleLabelH">',
+ _suffix: '</div></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:
+ // 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));
+ start += inc;
+ }
+ }
+ return labels;
+ },
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this.labels = this.getLabels();
+ this.count = this.labels.length;
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/HorizontalSlider.js b/js/dojo-1.6/dijit/form/HorizontalSlider.js new file mode 100644 index 0000000..6831547 --- /dev/null +++ b/js/dojo-1.6/dijit/form/HorizontalSlider.js @@ -0,0 +1,344 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.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._FormValueWidget, dijit._Container],
+{
+ // 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 dijitSliderH\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"topDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconH\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${!nameAttrSetting}\r\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" role=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\"\r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" role=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"></div\r\n\t\t\t></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconH\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n></table>\r\n"),
+
+ // Overrides FormValueWidget.value to indicate numeric value
+ value: 0,
+
+ // showButtons: [const] Boolean
+ // Show increment/decrement buttons at the ends of the slider?
+ showButtons: true,
+
+ // minimum:: [const] Integer
+ // The minimum value the slider can be set to.
+ minimum: 0,
+
+ // maximum: [const] Integer
+ // The maximum value the slider can be set to.
+ maximum: 100,
+
+ // 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
+ // 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 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 (TODO: why is this here? I see no widgets in the template.)
+ widgetsInTemplate: true,
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ id: ""
+ }),
+
+ baseClass: "dijitSlider",
+
+ // Apply CSS classes to up/down arrows and handle per mouse state
+ cssStateNodes: {
+ incrementButton: "dijitSliderIncrementButton",
+ decrementButton: "dijitSliderDecrementButton",
+ focusNode: "dijitSliderThumb"
+ },
+
+ _mousePixelCoord: "pageX",
+ _pixelCount: "w",
+ _startingPixelCoord: "x",
+ _startingPixelCount: "l",
+ _handleOffsetCoord: "left",
+ _progressPixelSize: "width",
+
+ _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 || 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;
+ // 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 ((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){
+ // 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(){
+ // summary:
+ // Returns true if direction is from right to left
+ // tags:
+ // protected extension
+ return !this.isLeftToRight();
+ },
+
+ _onBarClick: function(e){
+ if(this.disabled || this.readOnly || !this.clickSelect){ return; }
+ dijit.focus(this.sliderHandle);
+ dojo.stopEvent(e);
+ var abspos = dojo.position(this.sliderBarContainer, true);
+ var pixelValue = e[this._mousePixelCoord] - abspos[this._startingPixelCoord];
+ this._setPixelValue(this._isReversed() ? (abspos[this._pixelCount] - pixelValue) : pixelValue, abspos[this._pixelCount], true);
+ this._movable.onMouseDown(e);
+ },
+
+ _setPixelValue: function(/*Number*/ pixelValue, /*Number*/ maxPixels, /*Boolean?*/ priorityChange){
+ 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._setValueAttr((this.maximum-this.minimum)*wholeIncrements/count + this.minimum, priorityChange);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so set('value', value) works.
+ this._set("value", value);
+ this.valueNode.value = value;
+ dijit.setWaiState(this.focusNode, "valuenow", value);
+ this.inherited(arguments);
+ var percent = (value - this.minimum) / (this.maximum - this.minimum);
+ 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?*/ 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._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 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(){
+ if(this._started){ return; }
+
+ dojo.forEach(this.getChildren(), function(child){
+ if(this[child.container] != this.containerNode){
+ this[child.container].appendChild(child.domNode);
+ }
+ }, this);
+
+ this.inherited(arguments);
+ },
+
+ _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);
+ }
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ if(this.showButtons){
+ this.incrementButton.style.display="";
+ this.decrementButton.style.display="";
+ }
+
+ // 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);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ if(this.showButtons){
+ 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 mover = dojo.declare(dijit.form._SliderMover, {
+ widget: this
+ });
+ this._movable = new dojo.dnd.Moveable(this.sliderHandle, {mover: mover});
+
+ this._layoutHackIE7();
+ },
+
+ destroy: function(){
+ this._movable.destroy();
+ 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 abspos = widget._abspos;
+ if(!abspos){
+ abspos = widget._abspos = dojo.position(widget.sliderBarContainer, true);
+ widget._setPixelValue_ = dojo.hitch(widget, "_setPixelValue");
+ widget._isReversed_ = widget._isReversed();
+ }
+ var coordEvent = e.touches ? e.touches[0] : e, // if multitouch take first touch for coords
+ pixelValue = coordEvent[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._abspos = null;
+ widget._setValueAttr(widget.value, true);
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/HorizontalSlider.xd.js b/js/dojo-1.6/dijit/form/HorizontalSlider.xd.js new file mode 100644 index 0000000..2857465 --- /dev/null +++ b/js/dojo-1.6/dijit/form/HorizontalSlider.xd.js @@ -0,0 +1,353 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.HorizontalSlider"],
+["require", "dijit.form._FormWidget"],
+["require", "dijit._Container"],
+["require", "dojo.dnd.move"],
+["require", "dijit.form.Button"],
+["require", "dojo.number"]],
+defineResource: function(dojo, dijit, dojox){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.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._FormValueWidget, dijit._Container],
+{
+ // 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 dijitSliderH\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"topDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconH\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${!nameAttrSetting}\r\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" role=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\"\r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" role=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"></div\r\n\t\t\t></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconH\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n></table>\r\n"),
+
+ // Overrides FormValueWidget.value to indicate numeric value
+ value: 0,
+
+ // showButtons: [const] Boolean
+ // Show increment/decrement buttons at the ends of the slider?
+ showButtons: true,
+
+ // minimum:: [const] Integer
+ // The minimum value the slider can be set to.
+ minimum: 0,
+
+ // maximum: [const] Integer
+ // The maximum value the slider can be set to.
+ maximum: 100,
+
+ // 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
+ // 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 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 (TODO: why is this here? I see no widgets in the template.)
+ widgetsInTemplate: true,
+
+ attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, {
+ id: ""
+ }),
+
+ baseClass: "dijitSlider",
+
+ // Apply CSS classes to up/down arrows and handle per mouse state
+ cssStateNodes: {
+ incrementButton: "dijitSliderIncrementButton",
+ decrementButton: "dijitSliderDecrementButton",
+ focusNode: "dijitSliderThumb"
+ },
+
+ _mousePixelCoord: "pageX",
+ _pixelCount: "w",
+ _startingPixelCoord: "x",
+ _startingPixelCount: "l",
+ _handleOffsetCoord: "left",
+ _progressPixelSize: "width",
+
+ _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 || 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;
+ // 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 ((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){
+ // 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(){
+ // summary:
+ // Returns true if direction is from right to left
+ // tags:
+ // protected extension
+ return !this.isLeftToRight();
+ },
+
+ _onBarClick: function(e){
+ if(this.disabled || this.readOnly || !this.clickSelect){ return; }
+ dijit.focus(this.sliderHandle);
+ dojo.stopEvent(e);
+ var abspos = dojo.position(this.sliderBarContainer, true);
+ var pixelValue = e[this._mousePixelCoord] - abspos[this._startingPixelCoord];
+ this._setPixelValue(this._isReversed() ? (abspos[this._pixelCount] - pixelValue) : pixelValue, abspos[this._pixelCount], true);
+ this._movable.onMouseDown(e);
+ },
+
+ _setPixelValue: function(/*Number*/ pixelValue, /*Number*/ maxPixels, /*Boolean?*/ priorityChange){
+ 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._setValueAttr((this.maximum-this.minimum)*wholeIncrements/count + this.minimum, priorityChange);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so set('value', value) works.
+ this._set("value", value);
+ this.valueNode.value = value;
+ dijit.setWaiState(this.focusNode, "valuenow", value);
+ this.inherited(arguments);
+ var percent = (value - this.minimum) / (this.maximum - this.minimum);
+ 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?*/ 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._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 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(){
+ if(this._started){ return; }
+
+ dojo.forEach(this.getChildren(), function(child){
+ if(this[child.container] != this.containerNode){
+ this[child.container].appendChild(child.domNode);
+ }
+ }, this);
+
+ this.inherited(arguments);
+ },
+
+ _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);
+ }
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ if(this.showButtons){
+ this.incrementButton.style.display="";
+ this.decrementButton.style.display="";
+ }
+
+ // 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);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ if(this.showButtons){
+ 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 mover = dojo.declare(dijit.form._SliderMover, {
+ widget: this
+ });
+ this._movable = new dojo.dnd.Moveable(this.sliderHandle, {mover: mover});
+
+ this._layoutHackIE7();
+ },
+
+ destroy: function(){
+ this._movable.destroy();
+ 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 abspos = widget._abspos;
+ if(!abspos){
+ abspos = widget._abspos = dojo.position(widget.sliderBarContainer, true);
+ widget._setPixelValue_ = dojo.hitch(widget, "_setPixelValue");
+ widget._isReversed_ = widget._isReversed();
+ }
+ var coordEvent = e.touches ? e.touches[0] : e, // if multitouch take first touch for coords
+ pixelValue = coordEvent[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._abspos = null;
+ widget._setValueAttr(widget.value, true);
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/MappedTextBox.js b/js/dojo-1.6/dijit/form/MappedTextBox.js new file mode 100644 index 0000000..040c5ab --- /dev/null +++ b/js/dojo-1.6/dijit/form/MappedTextBox.js @@ -0,0 +1,15 @@ +/*
+ Copyright (c) 2004-2011, The 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.MappedTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.MappedTextBox"] = true;
+dojo.provide("dijit.form.MappedTextBox");
+dojo.require("dijit.form.ValidationTextBox");
+
+
+
+}
diff --git a/js/dojo-1.6/dijit/form/MappedTextBox.xd.js b/js/dojo-1.6/dijit/form/MappedTextBox.xd.js new file mode 100644 index 0000000..cb5b444 --- /dev/null +++ b/js/dojo-1.6/dijit/form/MappedTextBox.xd.js @@ -0,0 +1,20 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.MappedTextBox"],
+["require", "dijit.form.ValidationTextBox"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dijit.form.MappedTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.MappedTextBox"] = true;
+dojo.provide("dijit.form.MappedTextBox");
+dojo.require("dijit.form.ValidationTextBox");
+
+
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/MultiSelect.js b/js/dojo-1.6/dijit/form/MultiSelect.js new file mode 100644 index 0000000..28b1a5a --- /dev/null +++ b/js/dojo-1.6/dijit/form/MultiSelect.js @@ -0,0 +1,120 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.form._FormWidget");
+
+
+
+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 get('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 set('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.get('value'), onChange == true);
+ },
+
+ _onChange: function(/*Event*/ e){
+ this._handleOnChange(this.get('value'), true);
+ },
+
+ // for layout widgets:
+ resize: function(/*Object*/ size){
+ if(size){
+ dojo.marginBox(this.domNode, size);
+ }
+ },
+
+ postCreate: function(){
+ this._onChange();
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/MultiSelect.xd.js b/js/dojo-1.6/dijit/form/MultiSelect.xd.js new file mode 100644 index 0000000..a580160 --- /dev/null +++ b/js/dojo-1.6/dijit/form/MultiSelect.xd.js @@ -0,0 +1,125 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.MultiSelect"],
+["require", "dijit.form._FormWidget"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form._FormWidget");
+
+
+
+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 get('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 set('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.get('value'), onChange == true);
+ },
+
+ _onChange: function(/*Event*/ e){
+ this._handleOnChange(this.get('value'), true);
+ },
+
+ // for layout widgets:
+ resize: function(/*Object*/ size){
+ if(size){
+ dojo.marginBox(this.domNode, size);
+ }
+ },
+
+ postCreate: function(){
+ this._onChange();
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/NumberSpinner.js b/js/dojo-1.6/dijit/form/NumberSpinner.js new file mode 100644 index 0000000..5d989f0 --- /dev/null +++ b/js/dojo-1.6/dijit/form/NumberSpinner.js @@ -0,0 +1,72 @@ +/*
+ Copyright (c) 2004-2011, The 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"]){ //_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.require("dijit.form._Spinner");
+dojo.require("dijit.form.NumberTextBox");
+
+
+
+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 increase 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;
+ },
+
+ _onKeyPress: function(e){
+ if((e.charOrCode == dojo.keys.HOME || e.charOrCode == dojo.keys.END) && !(e.ctrlKey || e.altKey || e.metaKey)
+ && typeof this.get('value') != 'undefined' /* gibberish, so HOME and END are default editing keys*/){
+ var value = this.constraints[(e.charOrCode == dojo.keys.HOME ? "min" : "max")];
+ if(typeof value == "number"){
+ this._setValueAttr(value, false);
+ }
+ // eat home or end key whether we change the value or not
+ dojo.stopEvent(e);
+ }
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/NumberSpinner.xd.js b/js/dojo-1.6/dijit/form/NumberSpinner.xd.js new file mode 100644 index 0000000..5f570d2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/NumberSpinner.xd.js @@ -0,0 +1,78 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.NumberSpinner"],
+["require", "dijit.form._Spinner"],
+["require", "dijit.form.NumberTextBox"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form._Spinner");
+dojo.require("dijit.form.NumberTextBox");
+
+
+
+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 increase 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;
+ },
+
+ _onKeyPress: function(e){
+ if((e.charOrCode == dojo.keys.HOME || e.charOrCode == dojo.keys.END) && !(e.ctrlKey || e.altKey || e.metaKey)
+ && typeof this.get('value') != 'undefined' /* gibberish, so HOME and END are default editing keys*/){
+ var value = this.constraints[(e.charOrCode == dojo.keys.HOME ? "min" : "max")];
+ if(typeof value == "number"){
+ this._setValueAttr(value, false);
+ }
+ // eat home or end key whether we change the value or not
+ dojo.stopEvent(e);
+ }
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/NumberTextBox.js b/js/dojo-1.6/dijit/form/NumberTextBox.js new file mode 100644 index 0000000..4632cfd --- /dev/null +++ b/js/dojo-1.6/dijit/form/NumberTextBox.js @@ -0,0 +1,279 @@ +/*
+ Copyright (c) 2004-2011, The 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"]){ //_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.require("dijit.form.ValidationTextBox");
+dojo.require("dojo.number");
+
+
+
+/*=====
+dojo.declare(
+ "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:
+ // | {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,
+
+ /*=====
+ // 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 (i.e., 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. get('value') returns undefined).
+ //
+ // Symmetrically, set('value', NaN) will clear the displayed value,
+ // whereas set('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,
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ var places = typeof constraints.places == "number"? constraints.places : 0;
+ if(places){ places++; } // decimal rounding errors take away another digit of precision
+ if(typeof constraints.max != "number"){
+ constraints.max = 9 * Math.pow(10, 15-places);
+ }
+ if(typeof constraints.min != "number"){
+ constraints.min = -9 * Math.pow(10, 15-places);
+ }
+ this.inherited(arguments, [ constraints ]);
+ if(this.focusNode && this.focusNode.value && !isNaN(this.value)){
+ this.set('value', this.value);
+ }
+ },
+
+ _onFocus: function(){
+ if(this.disabled){ return; }
+ var val = this.get('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
+
+ var formattedValue = String(value);
+ if(typeof value != "number"){ return formattedValue; }
+ if(isNaN(value)){ return ""; }
+ // check for exponential notation that dojo.number.format chokes on
+ if(!("rangeCheck" in this && this.rangeCheck(value, constraints)) && constraints.exponent !== false && /\de[-+]?\d/i.test(formattedValue)){
+ return formattedValue;
+ }
+ if(this.editOptions && this._focused){
+ constraints = dojo.mixin({}, constraints, this.editOptions);
+ }
+ return this._formatter(value, constraints);
+ },
+
+ /*=====
+ _parser: 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
+ },
+ =====*/
+ _parser: dojo.number.parse,
+
+ parse: function(/*String*/ value, /*dojo.number.__FormatOptions*/ constraints){
+ // summary:
+ // Replacable function to convert a formatted string to a number value
+ // tags:
+ // protected extension
+
+ var v = this._parser(value, dojo.mixin({}, constraints, (this.editOptions && this._focused) ? this.editOptions : {}));
+ if(this.editOptions && this._focused && isNaN(v)){
+ v = this._parser(value, constraints); // parse w/o editOptions: not technically needed but is nice for the user
+ }
+ return v;
+ },
+
+ _getDisplayedValueAttr: function(){
+ var v = this.inherited(arguments);
+ return isNaN(v) ? this.textbox.value : v;
+ },
+
+ filter: function(/*Number*/ value){
+ // 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); // set('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);
+ },
+
+ _setBlurValue: function(){
+ var val = dojo.hitch(dojo.mixin({}, this, { _focused: true }), "get")('value'); // parse with editOptions
+ this._setValueAttr(val, true);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Hook so set('value', ...) works.
+ if(value !== undefined && formattedValue === undefined){
+ formattedValue = String(value);
+ if(typeof value == "number"){
+ if(isNaN(value)){ formattedValue = '' }
+ // check for exponential notation that dojo.number.format chokes on
+ else if(("rangeCheck" in this && this.rangeCheck(value, this.constraints)) || this.constraints.exponent === false || !/\de[-+]?\d/i.test(formattedValue)){
+ formattedValue = undefined; // lets format comnpute a real string value
+ }
+ }else if(!value){ // 0 processed in if branch above, ''|null|undefined flow thru here
+ formattedValue = '';
+ value = NaN;
+ }else{ // non-numeric values
+ value = undefined;
+ }
+ }
+ this.inherited(arguments, [value, priorityChange, formattedValue]);
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so get('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.get('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",
+ [dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],
+ {
+ // summary:
+ // 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).
+
+ baseClass: "dijitTextBox dijitNumberTextBox"
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/NumberTextBox.xd.js b/js/dojo-1.6/dijit/form/NumberTextBox.xd.js new file mode 100644 index 0000000..b450e4c --- /dev/null +++ b/js/dojo-1.6/dijit/form/NumberTextBox.xd.js @@ -0,0 +1,285 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.NumberTextBox"],
+["require", "dijit.form.ValidationTextBox"],
+["require", "dojo.number"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form.ValidationTextBox");
+dojo.require("dojo.number");
+
+
+
+/*=====
+dojo.declare(
+ "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:
+ // | {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,
+
+ /*=====
+ // 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 (i.e., 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. get('value') returns undefined).
+ //
+ // Symmetrically, set('value', NaN) will clear the displayed value,
+ // whereas set('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,
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ var places = typeof constraints.places == "number"? constraints.places : 0;
+ if(places){ places++; } // decimal rounding errors take away another digit of precision
+ if(typeof constraints.max != "number"){
+ constraints.max = 9 * Math.pow(10, 15-places);
+ }
+ if(typeof constraints.min != "number"){
+ constraints.min = -9 * Math.pow(10, 15-places);
+ }
+ this.inherited(arguments, [ constraints ]);
+ if(this.focusNode && this.focusNode.value && !isNaN(this.value)){
+ this.set('value', this.value);
+ }
+ },
+
+ _onFocus: function(){
+ if(this.disabled){ return; }
+ var val = this.get('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
+
+ var formattedValue = String(value);
+ if(typeof value != "number"){ return formattedValue; }
+ if(isNaN(value)){ return ""; }
+ // check for exponential notation that dojo.number.format chokes on
+ if(!("rangeCheck" in this && this.rangeCheck(value, constraints)) && constraints.exponent !== false && /\de[-+]?\d/i.test(formattedValue)){
+ return formattedValue;
+ }
+ if(this.editOptions && this._focused){
+ constraints = dojo.mixin({}, constraints, this.editOptions);
+ }
+ return this._formatter(value, constraints);
+ },
+
+ /*=====
+ _parser: 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
+ },
+ =====*/
+ _parser: dojo.number.parse,
+
+ parse: function(/*String*/ value, /*dojo.number.__FormatOptions*/ constraints){
+ // summary:
+ // Replacable function to convert a formatted string to a number value
+ // tags:
+ // protected extension
+
+ var v = this._parser(value, dojo.mixin({}, constraints, (this.editOptions && this._focused) ? this.editOptions : {}));
+ if(this.editOptions && this._focused && isNaN(v)){
+ v = this._parser(value, constraints); // parse w/o editOptions: not technically needed but is nice for the user
+ }
+ return v;
+ },
+
+ _getDisplayedValueAttr: function(){
+ var v = this.inherited(arguments);
+ return isNaN(v) ? this.textbox.value : v;
+ },
+
+ filter: function(/*Number*/ value){
+ // 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); // set('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);
+ },
+
+ _setBlurValue: function(){
+ var val = dojo.hitch(dojo.mixin({}, this, { _focused: true }), "get")('value'); // parse with editOptions
+ this._setValueAttr(val, true);
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Hook so set('value', ...) works.
+ if(value !== undefined && formattedValue === undefined){
+ formattedValue = String(value);
+ if(typeof value == "number"){
+ if(isNaN(value)){ formattedValue = '' }
+ // check for exponential notation that dojo.number.format chokes on
+ else if(("rangeCheck" in this && this.rangeCheck(value, this.constraints)) || this.constraints.exponent === false || !/\de[-+]?\d/i.test(formattedValue)){
+ formattedValue = undefined; // lets format comnpute a real string value
+ }
+ }else if(!value){ // 0 processed in if branch above, ''|null|undefined flow thru here
+ formattedValue = '';
+ value = NaN;
+ }else{ // non-numeric values
+ value = undefined;
+ }
+ }
+ this.inherited(arguments, [value, priorityChange, formattedValue]);
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so get('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.get('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",
+ [dijit.form.RangeBoundTextBox,dijit.form.NumberTextBoxMixin],
+ {
+ // summary:
+ // 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).
+
+ baseClass: "dijitTextBox dijitNumberTextBox"
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/RadioButton.js b/js/dojo-1.6/dijit/form/RadioButton.js new file mode 100644 index 0000000..3216886 --- /dev/null +++ b/js/dojo-1.6/dijit/form/RadioButton.js @@ -0,0 +1,17 @@ +/*
+ Copyright (c) 2004-2011, The 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.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");
+dojo.require("dijit.form.CheckBox");
+
+
+
+// TODO: for 2.0, move the RadioButton code into this file
+
+}
diff --git a/js/dojo-1.6/dijit/form/RadioButton.xd.js b/js/dojo-1.6/dijit/form/RadioButton.xd.js new file mode 100644 index 0000000..d62d93d --- /dev/null +++ b/js/dojo-1.6/dijit/form/RadioButton.xd.js @@ -0,0 +1,22 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.RadioButton"],
+["require", "dijit.form.CheckBox"]],
+defineResource: function(dojo, dijit, dojox){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");
+dojo.require("dijit.form.CheckBox");
+
+
+
+// TODO: for 2.0, move the RadioButton code into this file
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/RangeBoundTextBox.js b/js/dojo-1.6/dijit/form/RangeBoundTextBox.js new file mode 100644 index 0000000..3959bf5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/RangeBoundTextBox.js @@ -0,0 +1,15 @@ +/*
+ Copyright (c) 2004-2011, The 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.RangeBoundTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.RangeBoundTextBox"] = true;
+dojo.provide("dijit.form.RangeBoundTextBox");
+dojo.require("dijit.form.ValidationTextBox");
+
+
+
+}
diff --git a/js/dojo-1.6/dijit/form/RangeBoundTextBox.xd.js b/js/dojo-1.6/dijit/form/RangeBoundTextBox.xd.js new file mode 100644 index 0000000..e5fec64 --- /dev/null +++ b/js/dojo-1.6/dijit/form/RangeBoundTextBox.xd.js @@ -0,0 +1,20 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.RangeBoundTextBox"],
+["require", "dijit.form.ValidationTextBox"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dijit.form.RangeBoundTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.RangeBoundTextBox"] = true;
+dojo.provide("dijit.form.RangeBoundTextBox");
+dojo.require("dijit.form.ValidationTextBox");
+
+
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/Select.js b/js/dojo-1.6/dijit/form/Select.js new file mode 100644 index 0000000..89a3c9b --- /dev/null +++ b/js/dojo-1.6/dijit/form/Select.js @@ -0,0 +1,306 @@ +/*
+ Copyright (c) 2004-2011, The 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.Select"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.Select"] = true;
+dojo.provide("dijit.form.Select");
+dojo.require("dijit.form._FormSelectWidget");
+dojo.require("dijit._HasDropDown");
+dojo.require("dijit.Menu");
+dojo.require("dijit.Tooltip");
+dojo.requireLocalization("dijit.form", "validate", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
+
+
+
+dojo.declare("dijit.form._SelectMenu", dijit.Menu, {
+ // summary:
+ // An internally-used menu for dropdown that allows us a vertical scrollbar
+ buildRendering: function(){
+ // summary:
+ // Stub in our own changes, so that our domNode is not a table
+ // otherwise, we won't respond correctly to heights/overflows
+ this.inherited(arguments);
+ var o = (this.menuTableNode = this.domNode);
+ var n = (this.domNode = dojo.create("div", {style: {overflowX: "hidden", overflowY: "scroll"}}));
+ if(o.parentNode){
+ o.parentNode.replaceChild(n, o);
+ }
+ dojo.removeClass(o, "dijitMenuTable");
+ n.className = o.className + " dijitSelectMenu";
+ o.className = "dijitReset dijitMenuTable";
+ dijit.setWaiRole(o,"listbox");
+ dijit.setWaiRole(n,"presentation");
+ n.appendChild(o);
+ },
+
+ postCreate: function(){
+ // summary:
+ // stop mousemove from selecting text on IE to be consistent with other browsers
+
+ this.inherited(arguments);
+
+ this.connect(this.domNode, "onmousemove", dojo.stopEvent);
+ },
+
+ resize: function(/*Object*/ mb){
+ // summary:
+ // Overridden so that we are able to handle resizing our
+ // internal widget. Note that this is not a "full" resize
+ // implementation - it only works correctly if you pass it a
+ // marginBox.
+ //
+ // mb: Object
+ // The margin box to set this dropdown to.
+ if(mb){
+ dojo.marginBox(this.domNode, mb);
+ if("w" in mb){
+ // We've explicitly set the wrapper <div>'s width, so set <table> width to match.
+ // 100% is safer than a pixel value because there may be a scroll bar with
+ // browser/OS specific width.
+ this.menuTableNode.style.width = "100%";
+ }
+ }
+ }
+});
+
+dojo.declare("dijit.form.Select", [dijit.form._FormSelectWidget, dijit._HasDropDown], {
+ // summary:
+ // This is a "styleable" select box - it is basically a DropDownButton which
+ // can take a <select> as its input.
+
+ baseClass: "dijitSelect",
+
+ templateString: dojo.cache("dijit.form", "templates/Select.html", "<table class=\"dijit dijitReset dijitInline dijitLeft\"\r\n\tdojoAttachPoint=\"_buttonNode,tableNode,focusNode\" cellspacing='0' cellpadding='0'\r\n\trole=\"combobox\" aria-haspopup=\"true\"\r\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\" role=\"presentation\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\" dojoAttachPoint=\"containerNode,_popupStateNode\"></span\r\n\t\t\t><input type=\"hidden\" ${!nameAttrSetting} dojoAttachPoint=\"valueNode\" value=\"${value}\" aria-hidden=\"true\"\r\n\t\t/></td><td class=\"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton\"\r\n\t\t\t\tdojoAttachPoint=\"titleNode\" role=\"presentation\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">▼</div\r\n\t\t></td\r\n\t></tr></tbody\r\n></table>\r\n"),
+
+ // attributeMap: Object
+ // Add in our style to be applied to the focus node
+ attributeMap: dojo.mixin(dojo.clone(dijit.form._FormSelectWidget.prototype.attributeMap),{style:"tableNode"}),
+
+ // required: Boolean
+ // Can be true or false, default is false.
+ required: false,
+
+ // state: String
+ // Shows current state (ie, validation result) of input (Normal, Warning, or Error)
+ state: "",
+
+ // message: String
+ // Currently displayed error/prompt message
+ message: "",
+
+ // tooltipPosition: String[]
+ // See description of dijit.Tooltip.defaultPosition for details on this parameter.
+ tooltipPosition: [],
+
+ // emptyLabel: string
+ // What to display in an "empty" dropdown
+ emptyLabel: " ",
+
+ // _isLoaded: Boolean
+ // Whether or not we have been loaded
+ _isLoaded: false,
+
+ // _childrenLoaded: Boolean
+ // Whether or not our children have been loaded
+ _childrenLoaded: false,
+
+ _fillContent: function(){
+ // summary:
+ // Set the value to be the first, or the selected index
+ this.inherited(arguments);
+ // set value from selected option
+ if(this.options.length && !this.value && this.srcNodeRef){
+ var si = this.srcNodeRef.selectedIndex || 0; // || 0 needed for when srcNodeRef is not a SELECT
+ this.value = this.options[si >= 0 ? si : 0].value;
+ }
+ // Create the dropDown widget
+ this.dropDown = new dijit.form._SelectMenu({id: this.id + "_menu"});
+ dojo.addClass(this.dropDown.domNode, this.baseClass + "Menu");
+ },
+
+ _getMenuItemForOption: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // For the given option, return the menu item that should be
+ // used to display it. This can be overridden as needed
+ if(!option.value && !option.label){
+ // We are a separator (no label set for it)
+ return new dijit.MenuSeparator();
+ }else{
+ // Just a regular menu option
+ var click = dojo.hitch(this, "_setValueAttr", option);
+ var item = new dijit.MenuItem({
+ option: option,
+ label: option.label || this.emptyLabel,
+ onClick: click,
+ disabled: option.disabled || false
+ });
+ dijit.setWaiRole(item.focusNode, "listitem");
+ return item;
+ }
+ },
+
+ _addOptionItem: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // For the given option, add an option to our dropdown.
+ // If the option doesn't have a value, then a separator is added
+ // in that place.
+ if(this.dropDown){
+ this.dropDown.addChild(this._getMenuItemForOption(option));
+ }
+ },
+
+ _getChildren: function(){
+ if(!this.dropDown){
+ return [];
+ }
+ return this.dropDown.getChildren();
+ },
+
+ _loadChildren: function(/*Boolean*/ loadMenuItems){
+ // summary:
+ // Resets the menu and the length attribute of the button - and
+ // ensures that the label is appropriately set.
+ // loadMenuItems: Boolean
+ // actually loads the child menu items - we only do this when we are
+ // populating for showing the dropdown.
+
+ if(loadMenuItems === true){
+ // this.inherited destroys this.dropDown's child widgets (MenuItems).
+ // Avoid this.dropDown (Menu widget) having a pointer to a destroyed widget (which will cause
+ // issues later in _setSelected). (see #10296)
+ if(this.dropDown){
+ delete this.dropDown.focusedChild;
+ }
+ if(this.options.length){
+ this.inherited(arguments);
+ }else{
+ // Drop down menu is blank but add one blank entry just so something appears on the screen
+ // to let users know that they are no choices (mimicing native select behavior)
+ dojo.forEach(this._getChildren(), function(child){ child.destroyRecursive(); });
+ var item = new dijit.MenuItem({label: " "});
+ this.dropDown.addChild(item);
+ }
+ }else{
+ this._updateSelection();
+ }
+
+ this._isLoaded = false;
+ this._childrenLoaded = true;
+
+ if(!this._loadingStore){
+ // Don't call this if we are loading - since we will handle it later
+ this._setValueAttr(this.value);
+ }
+ },
+
+ _setValueAttr: function(value){
+ this.inherited(arguments);
+ dojo.attr(this.valueNode, "value", this.get("value"));
+ },
+
+ _setDisplay: function(/*String*/ newDisplay){
+ // summary:
+ // sets the display for the given value (or values)
+ var lbl = newDisplay || this.emptyLabel;
+ this.containerNode.innerHTML = '<span class="dijitReset dijitInline ' + this.baseClass + 'Label">' + lbl + '</span>';
+ dijit.setWaiState(this.focusNode, "valuetext", lbl);
+ },
+
+ validate: function(/*Boolean*/ isFocused){
+ // summary:
+ // Called by oninit, onblur, and onkeypress.
+ // description:
+ // Show missing or invalid messages if appropriate, and highlight textbox field.
+ // Used when a select is initially set to no value and the user is required to
+ // set the value.
+
+ var isValid = this.isValid(isFocused);
+ this._set("state", isValid ? "" : "Error");
+ dijit.setWaiState(this.focusNode, "invalid", isValid ? "false" : "true");
+ var message = isValid ? "" : this._missingMsg;
+ if(this.message !== message){
+ this._set("message", message);
+ dijit.hideTooltip(this.domNode);
+ if(message){
+ dijit.showTooltip(message, this.domNode, this.tooltipPosition, !this.isLeftToRight());
+ }
+ }
+ return isValid;
+ },
+
+ isValid: function(/*Boolean*/ isFocused){
+ // summary:
+ // Whether or not this is a valid value. The only way a Select
+ // can be invalid is when it's required but nothing is selected.
+ return (!this.required || this.value === 0 || !(/^\s*$/.test(this.value || ""))); // handle value is null or undefined
+ },
+
+ reset: function(){
+ // summary:
+ // Overridden so that the state will be cleared.
+ this.inherited(arguments);
+ dijit.hideTooltip(this.domNode);
+ this._set("state", "");
+ this._set("message", "")
+ },
+
+ postMixInProperties: function(){
+ // summary:
+ // set the missing message
+ this.inherited(arguments);
+ this._missingMsg = dojo.i18n.getLocalization("dijit.form", "validate",
+ this.lang).missingMessage;
+ },
+
+ postCreate: function(){
+ // summary:
+ // stop mousemove from selecting text on IE to be consistent with other browsers
+
+ this.inherited(arguments);
+
+ this.connect(this.domNode, "onmousemove", dojo.stopEvent);
+ },
+
+ _setStyleAttr: function(/*String||Object*/ value){
+ this.inherited(arguments);
+ dojo.toggleClass(this.domNode, this.baseClass + "FixedWidth", !!this.tableNode.style.width);
+ },
+
+ isLoaded: function(){
+ return this._isLoaded;
+ },
+
+ loadDropDown: function(/*Function*/ loadCallback){
+ // summary:
+ // populates the menu
+ this._loadChildren(true);
+ this._isLoaded = true;
+ loadCallback();
+ },
+
+ closeDropDown: function(){
+ // overriding _HasDropDown.closeDropDown()
+ this.inherited(arguments);
+
+ if(this.dropDown && this.dropDown.menuTableNode){
+ // Erase possible width: 100% setting from _SelectMenu.resize().
+ // Leaving it would interfere with the next openDropDown() call, which
+ // queries the natural size of the drop down.
+ this.dropDown.menuTableNode.style.width = "";
+ }
+ },
+
+ uninitialize: function(preserveDom){
+ if(this.dropDown && !this.dropDown._destroyed){
+ this.dropDown.destroyRecursive(preserveDom);
+ delete this.dropDown;
+ }
+ this.inherited(arguments);
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/Select.xd.js b/js/dojo-1.6/dijit/form/Select.xd.js new file mode 100644 index 0000000..a24ecbb --- /dev/null +++ b/js/dojo-1.6/dijit/form/Select.xd.js @@ -0,0 +1,315 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.Select"],
+["require", "dijit.form._FormSelectWidget"],
+["require", "dijit._HasDropDown"],
+["require", "dijit.Menu"],
+["require", "dijit.Tooltip"],
+["requireLocalization", "dijit.form", "validate", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw", "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dijit.form.Select"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form.Select"] = true;
+dojo.provide("dijit.form.Select");
+dojo.require("dijit.form._FormSelectWidget");
+dojo.require("dijit._HasDropDown");
+dojo.require("dijit.Menu");
+dojo.require("dijit.Tooltip");
+;
+
+
+
+dojo.declare("dijit.form._SelectMenu", dijit.Menu, {
+ // summary:
+ // An internally-used menu for dropdown that allows us a vertical scrollbar
+ buildRendering: function(){
+ // summary:
+ // Stub in our own changes, so that our domNode is not a table
+ // otherwise, we won't respond correctly to heights/overflows
+ this.inherited(arguments);
+ var o = (this.menuTableNode = this.domNode);
+ var n = (this.domNode = dojo.create("div", {style: {overflowX: "hidden", overflowY: "scroll"}}));
+ if(o.parentNode){
+ o.parentNode.replaceChild(n, o);
+ }
+ dojo.removeClass(o, "dijitMenuTable");
+ n.className = o.className + " dijitSelectMenu";
+ o.className = "dijitReset dijitMenuTable";
+ dijit.setWaiRole(o,"listbox");
+ dijit.setWaiRole(n,"presentation");
+ n.appendChild(o);
+ },
+
+ postCreate: function(){
+ // summary:
+ // stop mousemove from selecting text on IE to be consistent with other browsers
+
+ this.inherited(arguments);
+
+ this.connect(this.domNode, "onmousemove", dojo.stopEvent);
+ },
+
+ resize: function(/*Object*/ mb){
+ // summary:
+ // Overridden so that we are able to handle resizing our
+ // internal widget. Note that this is not a "full" resize
+ // implementation - it only works correctly if you pass it a
+ // marginBox.
+ //
+ // mb: Object
+ // The margin box to set this dropdown to.
+ if(mb){
+ dojo.marginBox(this.domNode, mb);
+ if("w" in mb){
+ // We've explicitly set the wrapper <div>'s width, so set <table> width to match.
+ // 100% is safer than a pixel value because there may be a scroll bar with
+ // browser/OS specific width.
+ this.menuTableNode.style.width = "100%";
+ }
+ }
+ }
+});
+
+dojo.declare("dijit.form.Select", [dijit.form._FormSelectWidget, dijit._HasDropDown], {
+ // summary:
+ // This is a "styleable" select box - it is basically a DropDownButton which
+ // can take a <select> as its input.
+
+ baseClass: "dijitSelect",
+
+ templateString: dojo.cache("dijit.form", "templates/Select.html", "<table class=\"dijit dijitReset dijitInline dijitLeft\"\r\n\tdojoAttachPoint=\"_buttonNode,tableNode,focusNode\" cellspacing='0' cellpadding='0'\r\n\trole=\"combobox\" aria-haspopup=\"true\"\r\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\" role=\"presentation\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\" dojoAttachPoint=\"containerNode,_popupStateNode\"></span\r\n\t\t\t><input type=\"hidden\" ${!nameAttrSetting} dojoAttachPoint=\"valueNode\" value=\"${value}\" aria-hidden=\"true\"\r\n\t\t/></td><td class=\"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton\"\r\n\t\t\t\tdojoAttachPoint=\"titleNode\" role=\"presentation\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">▼</div\r\n\t\t></td\r\n\t></tr></tbody\r\n></table>\r\n"),
+
+ // attributeMap: Object
+ // Add in our style to be applied to the focus node
+ attributeMap: dojo.mixin(dojo.clone(dijit.form._FormSelectWidget.prototype.attributeMap),{style:"tableNode"}),
+
+ // required: Boolean
+ // Can be true or false, default is false.
+ required: false,
+
+ // state: String
+ // Shows current state (ie, validation result) of input (Normal, Warning, or Error)
+ state: "",
+
+ // message: String
+ // Currently displayed error/prompt message
+ message: "",
+
+ // tooltipPosition: String[]
+ // See description of dijit.Tooltip.defaultPosition for details on this parameter.
+ tooltipPosition: [],
+
+ // emptyLabel: string
+ // What to display in an "empty" dropdown
+ emptyLabel: " ",
+
+ // _isLoaded: Boolean
+ // Whether or not we have been loaded
+ _isLoaded: false,
+
+ // _childrenLoaded: Boolean
+ // Whether or not our children have been loaded
+ _childrenLoaded: false,
+
+ _fillContent: function(){
+ // summary:
+ // Set the value to be the first, or the selected index
+ this.inherited(arguments);
+ // set value from selected option
+ if(this.options.length && !this.value && this.srcNodeRef){
+ var si = this.srcNodeRef.selectedIndex || 0; // || 0 needed for when srcNodeRef is not a SELECT
+ this.value = this.options[si >= 0 ? si : 0].value;
+ }
+ // Create the dropDown widget
+ this.dropDown = new dijit.form._SelectMenu({id: this.id + "_menu"});
+ dojo.addClass(this.dropDown.domNode, this.baseClass + "Menu");
+ },
+
+ _getMenuItemForOption: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // For the given option, return the menu item that should be
+ // used to display it. This can be overridden as needed
+ if(!option.value && !option.label){
+ // We are a separator (no label set for it)
+ return new dijit.MenuSeparator();
+ }else{
+ // Just a regular menu option
+ var click = dojo.hitch(this, "_setValueAttr", option);
+ var item = new dijit.MenuItem({
+ option: option,
+ label: option.label || this.emptyLabel,
+ onClick: click,
+ disabled: option.disabled || false
+ });
+ dijit.setWaiRole(item.focusNode, "listitem");
+ return item;
+ }
+ },
+
+ _addOptionItem: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // For the given option, add an option to our dropdown.
+ // If the option doesn't have a value, then a separator is added
+ // in that place.
+ if(this.dropDown){
+ this.dropDown.addChild(this._getMenuItemForOption(option));
+ }
+ },
+
+ _getChildren: function(){
+ if(!this.dropDown){
+ return [];
+ }
+ return this.dropDown.getChildren();
+ },
+
+ _loadChildren: function(/*Boolean*/ loadMenuItems){
+ // summary:
+ // Resets the menu and the length attribute of the button - and
+ // ensures that the label is appropriately set.
+ // loadMenuItems: Boolean
+ // actually loads the child menu items - we only do this when we are
+ // populating for showing the dropdown.
+
+ if(loadMenuItems === true){
+ // this.inherited destroys this.dropDown's child widgets (MenuItems).
+ // Avoid this.dropDown (Menu widget) having a pointer to a destroyed widget (which will cause
+ // issues later in _setSelected). (see #10296)
+ if(this.dropDown){
+ delete this.dropDown.focusedChild;
+ }
+ if(this.options.length){
+ this.inherited(arguments);
+ }else{
+ // Drop down menu is blank but add one blank entry just so something appears on the screen
+ // to let users know that they are no choices (mimicing native select behavior)
+ dojo.forEach(this._getChildren(), function(child){ child.destroyRecursive(); });
+ var item = new dijit.MenuItem({label: " "});
+ this.dropDown.addChild(item);
+ }
+ }else{
+ this._updateSelection();
+ }
+
+ this._isLoaded = false;
+ this._childrenLoaded = true;
+
+ if(!this._loadingStore){
+ // Don't call this if we are loading - since we will handle it later
+ this._setValueAttr(this.value);
+ }
+ },
+
+ _setValueAttr: function(value){
+ this.inherited(arguments);
+ dojo.attr(this.valueNode, "value", this.get("value"));
+ },
+
+ _setDisplay: function(/*String*/ newDisplay){
+ // summary:
+ // sets the display for the given value (or values)
+ var lbl = newDisplay || this.emptyLabel;
+ this.containerNode.innerHTML = '<span class="dijitReset dijitInline ' + this.baseClass + 'Label">' + lbl + '</span>';
+ dijit.setWaiState(this.focusNode, "valuetext", lbl);
+ },
+
+ validate: function(/*Boolean*/ isFocused){
+ // summary:
+ // Called by oninit, onblur, and onkeypress.
+ // description:
+ // Show missing or invalid messages if appropriate, and highlight textbox field.
+ // Used when a select is initially set to no value and the user is required to
+ // set the value.
+
+ var isValid = this.isValid(isFocused);
+ this._set("state", isValid ? "" : "Error");
+ dijit.setWaiState(this.focusNode, "invalid", isValid ? "false" : "true");
+ var message = isValid ? "" : this._missingMsg;
+ if(this.message !== message){
+ this._set("message", message);
+ dijit.hideTooltip(this.domNode);
+ if(message){
+ dijit.showTooltip(message, this.domNode, this.tooltipPosition, !this.isLeftToRight());
+ }
+ }
+ return isValid;
+ },
+
+ isValid: function(/*Boolean*/ isFocused){
+ // summary:
+ // Whether or not this is a valid value. The only way a Select
+ // can be invalid is when it's required but nothing is selected.
+ return (!this.required || this.value === 0 || !(/^\s*$/.test(this.value || ""))); // handle value is null or undefined
+ },
+
+ reset: function(){
+ // summary:
+ // Overridden so that the state will be cleared.
+ this.inherited(arguments);
+ dijit.hideTooltip(this.domNode);
+ this._set("state", "");
+ this._set("message", "")
+ },
+
+ postMixInProperties: function(){
+ // summary:
+ // set the missing message
+ this.inherited(arguments);
+ this._missingMsg = dojo.i18n.getLocalization("dijit.form", "validate",
+ this.lang).missingMessage;
+ },
+
+ postCreate: function(){
+ // summary:
+ // stop mousemove from selecting text on IE to be consistent with other browsers
+
+ this.inherited(arguments);
+
+ this.connect(this.domNode, "onmousemove", dojo.stopEvent);
+ },
+
+ _setStyleAttr: function(/*String||Object*/ value){
+ this.inherited(arguments);
+ dojo.toggleClass(this.domNode, this.baseClass + "FixedWidth", !!this.tableNode.style.width);
+ },
+
+ isLoaded: function(){
+ return this._isLoaded;
+ },
+
+ loadDropDown: function(/*Function*/ loadCallback){
+ // summary:
+ // populates the menu
+ this._loadChildren(true);
+ this._isLoaded = true;
+ loadCallback();
+ },
+
+ closeDropDown: function(){
+ // overriding _HasDropDown.closeDropDown()
+ this.inherited(arguments);
+
+ if(this.dropDown && this.dropDown.menuTableNode){
+ // Erase possible width: 100% setting from _SelectMenu.resize().
+ // Leaving it would interfere with the next openDropDown() call, which
+ // queries the natural size of the drop down.
+ this.dropDown.menuTableNode.style.width = "";
+ }
+ },
+
+ uninitialize: function(preserveDom){
+ if(this.dropDown && !this.dropDown._destroyed){
+ this.dropDown.destroyRecursive(preserveDom);
+ delete this.dropDown;
+ }
+ this.inherited(arguments);
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/SimpleTextarea.js b/js/dojo-1.6/dijit/form/SimpleTextarea.js new file mode 100644 index 0000000..9d14d1d --- /dev/null +++ b/js/dojo-1.6/dijit/form/SimpleTextarea.js @@ -0,0 +1,104 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.form.TextBox");
+
+
+
+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: "dijitTextBox 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)
+ // TODO: parser will handle this in 2.0
+ if(!this.value && this.srcNodeRef){
+ this.value = this.srcNodeRef.value;
+ }
+ this.inherited(arguments);
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ if(dojo.isIE && this.cols){ // attribute selectors is not supported in IE6
+ dojo.addClass(this.textbox, "dijitTextAreaCols");
+ }
+ },
+
+ 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);
+ },
+
+ _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);
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/SimpleTextarea.xd.js b/js/dojo-1.6/dijit/form/SimpleTextarea.xd.js new file mode 100644 index 0000000..5df0dcf --- /dev/null +++ b/js/dojo-1.6/dijit/form/SimpleTextarea.xd.js @@ -0,0 +1,109 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.SimpleTextarea"],
+["require", "dijit.form.TextBox"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form.TextBox");
+
+
+
+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: "dijitTextBox 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)
+ // TODO: parser will handle this in 2.0
+ if(!this.value && this.srcNodeRef){
+ this.value = this.srcNodeRef.value;
+ }
+ this.inherited(arguments);
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ if(dojo.isIE && this.cols){ // attribute selectors is not supported in IE6
+ dojo.addClass(this.textbox, "dijitTextAreaCols");
+ }
+ },
+
+ 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);
+ },
+
+ _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);
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/Slider.js b/js/dojo-1.6/dijit/form/Slider.js new file mode 100644 index 0000000..cb5187a --- /dev/null +++ b/js/dojo-1.6/dijit/form/Slider.js @@ -0,0 +1,24 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.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");
+
+
+
+dojo.deprecated("Call require() for HorizontalSlider / VerticalRule, explicitly rather than 'dijit.form.Slider' itself", "", "2.0");
+
+// For back-compat, remove for 2.0
+
+}
diff --git a/js/dojo-1.6/dijit/form/Slider.xd.js b/js/dojo-1.6/dijit/form/Slider.xd.js new file mode 100644 index 0000000..f5bbb0d --- /dev/null +++ b/js/dojo-1.6/dijit/form/Slider.xd.js @@ -0,0 +1,34 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.Slider"],
+["require", "dijit.form.HorizontalSlider"],
+["require", "dijit.form.VerticalSlider"],
+["require", "dijit.form.HorizontalRule"],
+["require", "dijit.form.VerticalRule"],
+["require", "dijit.form.HorizontalRuleLabels"],
+["require", "dijit.form.VerticalRuleLabels"]],
+defineResource: function(dojo, dijit, dojox){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.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");
+
+
+
+dojo.deprecated("Call require() for HorizontalSlider / VerticalRule, explicitly rather than 'dijit.form.Slider' itself", "", "2.0");
+
+// For back-compat, remove for 2.0
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/TextBox.js b/js/dojo-1.6/dijit/form/TextBox.js new file mode 100644 index 0000000..f1f1c0a --- /dev/null +++ b/js/dojo-1.6/dijit/form/TextBox.js @@ -0,0 +1,428 @@ +/*
+ Copyright (c) 2004-2011, The 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.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._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
+ // 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: "",
+
+ // selectOnClick: [const] Boolean
+ // If true, all text will be selected when focused with mouse
+ selectOnClick: false,
+
+ // placeHolder: String
+ // Defines a hint to help users fill out the input field (as defined in HTML 5).
+ // This should only contain plain text (no html markup).
+ placeHolder: "",
+
+ templateString: dojo.cache("dijit.form", "templates/TextBox.html", "<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" role=\"presentation\"\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class=\"dijitReset dijitInputInner\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\r\n\t\t\t${!nameAttrSetting} type='${type}'\r\n\t/></div\r\n></div>\r\n"),
+ _singleNodeTemplate: '<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
+
+ _buttonInputDisabled: dojo.isIE ? "disabled" : "", // allows IE to disallow focus, but Firefox cannot be disabled for mousedown events
+
+ baseClass: "dijitTextBox",
+
+ attributeMap: dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap, {
+ maxLength: "focusNode"
+ }),
+
+ postMixInProperties: function(){
+ var type = this.type.toLowerCase();
+ if(this.templateString && this.templateString.toLowerCase() == "input" || ((type == "hidden" || type == "file") && this.templateString == dijit.form.TextBox.prototype.templateString)){
+ this.templateString = this._singleNodeTemplate;
+ }
+ this.inherited(arguments);
+ },
+
+ _setPlaceHolderAttr: function(v){
+ this._set("placeHolder", v);
+ if(!this._phspan){
+ this._attachPoints.push('_phspan');
+ /* dijitInputField class gives placeHolder same padding as the input field
+ * parent node already has dijitInputField class but it doesn't affect this <span>
+ * since it's position: absolute.
+ */
+ this._phspan = dojo.create('span',{className:'dijitPlaceHolder dijitInputField'},this.textbox,'after');
+ }
+ this._phspan.innerHTML="";
+ this._phspan.appendChild(document.createTextNode(v));
+
+ this._updatePlaceHolder();
+ },
+
+ _updatePlaceHolder: function(){
+ if(this._phspan){
+ this._phspan.style.display=(this.placeHolder&&!this._focused&&!this.textbox.value)?"":"none";
+ }
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so get('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.get('displayedValue'), this.constraints);
+ },
+
+ _setValueAttr: function(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Hook so set('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._set("displayedValue", this.get("displayedValue"));
+ }
+
+ this._updatePlaceHolder();
+
+ 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 set('displayedValue', ...)
+ // updates 'value', and vice-versa. Otherwise '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 get('displayedValue') instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.", "", "2.0");
+ return this.get('displayedValue');
+ },
+
+ _getDisplayedValueAttr: function(){
+ // summary:
+ // Hook so get('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)
+
+ // TODO: maybe we should update this.displayedValue on every keystroke so that we don't need
+ // this method
+ // TODO: this isn't really the displayed value when the user is typing
+ return this.filter(this.textbox.value);
+ },
+
+ setDisplayedValue: function(/*String*/ value){
+ // summary:
+ // Deprecated. Use set('displayedValue', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.", "", "2.0");
+ this.set('displayedValue', value);
+ },
+
+ _setDisplayedValueAttr: function(/*String*/ value){
+ // summary:
+ // Hook so set('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;
+
+ // sets the serialized value to something corresponding to specified displayedValue
+ // (if possible), and also updates the textbox.value, for example converting "123"
+ // to "123.00"
+ this._setValueAttr(this.get('value'), undefined);
+
+ this._set("displayedValue", this.get('displayedValue'));
+ },
+
+ format: function(/*String*/ value, /*Object*/ constraints){
+ // 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
+ // 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.get('value'), false); }, 0);
+ }
+ this._refreshState();
+
+ // In case someone is watch()'ing for changes to displayedValue
+ this._set("displayedValue", this.get("displayedValue"));
+ },
+
+ postCreate: function(){
+ if(dojo.isIE){ // IE INPUT tag fontFamily has to be set directly using STYLE
+ // the setTimeout gives IE a chance to render the TextBox and to deal with font inheritance
+ setTimeout(dojo.hitch(this, function(){
+ var s = dojo.getComputedStyle(this.domNode);
+ if(s){
+ var ff = s.fontFamily;
+ if(ff){
+ var inputs = this.domNode.getElementsByTagName("INPUT");
+ if(inputs){
+ for(var i=0; i < inputs.length; i++){
+ inputs[i].style.fontFamily = ff;
+ }
+ }
+ }
+ }
+ }), 0);
+ }
+
+ // 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.textbox.value); // DOM and JS values should be the same
+
+ this.inherited(arguments);
+
+ if(dojo.isMoz || dojo.isOpera){
+ this.connect(this.textbox, "oninput", "_onInput");
+ }else{
+ this.connect(this.textbox, "onkeydown", "_onInput");
+ this.connect(this.textbox, "onkeyup", "_onInput");
+ this.connect(this.textbox, "onpaste", "_onInput");
+ this.connect(this.textbox, "oncut", "_onInput");
+ }
+ },
+
+ _blankValue: '', // if the textbox is blank, what value should be reported
+ filter: function(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 set('value', ...)
+ // and get('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;
+ },
+
+ _setBlurValue: function(){
+ this._setValueAttr(this.get('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
+ }
+
+ this._updatePlaceHolder();
+ },
+
+ _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 widget 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._updatePlaceHolder();
+
+ // call this.inherited() before refreshState(), since this.inherited() will possibly scroll the viewport
+ // (to scroll the TextBox into view), which will affect how _refreshState() positions the tooltip
+ this.inherited(arguments);
+
+ this._refreshState();
+ },
+
+ 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 r = element.createTextRange();
+ r.collapse(true);
+ r.moveStart("character", -99999); // move to 0
+ r.moveStart("character", start); // delta from 0 is the correct position
+ r.moveEnd("character", stop-start);
+ r.select();
+ }
+ }else if(_window["getSelection"]){
+ if(element.setSelectionRange){
+ element.setSelectionRange(start, stop);
+ }
+ }
+};
+
+}
diff --git a/js/dojo-1.6/dijit/form/TextBox.xd.js b/js/dojo-1.6/dijit/form/TextBox.xd.js new file mode 100644 index 0000000..479b7c3 --- /dev/null +++ b/js/dojo-1.6/dijit/form/TextBox.xd.js @@ -0,0 +1,433 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.TextBox"],
+["require", "dijit.form._FormWidget"]],
+defineResource: function(dojo, dijit, dojox){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._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
+ // 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: "",
+
+ // selectOnClick: [const] Boolean
+ // If true, all text will be selected when focused with mouse
+ selectOnClick: false,
+
+ // placeHolder: String
+ // Defines a hint to help users fill out the input field (as defined in HTML 5).
+ // This should only contain plain text (no html markup).
+ placeHolder: "",
+
+ templateString: dojo.cache("dijit.form", "templates/TextBox.html", "<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" role=\"presentation\"\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class=\"dijitReset dijitInputInner\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\r\n\t\t\t${!nameAttrSetting} type='${type}'\r\n\t/></div\r\n></div>\r\n"),
+ _singleNodeTemplate: '<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
+
+ _buttonInputDisabled: dojo.isIE ? "disabled" : "", // allows IE to disallow focus, but Firefox cannot be disabled for mousedown events
+
+ baseClass: "dijitTextBox",
+
+ attributeMap: dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap, {
+ maxLength: "focusNode"
+ }),
+
+ postMixInProperties: function(){
+ var type = this.type.toLowerCase();
+ if(this.templateString && this.templateString.toLowerCase() == "input" || ((type == "hidden" || type == "file") && this.templateString == dijit.form.TextBox.prototype.templateString)){
+ this.templateString = this._singleNodeTemplate;
+ }
+ this.inherited(arguments);
+ },
+
+ _setPlaceHolderAttr: function(v){
+ this._set("placeHolder", v);
+ if(!this._phspan){
+ this._attachPoints.push('_phspan');
+ /* dijitInputField class gives placeHolder same padding as the input field
+ * parent node already has dijitInputField class but it doesn't affect this <span>
+ * since it's position: absolute.
+ */
+ this._phspan = dojo.create('span',{className:'dijitPlaceHolder dijitInputField'},this.textbox,'after');
+ }
+ this._phspan.innerHTML="";
+ this._phspan.appendChild(document.createTextNode(v));
+
+ this._updatePlaceHolder();
+ },
+
+ _updatePlaceHolder: function(){
+ if(this._phspan){
+ this._phspan.style.display=(this.placeHolder&&!this._focused&&!this.textbox.value)?"":"none";
+ }
+ },
+
+ _getValueAttr: function(){
+ // summary:
+ // Hook so get('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.get('displayedValue'), this.constraints);
+ },
+
+ _setValueAttr: function(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Hook so set('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._set("displayedValue", this.get("displayedValue"));
+ }
+
+ this._updatePlaceHolder();
+
+ 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 set('displayedValue', ...)
+ // updates 'value', and vice-versa. Otherwise '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 get('displayedValue') instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.", "", "2.0");
+ return this.get('displayedValue');
+ },
+
+ _getDisplayedValueAttr: function(){
+ // summary:
+ // Hook so get('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)
+
+ // TODO: maybe we should update this.displayedValue on every keystroke so that we don't need
+ // this method
+ // TODO: this isn't really the displayed value when the user is typing
+ return this.filter(this.textbox.value);
+ },
+
+ setDisplayedValue: function(/*String*/ value){
+ // summary:
+ // Deprecated. Use set('displayedValue', ...) instead.
+ // tags:
+ // deprecated
+ dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.", "", "2.0");
+ this.set('displayedValue', value);
+ },
+
+ _setDisplayedValueAttr: function(/*String*/ value){
+ // summary:
+ // Hook so set('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;
+
+ // sets the serialized value to something corresponding to specified displayedValue
+ // (if possible), and also updates the textbox.value, for example converting "123"
+ // to "123.00"
+ this._setValueAttr(this.get('value'), undefined);
+
+ this._set("displayedValue", this.get('displayedValue'));
+ },
+
+ format: function(/*String*/ value, /*Object*/ constraints){
+ // 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
+ // 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.get('value'), false); }, 0);
+ }
+ this._refreshState();
+
+ // In case someone is watch()'ing for changes to displayedValue
+ this._set("displayedValue", this.get("displayedValue"));
+ },
+
+ postCreate: function(){
+ if(dojo.isIE){ // IE INPUT tag fontFamily has to be set directly using STYLE
+ // the setTimeout gives IE a chance to render the TextBox and to deal with font inheritance
+ setTimeout(dojo.hitch(this, function(){
+ var s = dojo.getComputedStyle(this.domNode);
+ if(s){
+ var ff = s.fontFamily;
+ if(ff){
+ var inputs = this.domNode.getElementsByTagName("INPUT");
+ if(inputs){
+ for(var i=0; i < inputs.length; i++){
+ inputs[i].style.fontFamily = ff;
+ }
+ }
+ }
+ }
+ }), 0);
+ }
+
+ // 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.textbox.value); // DOM and JS values should be the same
+
+ this.inherited(arguments);
+
+ if(dojo.isMoz || dojo.isOpera){
+ this.connect(this.textbox, "oninput", "_onInput");
+ }else{
+ this.connect(this.textbox, "onkeydown", "_onInput");
+ this.connect(this.textbox, "onkeyup", "_onInput");
+ this.connect(this.textbox, "onpaste", "_onInput");
+ this.connect(this.textbox, "oncut", "_onInput");
+ }
+ },
+
+ _blankValue: '', // if the textbox is blank, what value should be reported
+ filter: function(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 set('value', ...)
+ // and get('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;
+ },
+
+ _setBlurValue: function(){
+ this._setValueAttr(this.get('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
+ }
+
+ this._updatePlaceHolder();
+ },
+
+ _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 widget 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._updatePlaceHolder();
+
+ // call this.inherited() before refreshState(), since this.inherited() will possibly scroll the viewport
+ // (to scroll the TextBox into view), which will affect how _refreshState() positions the tooltip
+ this.inherited(arguments);
+
+ this._refreshState();
+ },
+
+ 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 r = element.createTextRange();
+ r.collapse(true);
+ r.moveStart("character", -99999); // move to 0
+ r.moveStart("character", start); // delta from 0 is the correct position
+ r.moveEnd("character", stop-start);
+ r.select();
+ }
+ }else if(_window["getSelection"]){
+ if(element.setSelectionRange){
+ element.setSelectionRange(start, stop);
+ }
+ }
+};
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/Textarea.js b/js/dojo-1.6/dijit/form/Textarea.js new file mode 100644 index 0000000..e7ba2d5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/Textarea.js @@ -0,0 +1,168 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.SimpleTextarea");
+
+
+
+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>
+
+
+ // TODO: for 2.0, rename this to ExpandingTextArea, and rename SimpleTextarea to Textarea
+
+ baseClass: "dijitTextBox dijitTextArea dijitExpandingTextArea",
+
+ // 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){
+ newH += dojo._getBorderExtents(textarea).h;
+ }else{ // Opera 9.6 (TODO: test if this is still needed)
+ 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();
+ },
+
+ buildRendering: 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' });
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ this.connect(this.textbox, "onscroll", "_onInput");
+ this.connect(this.textbox, "onresize", "_onInput");
+ this.connect(this.textbox, "onfocus", "_onInput"); // useful when a previous estimate was off a bit
+ this._setTimeoutHandle = setTimeout(dojo.hitch(this, "resize"), 0);
+ },
+
+ uninitialize: function(){
+ if(this._setTimeoutHandle){
+ clearTimeout(this._setTimeoutHandle);
+ }
+ this.inherited(arguments);
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/Textarea.xd.js b/js/dojo-1.6/dijit/form/Textarea.xd.js new file mode 100644 index 0000000..097188c --- /dev/null +++ b/js/dojo-1.6/dijit/form/Textarea.xd.js @@ -0,0 +1,173 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.Textarea"],
+["require", "dijit.form.SimpleTextarea"]],
+defineResource: function(dojo, dijit, dojox){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.SimpleTextarea");
+
+
+
+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>
+
+
+ // TODO: for 2.0, rename this to ExpandingTextArea, and rename SimpleTextarea to Textarea
+
+ baseClass: "dijitTextBox dijitTextArea dijitExpandingTextArea",
+
+ // 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){
+ newH += dojo._getBorderExtents(textarea).h;
+ }else{ // Opera 9.6 (TODO: test if this is still needed)
+ 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();
+ },
+
+ buildRendering: 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' });
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ this.connect(this.textbox, "onscroll", "_onInput");
+ this.connect(this.textbox, "onresize", "_onInput");
+ this.connect(this.textbox, "onfocus", "_onInput"); // useful when a previous estimate was off a bit
+ this._setTimeoutHandle = setTimeout(dojo.hitch(this, "resize"), 0);
+ },
+
+ uninitialize: function(){
+ if(this._setTimeoutHandle){
+ clearTimeout(this._setTimeoutHandle);
+ }
+ this.inherited(arguments);
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/TimeTextBox.js b/js/dojo-1.6/dijit/form/TimeTextBox.js new file mode 100644 index 0000000..68bf21e --- /dev/null +++ b/js/dojo-1.6/dijit/form/TimeTextBox.js @@ -0,0 +1,88 @@ +/*
+ Copyright (c) 2004-2011, The 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.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("dijit._TimePicker");
+dojo.require("dijit.form._DateTimeTextBox");
+
+
+
+/*=====
+dojo.declare(
+ "dijit.form.TimeTextBox.__Constraints",
+ [dijit.form._DateTimeTextBox.__Constraints, dijit._TimePicker.__Constraints]
+);
+=====*/
+
+dojo.declare(
+ "dijit.form.TimeTextBox",
+ dijit.form._DateTimeTextBox,
+ {
+ // summary:
+ // A validating, serializable, range-bound time text box with a drop down time picker
+
+ baseClass: "dijitTextBox dijitComboBox dijitTimeTextBox",
+ popupClass: "dijit._TimePicker",
+ _selector: "time",
+
+/*=====
+ // constraints: dijit.form.TimeTextBox.__Constraints
+ constraints:{},
+=====*/
+
+ // value: Date
+ // The value of this widget as a JavaScript Date object. Note that the date portion implies time zone and daylight savings rules.
+ //
+ // Example:
+ // | new dijit.form.TimeTextBox({value: dojo.date.stamp.fromISOString("T12:59:59", new Date())})
+ //
+ // When passed to the parser in markup, must be specified according to locale-independent
+ // `dojo.date.stamp.fromISOString` format.
+ //
+ // Example:
+ // | <input dojotype='dijit.form.TimeTextBox' value='T12:34:00'>
+ value: new Date(""), // value.toString()="NaN"
+ //FIXME: in markup, you have no control over daylight savings
+
+ _onKey: function(evt){
+ this.inherited(arguments);
+
+ // If the user has backspaced or typed some numbers, then filter the result list
+ // by what they typed. Maybe there's a better way to detect this, like _handleOnChange()?
+ switch(evt.keyCode){
+ case dojo.keys.ENTER:
+ case dojo.keys.TAB:
+ case dojo.keys.ESCAPE:
+ case dojo.keys.DOWN_ARROW:
+ case dojo.keys.UP_ARROW:
+ // these keys have special meaning
+ break;
+ default:
+ // setTimeout() because the keystroke hasn't yet appeared in the <input>,
+ // so the get('displayedValue') call below won't give the result we want.
+ setTimeout(dojo.hitch(this, function(){
+ // set this.filterString to the filter to apply to the drop down list;
+ // it will be used in openDropDown()
+ var val = this.get('displayedValue');
+ this.filterString = (val && !this.parse(val, this.constraints)) ? val.toLowerCase() : "";
+
+ // close the drop down and reopen it, in order to filter the items shown in the list
+ // and also since the drop down may need to be repositioned if the number of list items has changed
+ // and it's being displayed above the <input>
+ if(this._opened){
+ this.closeDropDown();
+ }
+ this.openDropDown();
+ }), 0);
+ }
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/TimeTextBox.xd.js b/js/dojo-1.6/dijit/form/TimeTextBox.xd.js new file mode 100644 index 0000000..c149e95 --- /dev/null +++ b/js/dojo-1.6/dijit/form/TimeTextBox.xd.js @@ -0,0 +1,94 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.TimeTextBox"],
+["require", "dijit._TimePicker"],
+["require", "dijit.form._DateTimeTextBox"]],
+defineResource: function(dojo, dijit, dojox){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("dijit._TimePicker");
+dojo.require("dijit.form._DateTimeTextBox");
+
+
+
+/*=====
+dojo.declare(
+ "dijit.form.TimeTextBox.__Constraints",
+ [dijit.form._DateTimeTextBox.__Constraints, dijit._TimePicker.__Constraints]
+);
+=====*/
+
+dojo.declare(
+ "dijit.form.TimeTextBox",
+ dijit.form._DateTimeTextBox,
+ {
+ // summary:
+ // A validating, serializable, range-bound time text box with a drop down time picker
+
+ baseClass: "dijitTextBox dijitComboBox dijitTimeTextBox",
+ popupClass: "dijit._TimePicker",
+ _selector: "time",
+
+/*=====
+ // constraints: dijit.form.TimeTextBox.__Constraints
+ constraints:{},
+=====*/
+
+ // value: Date
+ // The value of this widget as a JavaScript Date object. Note that the date portion implies time zone and daylight savings rules.
+ //
+ // Example:
+ // | new dijit.form.TimeTextBox({value: dojo.date.stamp.fromISOString("T12:59:59", new Date())})
+ //
+ // When passed to the parser in markup, must be specified according to locale-independent
+ // `dojo.date.stamp.fromISOString` format.
+ //
+ // Example:
+ // | <input dojotype='dijit.form.TimeTextBox' value='T12:34:00'>
+ value: new Date(""), // value.toString()="NaN"
+ //FIXME: in markup, you have no control over daylight savings
+
+ _onKey: function(evt){
+ this.inherited(arguments);
+
+ // If the user has backspaced or typed some numbers, then filter the result list
+ // by what they typed. Maybe there's a better way to detect this, like _handleOnChange()?
+ switch(evt.keyCode){
+ case dojo.keys.ENTER:
+ case dojo.keys.TAB:
+ case dojo.keys.ESCAPE:
+ case dojo.keys.DOWN_ARROW:
+ case dojo.keys.UP_ARROW:
+ // these keys have special meaning
+ break;
+ default:
+ // setTimeout() because the keystroke hasn't yet appeared in the <input>,
+ // so the get('displayedValue') call below won't give the result we want.
+ setTimeout(dojo.hitch(this, function(){
+ // set this.filterString to the filter to apply to the drop down list;
+ // it will be used in openDropDown()
+ var val = this.get('displayedValue');
+ this.filterString = (val && !this.parse(val, this.constraints)) ? val.toLowerCase() : "";
+
+ // close the drop down and reopen it, in order to filter the items shown in the list
+ // and also since the drop down may need to be repositioned if the number of list items has changed
+ // and it's being displayed above the <input>
+ if(this._opened){
+ this.closeDropDown();
+ }
+ this.openDropDown();
+ }), 0);
+ }
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/ToggleButton.js b/js/dojo-1.6/dijit/form/ToggleButton.js new file mode 100644 index 0000000..f8deafc --- /dev/null +++ b/js/dojo-1.6/dijit/form/ToggleButton.js @@ -0,0 +1,15 @@ +/*
+ Copyright (c) 2004-2011, The 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.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");
+dojo.require("dijit.form.Button");
+
+
+
+}
diff --git a/js/dojo-1.6/dijit/form/ToggleButton.xd.js b/js/dojo-1.6/dijit/form/ToggleButton.xd.js new file mode 100644 index 0000000..0a2703c --- /dev/null +++ b/js/dojo-1.6/dijit/form/ToggleButton.xd.js @@ -0,0 +1,20 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.ToggleButton"],
+["require", "dijit.form.Button"]],
+defineResource: function(dojo, dijit, dojox){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");
+dojo.require("dijit.form.Button");
+
+
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/ValidationTextBox.js b/js/dojo-1.6/dijit/form/ValidationTextBox.js new file mode 100644 index 0000000..bf3e509 --- /dev/null +++ b/js/dojo-1.6/dijit/form/ValidationTextBox.js @@ -0,0 +1,487 @@ +/*
+ Copyright (c) 2004-2011, The 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"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+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, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
+
+
+
+/*=====
+ 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:
+ // 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\"\r\n\tid=\"widget_${id}\" role=\"presentation\"\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class=\"dijitReset dijitInputInner\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\r\n\t\t\t${!nameAttrSetting} type='${type}'\r\n\t/></div\r\n></div>\r\n"),
+ baseClass: "dijitTextBox dijitValidationTextBox",
+
+ // required: Boolean
+ // User is required to enter data into this field.
+ required: false,
+
+ // promptMessage: String
+ // If defined, display this hint string immediately on focus to the textbox, if empty.
+ // Also displays if the textbox value is Incomplete (not yet valid but will be with additional input).
+ // 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.
+ // The translated string value is read from the message file by default.
+ // Set to "" to use the promptMessage instead.
+ invalidMessage: "$_unset_$",
+
+ // missingMessage: String
+ // The message to display if value is empty and the field is required.
+ // The translated string value is read from the message file by default.
+ // Set to "" to use the invalidMessage instead.
+ missingMessage: "$_unset_$",
+
+ // message: String
+ // Currently error/prompt message.
+ // When using the default tooltip implementation, this will only be
+ // displayed when the field is focused.
+ message: "",
+
+ // constraints: dijit.form.ValidationTextBox.__Constraints
+ // user-defined object needed to pass parameters to the validator functions
+ constraints: {},
+
+ // regExp: [extension protected] String
+ // regular expression string used to validate the input
+ // Do not specify both regExp and regExpGen
+ regExp: ".*",
+
+ 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, Incomplete, or Error)
+ state: "",
+
+ // tooltipPosition: String[]
+ // See description of `dijit.Tooltip.defaultPosition` for details on this parameter.
+ tooltipPosition: [],
+
+ _setValueAttr: function(){
+ // summary:
+ // Hook so set('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) !== 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
+ return (this.trim ? /^\s*$/ : /^$/).test(value); // Boolean
+ },
+
+ getErrorMessage: function(/*Boolean*/ isFocused){
+ // summary:
+ // Return an error message to show if appropriate
+ // tags:
+ // protected
+ return (this.required && this._isEmpty(this.textbox.value)) ? this.missingMessage : 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.disabled || this.isValid(isFocused);
+ if(isValid){ this._maskValidSubsetError = true; }
+ var isEmpty = this._isEmpty(this.textbox.value);
+ var isValidSubset = !isValid && isFocused && this._isValidSubset();
+ this._set("state", isValid ? "" : (((((!this._hasBeenBlurred || isFocused) && isEmpty) || isValidSubset) && this._maskValidSubsetError) ? "Incomplete" : "Error"));
+ dijit.setWaiState(this.focusNode, "invalid", isValid ? "false" : "true");
+
+ if(this.state == "Error"){
+ this._maskValidSubsetError = isFocused && isValidSubset; // we want the error to show up after a blur and refocus
+ message = this.getErrorMessage(isFocused);
+ }else if(this.state == "Incomplete"){
+ message = this.getPromptMessage(isFocused); // show the prompt whenever the value is not yet complete
+ this._maskValidSubsetError = !this._hasBeenBlurred || isFocused; // no Incomplete warnings while focused
+ }else if(isEmpty){
+ message = this.getPromptMessage(isFocused); // show the prompt whenever there's no error and no text
+ }
+ this.set("message", message);
+
+ return isValid;
+ },
+
+ displayMessage: function(/*String*/ message){
+ // summary:
+ // Overridable method to display validation errors/hints.
+ // By default uses a tooltip.
+ // tags:
+ // extension
+ dijit.hideTooltip(this.domNode);
+ if(message && this._focused){
+ dijit.showTooltip(message, this.domNode, this.tooltipPosition, !this.isLeftToRight());
+ }
+ },
+
+ _refreshState: function(){
+ // Overrides TextBox._refreshState()
+ this.validate(this._focused);
+ this.inherited(arguments);
+ },
+
+ //////////// INITIALIZATION METHODS ///////////////////////////////////////
+
+ constructor: function(){
+ this.constraints = {};
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ if(!constraints.locale && this.lang){
+ constraints.locale = this.lang;
+ }
+ this._set("constraints", constraints);
+ this._computePartialRE();
+ },
+
+ _computePartialRE: function(){
+ var p = this.regExpGen(this.constraints);
+ this.regExp = p;
+ 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 + ")$";
+ },
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang);
+ if(this.invalidMessage == "$_unset_$"){ this.invalidMessage = this.messages.invalidMessage; }
+ if(!this.invalidMessage){ this.invalidMessage = this.promptMessage; }
+ if(this.missingMessage == "$_unset_$"){ this.missingMessage = this.messages.missingMessage; }
+ if(!this.missingMessage){ this.missingMessage = this.invalidMessage; }
+ this._setConstraintsAttr(this.constraints); // this needs to happen now (and later) due to codependency on _set*Attr calls attachPoints
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this.inherited(arguments); // call FormValueWidget._setDisabledAttr()
+ this._refreshState();
+ },
+
+ _setRequiredAttr: function(/*Boolean*/ value){
+ this._set("required", value);
+ dijit.setWaiState(this.focusNode, "required", value);
+ this._refreshState();
+ },
+
+ _setMessageAttr: function(/*String*/ message){
+ this._set("message", message);
+ this.displayMessage(message);
+ },
+
+ reset:function(){
+ // Overrides dijit.form.TextBox.reset() by also
+ // hiding errors about partial matches
+ this._maskValidSubsetError = true;
+ this.inherited(arguments);
+ },
+
+ _onBlur: function(){
+ // the message still exists but for back-compat, and to erase the tooltip
+ // (if the message is being displayed as a tooltip), call displayMessage('')
+ this.displayMessage('');
+
+ this.inherited(arguments);
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form.MappedTextBox",
+ dijit.form.ValidationTextBox,
+ {
+ // summary:
+ // 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 get('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:
+ // Returns widget as a printable string using the widget's value
+ // tags:
+ // protected
+ var val = this.filter(this.get('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();
+ 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.replace(/'/g, """) + "'" : "") + "/>", 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:
+ // 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: "",
+
+ /*=====
+ // 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.get('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.get('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.get('value');
+ if(v !== null && v !== '' && v !== undefined && (typeof v != "number" || !isNaN(v)) && !this.isInRange(isFocused)){ // don't check isInRange w/o a real value
+ return this.rangeMessage; // String
+ }
+ 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;
+ }
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ this.inherited(arguments);
+ if(this.focusNode){ // not set when called from postMixInProperties
+ if(this.constraints.min !== undefined){
+ dijit.setWaiState(this.focusNode, "valuemin", this.constraints.min);
+ }else{
+ dijit.removeWaiState(this.focusNode, "valuemin");
+ }
+ if(this.constraints.max !== undefined){
+ dijit.setWaiState(this.focusNode, "valuemax", this.constraints.max);
+ }else{
+ dijit.removeWaiState(this.focusNode, "valuemax");
+ }
+ }
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so set('value', ...) works.
+
+ dijit.setWaiState(this.focusNode, "valuenow", value);
+ this.inherited(arguments);
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/ValidationTextBox.xd.js b/js/dojo-1.6/dijit/form/ValidationTextBox.xd.js new file mode 100644 index 0000000..aaf8103 --- /dev/null +++ b/js/dojo-1.6/dijit/form/ValidationTextBox.xd.js @@ -0,0 +1,495 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.ValidationTextBox"],
+["require", "dojo.i18n"],
+["require", "dijit.form.TextBox"],
+["require", "dijit.Tooltip"],
+["requireLocalization", "dijit.form", "validate", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw", "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"]],
+defineResource: function(dojo, dijit, dojox){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");
+dojo.require("dojo.i18n");
+dojo.require("dijit.form.TextBox");
+dojo.require("dijit.Tooltip");
+;
+
+
+
+/*=====
+ 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:
+ // 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\"\r\n\tid=\"widget_${id}\" role=\"presentation\"\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class=\"dijitReset dijitInputInner\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\r\n\t\t\t${!nameAttrSetting} type='${type}'\r\n\t/></div\r\n></div>\r\n"),
+ baseClass: "dijitTextBox dijitValidationTextBox",
+
+ // required: Boolean
+ // User is required to enter data into this field.
+ required: false,
+
+ // promptMessage: String
+ // If defined, display this hint string immediately on focus to the textbox, if empty.
+ // Also displays if the textbox value is Incomplete (not yet valid but will be with additional input).
+ // 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.
+ // The translated string value is read from the message file by default.
+ // Set to "" to use the promptMessage instead.
+ invalidMessage: "$_unset_$",
+
+ // missingMessage: String
+ // The message to display if value is empty and the field is required.
+ // The translated string value is read from the message file by default.
+ // Set to "" to use the invalidMessage instead.
+ missingMessage: "$_unset_$",
+
+ // message: String
+ // Currently error/prompt message.
+ // When using the default tooltip implementation, this will only be
+ // displayed when the field is focused.
+ message: "",
+
+ // constraints: dijit.form.ValidationTextBox.__Constraints
+ // user-defined object needed to pass parameters to the validator functions
+ constraints: {},
+
+ // regExp: [extension protected] String
+ // regular expression string used to validate the input
+ // Do not specify both regExp and regExpGen
+ regExp: ".*",
+
+ 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, Incomplete, or Error)
+ state: "",
+
+ // tooltipPosition: String[]
+ // See description of `dijit.Tooltip.defaultPosition` for details on this parameter.
+ tooltipPosition: [],
+
+ _setValueAttr: function(){
+ // summary:
+ // Hook so set('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) !== 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
+ return (this.trim ? /^\s*$/ : /^$/).test(value); // Boolean
+ },
+
+ getErrorMessage: function(/*Boolean*/ isFocused){
+ // summary:
+ // Return an error message to show if appropriate
+ // tags:
+ // protected
+ return (this.required && this._isEmpty(this.textbox.value)) ? this.missingMessage : 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.disabled || this.isValid(isFocused);
+ if(isValid){ this._maskValidSubsetError = true; }
+ var isEmpty = this._isEmpty(this.textbox.value);
+ var isValidSubset = !isValid && isFocused && this._isValidSubset();
+ this._set("state", isValid ? "" : (((((!this._hasBeenBlurred || isFocused) && isEmpty) || isValidSubset) && this._maskValidSubsetError) ? "Incomplete" : "Error"));
+ dijit.setWaiState(this.focusNode, "invalid", isValid ? "false" : "true");
+
+ if(this.state == "Error"){
+ this._maskValidSubsetError = isFocused && isValidSubset; // we want the error to show up after a blur and refocus
+ message = this.getErrorMessage(isFocused);
+ }else if(this.state == "Incomplete"){
+ message = this.getPromptMessage(isFocused); // show the prompt whenever the value is not yet complete
+ this._maskValidSubsetError = !this._hasBeenBlurred || isFocused; // no Incomplete warnings while focused
+ }else if(isEmpty){
+ message = this.getPromptMessage(isFocused); // show the prompt whenever there's no error and no text
+ }
+ this.set("message", message);
+
+ return isValid;
+ },
+
+ displayMessage: function(/*String*/ message){
+ // summary:
+ // Overridable method to display validation errors/hints.
+ // By default uses a tooltip.
+ // tags:
+ // extension
+ dijit.hideTooltip(this.domNode);
+ if(message && this._focused){
+ dijit.showTooltip(message, this.domNode, this.tooltipPosition, !this.isLeftToRight());
+ }
+ },
+
+ _refreshState: function(){
+ // Overrides TextBox._refreshState()
+ this.validate(this._focused);
+ this.inherited(arguments);
+ },
+
+ //////////// INITIALIZATION METHODS ///////////////////////////////////////
+
+ constructor: function(){
+ this.constraints = {};
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ if(!constraints.locale && this.lang){
+ constraints.locale = this.lang;
+ }
+ this._set("constraints", constraints);
+ this._computePartialRE();
+ },
+
+ _computePartialRE: function(){
+ var p = this.regExpGen(this.constraints);
+ this.regExp = p;
+ 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 + ")$";
+ },
+
+ postMixInProperties: function(){
+ this.inherited(arguments);
+ this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang);
+ if(this.invalidMessage == "$_unset_$"){ this.invalidMessage = this.messages.invalidMessage; }
+ if(!this.invalidMessage){ this.invalidMessage = this.promptMessage; }
+ if(this.missingMessage == "$_unset_$"){ this.missingMessage = this.messages.missingMessage; }
+ if(!this.missingMessage){ this.missingMessage = this.invalidMessage; }
+ this._setConstraintsAttr(this.constraints); // this needs to happen now (and later) due to codependency on _set*Attr calls attachPoints
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this.inherited(arguments); // call FormValueWidget._setDisabledAttr()
+ this._refreshState();
+ },
+
+ _setRequiredAttr: function(/*Boolean*/ value){
+ this._set("required", value);
+ dijit.setWaiState(this.focusNode, "required", value);
+ this._refreshState();
+ },
+
+ _setMessageAttr: function(/*String*/ message){
+ this._set("message", message);
+ this.displayMessage(message);
+ },
+
+ reset:function(){
+ // Overrides dijit.form.TextBox.reset() by also
+ // hiding errors about partial matches
+ this._maskValidSubsetError = true;
+ this.inherited(arguments);
+ },
+
+ _onBlur: function(){
+ // the message still exists but for back-compat, and to erase the tooltip
+ // (if the message is being displayed as a tooltip), call displayMessage('')
+ this.displayMessage('');
+
+ this.inherited(arguments);
+ }
+ }
+);
+
+dojo.declare(
+ "dijit.form.MappedTextBox",
+ dijit.form.ValidationTextBox,
+ {
+ // summary:
+ // 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 get('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:
+ // Returns widget as a printable string using the widget's value
+ // tags:
+ // protected
+ var val = this.filter(this.get('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();
+ 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.replace(/'/g, """) + "'" : "") + "/>", 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:
+ // 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: "",
+
+ /*=====
+ // 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.get('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.get('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.get('value');
+ if(v !== null && v !== '' && v !== undefined && (typeof v != "number" || !isNaN(v)) && !this.isInRange(isFocused)){ // don't check isInRange w/o a real value
+ return this.rangeMessage; // String
+ }
+ 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;
+ }
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ this.inherited(arguments);
+ if(this.focusNode){ // not set when called from postMixInProperties
+ if(this.constraints.min !== undefined){
+ dijit.setWaiState(this.focusNode, "valuemin", this.constraints.min);
+ }else{
+ dijit.removeWaiState(this.focusNode, "valuemin");
+ }
+ if(this.constraints.max !== undefined){
+ dijit.setWaiState(this.focusNode, "valuemax", this.constraints.max);
+ }else{
+ dijit.removeWaiState(this.focusNode, "valuemax");
+ }
+ }
+ },
+
+ _setValueAttr: function(/*Number*/ value, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so set('value', ...) works.
+
+ dijit.setWaiState(this.focusNode, "valuenow", value);
+ this.inherited(arguments);
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/VerticalRule.js b/js/dojo-1.6/dijit/form/VerticalRule.js new file mode 100644 index 0000000..1beffad --- /dev/null +++ b/js/dojo-1.6/dijit/form/VerticalRule.js @@ -0,0 +1,36 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.form.HorizontalRule");
+
+
+
+dojo.declare("dijit.form.VerticalRule", dijit.form.HorizontalRule,
+{
+ // 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
+
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/VerticalRule.xd.js b/js/dojo-1.6/dijit/form/VerticalRule.xd.js new file mode 100644 index 0000000..fa63319 --- /dev/null +++ b/js/dojo-1.6/dijit/form/VerticalRule.xd.js @@ -0,0 +1,41 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.VerticalRule"],
+["require", "dijit.form.HorizontalRule"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form.HorizontalRule");
+
+
+
+dojo.declare("dijit.form.VerticalRule", dijit.form.HorizontalRule,
+{
+ // 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
+
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/VerticalRuleLabels.js b/js/dojo-1.6/dijit/form/VerticalRuleLabels.js new file mode 100644 index 0000000..b2e3e76 --- /dev/null +++ b/js/dojo-1.6/dijit/form/VerticalRuleLabels.js @@ -0,0 +1,34 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.form.HorizontalRuleLabels");
+
+
+
+dojo.declare("dijit.form.VerticalRuleLabels", dijit.form.HorizontalRuleLabels,
+{
+ // 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;
+ },
+
+ // needed to prevent labels from being reversed in RTL mode
+ _isHorizontal: false
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/VerticalRuleLabels.xd.js b/js/dojo-1.6/dijit/form/VerticalRuleLabels.xd.js new file mode 100644 index 0000000..e151d33 --- /dev/null +++ b/js/dojo-1.6/dijit/form/VerticalRuleLabels.xd.js @@ -0,0 +1,39 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.VerticalRuleLabels"],
+["require", "dijit.form.HorizontalRuleLabels"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form.HorizontalRuleLabels");
+
+
+
+dojo.declare("dijit.form.VerticalRuleLabels", dijit.form.HorizontalRuleLabels,
+{
+ // 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;
+ },
+
+ // needed to prevent labels from being reversed in RTL mode
+ _isHorizontal: false
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/VerticalSlider.js b/js/dojo-1.6/dijit/form/VerticalSlider.js new file mode 100644 index 0000000..ecb832c --- /dev/null +++ b/js/dojo-1.6/dijit/form/VerticalSlider.js @@ -0,0 +1,43 @@ +/*
+ Copyright (c) 2004-2011, The 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.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.require("dijit.form.HorizontalSlider");
+
+
+
+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=\"dijit dijitReset dijitSlider dijitSliderV\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconV\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationL dijitSliderDecorationV\"></td\r\n\t\t><td class=\"dijitReset dijitSliderDecorationC\" style=\"height:100%;\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${!nameAttrSetting}\r\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" role=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"><!--#5629--></div\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableV\" style=\"vertical-align:top;\"\r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" role=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t></center\r\n\t\t></td\r\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationR dijitSliderDecorationV\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconV\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n></table>\r\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,
+
+ _isReversed: function(){
+ // summary:
+ // Overrides HorizontalSlider._isReversed.
+ // Indicates if values are high on top (with low numbers on the bottom).
+ return this._descending;
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/VerticalSlider.xd.js b/js/dojo-1.6/dijit/form/VerticalSlider.xd.js new file mode 100644 index 0000000..35c16a2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/VerticalSlider.xd.js @@ -0,0 +1,48 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form.VerticalSlider"],
+["require", "dijit.form.HorizontalSlider"]],
+defineResource: function(dojo, dijit, dojox){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.require("dijit.form.HorizontalSlider");
+
+
+
+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=\"dijit dijitReset dijitSlider dijitSliderV\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconV\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationL dijitSliderDecorationV\"></td\r\n\t\t><td class=\"dijitReset dijitSliderDecorationC\" style=\"height:100%;\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${!nameAttrSetting}\r\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" role=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"><!--#5629--></div\r\n\t\t\t\t><div role=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableV\" style=\"vertical-align:top;\"\r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" role=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t></center\r\n\t\t></td\r\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationR dijitSliderDecorationV\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconV\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n></table>\r\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,
+
+ _isReversed: function(){
+ // summary:
+ // Overrides HorizontalSlider._isReversed.
+ // Indicates if values are high on top (with low numbers on the bottom).
+ return this._descending;
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/_DateTimeTextBox.js b/js/dojo-1.6/dijit/form/_DateTimeTextBox.js new file mode 100644 index 0000000..f9034d3 --- /dev/null +++ b/js/dojo-1.6/dijit/form/_DateTimeTextBox.js @@ -0,0 +1,252 @@ +/*
+ Copyright (c) 2004-2011, The 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._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.require("dojo.date");
+dojo.require("dojo.date.locale");
+dojo.require("dojo.date.stamp");
+dojo.require("dijit.form.ValidationTextBox");
+dojo.require("dijit._HasDropDown");
+
+
+
+new Date("X"); // workaround for #11279, new Date("") == NaN
+
+/*=====
+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._DateTimeTextBox",
+ [ dijit.form.RangeBoundTextBox, dijit._HasDropDown ],
+ {
+ // summary:
+ // Base class for validating, serializable, range-bound date or time text box.
+
+ templateString: dojo.cache("dijit.form", "templates/DropDownBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"▼ \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),
+
+ // hasDownArrow: [const] Boolean
+ // Set this textbox to display a down arrow button, to open the drop down list.
+ hasDownArrow: true,
+
+ // openOnClick: [const] Boolean
+ // Set to true to open drop down upon clicking anywhere on the textbox.
+ openOnClick: true,
+
+ /*=====
+ // 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: function(/*Date*/ val1, /*Date*/ val2){
+ return dojo.date.compare(val1, val2, this._selector);
+ },
+
+ // flag to _HasDropDown to make drop down Calendar width == <input> width
+ forceWidth: true,
+
+ 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);
+ },
+
+ // dropDownDefaultValue: Date
+ // The default value to focus in the popupClass widget when the textbox value is empty.
+ dropDownDefaultValue : new Date(),
+
+ // value: Date
+ // The value of this widget as a JavaScript Date object. Use get("value") / set("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;
+ this._invalidDate = dijit.form._DateTimeTextBox.prototype.value.toString();
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ if(!this.hasDownArrow){
+ this._buttonNode.style.display = "none";
+ }
+
+ // If openOnClick is true, we basically just want to treat the whole widget as the
+ // button. We need to do that also if the actual drop down button will be hidden,
+ // so that there's a mouse method for opening the drop down.
+ if(this.openOnClick || !this.hasDownArrow){
+ this._buttonNode = this.domNode;
+ this.baseClass += " dijitComboBoxOpenOnClick";
+ }
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ 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); }
+ this.inherited(arguments, [constraints]);
+ },
+
+ _isInvalidDate: function(/*Date*/ value){
+ // summary:
+ // Runs various tests on the value, checking for invalid conditions
+ // tags:
+ // private
+ return !value || isNaN(value) || typeof value != "object" || value.toString() == this._invalidDate;
+ },
+
+ _setValueAttr: function(/*Date|String*/ value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Sets the date on this textbox. Note: value can be a JavaScript Date literal or a string to be parsed.
+ if(value !== undefined){
+ if(typeof value == "string"){
+ value = dojo.date.stamp.fromISOString(value);
+ }
+ if(this._isInvalidDate(value)){
+ value = null;
+ }
+ if(value instanceof Date && !(this.dateClassObj instanceof Date)){
+ value = new this.dateClassObj(value);
+ }
+ }
+ this.inherited(arguments, [value, priorityChange, formattedValue]);
+ if(this.dropDown){
+ this.dropDown.set('value', value, false);
+ }
+ },
+
+ _set: function(attr, value){
+ // Avoid spurious watch() notifications when value is changed to new Date object w/the same value
+ if(attr == "value"
+ && this.value instanceof Date
+ && ((this._isInvalidDate(this.value) && this._isInvalidDate(value))
+ || this.compare(value, this.value) == 0)){
+ return;
+ }
+ this.inherited(arguments);
+ },
+
+ _setDropDownDefaultValueAttr: function(/*Date*/ val){
+ if(this._isInvalidDate(val)){
+ // convert null setting into today's date, since there needs to be *some* default at all times.
+ val = new this.dateClassObj()
+ }
+ this.dropDownDefaultValue = val;
+ },
+
+ openDropDown: function(/*Function*/ callback){
+ // rebuild drop down every time, so that constraints get copied (#6002)
+ if(this.dropDown){
+ this.dropDown.destroy();
+ }
+ var PopupProto = dojo.getObject(this.popupClass, false),
+ textBox = this,
+ value = this.get("value");
+ this.dropDown = new PopupProto({
+ onChange: function(value){
+ // this will cause InlineEditBox and other handlers to do stuff so make sure it's last
+ dijit.form._DateTimeTextBox.superclass._setValueAttr.call(textBox, value, true);
+ },
+ id: this.id + "_popup",
+ dir: textBox.dir,
+ lang: textBox.lang,
+ value: value,
+ currentFocus: !this._isInvalidDate(value) ? value : this.dropDownDefaultValue,
+ constraints: textBox.constraints,
+ filterString: textBox.filterString, // for TimeTextBox, to filter times shown
+
+ datePackage: textBox.datePackage,
+
+ isDisabledDate: function(/*Date*/ date){
+ // summary:
+ // disables dates outside of the min/max of the _DateTimeTextBox
+ return !textBox.rangeCheck(date, textBox.constraints);
+ }
+ });
+
+ this.inherited(arguments);
+ },
+
+ _getDisplayedValueAttr: function(){
+ return this.textbox.value;
+ },
+
+ _setDisplayedValueAttr: function(/*String*/ value, /*Boolean?*/ priorityChange){
+ this._setValueAttr(this.parse(value, this.constraints), priorityChange, value);
+ }
+ }
+);
+
+}
diff --git a/js/dojo-1.6/dijit/form/_DateTimeTextBox.xd.js b/js/dojo-1.6/dijit/form/_DateTimeTextBox.xd.js new file mode 100644 index 0000000..dacef25 --- /dev/null +++ b/js/dojo-1.6/dijit/form/_DateTimeTextBox.xd.js @@ -0,0 +1,261 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form._DateTimeTextBox"],
+["require", "dojo.date"],
+["require", "dojo.date.locale"],
+["require", "dojo.date.stamp"],
+["require", "dijit.form.ValidationTextBox"],
+["require", "dijit._HasDropDown"]],
+defineResource: function(dojo, dijit, dojox){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.require("dojo.date");
+dojo.require("dojo.date.locale");
+dojo.require("dojo.date.stamp");
+dojo.require("dijit.form.ValidationTextBox");
+dojo.require("dijit._HasDropDown");
+
+
+
+new Date("X"); // workaround for #11279, new Date("") == NaN
+
+/*=====
+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._DateTimeTextBox",
+ [ dijit.form.RangeBoundTextBox, dijit._HasDropDown ],
+ {
+ // summary:
+ // Base class for validating, serializable, range-bound date or time text box.
+
+ templateString: dojo.cache("dijit.form", "templates/DropDownBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"▼ \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),
+
+ // hasDownArrow: [const] Boolean
+ // Set this textbox to display a down arrow button, to open the drop down list.
+ hasDownArrow: true,
+
+ // openOnClick: [const] Boolean
+ // Set to true to open drop down upon clicking anywhere on the textbox.
+ openOnClick: true,
+
+ /*=====
+ // 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: function(/*Date*/ val1, /*Date*/ val2){
+ return dojo.date.compare(val1, val2, this._selector);
+ },
+
+ // flag to _HasDropDown to make drop down Calendar width == <input> width
+ forceWidth: true,
+
+ 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);
+ },
+
+ // dropDownDefaultValue: Date
+ // The default value to focus in the popupClass widget when the textbox value is empty.
+ dropDownDefaultValue : new Date(),
+
+ // value: Date
+ // The value of this widget as a JavaScript Date object. Use get("value") / set("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;
+ this._invalidDate = dijit.form._DateTimeTextBox.prototype.value.toString();
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ if(!this.hasDownArrow){
+ this._buttonNode.style.display = "none";
+ }
+
+ // If openOnClick is true, we basically just want to treat the whole widget as the
+ // button. We need to do that also if the actual drop down button will be hidden,
+ // so that there's a mouse method for opening the drop down.
+ if(this.openOnClick || !this.hasDownArrow){
+ this._buttonNode = this.domNode;
+ this.baseClass += " dijitComboBoxOpenOnClick";
+ }
+ },
+
+ _setConstraintsAttr: function(/*Object*/ constraints){
+ 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); }
+ this.inherited(arguments, [constraints]);
+ },
+
+ _isInvalidDate: function(/*Date*/ value){
+ // summary:
+ // Runs various tests on the value, checking for invalid conditions
+ // tags:
+ // private
+ return !value || isNaN(value) || typeof value != "object" || value.toString() == this._invalidDate;
+ },
+
+ _setValueAttr: function(/*Date|String*/ value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue){
+ // summary:
+ // Sets the date on this textbox. Note: value can be a JavaScript Date literal or a string to be parsed.
+ if(value !== undefined){
+ if(typeof value == "string"){
+ value = dojo.date.stamp.fromISOString(value);
+ }
+ if(this._isInvalidDate(value)){
+ value = null;
+ }
+ if(value instanceof Date && !(this.dateClassObj instanceof Date)){
+ value = new this.dateClassObj(value);
+ }
+ }
+ this.inherited(arguments, [value, priorityChange, formattedValue]);
+ if(this.dropDown){
+ this.dropDown.set('value', value, false);
+ }
+ },
+
+ _set: function(attr, value){
+ // Avoid spurious watch() notifications when value is changed to new Date object w/the same value
+ if(attr == "value"
+ && this.value instanceof Date
+ && ((this._isInvalidDate(this.value) && this._isInvalidDate(value))
+ || this.compare(value, this.value) == 0)){
+ return;
+ }
+ this.inherited(arguments);
+ },
+
+ _setDropDownDefaultValueAttr: function(/*Date*/ val){
+ if(this._isInvalidDate(val)){
+ // convert null setting into today's date, since there needs to be *some* default at all times.
+ val = new this.dateClassObj()
+ }
+ this.dropDownDefaultValue = val;
+ },
+
+ openDropDown: function(/*Function*/ callback){
+ // rebuild drop down every time, so that constraints get copied (#6002)
+ if(this.dropDown){
+ this.dropDown.destroy();
+ }
+ var PopupProto = dojo.getObject(this.popupClass, false),
+ textBox = this,
+ value = this.get("value");
+ this.dropDown = new PopupProto({
+ onChange: function(value){
+ // this will cause InlineEditBox and other handlers to do stuff so make sure it's last
+ dijit.form._DateTimeTextBox.superclass._setValueAttr.call(textBox, value, true);
+ },
+ id: this.id + "_popup",
+ dir: textBox.dir,
+ lang: textBox.lang,
+ value: value,
+ currentFocus: !this._isInvalidDate(value) ? value : this.dropDownDefaultValue,
+ constraints: textBox.constraints,
+ filterString: textBox.filterString, // for TimeTextBox, to filter times shown
+
+ datePackage: textBox.datePackage,
+
+ isDisabledDate: function(/*Date*/ date){
+ // summary:
+ // disables dates outside of the min/max of the _DateTimeTextBox
+ return !textBox.rangeCheck(date, textBox.constraints);
+ }
+ });
+
+ this.inherited(arguments);
+ },
+
+ _getDisplayedValueAttr: function(){
+ return this.textbox.value;
+ },
+
+ _setDisplayedValueAttr: function(/*String*/ value, /*Boolean?*/ priorityChange){
+ this._setValueAttr(this.parse(value, this.constraints), priorityChange, value);
+ }
+ }
+);
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/_FormMixin.js b/js/dojo-1.6/dijit/form/_FormMixin.js new file mode 100644 index 0000000..9695ada --- /dev/null +++ b/js/dojo-1.6/dijit/form/_FormMixin.js @@ -0,0 +1,462 @@ +/*
+ Copyright (c) 2004-2011, The 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._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.require("dojo.window");
+
+
+
+dojo.declare("dijit.form._FormMixin", null, {
+ // 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 child widget with a name and value.
+ // Child widgets without names are not part of the hash.
+ //
+ // If there are multiple child widgets w/the same name, value is an array,
+ // unless they are radio buttons in which case value is a scalar (since only
+ // one radio button can be checked at a time).
+ //
+ // If a child widget's name is a dot separated list (like a.b.c.d), it's a nested structure.
+ //
+ // Example:
+ // | { name: "John Smith", interests: ["sports", "movies"] }
+=====*/
+
+ // state: [readonly] String
+ // Will be "Error" if one or more of the child widgets has an invalid value,
+ // "Incomplete" if not all of the required child widgets are filled in. Otherwise, "",
+ // which indicates that the form is ready to be submitted.
+ state: "",
+
+ // 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
+ dojo.window.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 set('value', val) instead.", "", "2.0");
+ return this.set('value', val);
+ },
+ _setValueAttr: function(/*Object*/ obj){
+ // summary:
+ // Fill in form values from according to an Object (in the format returned by get('value'))
+
+ // 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);
+ });
+
+ 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(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.set('value', dojo.indexOf(values, w.value) != -1);
+ });
+ }else if(widgets[0].multiple){
+ // it takes an array (e.g. multi-select)
+ widgets[0].set('value', values);
+ }else{
+ // otherwise, values is a list of values to be assigned sequentially to each widget
+ dojo.forEach(widgets, function(w, i){
+ w.set('value', 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 set('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; });
+ 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;
+ }
+ });
+ */
+
+ // Note: no need to call this._set("value", ...) as the child updates will trigger onChange events
+ // which I am monitoring.
+ },
+
+ getValues: function(){
+ dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.", "", "2.0");
+ return this.get('value');
+ },
+ _getValueAttr: function(){
+ // summary:
+ // Returns Object representing form values. See description of `value` for details.
+ // description:
+
+ // The value is updated into this.value every time a child has an onChange event,
+ // so in the common case this function could just return this.value. However,
+ // that wouldn't work when:
+ //
+ // 1. User presses return key to submit a form. That doesn't fire an onchange event,
+ // and even if it did it would come too late due to the setTimout(..., 0) in _handleOnChange()
+ //
+ // 2. app for some reason calls this.get("value") while the user is typing into a
+ // form field. Not sure if that case needs to be supported or not.
+
+ // get widget values
+ var obj = { };
+ dojo.forEach(this.getDescendants(), function(widget){
+ var name = widget.name;
+ if(!name || widget.disabled){ return; }
+
+ // Single value widget (checkbox, radio, or plain <input> type widget)
+ var value = widget.get('value');
+
+ // Store widget's value(s) as a scalar, except for checkboxes which are automatically arrays
+ if(typeof widget.checked == 'boolean'){
+ if(/Radio/.test(widget.declaredClass)){
+ // radio button
+ 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(value !== false){
+ ary.push(value);
+ }
+ }
+ }else{
+ 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) {
+ 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(){
+ // summary:
+ // Returns true if all of the widgets are valid.
+ // Deprecated, will be removed in 2.0. Use get("state") instead.
+
+ return this.state == "";
+ },
+
+ 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.
+ //
+ // Deprecated. Will be removed in 2.0. Use watch("state", ...) instead.
+ },
+
+ _getState: function(){
+ // summary:
+ // Compute what this.state should be based on state of children
+ var states = dojo.map(this._descendants, function(w){
+ return w.get("state") || "";
+ });
+
+ return dojo.indexOf(states, "Error") >= 0 ? "Error" :
+ dojo.indexOf(states, "Incomplete") >= 0 ? "Incomplete" : "";
+ },
+
+ disconnectChildren: function(){
+ // summary:
+ // Remove connections to monitor changes to children's value, error state, and disabled state,
+ // in order to update Form.value and Form.state.
+ dojo.forEach(this._childConnections || [], dojo.hitch(this, "disconnect"));
+ dojo.forEach(this._childWatches || [], function(w){ w.unwatch(); });
+ },
+
+ connectChildren: function(/*Boolean*/ inStartup){
+ // summary:
+ // Setup connections to monitor changes to children's value, error state, and disabled state,
+ // in order to update Form.value and Form.state.
+ //
+ // 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.
+
+ var _this = this;
+
+ // Remove old connections, if any
+ this.disconnectChildren();
+
+ this._descendants = this.getDescendants();
+
+ // (Re)set this.value and this.state. Send watch() notifications but not on startup.
+ var set = inStartup ? function(name, val){ _this[name] = val; } : dojo.hitch(this, "_set");
+ set("value", this.get("value"));
+ set("state", this._getState());
+
+ // Monitor changes to error state and disabled state in order to update
+ // Form.state
+ var conns = (this._childConnections = []),
+ watches = (this._childWatches = []);
+ dojo.forEach(dojo.filter(this._descendants,
+ function(item){ return item.validate; }
+ ),
+ function(widget){
+ // We are interested in whenever the widget changes validity state - or
+ // whenever the disabled attribute on that widget is changed.
+ dojo.forEach(["state", "disabled"], function(attr){
+ watches.push(widget.watch(attr, function(attr, oldVal, newVal){
+ _this.set("state", _this._getState());
+ }));
+ });
+ });
+
+ // And monitor calls to child.onChange so we can update this.value
+ var onChange = function(){
+ // summary:
+ // Called when child's value or disabled state changes
+
+ // Use setTimeout() to collapse value changes in multiple children into a single
+ // update to my value. Multiple updates will occur on:
+ // 1. Form.set()
+ // 2. Form.reset()
+ // 3. user selecting a radio button (which will de-select another radio button,
+ // causing two onChange events)
+ if(_this._onChangeDelayTimer){
+ clearTimeout(_this._onChangeDelayTimer);
+ }
+ _this._onChangeDelayTimer = setTimeout(function(){
+ delete _this._onChangeDelayTimer;
+ _this._set("value", _this.get("value"));
+ }, 10);
+ };
+ dojo.forEach(
+ dojo.filter(this._descendants, function(item){ return item.onChange; } ),
+ function(widget){
+ // When a child widget's value changes,
+ // the efficient thing to do is to just update that one attribute in this.value,
+ // but that gets a little complicated when a checkbox is checked/unchecked
+ // since this.value["checkboxName"] contains an array of all the checkboxes w/the same name.
+ // Doing simple thing for now.
+ conns.push(_this.connect(widget, "onChange", onChange));
+
+ // Disabling/enabling a child widget should remove it's value from this.value.
+ // Again, this code could be more efficient, doing simple thing for now.
+ watches.push(widget.watch("disabled", onChange));
+ }
+ );
+ },
+
+ startup: function(){
+ this.inherited(arguments);
+
+ // Initialize value and valid/invalid state tracking. Needs to be done in startup()
+ // so that children are initialized.
+ this.connectChildren(true);
+
+ // Make state change call onValidStateChange(), will be removed in 2.0
+ this.watch("state", function(attr, oldVal, newVal){ this.onValidStateChange(newVal == ""); });
+ },
+
+ destroy: function(){
+ this.disconnectChildren();
+ this.inherited(arguments);
+ }
+
+ });
+
+}
diff --git a/js/dojo-1.6/dijit/form/_FormMixin.xd.js b/js/dojo-1.6/dijit/form/_FormMixin.xd.js new file mode 100644 index 0000000..f0a102f --- /dev/null +++ b/js/dojo-1.6/dijit/form/_FormMixin.xd.js @@ -0,0 +1,467 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form._FormMixin"],
+["require", "dojo.window"]],
+defineResource: function(dojo, dijit, dojox){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.require("dojo.window");
+
+
+
+dojo.declare("dijit.form._FormMixin", null, {
+ // 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 child widget with a name and value.
+ // Child widgets without names are not part of the hash.
+ //
+ // If there are multiple child widgets w/the same name, value is an array,
+ // unless they are radio buttons in which case value is a scalar (since only
+ // one radio button can be checked at a time).
+ //
+ // If a child widget's name is a dot separated list (like a.b.c.d), it's a nested structure.
+ //
+ // Example:
+ // | { name: "John Smith", interests: ["sports", "movies"] }
+=====*/
+
+ // state: [readonly] String
+ // Will be "Error" if one or more of the child widgets has an invalid value,
+ // "Incomplete" if not all of the required child widgets are filled in. Otherwise, "",
+ // which indicates that the form is ready to be submitted.
+ state: "",
+
+ // 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
+ dojo.window.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 set('value', val) instead.", "", "2.0");
+ return this.set('value', val);
+ },
+ _setValueAttr: function(/*Object*/ obj){
+ // summary:
+ // Fill in form values from according to an Object (in the format returned by get('value'))
+
+ // 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);
+ });
+
+ 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(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.set('value', dojo.indexOf(values, w.value) != -1);
+ });
+ }else if(widgets[0].multiple){
+ // it takes an array (e.g. multi-select)
+ widgets[0].set('value', values);
+ }else{
+ // otherwise, values is a list of values to be assigned sequentially to each widget
+ dojo.forEach(widgets, function(w, i){
+ w.set('value', 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 set('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; });
+ 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;
+ }
+ });
+ */
+
+ // Note: no need to call this._set("value", ...) as the child updates will trigger onChange events
+ // which I am monitoring.
+ },
+
+ getValues: function(){
+ dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.", "", "2.0");
+ return this.get('value');
+ },
+ _getValueAttr: function(){
+ // summary:
+ // Returns Object representing form values. See description of `value` for details.
+ // description:
+
+ // The value is updated into this.value every time a child has an onChange event,
+ // so in the common case this function could just return this.value. However,
+ // that wouldn't work when:
+ //
+ // 1. User presses return key to submit a form. That doesn't fire an onchange event,
+ // and even if it did it would come too late due to the setTimout(..., 0) in _handleOnChange()
+ //
+ // 2. app for some reason calls this.get("value") while the user is typing into a
+ // form field. Not sure if that case needs to be supported or not.
+
+ // get widget values
+ var obj = { };
+ dojo.forEach(this.getDescendants(), function(widget){
+ var name = widget.name;
+ if(!name || widget.disabled){ return; }
+
+ // Single value widget (checkbox, radio, or plain <input> type widget)
+ var value = widget.get('value');
+
+ // Store widget's value(s) as a scalar, except for checkboxes which are automatically arrays
+ if(typeof widget.checked == 'boolean'){
+ if(/Radio/.test(widget.declaredClass)){
+ // radio button
+ 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(value !== false){
+ ary.push(value);
+ }
+ }
+ }else{
+ 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) {
+ 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(){
+ // summary:
+ // Returns true if all of the widgets are valid.
+ // Deprecated, will be removed in 2.0. Use get("state") instead.
+
+ return this.state == "";
+ },
+
+ 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.
+ //
+ // Deprecated. Will be removed in 2.0. Use watch("state", ...) instead.
+ },
+
+ _getState: function(){
+ // summary:
+ // Compute what this.state should be based on state of children
+ var states = dojo.map(this._descendants, function(w){
+ return w.get("state") || "";
+ });
+
+ return dojo.indexOf(states, "Error") >= 0 ? "Error" :
+ dojo.indexOf(states, "Incomplete") >= 0 ? "Incomplete" : "";
+ },
+
+ disconnectChildren: function(){
+ // summary:
+ // Remove connections to monitor changes to children's value, error state, and disabled state,
+ // in order to update Form.value and Form.state.
+ dojo.forEach(this._childConnections || [], dojo.hitch(this, "disconnect"));
+ dojo.forEach(this._childWatches || [], function(w){ w.unwatch(); });
+ },
+
+ connectChildren: function(/*Boolean*/ inStartup){
+ // summary:
+ // Setup connections to monitor changes to children's value, error state, and disabled state,
+ // in order to update Form.value and Form.state.
+ //
+ // 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.
+
+ var _this = this;
+
+ // Remove old connections, if any
+ this.disconnectChildren();
+
+ this._descendants = this.getDescendants();
+
+ // (Re)set this.value and this.state. Send watch() notifications but not on startup.
+ var set = inStartup ? function(name, val){ _this[name] = val; } : dojo.hitch(this, "_set");
+ set("value", this.get("value"));
+ set("state", this._getState());
+
+ // Monitor changes to error state and disabled state in order to update
+ // Form.state
+ var conns = (this._childConnections = []),
+ watches = (this._childWatches = []);
+ dojo.forEach(dojo.filter(this._descendants,
+ function(item){ return item.validate; }
+ ),
+ function(widget){
+ // We are interested in whenever the widget changes validity state - or
+ // whenever the disabled attribute on that widget is changed.
+ dojo.forEach(["state", "disabled"], function(attr){
+ watches.push(widget.watch(attr, function(attr, oldVal, newVal){
+ _this.set("state", _this._getState());
+ }));
+ });
+ });
+
+ // And monitor calls to child.onChange so we can update this.value
+ var onChange = function(){
+ // summary:
+ // Called when child's value or disabled state changes
+
+ // Use setTimeout() to collapse value changes in multiple children into a single
+ // update to my value. Multiple updates will occur on:
+ // 1. Form.set()
+ // 2. Form.reset()
+ // 3. user selecting a radio button (which will de-select another radio button,
+ // causing two onChange events)
+ if(_this._onChangeDelayTimer){
+ clearTimeout(_this._onChangeDelayTimer);
+ }
+ _this._onChangeDelayTimer = setTimeout(function(){
+ delete _this._onChangeDelayTimer;
+ _this._set("value", _this.get("value"));
+ }, 10);
+ };
+ dojo.forEach(
+ dojo.filter(this._descendants, function(item){ return item.onChange; } ),
+ function(widget){
+ // When a child widget's value changes,
+ // the efficient thing to do is to just update that one attribute in this.value,
+ // but that gets a little complicated when a checkbox is checked/unchecked
+ // since this.value["checkboxName"] contains an array of all the checkboxes w/the same name.
+ // Doing simple thing for now.
+ conns.push(_this.connect(widget, "onChange", onChange));
+
+ // Disabling/enabling a child widget should remove it's value from this.value.
+ // Again, this code could be more efficient, doing simple thing for now.
+ watches.push(widget.watch("disabled", onChange));
+ }
+ );
+ },
+
+ startup: function(){
+ this.inherited(arguments);
+
+ // Initialize value and valid/invalid state tracking. Needs to be done in startup()
+ // so that children are initialized.
+ this.connectChildren(true);
+
+ // Make state change call onValidStateChange(), will be removed in 2.0
+ this.watch("state", function(attr, oldVal, newVal){ this.onValidStateChange(newVal == ""); });
+ },
+
+ destroy: function(){
+ this.disconnectChildren();
+ this.inherited(arguments);
+ }
+
+ });
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/_FormSelectWidget.js b/js/dojo-1.6/dijit/form/_FormSelectWidget.js new file mode 100644 index 0000000..dd52288 --- /dev/null +++ b/js/dojo-1.6/dijit/form/_FormSelectWidget.js @@ -0,0 +1,583 @@ +/*
+ Copyright (c) 2004-2011, The 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._FormSelectWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form._FormSelectWidget"] = true;
+dojo.provide("dijit.form._FormSelectWidget");
+dojo.require("dijit.form._FormWidget");
+dojo.require("dojo.data.util.sorter");
+
+
+
+/*=====
+dijit.form.__SelectOption = function(){
+ // value: String
+ // The value of the option. Setting to empty (or missing) will
+ // place a separator at that location
+ // label: String
+ // The label for our option. It can contain html tags.
+ // selected: Boolean
+ // Whether or not we are a selected option
+ // disabled: Boolean
+ // Whether or not this specific option is disabled
+ this.value = value;
+ this.label = label;
+ this.selected = selected;
+ this.disabled = disabled;
+}
+=====*/
+
+dojo.declare("dijit.form._FormSelectWidget", dijit.form._FormValueWidget, {
+ // summary:
+ // Extends _FormValueWidget in order to provide "select-specific"
+ // values - i.e., those values that are unique to <select> elements.
+ // This also provides the mechanism for reading the elements from
+ // a store, if desired.
+
+ // multiple: [const] Boolean
+ // Whether or not we are multi-valued
+ multiple: false,
+
+ // options: dijit.form.__SelectOption[]
+ // The set of options for our select item. Roughly corresponds to
+ // the html <option> tag.
+ options: null,
+
+ // store: dojo.data.api.Identity
+ // A store which, at the very least impelements dojo.data.api.Identity
+ // to use for getting our list of options - rather than reading them
+ // from the <option> html tags.
+ store: null,
+
+ // query: object
+ // A query to use when fetching items from our store
+ query: null,
+
+ // queryOptions: object
+ // Query options to use when fetching from the store
+ queryOptions: null,
+
+ // onFetch: Function
+ // A callback to do with an onFetch - but before any items are actually
+ // iterated over (i.e. to filter even futher what you want to add)
+ onFetch: null,
+
+ // sortByLabel: Boolean
+ // Flag to sort the options returned from a store by the label of
+ // the store.
+ sortByLabel: true,
+
+
+ // loadChildrenOnOpen: Boolean
+ // By default loadChildren is called when the items are fetched from the
+ // store. This property allows delaying loadChildren (and the creation
+ // of the options/menuitems) until the user clicks the button to open the
+ // dropdown.
+ loadChildrenOnOpen: false,
+
+ getOptions: function(/*anything*/ valueOrIdx){
+ // summary:
+ // Returns a given option (or options).
+ // valueOrIdx:
+ // If passed in as a string, that string is used to look up the option
+ // in the array of options - based on the value property.
+ // (See dijit.form.__SelectOption).
+ //
+ // If passed in a number, then the option with the given index (0-based)
+ // within this select will be returned.
+ //
+ // If passed in a dijit.form.__SelectOption, the same option will be
+ // returned if and only if it exists within this select.
+ //
+ // If passed an array, then an array will be returned with each element
+ // in the array being looked up.
+ //
+ // If not passed a value, then all options will be returned
+ //
+ // returns:
+ // The option corresponding with the given value or index. null
+ // is returned if any of the following are true:
+ // - A string value is passed in which doesn't exist
+ // - An index is passed in which is outside the bounds of the array of options
+ // - A dijit.form.__SelectOption is passed in which is not a part of the select
+
+ // NOTE: the compare for passing in a dijit.form.__SelectOption checks
+ // if the value property matches - NOT if the exact option exists
+ // NOTE: if passing in an array, null elements will be placed in the returned
+ // array when a value is not found.
+ var lookupValue = valueOrIdx, opts = this.options || [], l = opts.length;
+
+ if(lookupValue === undefined){
+ return opts; // dijit.form.__SelectOption[]
+ }
+ if(dojo.isArray(lookupValue)){
+ return dojo.map(lookupValue, "return this.getOptions(item);", this); // dijit.form.__SelectOption[]
+ }
+ if(dojo.isObject(valueOrIdx)){
+ // We were passed an option - so see if it's in our array (directly),
+ // and if it's not, try and find it by value.
+ if(!dojo.some(this.options, function(o, idx){
+ if(o === lookupValue ||
+ (o.value && o.value === lookupValue.value)){
+ lookupValue = idx;
+ return true;
+ }
+ return false;
+ })){
+ lookupValue = -1;
+ }
+ }
+ if(typeof lookupValue == "string"){
+ for(var i=0; i<l; i++){
+ if(opts[i].value === lookupValue){
+ lookupValue = i;
+ break;
+ }
+ }
+ }
+ if(typeof lookupValue == "number" && lookupValue >= 0 && lookupValue < l){
+ return this.options[lookupValue] // dijit.form.__SelectOption
+ }
+ return null; // null
+ },
+
+ addOption: function(/*dijit.form.__SelectOption|dijit.form.__SelectOption[]*/ option){
+ // summary:
+ // Adds an option or options to the end of the select. If value
+ // of the option is empty or missing, a separator is created instead.
+ // Passing in an array of options will yield slightly better performance
+ // since the children are only loaded once.
+ if(!dojo.isArray(option)){ option = [option]; }
+ dojo.forEach(option, function(i){
+ if(i && dojo.isObject(i)){
+ this.options.push(i);
+ }
+ }, this);
+ this._loadChildren();
+ },
+
+ removeOption: function(/*String|dijit.form.__SelectOption|Number|Array*/ valueOrIdx){
+ // summary:
+ // Removes the given option or options. You can remove by string
+ // (in which case the value is removed), number (in which case the
+ // index in the options array is removed), or select option (in
+ // which case, the select option with a matching value is removed).
+ // You can also pass in an array of those values for a slightly
+ // better performance since the children are only loaded once.
+ if(!dojo.isArray(valueOrIdx)){ valueOrIdx = [valueOrIdx]; }
+ var oldOpts = this.getOptions(valueOrIdx);
+ dojo.forEach(oldOpts, function(i){
+ // We can get null back in our array - if our option was not found. In
+ // that case, we don't want to blow up...
+ if(i){
+ this.options = dojo.filter(this.options, function(node, idx){
+ return (node.value !== i.value || node.label !== i.label);
+ });
+ this._removeOptionItem(i);
+ }
+ }, this);
+ this._loadChildren();
+ },
+
+ updateOption: function(/*dijit.form.__SelectOption|dijit.form.__SelectOption[]*/ newOption){
+ // summary:
+ // Updates the values of the given option. The option to update
+ // is matched based on the value of the entered option. Passing
+ // in an array of new options will yeild better performance since
+ // the children will only be loaded once.
+ if(!dojo.isArray(newOption)){ newOption = [newOption]; }
+ dojo.forEach(newOption, function(i){
+ var oldOpt = this.getOptions(i), k;
+ if(oldOpt){
+ for(k in i){ oldOpt[k] = i[k]; }
+ }
+ }, this);
+ this._loadChildren();
+ },
+
+ setStore: function(/*dojo.data.api.Identity*/ store,
+ /*anything?*/ selectedValue,
+ /*Object?*/ fetchArgs){
+ // summary:
+ // Sets the store you would like to use with this select widget.
+ // The selected value is the value of the new store to set. This
+ // function returns the original store, in case you want to reuse
+ // it or something.
+ // store: dojo.data.api.Identity
+ // The store you would like to use - it MUST implement Identity,
+ // and MAY implement Notification.
+ // selectedValue: anything?
+ // The value that this widget should set itself to *after* the store
+ // has been loaded
+ // fetchArgs: Object?
+ // The arguments that will be passed to the store's fetch() function
+ var oStore = this.store;
+ fetchArgs = fetchArgs || {};
+ if(oStore !== store){
+ // Our store has changed, so update our notifications
+ dojo.forEach(this._notifyConnections || [], dojo.disconnect);
+ delete this._notifyConnections;
+ if(store && store.getFeatures()["dojo.data.api.Notification"]){
+ this._notifyConnections = [
+ dojo.connect(store, "onNew", this, "_onNewItem"),
+ dojo.connect(store, "onDelete", this, "_onDeleteItem"),
+ dojo.connect(store, "onSet", this, "_onSetItem")
+ ];
+ }
+ this._set("store", store);
+ }
+
+ // Turn off change notifications while we make all these changes
+ this._onChangeActive = false;
+
+ // Remove existing options (if there are any)
+ if(this.options && this.options.length){
+ this.removeOption(this.options);
+ }
+
+ // Add our new options
+ if(store){
+ this._loadingStore = true;
+ store.fetch(dojo.delegate(fetchArgs, {
+ onComplete: function(items, opts){
+ if(this.sortByLabel && !fetchArgs.sort && items.length){
+ items.sort(dojo.data.util.sorter.createSortFunction([{
+ attribute: store.getLabelAttributes(items[0])[0]
+ }], store));
+ }
+
+ if(fetchArgs.onFetch){
+ items = fetchArgs.onFetch.call(this, items, opts);
+ }
+ // TODO: Add these guys as a batch, instead of separately
+ dojo.forEach(items, function(i){
+ this._addOptionForItem(i);
+ }, this);
+
+ // Set our value (which might be undefined), and then tweak
+ // it to send a change event with the real value
+ this._loadingStore = false;
+ this.set("value", "_pendingValue" in this ? this._pendingValue : selectedValue);
+ delete this._pendingValue;
+
+ if(!this.loadChildrenOnOpen){
+ this._loadChildren();
+ }else{
+ this._pseudoLoadChildren(items);
+ }
+ this._fetchedWith = opts;
+ this._lastValueReported = this.multiple ? [] : null;
+ this._onChangeActive = true;
+ this.onSetStore();
+ this._handleOnChange(this.value);
+ },
+ scope: this
+ }));
+ }else{
+ delete this._fetchedWith;
+ }
+ return oStore; // dojo.data.api.Identity
+ },
+
+ // TODO: implement set() and watch() for store and query, although not sure how to handle
+ // setting them individually rather than together (as in setStore() above)
+
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ // summary:
+ // set the value of the widget.
+ // If a string is passed, then we set our value from looking it up.
+ if(this._loadingStore){
+ // Our store is loading - so save our value, and we'll set it when
+ // we're done
+ this._pendingValue = newValue;
+ return;
+ }
+ var opts = this.getOptions() || [];
+ if(!dojo.isArray(newValue)){
+ newValue = [newValue];
+ }
+ dojo.forEach(newValue, function(i, idx){
+ if(!dojo.isObject(i)){
+ i = i + "";
+ }
+ if(typeof i === "string"){
+ newValue[idx] = dojo.filter(opts, function(node){
+ return node.value === i;
+ })[0] || {value: "", label: ""};
+ }
+ }, this);
+
+ // Make sure some sane default is set
+ newValue = dojo.filter(newValue, function(i){ return i && i.value; });
+ if(!this.multiple && (!newValue[0] || !newValue[0].value) && opts.length){
+ newValue[0] = opts[0];
+ }
+ dojo.forEach(opts, function(i){
+ i.selected = dojo.some(newValue, function(v){ return v.value === i.value; });
+ });
+ var val = dojo.map(newValue, function(i){ return i.value; }),
+ disp = dojo.map(newValue, function(i){ return i.label; });
+
+ this._set("value", this.multiple ? val : val[0]);
+ this._setDisplay(this.multiple ? disp : disp[0]);
+ this._updateSelection();
+ this._handleOnChange(this.value, priorityChange);
+ },
+
+ _getDisplayedValueAttr: function(){
+ // summary:
+ // returns the displayed value of the widget
+ var val = this.get("value");
+ if(!dojo.isArray(val)){
+ val = [val];
+ }
+ var ret = dojo.map(this.getOptions(val), function(v){
+ if(v && "label" in v){
+ return v.label;
+ }else if(v){
+ return v.value;
+ }
+ return null;
+ }, this);
+ return this.multiple ? ret : ret[0];
+ },
+
+ _loadChildren: function(){
+ // summary:
+ // Loads the children represented by this widget's options.
+ // reset the menu to make it populatable on the next click
+ if(this._loadingStore){ return; }
+ dojo.forEach(this._getChildren(), function(child){
+ child.destroyRecursive();
+ });
+ // Add each menu item
+ dojo.forEach(this.options, this._addOptionItem, this);
+
+ // Update states
+ this._updateSelection();
+ },
+
+ _updateSelection: function(){
+ // summary:
+ // Sets the "selected" class on the item for styling purposes
+ this._set("value", this._getValueFromOpts());
+ var val = this.value;
+ if(!dojo.isArray(val)){
+ val = [val];
+ }
+ if(val && val[0]){
+ dojo.forEach(this._getChildren(), function(child){
+ var isSelected = dojo.some(val, function(v){
+ return child.option && (v === child.option.value);
+ });
+ dojo.toggleClass(child.domNode, this.baseClass + "SelectedOption", isSelected);
+ dijit.setWaiState(child.domNode, "selected", isSelected);
+ }, this);
+ }
+ },
+
+ _getValueFromOpts: function(){
+ // summary:
+ // Returns the value of the widget by reading the options for
+ // the selected flag
+ var opts = this.getOptions() || [];
+ if(!this.multiple && opts.length){
+ // Mirror what a select does - choose the first one
+ var opt = dojo.filter(opts, function(i){
+ return i.selected;
+ })[0];
+ if(opt && opt.value){
+ return opt.value
+ }else{
+ opts[0].selected = true;
+ return opts[0].value;
+ }
+ }else if(this.multiple){
+ // Set value to be the sum of all selected
+ return dojo.map(dojo.filter(opts, function(i){
+ return i.selected;
+ }), function(i){
+ return i.value;
+ }) || [];
+ }
+ return "";
+ },
+
+ // Internal functions to call when we have store notifications come in
+ _onNewItem: function(/*item*/ item, /*Object?*/ parentInfo){
+ if(!parentInfo || !parentInfo.parent){
+ // Only add it if we are top-level
+ this._addOptionForItem(item);
+ }
+ },
+ _onDeleteItem: function(/*item*/ item){
+ var store = this.store;
+ this.removeOption(store.getIdentity(item));
+ },
+ _onSetItem: function(/*item*/ item){
+ this.updateOption(this._getOptionObjForItem(item));
+ },
+
+ _getOptionObjForItem: function(item){
+ // summary:
+ // Returns an option object based off the given item. The "value"
+ // of the option item will be the identity of the item, the "label"
+ // of the option will be the label of the item. If the item contains
+ // children, the children value of the item will be set
+ var store = this.store, label = store.getLabel(item),
+ value = (label ? store.getIdentity(item) : null);
+ return {value: value, label: label, item:item}; // dijit.form.__SelectOption
+ },
+
+ _addOptionForItem: function(/*item*/ item){
+ // summary:
+ // Creates (and adds) the option for the given item
+ var store = this.store;
+ if(!store.isItemLoaded(item)){
+ // We are not loaded - so let's load it and add later
+ store.loadItem({item: item, onComplete: function(i){
+ this._addOptionForItem(item);
+ },
+ scope: this});
+ return;
+ }
+ var newOpt = this._getOptionObjForItem(item);
+ this.addOption(newOpt);
+ },
+
+ constructor: function(/*Object*/ keywordArgs){
+ // summary:
+ // Saves off our value, if we have an initial one set so we
+ // can use it if we have a store as well (see startup())
+ this._oValue = (keywordArgs || {}).value || null;
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ dojo.setSelectable(this.focusNode, false);
+ },
+
+ _fillContent: function(){
+ // summary:
+ // Loads our options and sets up our dropdown correctly. We
+ // don't want any content, so we don't call any inherit chain
+ // function.
+ var opts = this.options;
+ if(!opts){
+ opts = this.options = this.srcNodeRef ? dojo.query(">",
+ this.srcNodeRef).map(function(node){
+ if(node.getAttribute("type") === "separator"){
+ return { value: "", label: "", selected: false, disabled: false };
+ }
+ return {
+ value: (node.getAttribute("data-" + dojo._scopeName + "-value") || node.getAttribute("value")),
+ label: String(node.innerHTML),
+ // FIXME: disabled and selected are not valid on complex markup children (which is why we're
+ // looking for data-dojo-value above. perhaps we should data-dojo-props="" this whole thing?)
+ // decide before 1.6
+ selected: node.getAttribute("selected") || false,
+ disabled: node.getAttribute("disabled") || false
+ };
+ }, this) : [];
+ }
+ if(!this.value){
+ this._set("value", this._getValueFromOpts());
+ }else if(this.multiple && typeof this.value == "string"){
+ this_set("value", this.value.split(","));
+ }
+ },
+
+ postCreate: function(){
+ // summary:
+ // sets up our event handling that we need for functioning
+ // as a select
+ this.inherited(arguments);
+
+ // Make our event connections for updating state
+ this.connect(this, "onChange", "_updateSelection");
+ this.connect(this, "startup", "_loadChildren");
+
+ this._setValueAttr(this.value, null);
+ },
+
+ startup: function(){
+ // summary:
+ // Connects in our store, if we have one defined
+ this.inherited(arguments);
+ var store = this.store, fetchArgs = {};
+ dojo.forEach(["query", "queryOptions", "onFetch"], function(i){
+ if(this[i]){
+ fetchArgs[i] = this[i];
+ }
+ delete this[i];
+ }, this);
+ if(store && store.getFeatures()["dojo.data.api.Identity"]){
+ // Temporarily set our store to null so that it will get set
+ // and connected appropriately
+ this.store = null;
+ this.setStore(store, this._oValue, fetchArgs);
+ }
+ },
+
+ destroy: function(){
+ // summary:
+ // Clean up our connections
+ dojo.forEach(this._notifyConnections || [], dojo.disconnect);
+ this.inherited(arguments);
+ },
+
+ _addOptionItem: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // User-overridable function which, for the given option, adds an
+ // item to the select. If the option doesn't have a value, then a
+ // separator is added in that place. Make sure to store the option
+ // in the created option widget.
+ },
+
+ _removeOptionItem: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // User-overridable function which, for the given option, removes
+ // its item from the select.
+ },
+
+ _setDisplay: function(/*String or String[]*/ newDisplay){
+ // summary:
+ // Overridable function which will set the display for the
+ // widget. newDisplay is either a string (in the case of
+ // single selects) or array of strings (in the case of multi-selects)
+ },
+
+ _getChildren: function(){
+ // summary:
+ // Overridable function to return the children that this widget contains.
+ return [];
+ },
+
+ _getSelectedOptionsAttr: function(){
+ // summary:
+ // hooks into this.attr to provide a mechanism for getting the
+ // option items for the current value of the widget.
+ return this.getOptions(this.get("value"));
+ },
+
+ _pseudoLoadChildren: function(/*item[]*/ items){
+ // summary:
+ // a function that will "fake" loading children, if needed, and
+ // if we have set to not load children until the widget opens.
+ // items:
+ // An array of items that will be loaded, when needed
+ },
+
+ onSetStore: function(){
+ // summary:
+ // a function that can be connected to in order to receive a
+ // notification that the store has finished loading and all options
+ // from that store are available
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/_FormSelectWidget.xd.js b/js/dojo-1.6/dijit/form/_FormSelectWidget.xd.js new file mode 100644 index 0000000..c881f2d --- /dev/null +++ b/js/dojo-1.6/dijit/form/_FormSelectWidget.xd.js @@ -0,0 +1,589 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form._FormSelectWidget"],
+["require", "dijit.form._FormWidget"],
+["require", "dojo.data.util.sorter"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dijit.form._FormSelectWidget"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dijit.form._FormSelectWidget"] = true;
+dojo.provide("dijit.form._FormSelectWidget");
+dojo.require("dijit.form._FormWidget");
+dojo.require("dojo.data.util.sorter");
+
+
+
+/*=====
+dijit.form.__SelectOption = function(){
+ // value: String
+ // The value of the option. Setting to empty (or missing) will
+ // place a separator at that location
+ // label: String
+ // The label for our option. It can contain html tags.
+ // selected: Boolean
+ // Whether or not we are a selected option
+ // disabled: Boolean
+ // Whether or not this specific option is disabled
+ this.value = value;
+ this.label = label;
+ this.selected = selected;
+ this.disabled = disabled;
+}
+=====*/
+
+dojo.declare("dijit.form._FormSelectWidget", dijit.form._FormValueWidget, {
+ // summary:
+ // Extends _FormValueWidget in order to provide "select-specific"
+ // values - i.e., those values that are unique to <select> elements.
+ // This also provides the mechanism for reading the elements from
+ // a store, if desired.
+
+ // multiple: [const] Boolean
+ // Whether or not we are multi-valued
+ multiple: false,
+
+ // options: dijit.form.__SelectOption[]
+ // The set of options for our select item. Roughly corresponds to
+ // the html <option> tag.
+ options: null,
+
+ // store: dojo.data.api.Identity
+ // A store which, at the very least impelements dojo.data.api.Identity
+ // to use for getting our list of options - rather than reading them
+ // from the <option> html tags.
+ store: null,
+
+ // query: object
+ // A query to use when fetching items from our store
+ query: null,
+
+ // queryOptions: object
+ // Query options to use when fetching from the store
+ queryOptions: null,
+
+ // onFetch: Function
+ // A callback to do with an onFetch - but before any items are actually
+ // iterated over (i.e. to filter even futher what you want to add)
+ onFetch: null,
+
+ // sortByLabel: Boolean
+ // Flag to sort the options returned from a store by the label of
+ // the store.
+ sortByLabel: true,
+
+
+ // loadChildrenOnOpen: Boolean
+ // By default loadChildren is called when the items are fetched from the
+ // store. This property allows delaying loadChildren (and the creation
+ // of the options/menuitems) until the user clicks the button to open the
+ // dropdown.
+ loadChildrenOnOpen: false,
+
+ getOptions: function(/*anything*/ valueOrIdx){
+ // summary:
+ // Returns a given option (or options).
+ // valueOrIdx:
+ // If passed in as a string, that string is used to look up the option
+ // in the array of options - based on the value property.
+ // (See dijit.form.__SelectOption).
+ //
+ // If passed in a number, then the option with the given index (0-based)
+ // within this select will be returned.
+ //
+ // If passed in a dijit.form.__SelectOption, the same option will be
+ // returned if and only if it exists within this select.
+ //
+ // If passed an array, then an array will be returned with each element
+ // in the array being looked up.
+ //
+ // If not passed a value, then all options will be returned
+ //
+ // returns:
+ // The option corresponding with the given value or index. null
+ // is returned if any of the following are true:
+ // - A string value is passed in which doesn't exist
+ // - An index is passed in which is outside the bounds of the array of options
+ // - A dijit.form.__SelectOption is passed in which is not a part of the select
+
+ // NOTE: the compare for passing in a dijit.form.__SelectOption checks
+ // if the value property matches - NOT if the exact option exists
+ // NOTE: if passing in an array, null elements will be placed in the returned
+ // array when a value is not found.
+ var lookupValue = valueOrIdx, opts = this.options || [], l = opts.length;
+
+ if(lookupValue === undefined){
+ return opts; // dijit.form.__SelectOption[]
+ }
+ if(dojo.isArray(lookupValue)){
+ return dojo.map(lookupValue, "return this.getOptions(item);", this); // dijit.form.__SelectOption[]
+ }
+ if(dojo.isObject(valueOrIdx)){
+ // We were passed an option - so see if it's in our array (directly),
+ // and if it's not, try and find it by value.
+ if(!dojo.some(this.options, function(o, idx){
+ if(o === lookupValue ||
+ (o.value && o.value === lookupValue.value)){
+ lookupValue = idx;
+ return true;
+ }
+ return false;
+ })){
+ lookupValue = -1;
+ }
+ }
+ if(typeof lookupValue == "string"){
+ for(var i=0; i<l; i++){
+ if(opts[i].value === lookupValue){
+ lookupValue = i;
+ break;
+ }
+ }
+ }
+ if(typeof lookupValue == "number" && lookupValue >= 0 && lookupValue < l){
+ return this.options[lookupValue] // dijit.form.__SelectOption
+ }
+ return null; // null
+ },
+
+ addOption: function(/*dijit.form.__SelectOption|dijit.form.__SelectOption[]*/ option){
+ // summary:
+ // Adds an option or options to the end of the select. If value
+ // of the option is empty or missing, a separator is created instead.
+ // Passing in an array of options will yield slightly better performance
+ // since the children are only loaded once.
+ if(!dojo.isArray(option)){ option = [option]; }
+ dojo.forEach(option, function(i){
+ if(i && dojo.isObject(i)){
+ this.options.push(i);
+ }
+ }, this);
+ this._loadChildren();
+ },
+
+ removeOption: function(/*String|dijit.form.__SelectOption|Number|Array*/ valueOrIdx){
+ // summary:
+ // Removes the given option or options. You can remove by string
+ // (in which case the value is removed), number (in which case the
+ // index in the options array is removed), or select option (in
+ // which case, the select option with a matching value is removed).
+ // You can also pass in an array of those values for a slightly
+ // better performance since the children are only loaded once.
+ if(!dojo.isArray(valueOrIdx)){ valueOrIdx = [valueOrIdx]; }
+ var oldOpts = this.getOptions(valueOrIdx);
+ dojo.forEach(oldOpts, function(i){
+ // We can get null back in our array - if our option was not found. In
+ // that case, we don't want to blow up...
+ if(i){
+ this.options = dojo.filter(this.options, function(node, idx){
+ return (node.value !== i.value || node.label !== i.label);
+ });
+ this._removeOptionItem(i);
+ }
+ }, this);
+ this._loadChildren();
+ },
+
+ updateOption: function(/*dijit.form.__SelectOption|dijit.form.__SelectOption[]*/ newOption){
+ // summary:
+ // Updates the values of the given option. The option to update
+ // is matched based on the value of the entered option. Passing
+ // in an array of new options will yeild better performance since
+ // the children will only be loaded once.
+ if(!dojo.isArray(newOption)){ newOption = [newOption]; }
+ dojo.forEach(newOption, function(i){
+ var oldOpt = this.getOptions(i), k;
+ if(oldOpt){
+ for(k in i){ oldOpt[k] = i[k]; }
+ }
+ }, this);
+ this._loadChildren();
+ },
+
+ setStore: function(/*dojo.data.api.Identity*/ store,
+ /*anything?*/ selectedValue,
+ /*Object?*/ fetchArgs){
+ // summary:
+ // Sets the store you would like to use with this select widget.
+ // The selected value is the value of the new store to set. This
+ // function returns the original store, in case you want to reuse
+ // it or something.
+ // store: dojo.data.api.Identity
+ // The store you would like to use - it MUST implement Identity,
+ // and MAY implement Notification.
+ // selectedValue: anything?
+ // The value that this widget should set itself to *after* the store
+ // has been loaded
+ // fetchArgs: Object?
+ // The arguments that will be passed to the store's fetch() function
+ var oStore = this.store;
+ fetchArgs = fetchArgs || {};
+ if(oStore !== store){
+ // Our store has changed, so update our notifications
+ dojo.forEach(this._notifyConnections || [], dojo.disconnect);
+ delete this._notifyConnections;
+ if(store && store.getFeatures()["dojo.data.api.Notification"]){
+ this._notifyConnections = [
+ dojo.connect(store, "onNew", this, "_onNewItem"),
+ dojo.connect(store, "onDelete", this, "_onDeleteItem"),
+ dojo.connect(store, "onSet", this, "_onSetItem")
+ ];
+ }
+ this._set("store", store);
+ }
+
+ // Turn off change notifications while we make all these changes
+ this._onChangeActive = false;
+
+ // Remove existing options (if there are any)
+ if(this.options && this.options.length){
+ this.removeOption(this.options);
+ }
+
+ // Add our new options
+ if(store){
+ this._loadingStore = true;
+ store.fetch(dojo.delegate(fetchArgs, {
+ onComplete: function(items, opts){
+ if(this.sortByLabel && !fetchArgs.sort && items.length){
+ items.sort(dojo.data.util.sorter.createSortFunction([{
+ attribute: store.getLabelAttributes(items[0])[0]
+ }], store));
+ }
+
+ if(fetchArgs.onFetch){
+ items = fetchArgs.onFetch.call(this, items, opts);
+ }
+ // TODO: Add these guys as a batch, instead of separately
+ dojo.forEach(items, function(i){
+ this._addOptionForItem(i);
+ }, this);
+
+ // Set our value (which might be undefined), and then tweak
+ // it to send a change event with the real value
+ this._loadingStore = false;
+ this.set("value", "_pendingValue" in this ? this._pendingValue : selectedValue);
+ delete this._pendingValue;
+
+ if(!this.loadChildrenOnOpen){
+ this._loadChildren();
+ }else{
+ this._pseudoLoadChildren(items);
+ }
+ this._fetchedWith = opts;
+ this._lastValueReported = this.multiple ? [] : null;
+ this._onChangeActive = true;
+ this.onSetStore();
+ this._handleOnChange(this.value);
+ },
+ scope: this
+ }));
+ }else{
+ delete this._fetchedWith;
+ }
+ return oStore; // dojo.data.api.Identity
+ },
+
+ // TODO: implement set() and watch() for store and query, although not sure how to handle
+ // setting them individually rather than together (as in setStore() above)
+
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ // summary:
+ // set the value of the widget.
+ // If a string is passed, then we set our value from looking it up.
+ if(this._loadingStore){
+ // Our store is loading - so save our value, and we'll set it when
+ // we're done
+ this._pendingValue = newValue;
+ return;
+ }
+ var opts = this.getOptions() || [];
+ if(!dojo.isArray(newValue)){
+ newValue = [newValue];
+ }
+ dojo.forEach(newValue, function(i, idx){
+ if(!dojo.isObject(i)){
+ i = i + "";
+ }
+ if(typeof i === "string"){
+ newValue[idx] = dojo.filter(opts, function(node){
+ return node.value === i;
+ })[0] || {value: "", label: ""};
+ }
+ }, this);
+
+ // Make sure some sane default is set
+ newValue = dojo.filter(newValue, function(i){ return i && i.value; });
+ if(!this.multiple && (!newValue[0] || !newValue[0].value) && opts.length){
+ newValue[0] = opts[0];
+ }
+ dojo.forEach(opts, function(i){
+ i.selected = dojo.some(newValue, function(v){ return v.value === i.value; });
+ });
+ var val = dojo.map(newValue, function(i){ return i.value; }),
+ disp = dojo.map(newValue, function(i){ return i.label; });
+
+ this._set("value", this.multiple ? val : val[0]);
+ this._setDisplay(this.multiple ? disp : disp[0]);
+ this._updateSelection();
+ this._handleOnChange(this.value, priorityChange);
+ },
+
+ _getDisplayedValueAttr: function(){
+ // summary:
+ // returns the displayed value of the widget
+ var val = this.get("value");
+ if(!dojo.isArray(val)){
+ val = [val];
+ }
+ var ret = dojo.map(this.getOptions(val), function(v){
+ if(v && "label" in v){
+ return v.label;
+ }else if(v){
+ return v.value;
+ }
+ return null;
+ }, this);
+ return this.multiple ? ret : ret[0];
+ },
+
+ _loadChildren: function(){
+ // summary:
+ // Loads the children represented by this widget's options.
+ // reset the menu to make it populatable on the next click
+ if(this._loadingStore){ return; }
+ dojo.forEach(this._getChildren(), function(child){
+ child.destroyRecursive();
+ });
+ // Add each menu item
+ dojo.forEach(this.options, this._addOptionItem, this);
+
+ // Update states
+ this._updateSelection();
+ },
+
+ _updateSelection: function(){
+ // summary:
+ // Sets the "selected" class on the item for styling purposes
+ this._set("value", this._getValueFromOpts());
+ var val = this.value;
+ if(!dojo.isArray(val)){
+ val = [val];
+ }
+ if(val && val[0]){
+ dojo.forEach(this._getChildren(), function(child){
+ var isSelected = dojo.some(val, function(v){
+ return child.option && (v === child.option.value);
+ });
+ dojo.toggleClass(child.domNode, this.baseClass + "SelectedOption", isSelected);
+ dijit.setWaiState(child.domNode, "selected", isSelected);
+ }, this);
+ }
+ },
+
+ _getValueFromOpts: function(){
+ // summary:
+ // Returns the value of the widget by reading the options for
+ // the selected flag
+ var opts = this.getOptions() || [];
+ if(!this.multiple && opts.length){
+ // Mirror what a select does - choose the first one
+ var opt = dojo.filter(opts, function(i){
+ return i.selected;
+ })[0];
+ if(opt && opt.value){
+ return opt.value
+ }else{
+ opts[0].selected = true;
+ return opts[0].value;
+ }
+ }else if(this.multiple){
+ // Set value to be the sum of all selected
+ return dojo.map(dojo.filter(opts, function(i){
+ return i.selected;
+ }), function(i){
+ return i.value;
+ }) || [];
+ }
+ return "";
+ },
+
+ // Internal functions to call when we have store notifications come in
+ _onNewItem: function(/*item*/ item, /*Object?*/ parentInfo){
+ if(!parentInfo || !parentInfo.parent){
+ // Only add it if we are top-level
+ this._addOptionForItem(item);
+ }
+ },
+ _onDeleteItem: function(/*item*/ item){
+ var store = this.store;
+ this.removeOption(store.getIdentity(item));
+ },
+ _onSetItem: function(/*item*/ item){
+ this.updateOption(this._getOptionObjForItem(item));
+ },
+
+ _getOptionObjForItem: function(item){
+ // summary:
+ // Returns an option object based off the given item. The "value"
+ // of the option item will be the identity of the item, the "label"
+ // of the option will be the label of the item. If the item contains
+ // children, the children value of the item will be set
+ var store = this.store, label = store.getLabel(item),
+ value = (label ? store.getIdentity(item) : null);
+ return {value: value, label: label, item:item}; // dijit.form.__SelectOption
+ },
+
+ _addOptionForItem: function(/*item*/ item){
+ // summary:
+ // Creates (and adds) the option for the given item
+ var store = this.store;
+ if(!store.isItemLoaded(item)){
+ // We are not loaded - so let's load it and add later
+ store.loadItem({item: item, onComplete: function(i){
+ this._addOptionForItem(item);
+ },
+ scope: this});
+ return;
+ }
+ var newOpt = this._getOptionObjForItem(item);
+ this.addOption(newOpt);
+ },
+
+ constructor: function(/*Object*/ keywordArgs){
+ // summary:
+ // Saves off our value, if we have an initial one set so we
+ // can use it if we have a store as well (see startup())
+ this._oValue = (keywordArgs || {}).value || null;
+ },
+
+ buildRendering: function(){
+ this.inherited(arguments);
+ dojo.setSelectable(this.focusNode, false);
+ },
+
+ _fillContent: function(){
+ // summary:
+ // Loads our options and sets up our dropdown correctly. We
+ // don't want any content, so we don't call any inherit chain
+ // function.
+ var opts = this.options;
+ if(!opts){
+ opts = this.options = this.srcNodeRef ? dojo.query(">",
+ this.srcNodeRef).map(function(node){
+ if(node.getAttribute("type") === "separator"){
+ return { value: "", label: "", selected: false, disabled: false };
+ }
+ return {
+ value: (node.getAttribute("data-" + dojo._scopeName + "-value") || node.getAttribute("value")),
+ label: String(node.innerHTML),
+ // FIXME: disabled and selected are not valid on complex markup children (which is why we're
+ // looking for data-dojo-value above. perhaps we should data-dojo-props="" this whole thing?)
+ // decide before 1.6
+ selected: node.getAttribute("selected") || false,
+ disabled: node.getAttribute("disabled") || false
+ };
+ }, this) : [];
+ }
+ if(!this.value){
+ this._set("value", this._getValueFromOpts());
+ }else if(this.multiple && typeof this.value == "string"){
+ this_set("value", this.value.split(","));
+ }
+ },
+
+ postCreate: function(){
+ // summary:
+ // sets up our event handling that we need for functioning
+ // as a select
+ this.inherited(arguments);
+
+ // Make our event connections for updating state
+ this.connect(this, "onChange", "_updateSelection");
+ this.connect(this, "startup", "_loadChildren");
+
+ this._setValueAttr(this.value, null);
+ },
+
+ startup: function(){
+ // summary:
+ // Connects in our store, if we have one defined
+ this.inherited(arguments);
+ var store = this.store, fetchArgs = {};
+ dojo.forEach(["query", "queryOptions", "onFetch"], function(i){
+ if(this[i]){
+ fetchArgs[i] = this[i];
+ }
+ delete this[i];
+ }, this);
+ if(store && store.getFeatures()["dojo.data.api.Identity"]){
+ // Temporarily set our store to null so that it will get set
+ // and connected appropriately
+ this.store = null;
+ this.setStore(store, this._oValue, fetchArgs);
+ }
+ },
+
+ destroy: function(){
+ // summary:
+ // Clean up our connections
+ dojo.forEach(this._notifyConnections || [], dojo.disconnect);
+ this.inherited(arguments);
+ },
+
+ _addOptionItem: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // User-overridable function which, for the given option, adds an
+ // item to the select. If the option doesn't have a value, then a
+ // separator is added in that place. Make sure to store the option
+ // in the created option widget.
+ },
+
+ _removeOptionItem: function(/*dijit.form.__SelectOption*/ option){
+ // summary:
+ // User-overridable function which, for the given option, removes
+ // its item from the select.
+ },
+
+ _setDisplay: function(/*String or String[]*/ newDisplay){
+ // summary:
+ // Overridable function which will set the display for the
+ // widget. newDisplay is either a string (in the case of
+ // single selects) or array of strings (in the case of multi-selects)
+ },
+
+ _getChildren: function(){
+ // summary:
+ // Overridable function to return the children that this widget contains.
+ return [];
+ },
+
+ _getSelectedOptionsAttr: function(){
+ // summary:
+ // hooks into this.attr to provide a mechanism for getting the
+ // option items for the current value of the widget.
+ return this.getOptions(this.get("value"));
+ },
+
+ _pseudoLoadChildren: function(/*item[]*/ items){
+ // summary:
+ // a function that will "fake" loading children, if needed, and
+ // if we have set to not load children until the widget opens.
+ // items:
+ // An array of items that will be loaded, when needed
+ },
+
+ onSetStore: function(){
+ // summary:
+ // a function that can be connected to in order to receive a
+ // notification that the store has finished loading and all options
+ // from that store are available
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/_FormWidget.js b/js/dojo-1.6/dijit/form/_FormWidget.js new file mode 100644 index 0000000..75dd09e --- /dev/null +++ b/js/dojo-1.6/dijit/form/_FormWidget.js @@ -0,0 +1,378 @@ +/*
+ Copyright (c) 2004-2011, The 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._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("dojo.window");
+dojo.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.require("dijit._CssStateMixin");
+
+
+
+dojo.declare("dijit.form._FormWidget", [dijit._Widget, dijit._Templated, dijit._CssStateMixin],
+ {
+ // 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.
+
+ // name: [const] String
+ // Name used when submitting form; same as "name" attribute or plain HTML elements
+ name: "",
+
+ // 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.
+ 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
+ // Regarding escaping, see heading "Attribute values" in
+ // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2
+ this.nameAttrSetting = this.name ? ('name="' + this.name.replace(/'/g, """) + '"') : '';
+ this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ this.connect(this.domNode, "onmousedown", "_onMouseDown");
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this._set("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 these, because after the domNode is disabled, we can no longer receive
+ // mouse related events, see #4200
+ this._set("hovering", false);
+ this._set("active", false);
+
+ // clear tab stop(s) on this widget's focusable node(s) (ComboBox has two focusable nodes)
+ var attachPointNames = "tabIndex" in this.attributeMap ? this.attributeMap.tabIndex : "focusNode";
+ dojo.forEach(dojo.isArray(attachPointNames) ? attachPointNames : [attachPointNames], function(attachPointName){
+ var node = this[attachPointName];
+ // complex code because tabIndex=-1 on a <div> doesn't work on FF
+ if(dojo.isWebKit || dijit.hasDefaultTabStop(node)){ // see #11064 about webkit bug
+ node.setAttribute('tabIndex', "-1");
+ }else{
+ node.removeAttribute('tabIndex');
+ }
+ }, this);
+ }else{
+ if(this.tabIndex != ""){
+ this.focusNode.setAttribute('tabIndex', this.tabIndex);
+ }
+ }
+ },
+
+ setDisabled: function(/*Boolean*/ disabled){
+ // summary:
+ // Deprecated. Use set('disabled', ...) instead.
+ dojo.deprecated("setDisabled("+disabled+") is deprecated. Use set('disabled',"+disabled+") instead.", "", "2.0");
+ this.set('disabled', disabled);
+ },
+
+ _onFocus: function(e){
+ if(this.scrollOnFocus){
+ dojo.window.scrollIntoView(this.domNode);
+ }
+ this.inherited(arguments);
+ },
+
+ isFocusable: function(){
+ // summary:
+ // Tells if this widget is focusable or not. Used internally by dijit.
+ // tags:
+ // protected
+ return !this.disabled && this.focusNode && (dojo.style(this.domNode, "display") != "none");
+ },
+
+ focus: function(){
+ // summary:
+ // Put focus on this widget
+ if(!this.disabled){
+ dijit.focus(this.focusNode);
+ }
+ },
+
+ compare: function(/*anything*/ val1, /*anything*/ val2){
+ // summary:
+ // Compare 2 values (as returned by get('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 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==false,
+ // onChange is only called form priorityChange=true events.
+ // tags:
+ // private
+ 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;
+ }
+ this._pendingOnChange = this._pendingOnChange
+ || (typeof newValue != typeof this._lastValueReported)
+ || (this.compare(newValue, this._lastValueReported) != 0);
+ if((this.intermediateChanges || priorityChange || priorityChange === undefined) && this._pendingOnChange){
+ this._lastValueReported = newValue;
+ this._pendingOnChange = false;
+ 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;
+ },
+
+ 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 set('value', ...) instead.
+ dojo.deprecated("dijit.form._FormWidget:setValue("+value+") is deprecated. Use set('value',"+value+") instead.", "", "2.0");
+ this.set('value', value);
+ },
+
+ getValue: function(){
+ // summary:
+ // Deprecated. Use get('value') instead.
+ dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.", "", "2.0");
+ return this.get('value');
+ },
+
+ _onMouseDown: function(e){
+ // If user clicks on the button, even if the mouse is released outside of it,
+ // this button should get focus (to mimics native browser buttons).
+ // This is also needed on chrome because otherwise buttons won't get focus at all,
+ // which leads to bizarre focus restore on Dialog close etc.
+ if(!e.ctrlKey && dojo.mouseButtons.isLeft(e) && this.isFocusable()){ // !e.ctrlKey to ignore right-click on mac
+ // Set a global event to handle mouseup, so it fires properly
+ // even if the cursor leaves this.domNode before the mouse up event.
+ var mouseUpConnector = this.connect(dojo.body(), "onmouseup", function(){
+ if (this.isFocusable()) {
+ this.focus();
+ }
+ this.disconnect(mouseUpConnector);
+ });
+ }
+ }
+});
+
+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){
+ dojo.attr(this.focusNode, 'readOnly', value);
+ dijit.setWaiState(this.focusNode, "readonly", value);
+ this._set("readOnly", value);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ if(dojo.isIE){ // IE won't stop the event with keypress
+ this.connect(this.focusNode || this.domNode, "onkeydown", this._onKeyDown);
+ }
+ // Update our reset value if it hasn't yet been set (because this.set()
+ // is only called when there *is* a value)
+ if(this._resetValue === undefined){
+ this._lastValueReported = this._resetValue = this.value;
+ }
+ },
+
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so set('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._handleOnChange(newValue, priorityChange);
+ },
+
+ _handleOnChange: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ // summary:
+ // Called when the value of the widget has changed. Saves the new value in this.value,
+ // and calls onChange() if appropriate. See _FormWidget._handleOnChange() for details.
+ this._set("value", newValue);
+ this.inherited(arguments);
+ },
+
+ undo: function(){
+ // 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);
+ },
+
+ _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);
+ }
+ }
+ },
+
+ _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
+ var _this = this;
+ while(parent && parent.clientHeight == 0){ // search for parents that haven't rendered yet
+ (function ping(){
+ var disconnectHandle = _this.connect(parent, "onscroll",
+ function(e){
+ _this.disconnect(disconnectHandle); // only call once
+ 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;
+ }
+ }
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/_FormWidget.xd.js b/js/dojo-1.6/dijit/form/_FormWidget.xd.js new file mode 100644 index 0000000..eff2cab --- /dev/null +++ b/js/dojo-1.6/dijit/form/_FormWidget.xd.js @@ -0,0 +1,386 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form._FormWidget"],
+["require", "dojo.window"],
+["require", "dijit._Widget"],
+["require", "dijit._Templated"],
+["require", "dijit._CssStateMixin"]],
+defineResource: function(dojo, dijit, dojox){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("dojo.window");
+dojo.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.require("dijit._CssStateMixin");
+
+
+
+dojo.declare("dijit.form._FormWidget", [dijit._Widget, dijit._Templated, dijit._CssStateMixin],
+ {
+ // 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.
+
+ // name: [const] String
+ // Name used when submitting form; same as "name" attribute or plain HTML elements
+ name: "",
+
+ // 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.
+ 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
+ // Regarding escaping, see heading "Attribute values" in
+ // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2
+ this.nameAttrSetting = this.name ? ('name="' + this.name.replace(/'/g, """) + '"') : '';
+ this.inherited(arguments);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ this.connect(this.domNode, "onmousedown", "_onMouseDown");
+ },
+
+ _setDisabledAttr: function(/*Boolean*/ value){
+ this._set("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 these, because after the domNode is disabled, we can no longer receive
+ // mouse related events, see #4200
+ this._set("hovering", false);
+ this._set("active", false);
+
+ // clear tab stop(s) on this widget's focusable node(s) (ComboBox has two focusable nodes)
+ var attachPointNames = "tabIndex" in this.attributeMap ? this.attributeMap.tabIndex : "focusNode";
+ dojo.forEach(dojo.isArray(attachPointNames) ? attachPointNames : [attachPointNames], function(attachPointName){
+ var node = this[attachPointName];
+ // complex code because tabIndex=-1 on a <div> doesn't work on FF
+ if(dojo.isWebKit || dijit.hasDefaultTabStop(node)){ // see #11064 about webkit bug
+ node.setAttribute('tabIndex', "-1");
+ }else{
+ node.removeAttribute('tabIndex');
+ }
+ }, this);
+ }else{
+ if(this.tabIndex != ""){
+ this.focusNode.setAttribute('tabIndex', this.tabIndex);
+ }
+ }
+ },
+
+ setDisabled: function(/*Boolean*/ disabled){
+ // summary:
+ // Deprecated. Use set('disabled', ...) instead.
+ dojo.deprecated("setDisabled("+disabled+") is deprecated. Use set('disabled',"+disabled+") instead.", "", "2.0");
+ this.set('disabled', disabled);
+ },
+
+ _onFocus: function(e){
+ if(this.scrollOnFocus){
+ dojo.window.scrollIntoView(this.domNode);
+ }
+ this.inherited(arguments);
+ },
+
+ isFocusable: function(){
+ // summary:
+ // Tells if this widget is focusable or not. Used internally by dijit.
+ // tags:
+ // protected
+ return !this.disabled && this.focusNode && (dojo.style(this.domNode, "display") != "none");
+ },
+
+ focus: function(){
+ // summary:
+ // Put focus on this widget
+ if(!this.disabled){
+ dijit.focus(this.focusNode);
+ }
+ },
+
+ compare: function(/*anything*/ val1, /*anything*/ val2){
+ // summary:
+ // Compare 2 values (as returned by get('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 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==false,
+ // onChange is only called form priorityChange=true events.
+ // tags:
+ // private
+ 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;
+ }
+ this._pendingOnChange = this._pendingOnChange
+ || (typeof newValue != typeof this._lastValueReported)
+ || (this.compare(newValue, this._lastValueReported) != 0);
+ if((this.intermediateChanges || priorityChange || priorityChange === undefined) && this._pendingOnChange){
+ this._lastValueReported = newValue;
+ this._pendingOnChange = false;
+ 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;
+ },
+
+ 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 set('value', ...) instead.
+ dojo.deprecated("dijit.form._FormWidget:setValue("+value+") is deprecated. Use set('value',"+value+") instead.", "", "2.0");
+ this.set('value', value);
+ },
+
+ getValue: function(){
+ // summary:
+ // Deprecated. Use get('value') instead.
+ dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.", "", "2.0");
+ return this.get('value');
+ },
+
+ _onMouseDown: function(e){
+ // If user clicks on the button, even if the mouse is released outside of it,
+ // this button should get focus (to mimics native browser buttons).
+ // This is also needed on chrome because otherwise buttons won't get focus at all,
+ // which leads to bizarre focus restore on Dialog close etc.
+ if(!e.ctrlKey && dojo.mouseButtons.isLeft(e) && this.isFocusable()){ // !e.ctrlKey to ignore right-click on mac
+ // Set a global event to handle mouseup, so it fires properly
+ // even if the cursor leaves this.domNode before the mouse up event.
+ var mouseUpConnector = this.connect(dojo.body(), "onmouseup", function(){
+ if (this.isFocusable()) {
+ this.focus();
+ }
+ this.disconnect(mouseUpConnector);
+ });
+ }
+ }
+});
+
+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){
+ dojo.attr(this.focusNode, 'readOnly', value);
+ dijit.setWaiState(this.focusNode, "readonly", value);
+ this._set("readOnly", value);
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+
+ if(dojo.isIE){ // IE won't stop the event with keypress
+ this.connect(this.focusNode || this.domNode, "onkeydown", this._onKeyDown);
+ }
+ // Update our reset value if it hasn't yet been set (because this.set()
+ // is only called when there *is* a value)
+ if(this._resetValue === undefined){
+ this._lastValueReported = this._resetValue = this.value;
+ }
+ },
+
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ // summary:
+ // Hook so set('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._handleOnChange(newValue, priorityChange);
+ },
+
+ _handleOnChange: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ // summary:
+ // Called when the value of the widget has changed. Saves the new value in this.value,
+ // and calls onChange() if appropriate. See _FormWidget._handleOnChange() for details.
+ this._set("value", newValue);
+ this.inherited(arguments);
+ },
+
+ undo: function(){
+ // 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);
+ },
+
+ _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);
+ }
+ }
+ },
+
+ _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
+ var _this = this;
+ while(parent && parent.clientHeight == 0){ // search for parents that haven't rendered yet
+ (function ping(){
+ var disconnectHandle = _this.connect(parent, "onscroll",
+ function(e){
+ _this.disconnect(disconnectHandle); // only call once
+ 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;
+ }
+ }
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/_Spinner.js b/js/dojo-1.6/dijit/form/_Spinner.js new file mode 100644 index 0000000..b4e22a7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/_Spinner.js @@ -0,0 +1,129 @@ +/*
+ Copyright (c) 2004-2011, The 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._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 arrow key or up/down button becomes typematic
+ defaultTimeout: 500,
+
+ // minimumTimeout: Number
+ // minimum number of milliseconds that typematic event fires when held key or button is held
+ minimumTimeout: 10,
+
+ // 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: dojo.cache("dijit.form", "templates/Spinner.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\" role=\"presentation\"\r\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\r\n\t\t\tdojoAttachPoint=\"upArrowNode\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\"\r\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"▲\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/></div\r\n\t\t></div\r\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\r\n\t\t\tdojoAttachPoint=\"downArrowNode\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\"\r\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"▼\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/></div\r\n\t\t></div\r\n\t></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\r\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\r\n\t/></div\r\n></div>\r\n"),
+
+ baseClass: "dijitTextBox dijitSpinner",
+
+ // Set classes like dijitUpArrowButtonHover or dijitDownArrowButtonActive depending on
+ // mouse action over specified node
+ cssStateNodes: {
+ "upArrowNode": "dijitUpArrowButton",
+ "downArrowNode": "dijitDownArrowButton"
+ },
+
+ adjust: function(/*Object*/ val, /*Number*/ delta){
+ // 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;
+ },
+
+ _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._setValueAttr(this.adjust(this.get('value'), direction*increment), false);
+ dijit.selectInputText(this.textbox, this.textbox.value.length);
+ },
+
+ _arrowReleased: function(/*Node*/ node){
+ // summary:
+ // Handler for arrow button or arrow key being released
+ this._wheelTimer = null;
+ if(this.disabled || this.readOnly){ return; }
+ },
+
+ _typematicCallback: function(/*Number*/ count, /*DOMNode*/ node, /*Event*/ 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(count == -1){ this._arrowReleased(node); }
+ 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);
+ // 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(arguments);
+
+ // extra listeners
+ 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.minimumTimeout));
+ 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.minimumTimeout));
+ 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.minimumTimeout));
+ 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, this.minimumTimeout));
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dijit/form/_Spinner.xd.js b/js/dojo-1.6/dijit/form/_Spinner.xd.js new file mode 100644 index 0000000..cb33349 --- /dev/null +++ b/js/dojo-1.6/dijit/form/_Spinner.xd.js @@ -0,0 +1,134 @@ +/*
+ Copyright (c) 2004-2011, The 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._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dijit.form._Spinner"],
+["require", "dijit.form.ValidationTextBox"]],
+defineResource: function(dojo, dijit, dojox){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 arrow key or up/down button becomes typematic
+ defaultTimeout: 500,
+
+ // minimumTimeout: Number
+ // minimum number of milliseconds that typematic event fires when held key or button is held
+ minimumTimeout: 10,
+
+ // 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: dojo.cache("dijit.form", "templates/Spinner.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\" role=\"presentation\"\r\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\r\n\t\t\tdojoAttachPoint=\"upArrowNode\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\"\r\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"▲\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/></div\r\n\t\t></div\r\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\r\n\t\t\tdojoAttachPoint=\"downArrowNode\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\"\r\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"▼\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/></div\r\n\t\t></div\r\n\t></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\r\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\r\n\t/></div\r\n></div>\r\n"),
+
+ baseClass: "dijitTextBox dijitSpinner",
+
+ // Set classes like dijitUpArrowButtonHover or dijitDownArrowButtonActive depending on
+ // mouse action over specified node
+ cssStateNodes: {
+ "upArrowNode": "dijitUpArrowButton",
+ "downArrowNode": "dijitDownArrowButton"
+ },
+
+ adjust: function(/*Object*/ val, /*Number*/ delta){
+ // 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;
+ },
+
+ _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._setValueAttr(this.adjust(this.get('value'), direction*increment), false);
+ dijit.selectInputText(this.textbox, this.textbox.value.length);
+ },
+
+ _arrowReleased: function(/*Node*/ node){
+ // summary:
+ // Handler for arrow button or arrow key being released
+ this._wheelTimer = null;
+ if(this.disabled || this.readOnly){ return; }
+ },
+
+ _typematicCallback: function(/*Number*/ count, /*DOMNode*/ node, /*Event*/ 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(count == -1){ this._arrowReleased(node); }
+ 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);
+ // 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(arguments);
+
+ // extra listeners
+ 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.minimumTimeout));
+ 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.minimumTimeout));
+ 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.minimumTimeout));
+ 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, this.minimumTimeout));
+ }
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dijit/form/nls/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ComboBox.js new file mode 100644 index 0000000..49bba39 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Previous choices","nextMessage":"More choices"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ComboBox.xd.js new file mode 100644 index 0000000..e10c930 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "", {"previousMessage":"Previous choices","nextMessage":"More choices"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/Textarea.js b/js/dojo-1.6/dijit/form/nls/Textarea.js new file mode 100644 index 0000000..4b0e996 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"edit area","iframeFocusTitle":"edit area frame"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/Textarea.xd.js new file mode 100644 index 0000000..1946e95 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "", {"iframeEditTitle":"edit area","iframeFocusTitle":"edit area frame"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ar/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ar/ComboBox.js new file mode 100644 index 0000000..6a84531 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ar/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"الاختيارات السابقة","nextMessage":"مزيد من الاختيارات"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ar/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ar/ComboBox.xd.js new file mode 100644 index 0000000..acada7e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ar/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ar.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ar.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "ar", {"previousMessage":"الاختيارات السابقة","nextMessage":"مزيد من الاختيارات"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ar/Textarea.js b/js/dojo-1.6/dijit/form/nls/ar/Textarea.js new file mode 100644 index 0000000..fe623c6 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ar/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"مساحة التحرير","iframeFocusTitle":"اطار مساحة التحرير"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ar/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/ar/Textarea.xd.js new file mode 100644 index 0000000..565a711 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ar/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ar.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ar.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "ar", {"iframeEditTitle":"مساحة التحرير","iframeFocusTitle":"اطار مساحة التحرير"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ar/validate.js b/js/dojo-1.6/dijit/form/nls/ar/validate.js new file mode 100644 index 0000000..615e56b --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ar/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"هذه القيمة ليس بالمدى الصحيح.","invalidMessage":"القيمة التي تم ادخالها غير صحيحة.","missingMessage":"يجب ادخال هذه القيمة."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ar/validate.xd.js b/js/dojo-1.6/dijit/form/nls/ar/validate.xd.js new file mode 100644 index 0000000..32187af --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ar/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ar.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ar.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "ar", {"rangeMessage":"هذه القيمة ليس بالمدى الصحيح.","invalidMessage":"القيمة التي تم ادخالها غير صحيحة.","missingMessage":"يجب ادخال هذه القيمة."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ca/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ca/ComboBox.js new file mode 100644 index 0000000..1a37868 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ca/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Opcions anteriors","nextMessage":"Més opcions"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ca/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ca/ComboBox.xd.js new file mode 100644 index 0000000..9a9b582 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ca/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ca.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ca.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "ca", {"previousMessage":"Opcions anteriors","nextMessage":"Més opcions"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ca/Textarea.js b/js/dojo-1.6/dijit/form/nls/ca/Textarea.js new file mode 100644 index 0000000..357f923 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ca/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"àrea d'edició","iframeFocusTitle":"Marc de l'àrea d'edició"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ca/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/ca/Textarea.xd.js new file mode 100644 index 0000000..0b958ae --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ca/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ca.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ca.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "ca", {"iframeEditTitle":"àrea d'edició","iframeFocusTitle":"Marc de l'àrea d'edició"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ca/validate.js b/js/dojo-1.6/dijit/form/nls/ca/validate.js new file mode 100644 index 0000000..a0a592e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ca/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Aquest valor és fora de l'interval","invalidMessage":"El valor introduït no és vàlid","missingMessage":"Aquest valor és necessari"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ca/validate.xd.js b/js/dojo-1.6/dijit/form/nls/ca/validate.xd.js new file mode 100644 index 0000000..21670f4 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ca/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ca.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ca.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "ca", {"rangeMessage":"Aquest valor és fora de l'interval","invalidMessage":"El valor introduït no és vàlid","missingMessage":"Aquest valor és necessari"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/cs/ComboBox.js b/js/dojo-1.6/dijit/form/nls/cs/ComboBox.js new file mode 100644 index 0000000..84e0841 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/cs/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Předchozí volby","nextMessage":"Další volby"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/cs/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/cs/ComboBox.xd.js new file mode 100644 index 0000000..9ebded5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/cs/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.cs.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.cs.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "cs", {"previousMessage":"Předchozí volby","nextMessage":"Další volby"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/cs/Textarea.js b/js/dojo-1.6/dijit/form/nls/cs/Textarea.js new file mode 100644 index 0000000..8a75ddc --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/cs/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"oblast úprav","iframeFocusTitle":"rámec oblasti úprav"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/cs/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/cs/Textarea.xd.js new file mode 100644 index 0000000..e2e2efe --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/cs/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.cs.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.cs.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "cs", {"iframeEditTitle":"oblast úprav","iframeFocusTitle":"rámec oblasti úprav"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/cs/validate.js b/js/dojo-1.6/dijit/form/nls/cs/validate.js new file mode 100644 index 0000000..7bb7b9e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/cs/validate.js @@ -0,0 +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 diff --git a/js/dojo-1.6/dijit/form/nls/cs/validate.xd.js b/js/dojo-1.6/dijit/form/nls/cs/validate.xd.js new file mode 100644 index 0000000..582a7c0 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/cs/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.cs.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.cs.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "cs", {"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-1.6/dijit/form/nls/da/ComboBox.js b/js/dojo-1.6/dijit/form/nls/da/ComboBox.js new file mode 100644 index 0000000..4ddc10d --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/da/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Forrige valg","nextMessage":"Flere valg"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/da/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/da/ComboBox.xd.js new file mode 100644 index 0000000..8568e8c --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/da/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.da.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.da.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "da", {"previousMessage":"Forrige valg","nextMessage":"Flere valg"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/da/Textarea.js b/js/dojo-1.6/dijit/form/nls/da/Textarea.js new file mode 100644 index 0000000..244c210 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/da/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"redigeringsområde","iframeFocusTitle":"ramme om redigeringsområde"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/da/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/da/Textarea.xd.js new file mode 100644 index 0000000..d7d83fc --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/da/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.da.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.da.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "da", {"iframeEditTitle":"redigeringsområde","iframeFocusTitle":"ramme om redigeringsområde"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/da/validate.js b/js/dojo-1.6/dijit/form/nls/da/validate.js new file mode 100644 index 0000000..b42a99d --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/da/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Værdien er uden for intervallet.","invalidMessage":"Den angivne værdi er ikke gyldig.","missingMessage":"Værdien er påkrævet."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/da/validate.xd.js b/js/dojo-1.6/dijit/form/nls/da/validate.xd.js new file mode 100644 index 0000000..11e4ade --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/da/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.da.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.da.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "da", {"rangeMessage":"Værdien er uden for intervallet.","invalidMessage":"Den angivne værdi er ikke gyldig.","missingMessage":"Værdien er påkrævet."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/de/ComboBox.js b/js/dojo-1.6/dijit/form/nls/de/ComboBox.js new file mode 100644 index 0000000..6cce34b --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/de/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Vorherige Auswahl","nextMessage":"Weitere Auswahlmöglichkeiten"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/de/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/de/ComboBox.xd.js new file mode 100644 index 0000000..9139249 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/de/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.de.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.de.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "de", {"previousMessage":"Vorherige Auswahl","nextMessage":"Weitere Auswahlmöglichkeiten"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/de/Textarea.js b/js/dojo-1.6/dijit/form/nls/de/Textarea.js new file mode 100644 index 0000000..2cf75db --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/de/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"Editierbereich","iframeFocusTitle":"Rahmen für Editierbereich"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/de/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/de/Textarea.xd.js new file mode 100644 index 0000000..5239e23 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/de/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.de.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.de.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "de", {"iframeEditTitle":"Editierbereich","iframeFocusTitle":"Rahmen für Editierbereich"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/de/validate.js b/js/dojo-1.6/dijit/form/nls/de/validate.js new file mode 100644 index 0000000..597796d --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/de/validate.js @@ -0,0 +1 @@ +({"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-1.6/dijit/form/nls/de/validate.xd.js b/js/dojo-1.6/dijit/form/nls/de/validate.xd.js new file mode 100644 index 0000000..f08414d --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/de/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.de.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.de.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "de", {"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-1.6/dijit/form/nls/el/ComboBox.js b/js/dojo-1.6/dijit/form/nls/el/ComboBox.js new file mode 100644 index 0000000..ec294d1 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/el/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Προηγούμενες επιλογές","nextMessage":"Περισσότερες επιλογές"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/el/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/el/ComboBox.xd.js new file mode 100644 index 0000000..597a4be --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/el/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.el.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.el.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "el", {"previousMessage":"Προηγούμενες επιλογές","nextMessage":"Περισσότερες επιλογές"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/el/Textarea.js b/js/dojo-1.6/dijit/form/nls/el/Textarea.js new file mode 100644 index 0000000..9ce37a9 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/el/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"περιοχή επεξεργασίας","iframeFocusTitle":"πλαίσιο περιοχής επεξεργασίας"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/el/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/el/Textarea.xd.js new file mode 100644 index 0000000..53c987c --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/el/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.el.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.el.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "el", {"iframeEditTitle":"περιοχή επεξεργασίας","iframeFocusTitle":"πλαίσιο περιοχής επεξεργασίας"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/el/validate.js b/js/dojo-1.6/dijit/form/nls/el/validate.js new file mode 100644 index 0000000..cc57d55 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/el/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Η τιμή αυτή δεν ανήκει στο εύρος έγκυρων τιμών.","invalidMessage":"Η τιμή που καταχωρήσατε δεν είναι έγκυρη.","missingMessage":"Η τιμή αυτή πρέπει απαραίτητα να καθοριστεί."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/el/validate.xd.js b/js/dojo-1.6/dijit/form/nls/el/validate.xd.js new file mode 100644 index 0000000..e9f3afa --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/el/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.el.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.el.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "el", {"rangeMessage":"Η τιμή αυτή δεν ανήκει στο εύρος έγκυρων τιμών.","invalidMessage":"Η τιμή που καταχωρήσατε δεν είναι έγκυρη.","missingMessage":"Η τιμή αυτή πρέπει απαραίτητα να καθοριστεί."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/es/ComboBox.js b/js/dojo-1.6/dijit/form/nls/es/ComboBox.js new file mode 100644 index 0000000..5bf69f9 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/es/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Opciones anteriores","nextMessage":"Más opciones"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/es/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/es/ComboBox.xd.js new file mode 100644 index 0000000..5c7a79f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/es/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.es.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.es.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "es", {"previousMessage":"Opciones anteriores","nextMessage":"Más opciones"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/es/Textarea.js b/js/dojo-1.6/dijit/form/nls/es/Textarea.js new file mode 100644 index 0000000..f92a50f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/es/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"área de edición","iframeFocusTitle":"marco del área de edición"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/es/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/es/Textarea.xd.js new file mode 100644 index 0000000..0640eae --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/es/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.es.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.es.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "es", {"iframeEditTitle":"área de edición","iframeFocusTitle":"marco del área de edición"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/es/validate.js b/js/dojo-1.6/dijit/form/nls/es/validate.js new file mode 100644 index 0000000..65e190e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/es/validate.js @@ -0,0 +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 diff --git a/js/dojo-1.6/dijit/form/nls/es/validate.xd.js b/js/dojo-1.6/dijit/form/nls/es/validate.xd.js new file mode 100644 index 0000000..4eeb7f2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/es/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.es.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.es.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "es", {"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-1.6/dijit/form/nls/fi/ComboBox.js b/js/dojo-1.6/dijit/form/nls/fi/ComboBox.js new file mode 100644 index 0000000..6d9b830 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fi/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Edelliset valinnat","nextMessage":"Lisää valintoja"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fi/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/fi/ComboBox.xd.js new file mode 100644 index 0000000..ba1e137 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fi/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.fi.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.fi.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "fi", {"previousMessage":"Edelliset valinnat","nextMessage":"Lisää valintoja"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fi/Textarea.js b/js/dojo-1.6/dijit/form/nls/fi/Textarea.js new file mode 100644 index 0000000..5efaee9 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fi/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"muokkausalue","iframeFocusTitle":"muokkausalueen kehys"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fi/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/fi/Textarea.xd.js new file mode 100644 index 0000000..599a7b8 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fi/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.fi.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.fi.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "fi", {"iframeEditTitle":"muokkausalue","iframeFocusTitle":"muokkausalueen kehys"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fi/validate.js b/js/dojo-1.6/dijit/form/nls/fi/validate.js new file mode 100644 index 0000000..276efcd --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fi/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Tämä arvo on sallitun alueen ulkopuolella.","invalidMessage":"Annettu arvo ei kelpaa.","missingMessage":"Tämä arvo on pakollinen."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fi/validate.xd.js b/js/dojo-1.6/dijit/form/nls/fi/validate.xd.js new file mode 100644 index 0000000..ecbea35 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fi/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.fi.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.fi.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "fi", {"rangeMessage":"Tämä arvo on sallitun alueen ulkopuolella.","invalidMessage":"Annettu arvo ei kelpaa.","missingMessage":"Tämä arvo on pakollinen."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fr/ComboBox.js b/js/dojo-1.6/dijit/form/nls/fr/ComboBox.js new file mode 100644 index 0000000..14b3976 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fr/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Choix précédents","nextMessage":"Plus de choix"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fr/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/fr/ComboBox.xd.js new file mode 100644 index 0000000..915b9e4 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fr/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.fr.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.fr.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "fr", {"previousMessage":"Choix précédents","nextMessage":"Plus de choix"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fr/Textarea.js b/js/dojo-1.6/dijit/form/nls/fr/Textarea.js new file mode 100644 index 0000000..4abb6c3 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fr/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"zone d'édition","iframeFocusTitle":"cadre de la zone d'édition"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fr/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/fr/Textarea.xd.js new file mode 100644 index 0000000..5a59af4 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fr/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.fr.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.fr.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "fr", {"iframeEditTitle":"zone d'édition","iframeFocusTitle":"cadre de la zone d'édition"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/fr/validate.js b/js/dojo-1.6/dijit/form/nls/fr/validate.js new file mode 100644 index 0000000..95a0169 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fr/validate.js @@ -0,0 +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 diff --git a/js/dojo-1.6/dijit/form/nls/fr/validate.xd.js b/js/dojo-1.6/dijit/form/nls/fr/validate.xd.js new file mode 100644 index 0000000..e909518 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/fr/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.fr.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.fr.validate");dojo._xdLoadFlattenedBundle("dijit.form", "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."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/he/ComboBox.js b/js/dojo-1.6/dijit/form/nls/he/ComboBox.js new file mode 100644 index 0000000..169d0f5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/he/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"האפשרויות הקודמות","nextMessage":"אפשרויות נוספות"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/he/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/he/ComboBox.xd.js new file mode 100644 index 0000000..0393028 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/he/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.he.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.he.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "he", {"previousMessage":"האפשרויות הקודמות","nextMessage":"אפשרויות נוספות"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/he/Textarea.js b/js/dojo-1.6/dijit/form/nls/he/Textarea.js new file mode 100644 index 0000000..809eadf --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/he/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"אזור עריכה","iframeFocusTitle":"מסגרת אזור עריכה"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/he/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/he/Textarea.xd.js new file mode 100644 index 0000000..e71e99e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/he/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.he.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.he.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "he", {"iframeEditTitle":"אזור עריכה","iframeFocusTitle":"מסגרת אזור עריכה"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/he/validate.js b/js/dojo-1.6/dijit/form/nls/he/validate.js new file mode 100644 index 0000000..3d778e2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/he/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"הערך מחוץ לטווח.","invalidMessage":"הערך שצוין אינו חוקי.","missingMessage":"זהו ערך דרוש."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/he/validate.xd.js b/js/dojo-1.6/dijit/form/nls/he/validate.xd.js new file mode 100644 index 0000000..3ee3159 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/he/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.he.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.he.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "he", {"rangeMessage":"הערך מחוץ לטווח.","invalidMessage":"הערך שצוין אינו חוקי.","missingMessage":"זהו ערך דרוש."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/hu/ComboBox.js b/js/dojo-1.6/dijit/form/nls/hu/ComboBox.js new file mode 100644 index 0000000..4b6a620 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/hu/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Előző menüpontok","nextMessage":"További menüpontok"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/hu/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/hu/ComboBox.xd.js new file mode 100644 index 0000000..ecfc604 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/hu/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.hu.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.hu.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "hu", {"previousMessage":"Előző menüpontok","nextMessage":"További menüpontok"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/hu/Textarea.js b/js/dojo-1.6/dijit/form/nls/hu/Textarea.js new file mode 100644 index 0000000..9b4ca01 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/hu/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"szerkesztési terület","iframeFocusTitle":"szerkesztési terület keret"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/hu/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/hu/Textarea.xd.js new file mode 100644 index 0000000..264e413 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/hu/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.hu.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.hu.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "hu", {"iframeEditTitle":"szerkesztési terület","iframeFocusTitle":"szerkesztési terület keret"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/hu/validate.js b/js/dojo-1.6/dijit/form/nls/hu/validate.js new file mode 100644 index 0000000..b6d7996 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/hu/validate.js @@ -0,0 +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 diff --git a/js/dojo-1.6/dijit/form/nls/hu/validate.xd.js b/js/dojo-1.6/dijit/form/nls/hu/validate.xd.js new file mode 100644 index 0000000..d07fd57 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/hu/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.hu.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.hu.validate");dojo._xdLoadFlattenedBundle("dijit.form", "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."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/it/ComboBox.js b/js/dojo-1.6/dijit/form/nls/it/ComboBox.js new file mode 100644 index 0000000..9f67072 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/it/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Scelte precedenti","nextMessage":"Altre scelte"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/it/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/it/ComboBox.xd.js new file mode 100644 index 0000000..c069689 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/it/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.it.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.it.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "it", {"previousMessage":"Scelte precedenti","nextMessage":"Altre scelte"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/it/Textarea.js b/js/dojo-1.6/dijit/form/nls/it/Textarea.js new file mode 100644 index 0000000..1b14ecc --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/it/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"modifica area","iframeFocusTitle":"modifica frame area"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/it/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/it/Textarea.xd.js new file mode 100644 index 0000000..40073d0 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/it/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.it.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.it.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "it", {"iframeEditTitle":"modifica area","iframeFocusTitle":"modifica frame area"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/it/validate.js b/js/dojo-1.6/dijit/form/nls/it/validate.js new file mode 100644 index 0000000..af7227f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/it/validate.js @@ -0,0 +1 @@ +({"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-1.6/dijit/form/nls/it/validate.xd.js b/js/dojo-1.6/dijit/form/nls/it/validate.xd.js new file mode 100644 index 0000000..8207d08 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/it/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.it.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.it.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "it", {"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-1.6/dijit/form/nls/ja/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ja/ComboBox.js new file mode 100644 index 0000000..6b34170 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ja/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"以前の選択項目","nextMessage":"追加の選択項目"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ja/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ja/ComboBox.xd.js new file mode 100644 index 0000000..63567aa --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ja/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ja.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ja.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "ja", {"previousMessage":"以前の選択項目","nextMessage":"追加の選択項目"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ja/Textarea.js b/js/dojo-1.6/dijit/form/nls/ja/Textarea.js new file mode 100644 index 0000000..8a52f4a --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ja/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"編集域","iframeFocusTitle":"編集域フレーム"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ja/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/ja/Textarea.xd.js new file mode 100644 index 0000000..3fcca93 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ja/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ja.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ja.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "ja", {"iframeEditTitle":"編集域","iframeFocusTitle":"編集域フレーム"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ja/validate.js b/js/dojo-1.6/dijit/form/nls/ja/validate.js new file mode 100644 index 0000000..450cd7e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ja/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"この値は範囲外です。","invalidMessage":"入力した値は無効です。","missingMessage":"この値は必須です。"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ja/validate.xd.js b/js/dojo-1.6/dijit/form/nls/ja/validate.xd.js new file mode 100644 index 0000000..349596c --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ja/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ja.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ja.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "ja", {"rangeMessage":"この値は範囲外です。","invalidMessage":"入力した値は無効です。","missingMessage":"この値は必須です。"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/kk/ComboBox.js b/js/dojo-1.6/dijit/form/nls/kk/ComboBox.js new file mode 100644 index 0000000..edb918a --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/kk/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Алдыңғы нұсқалар","nextMessage":"Басқа нұсқалар"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/kk/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/kk/ComboBox.xd.js new file mode 100644 index 0000000..c35150b --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/kk/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.kk.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.kk.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "kk", {"previousMessage":"Алдыңғы нұсқалар","nextMessage":"Басқа нұсқалар"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/kk/Textarea.js b/js/dojo-1.6/dijit/form/nls/kk/Textarea.js new file mode 100644 index 0000000..617fcb9 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/kk/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"өңдеу аумағы","iframeFocusTitle":"өңдеу аумағының жақтауы"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/kk/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/kk/Textarea.xd.js new file mode 100644 index 0000000..b7c39ea --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/kk/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.kk.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.kk.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "kk", {"iframeEditTitle":"өңдеу аумағы","iframeFocusTitle":"өңдеу аумағының жақтауы"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/kk/validate.js b/js/dojo-1.6/dijit/form/nls/kk/validate.js new file mode 100644 index 0000000..d676121 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/kk/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Бұл мән ауқымнан тыс.","invalidMessage":"Енгізілген мән жарамды емес.","missingMessage":"Бұл мән міндетті."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/kk/validate.xd.js b/js/dojo-1.6/dijit/form/nls/kk/validate.xd.js new file mode 100644 index 0000000..81c7cd3 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/kk/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.kk.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.kk.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "kk", {"rangeMessage":"Бұл мән ауқымнан тыс.","invalidMessage":"Енгізілген мән жарамды емес.","missingMessage":"Бұл мән міндетті."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ko/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ko/ComboBox.js new file mode 100644 index 0000000..87d0f06 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ko/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"이전 선택사항","nextMessage":"기타 선택사항"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ko/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ko/ComboBox.xd.js new file mode 100644 index 0000000..e046f2f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ko/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ko.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ko.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "ko", {"previousMessage":"이전 선택사항","nextMessage":"기타 선택사항"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ko/Textarea.js b/js/dojo-1.6/dijit/form/nls/ko/Textarea.js new file mode 100644 index 0000000..5c4e916 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ko/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"편집 영역","iframeFocusTitle":"편집 영역 프레임"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ko/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/ko/Textarea.xd.js new file mode 100644 index 0000000..b43e9c0 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ko/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ko.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ko.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "ko", {"iframeEditTitle":"편집 영역","iframeFocusTitle":"편집 영역 프레임"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ko/validate.js b/js/dojo-1.6/dijit/form/nls/ko/validate.js new file mode 100644 index 0000000..c76c676 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ko/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"이 값은 범위를 벗어납니다.","invalidMessage":"입력된 값이 올바르지 않습니다.","missingMessage":"이 값은 필수입니다."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ko/validate.xd.js b/js/dojo-1.6/dijit/form/nls/ko/validate.xd.js new file mode 100644 index 0000000..b9acac7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ko/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ko.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ko.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "ko", {"rangeMessage":"이 값은 범위를 벗어납니다.","invalidMessage":"입력된 값이 올바르지 않습니다.","missingMessage":"이 값은 필수입니다."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nb/ComboBox.js b/js/dojo-1.6/dijit/form/nls/nb/ComboBox.js new file mode 100644 index 0000000..de14554 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nb/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Tidligere valg","nextMessage":"Flere valg"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nb/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/nb/ComboBox.xd.js new file mode 100644 index 0000000..5655910 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nb/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.nb.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.nb.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "nb", {"previousMessage":"Tidligere valg","nextMessage":"Flere valg"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nb/Textarea.js b/js/dojo-1.6/dijit/form/nls/nb/Textarea.js new file mode 100644 index 0000000..16fadf5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nb/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"redigeringsområde","iframeFocusTitle":"ramme for redigeringsområde"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nb/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/nb/Textarea.xd.js new file mode 100644 index 0000000..e5cc153 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nb/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.nb.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.nb.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "nb", {"iframeEditTitle":"redigeringsområde","iframeFocusTitle":"ramme for redigeringsområde"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nb/validate.js b/js/dojo-1.6/dijit/form/nls/nb/validate.js new file mode 100644 index 0000000..2fe96f2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nb/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Denne verdien er utenfor gyldig område.","invalidMessage":"Den angitte verdien er ikke gyldig.","missingMessage":"Denne verdien er obligatorisk."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nb/validate.xd.js b/js/dojo-1.6/dijit/form/nls/nb/validate.xd.js new file mode 100644 index 0000000..52777d6 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nb/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.nb.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.nb.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "nb", {"rangeMessage":"Denne verdien er utenfor gyldig område.","invalidMessage":"Den angitte verdien er ikke gyldig.","missingMessage":"Denne verdien er obligatorisk."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nl/ComboBox.js b/js/dojo-1.6/dijit/form/nls/nl/ComboBox.js new file mode 100644 index 0000000..b5885d7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nl/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Eerdere opties","nextMessage":"Meer opties"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nl/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/nl/ComboBox.xd.js new file mode 100644 index 0000000..b97e363 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nl/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.nl.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.nl.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "nl", {"previousMessage":"Eerdere opties","nextMessage":"Meer opties"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nl/Textarea.js b/js/dojo-1.6/dijit/form/nls/nl/Textarea.js new file mode 100644 index 0000000..d13c3a6 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nl/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"veld bewerken","iframeFocusTitle":"veldkader bewerken"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nl/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/nl/Textarea.xd.js new file mode 100644 index 0000000..dac7efb --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nl/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.nl.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.nl.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "nl", {"iframeEditTitle":"veld bewerken","iframeFocusTitle":"veldkader bewerken"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nl/validate.js b/js/dojo-1.6/dijit/form/nls/nl/validate.js new file mode 100644 index 0000000..b3062c1 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nl/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Deze waarde is niet toegestaan.","invalidMessage":"De opgegeven waarde is ongeldig.","missingMessage":"Deze waarde is verplicht."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/nl/validate.xd.js b/js/dojo-1.6/dijit/form/nls/nl/validate.xd.js new file mode 100644 index 0000000..ac6524c --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/nl/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.nl.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.nl.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "nl", {"rangeMessage":"Deze waarde is niet toegestaan.","invalidMessage":"De opgegeven waarde is ongeldig.","missingMessage":"Deze waarde is verplicht."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pl/ComboBox.js b/js/dojo-1.6/dijit/form/nls/pl/ComboBox.js new file mode 100644 index 0000000..f2b4b08 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pl/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Poprzednie wybory","nextMessage":"Więcej wyborów"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pl/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/pl/ComboBox.xd.js new file mode 100644 index 0000000..71ae4a5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pl/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pl.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pl.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "pl", {"previousMessage":"Poprzednie wybory","nextMessage":"Więcej wyborów"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pl/Textarea.js b/js/dojo-1.6/dijit/form/nls/pl/Textarea.js new file mode 100644 index 0000000..33b050a --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pl/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"edycja obszaru","iframeFocusTitle":"edycja ramki obszaru"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pl/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/pl/Textarea.xd.js new file mode 100644 index 0000000..6f9aa77 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pl/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pl.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pl.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "pl", {"iframeEditTitle":"edycja obszaru","iframeFocusTitle":"edycja ramki obszaru"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pl/validate.js b/js/dojo-1.6/dijit/form/nls/pl/validate.js new file mode 100644 index 0000000..cf05d2f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pl/validate.js @@ -0,0 +1 @@ +({"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-1.6/dijit/form/nls/pl/validate.xd.js b/js/dojo-1.6/dijit/form/nls/pl/validate.xd.js new file mode 100644 index 0000000..1e09a28 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pl/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pl.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pl.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "pl", {"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-1.6/dijit/form/nls/pt-pt/ComboBox.js b/js/dojo-1.6/dijit/form/nls/pt-pt/ComboBox.js new file mode 100644 index 0000000..2540542 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt-pt/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Opções anteriores","nextMessage":"Mais opções"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt-pt/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/pt-pt/ComboBox.xd.js new file mode 100644 index 0000000..a8663de --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt-pt/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pt-pt.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pt-pt.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "pt-pt", {"previousMessage":"Opções anteriores","nextMessage":"Mais opções"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt-pt/Textarea.js b/js/dojo-1.6/dijit/form/nls/pt-pt/Textarea.js new file mode 100644 index 0000000..bcd75e7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt-pt/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"área de edição","iframeFocusTitle":"painel da área de edição"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt-pt/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/pt-pt/Textarea.xd.js new file mode 100644 index 0000000..3e8b085 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt-pt/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pt-pt.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pt-pt.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "pt-pt", {"iframeEditTitle":"área de edição","iframeFocusTitle":"painel da área de edição"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt-pt/validate.js b/js/dojo-1.6/dijit/form/nls/pt-pt/validate.js new file mode 100644 index 0000000..3d92170 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt-pt/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Este valor encontra-se fora do intervalo.","invalidMessage":"O valor introduzido não é válido.","missingMessage":"Este valor é requerido."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt-pt/validate.xd.js b/js/dojo-1.6/dijit/form/nls/pt-pt/validate.xd.js new file mode 100644 index 0000000..741df2c --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt-pt/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pt-pt.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pt-pt.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "pt-pt", {"rangeMessage":"Este valor encontra-se fora do intervalo.","invalidMessage":"O valor introduzido não é válido.","missingMessage":"Este valor é requerido."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt/ComboBox.js b/js/dojo-1.6/dijit/form/nls/pt/ComboBox.js new file mode 100644 index 0000000..2540542 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Opções anteriores","nextMessage":"Mais opções"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/pt/ComboBox.xd.js new file mode 100644 index 0000000..a5bb613 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pt.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pt.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "pt", {"previousMessage":"Opções anteriores","nextMessage":"Mais opções"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt/Textarea.js b/js/dojo-1.6/dijit/form/nls/pt/Textarea.js new file mode 100644 index 0000000..b4a0b0f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"editar área","iframeFocusTitle":"editar quadro da área"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/pt/Textarea.xd.js new file mode 100644 index 0000000..3093dbb --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pt.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pt.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "pt", {"iframeEditTitle":"editar área","iframeFocusTitle":"editar quadro da área"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/pt/validate.js b/js/dojo-1.6/dijit/form/nls/pt/validate.js new file mode 100644 index 0000000..3b43579 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt/validate.js @@ -0,0 +1 @@ +({"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-1.6/dijit/form/nls/pt/validate.xd.js b/js/dojo-1.6/dijit/form/nls/pt/validate.xd.js new file mode 100644 index 0000000..1231741 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/pt/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.pt.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.pt.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "pt", {"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-1.6/dijit/form/nls/ro/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ro/ComboBox.js new file mode 100644 index 0000000..f491a11 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ro/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Alegeri anterioare","nextMessage":"Mai multe alegeri"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ro/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ro/ComboBox.xd.js new file mode 100644 index 0000000..1fbdc32 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ro/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ro.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ro.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "ro", {"previousMessage":"Alegeri anterioare","nextMessage":"Mai multe alegeri"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ro/Textarea.js b/js/dojo-1.6/dijit/form/nls/ro/Textarea.js new file mode 100644 index 0000000..2e029d9 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ro/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"zonă de editare","iframeFocusTitle":"cadru zonă de editare"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ro/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/ro/Textarea.xd.js new file mode 100644 index 0000000..85318bd --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ro/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ro.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ro.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "ro", {"iframeEditTitle":"zonă de editare","iframeFocusTitle":"cadru zonă de editare"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ro/validate.js b/js/dojo-1.6/dijit/form/nls/ro/validate.js new file mode 100644 index 0000000..f0892c7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ro/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Această valoare este în afara intervalului. ","invalidMessage":"Valoarea introdusă nu este validă.","missingMessage":"Această valoare este necesară."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ro/validate.xd.js b/js/dojo-1.6/dijit/form/nls/ro/validate.xd.js new file mode 100644 index 0000000..d7094b1 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ro/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ro.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ro.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "ro", {"rangeMessage":"Această valoare este în afara intervalului. ","invalidMessage":"Valoarea introdusă nu este validă.","missingMessage":"Această valoare este necesară."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ru/ComboBox.js b/js/dojo-1.6/dijit/form/nls/ru/ComboBox.js new file mode 100644 index 0000000..193f4ee --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ru/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Предыдущие варианты","nextMessage":"Следующие варианты"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ru/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/ru/ComboBox.xd.js new file mode 100644 index 0000000..f57a18e --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ru/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ru.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ru.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "ru", {"previousMessage":"Предыдущие варианты","nextMessage":"Следующие варианты"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ru/Textarea.js b/js/dojo-1.6/dijit/form/nls/ru/Textarea.js new file mode 100644 index 0000000..ad7ad22 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ru/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"область редактирования","iframeFocusTitle":"фрейм области редактирования"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ru/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/ru/Textarea.xd.js new file mode 100644 index 0000000..e5ed2de --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ru/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ru.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ru.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "ru", {"iframeEditTitle":"область редактирования","iframeFocusTitle":"фрейм области редактирования"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ru/validate.js b/js/dojo-1.6/dijit/form/nls/ru/validate.js new file mode 100644 index 0000000..35fb5ca --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ru/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Это значение вне диапазона.","invalidMessage":"Указано недопустимое значение.","missingMessage":"Это обязательное значение."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/ru/validate.xd.js b/js/dojo-1.6/dijit/form/nls/ru/validate.xd.js new file mode 100644 index 0000000..c40f9e0 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/ru/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.ru.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.ru.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "ru", {"rangeMessage":"Это значение вне диапазона.","invalidMessage":"Указано недопустимое значение.","missingMessage":"Это обязательное значение."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sk/ComboBox.js b/js/dojo-1.6/dijit/form/nls/sk/ComboBox.js new file mode 100644 index 0000000..a45c7f2 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sk/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Predchádzajúce voľby","nextMessage":"Ďalšie voľby"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sk/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/sk/ComboBox.xd.js new file mode 100644 index 0000000..9652473 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sk/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sk.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sk.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "sk", {"previousMessage":"Predchádzajúce voľby","nextMessage":"Ďalšie voľby"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sk/Textarea.js b/js/dojo-1.6/dijit/form/nls/sk/Textarea.js new file mode 100644 index 0000000..3ee98c3 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sk/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"upraviť oblasť","iframeFocusTitle":"upraviť rám oblasti"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sk/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/sk/Textarea.xd.js new file mode 100644 index 0000000..3784364 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sk/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sk.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sk.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "sk", {"iframeEditTitle":"upraviť oblasť","iframeFocusTitle":"upraviť rám oblasti"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sk/validate.js b/js/dojo-1.6/dijit/form/nls/sk/validate.js new file mode 100644 index 0000000..612dab5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sk/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Táto hodnota je mimo rozsah.","invalidMessage":"Zadaná hodnota nie je platná.","missingMessage":"Táto hodnota je vyžadovaná."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sk/validate.xd.js b/js/dojo-1.6/dijit/form/nls/sk/validate.xd.js new file mode 100644 index 0000000..7123fdf --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sk/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sk.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sk.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "sk", {"rangeMessage":"Táto hodnota je mimo rozsah.","invalidMessage":"Zadaná hodnota nie je platná.","missingMessage":"Táto hodnota je vyžadovaná."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sl/ComboBox.js b/js/dojo-1.6/dijit/form/nls/sl/ComboBox.js new file mode 100644 index 0000000..61d4469 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sl/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Prejšnje izbire","nextMessage":"Dodatne izbire"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sl/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/sl/ComboBox.xd.js new file mode 100644 index 0000000..5e942c7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sl/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sl.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sl.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "sl", {"previousMessage":"Prejšnje izbire","nextMessage":"Dodatne izbire"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sl/Textarea.js b/js/dojo-1.6/dijit/form/nls/sl/Textarea.js new file mode 100644 index 0000000..0e0d511 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sl/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"urejevalno področje","iframeFocusTitle":"okvir urejevalnega področja"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sl/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/sl/Textarea.xd.js new file mode 100644 index 0000000..6fe9a3d --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sl/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sl.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sl.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "sl", {"iframeEditTitle":"urejevalno področje","iframeFocusTitle":"okvir urejevalnega področja"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sl/validate.js b/js/dojo-1.6/dijit/form/nls/sl/validate.js new file mode 100644 index 0000000..b84b353 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sl/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Ta vrednost je izven območja.","invalidMessage":"Vnesena vrednost ni veljavna.","missingMessage":"Ta vrednost je zahtevana."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sl/validate.xd.js b/js/dojo-1.6/dijit/form/nls/sl/validate.xd.js new file mode 100644 index 0000000..934a735 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sl/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sl.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sl.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "sl", {"rangeMessage":"Ta vrednost je izven območja.","invalidMessage":"Vnesena vrednost ni veljavna.","missingMessage":"Ta vrednost je zahtevana."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sv/ComboBox.js b/js/dojo-1.6/dijit/form/nls/sv/ComboBox.js new file mode 100644 index 0000000..860bf75 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sv/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Föregående alternativ","nextMessage":"Fler alternativ"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sv/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/sv/ComboBox.xd.js new file mode 100644 index 0000000..9a234fb --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sv/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sv.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sv.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "sv", {"previousMessage":"Föregående alternativ","nextMessage":"Fler alternativ"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sv/Textarea.js b/js/dojo-1.6/dijit/form/nls/sv/Textarea.js new file mode 100644 index 0000000..9e508ac --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sv/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"redigeringsområde","iframeFocusTitle":"redigeringsområdesram"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sv/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/sv/Textarea.xd.js new file mode 100644 index 0000000..1f753aa --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sv/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sv.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sv.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "sv", {"iframeEditTitle":"redigeringsområde","iframeFocusTitle":"redigeringsområdesram"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sv/validate.js b/js/dojo-1.6/dijit/form/nls/sv/validate.js new file mode 100644 index 0000000..8c1b537 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sv/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Värdet är utanför intervallet.","invalidMessage":"Det angivna värdet är ogiltigt.","missingMessage":"Värdet är obligatoriskt."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/sv/validate.xd.js b/js/dojo-1.6/dijit/form/nls/sv/validate.xd.js new file mode 100644 index 0000000..a85bbca --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/sv/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.sv.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.sv.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "sv", {"rangeMessage":"Värdet är utanför intervallet.","invalidMessage":"Det angivna värdet är ogiltigt.","missingMessage":"Värdet är obligatoriskt."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/th/ComboBox.js b/js/dojo-1.6/dijit/form/nls/th/ComboBox.js new file mode 100644 index 0000000..ff32a4f --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/th/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"การเลือกก่อนหน้า","nextMessage":"การเลือกเพิ่มเติม"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/th/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/th/ComboBox.xd.js new file mode 100644 index 0000000..0646c08 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/th/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.th.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.th.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "th", {"previousMessage":"การเลือกก่อนหน้า","nextMessage":"การเลือกเพิ่มเติม"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/th/Textarea.js b/js/dojo-1.6/dijit/form/nls/th/Textarea.js new file mode 100644 index 0000000..4361183 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/th/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"แก้ไขพื้นที่","iframeFocusTitle":"แก้ไขกรอบพื้นที่"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/th/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/th/Textarea.xd.js new file mode 100644 index 0000000..d421452 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/th/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.th.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.th.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "th", {"iframeEditTitle":"แก้ไขพื้นที่","iframeFocusTitle":"แก้ไขกรอบพื้นที่"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/th/validate.js b/js/dojo-1.6/dijit/form/nls/th/validate.js new file mode 100644 index 0000000..86606b7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/th/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"ค่านี้เกินช่วง","invalidMessage":"ค่าที่ป้อนไม่ถูกต้อง","missingMessage":"จำเป็นต้องมีค่านี้"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/th/validate.xd.js b/js/dojo-1.6/dijit/form/nls/th/validate.xd.js new file mode 100644 index 0000000..830ba80 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/th/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.th.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.th.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "th", {"rangeMessage":"ค่านี้เกินช่วง","invalidMessage":"ค่าที่ป้อนไม่ถูกต้อง","missingMessage":"จำเป็นต้องมีค่านี้"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/tr/ComboBox.js b/js/dojo-1.6/dijit/form/nls/tr/ComboBox.js new file mode 100644 index 0000000..46f71dc --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/tr/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"Önceki seçenekler","nextMessage":"Diğer seçenekler"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/tr/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/tr/ComboBox.xd.js new file mode 100644 index 0000000..2d6adcd --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/tr/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.tr.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.tr.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "tr", {"previousMessage":"Önceki seçenekler","nextMessage":"Diğer seçenekler"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/tr/Textarea.js b/js/dojo-1.6/dijit/form/nls/tr/Textarea.js new file mode 100644 index 0000000..3f2b5e7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/tr/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"düzenleme alanı","iframeFocusTitle":"düzenleme alanı çerçevesi"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/tr/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/tr/Textarea.xd.js new file mode 100644 index 0000000..ea9bd53 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/tr/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.tr.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.tr.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "tr", {"iframeEditTitle":"düzenleme alanı","iframeFocusTitle":"düzenleme alanı çerçevesi"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/tr/validate.js b/js/dojo-1.6/dijit/form/nls/tr/validate.js new file mode 100644 index 0000000..838dbda --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/tr/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"Bu değer aralık dışında.","invalidMessage":"Girilen değer geçersiz.","missingMessage":"Bu değer gerekli."})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/tr/validate.xd.js b/js/dojo-1.6/dijit/form/nls/tr/validate.xd.js new file mode 100644 index 0000000..18d66b1 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/tr/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.tr.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.tr.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "tr", {"rangeMessage":"Bu değer aralık dışında.","invalidMessage":"Girilen değer geçersiz.","missingMessage":"Bu değer gerekli."}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/validate.js b/js/dojo-1.6/dijit/form/nls/validate.js new file mode 100644 index 0000000..29a1a47 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/validate.js @@ -0,0 +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 diff --git a/js/dojo-1.6/dijit/form/nls/validate.xd.js b/js/dojo-1.6/dijit/form/nls/validate.xd.js new file mode 100644 index 0000000..d927ee5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "", {"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-1.6/dijit/form/nls/zh-tw/ComboBox.js b/js/dojo-1.6/dijit/form/nls/zh-tw/ComboBox.js new file mode 100644 index 0000000..ead5fa6 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh-tw/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"前一個選擇項","nextMessage":"其他選擇項"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh-tw/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/zh-tw/ComboBox.xd.js new file mode 100644 index 0000000..5a74caf --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh-tw/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.zh-tw.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.zh-tw.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "zh-tw", {"previousMessage":"前一個選擇項","nextMessage":"其他選擇項"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh-tw/Textarea.js b/js/dojo-1.6/dijit/form/nls/zh-tw/Textarea.js new file mode 100644 index 0000000..cb7abda --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh-tw/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"編輯區","iframeFocusTitle":"編輯區框"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh-tw/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/zh-tw/Textarea.xd.js new file mode 100644 index 0000000..93c1029 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh-tw/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.zh-tw.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.zh-tw.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "zh-tw", {"iframeEditTitle":"編輯區","iframeFocusTitle":"編輯區框"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh-tw/validate.js b/js/dojo-1.6/dijit/form/nls/zh-tw/validate.js new file mode 100644 index 0000000..b398a31 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh-tw/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"此值超出範圍。","invalidMessage":"輸入的值無效。","missingMessage":"必須提供此值。"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh-tw/validate.xd.js b/js/dojo-1.6/dijit/form/nls/zh-tw/validate.xd.js new file mode 100644 index 0000000..4ea09d7 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh-tw/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.zh-tw.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.zh-tw.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "zh-tw", {"rangeMessage":"此值超出範圍。","invalidMessage":"輸入的值無效。","missingMessage":"必須提供此值。"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh/ComboBox.js b/js/dojo-1.6/dijit/form/nls/zh/ComboBox.js new file mode 100644 index 0000000..7cc92cf --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh/ComboBox.js @@ -0,0 +1 @@ +({"previousMessage":"先前选项","nextMessage":"更多选项"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh/ComboBox.xd.js b/js/dojo-1.6/dijit/form/nls/zh/ComboBox.xd.js new file mode 100644 index 0000000..4c58a4d --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh/ComboBox.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.zh.ComboBox"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.zh.ComboBox");dojo._xdLoadFlattenedBundle("dijit.form", "ComboBox", "zh", {"previousMessage":"先前选项","nextMessage":"更多选项"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh/Textarea.js b/js/dojo-1.6/dijit/form/nls/zh/Textarea.js new file mode 100644 index 0000000..e1cf172 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh/Textarea.js @@ -0,0 +1 @@ +({"iframeEditTitle":"编辑区","iframeFocusTitle":"编辑区框架"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh/Textarea.xd.js b/js/dojo-1.6/dijit/form/nls/zh/Textarea.xd.js new file mode 100644 index 0000000..a0734cb --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh/Textarea.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.zh.Textarea"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.zh.Textarea");dojo._xdLoadFlattenedBundle("dijit.form", "Textarea", "zh", {"iframeEditTitle":"编辑区","iframeFocusTitle":"编辑区框架"}); +}};});
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh/validate.js b/js/dojo-1.6/dijit/form/nls/zh/validate.js new file mode 100644 index 0000000..e2c01f5 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh/validate.js @@ -0,0 +1 @@ +({"rangeMessage":"此值超出范围。","invalidMessage":"输入的值无效。","missingMessage":"此值是必需值。"})
\ No newline at end of file diff --git a/js/dojo-1.6/dijit/form/nls/zh/validate.xd.js b/js/dojo-1.6/dijit/form/nls/zh/validate.xd.js new file mode 100644 index 0000000..28d6780 --- /dev/null +++ b/js/dojo-1.6/dijit/form/nls/zh/validate.xd.js @@ -0,0 +1,4 @@ +dojo._xdResourceLoaded(function(dojo, dijit, dojox){ +return {depends: [["provide", "dijit.form.nls.zh.validate"]], +defineResource: function(dojo, dijit, dojox){dojo.provide("dijit.form.nls.zh.validate");dojo._xdLoadFlattenedBundle("dijit.form", "validate", "zh", {"rangeMessage":"此值超出范围。","invalidMessage":"输入的值无效。","missingMessage":"此值是必需值。"}); +}};});
\ No newline at end of file |
