From 81bea17aefb26859f825b9293c7c99192874806e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 8 Nov 2011 20:40:44 +0400 Subject: upgrade Dojo to 1.6.1 --- lib/dijit/Calendar.js | 844 +- lib/dijit/CheckedMenuItem.js | 60 +- lib/dijit/ColorPalette.js | 147 +- lib/dijit/Declaration.js | 122 +- lib/dijit/Dialog.js | 827 +- lib/dijit/DialogUnderlay.js | 132 +- lib/dijit/Editor.js | 1231 +- lib/dijit/InlineEditBox.js | 794 +- lib/dijit/LICENSE | 2 +- lib/dijit/Menu.js | 1009 +- lib/dijit/MenuBar.js | 97 +- lib/dijit/MenuBarItem.js | 25 +- lib/dijit/MenuItem.js | 245 +- lib/dijit/MenuSeparator.js | 36 +- lib/dijit/PopupMenuBarItem.js | 14 +- lib/dijit/PopupMenuItem.js | 99 +- lib/dijit/ProgressBar.js | 203 +- lib/dijit/TitlePane.js | 341 +- lib/dijit/Toolbar.js | 54 +- lib/dijit/ToolbarSeparator.js | 33 +- lib/dijit/Tooltip.js | 571 +- lib/dijit/TooltipDialog.js | 188 +- lib/dijit/Tree.js | 2276 +- lib/dijit/_Calendar.js | 16 +- lib/dijit/_Contained.js | 91 +- lib/dijit/_Container.js | 190 +- lib/dijit/_CssStateMixin.js | 395 +- lib/dijit/_DialogMixin.js | 89 +- lib/dijit/_HasDropDown.js | 633 +- lib/dijit/_KeyNavContainer.js | 338 +- lib/dijit/_PaletteMixin.js | 406 +- lib/dijit/_Templated.js | 503 +- lib/dijit/_TimePicker.js | 726 +- lib/dijit/_Widget.js | 807 +- lib/dijit/_WidgetBase.js | 826 + lib/dijit/_base.js | 9 +- lib/dijit/_base/focus.js | 803 +- lib/dijit/_base/manager.js | 718 +- lib/dijit/_base/place.js | 449 +- lib/dijit/_base/popup.js | 533 +- lib/dijit/_base/scroll.js | 17 +- lib/dijit/_base/sniff.js | 15 +- lib/dijit/_base/typematic.js | 262 +- lib/dijit/_base/wai.js | 191 +- lib/dijit/_base/window.js | 13 +- lib/dijit/_editor/RichText.js | 3112 +- lib/dijit/_editor/_Plugin.js | 342 +- lib/dijit/_editor/html.js | 318 +- lib/dijit/_editor/nls/ar/FontChoice.js | 2 +- lib/dijit/_editor/nls/ar/LinkDialog.js | 2 +- lib/dijit/_editor/nls/ar/commands.js | 2 +- lib/dijit/_editor/nls/ca/FontChoice.js | 2 +- lib/dijit/_editor/nls/ca/LinkDialog.js | 2 +- lib/dijit/_editor/nls/ca/commands.js | 2 +- lib/dijit/_editor/nls/cs/FontChoice.js | 2 +- lib/dijit/_editor/nls/cs/commands.js | 2 +- lib/dijit/_editor/nls/da/FontChoice.js | 2 +- lib/dijit/_editor/nls/da/commands.js | 2 +- lib/dijit/_editor/nls/de/FontChoice.js | 2 +- lib/dijit/_editor/nls/el/FontChoice.js | 2 +- lib/dijit/_editor/nls/es/FontChoice.js | 2 +- lib/dijit/_editor/nls/es/LinkDialog.js | 2 +- lib/dijit/_editor/nls/fi/FontChoice.js | 2 +- lib/dijit/_editor/nls/fr/FontChoice.js | 2 +- lib/dijit/_editor/nls/fr/LinkDialog.js | 2 +- lib/dijit/_editor/nls/fr/commands.js | 2 +- lib/dijit/_editor/nls/he/FontChoice.js | 2 +- lib/dijit/_editor/nls/he/LinkDialog.js | 2 +- lib/dijit/_editor/nls/he/commands.js | 2 +- lib/dijit/_editor/nls/hu/FontChoice.js | 2 +- lib/dijit/_editor/nls/it/FontChoice.js | 2 +- lib/dijit/_editor/nls/it/LinkDialog.js | 2 +- lib/dijit/_editor/nls/it/commands.js | 2 +- lib/dijit/_editor/nls/ja/FontChoice.js | 2 +- lib/dijit/_editor/nls/ja/commands.js | 2 +- lib/dijit/_editor/nls/kk/FontChoice.js | 1 + lib/dijit/_editor/nls/kk/LinkDialog.js | 1 + lib/dijit/_editor/nls/kk/commands.js | 1 + lib/dijit/_editor/nls/ko/FontChoice.js | 2 +- lib/dijit/_editor/nls/ko/LinkDialog.js | 2 +- lib/dijit/_editor/nls/ko/commands.js | 2 +- lib/dijit/_editor/nls/nb/FontChoice.js | 2 +- lib/dijit/_editor/nls/nb/commands.js | 2 +- lib/dijit/_editor/nls/nl/FontChoice.js | 2 +- lib/dijit/_editor/nls/pl/FontChoice.js | 2 +- lib/dijit/_editor/nls/pl/commands.js | 2 +- lib/dijit/_editor/nls/pt-pt/FontChoice.js | 2 +- lib/dijit/_editor/nls/pt-pt/commands.js | 2 +- lib/dijit/_editor/nls/pt/FontChoice.js | 2 +- lib/dijit/_editor/nls/pt/commands.js | 2 +- lib/dijit/_editor/nls/ro/LinkDialog.js | 2 +- lib/dijit/_editor/nls/ro/commands.js | 2 +- lib/dijit/_editor/nls/ru/FontChoice.js | 2 +- lib/dijit/_editor/nls/ru/LinkDialog.js | 2 +- lib/dijit/_editor/nls/sk/FontChoice.js | 2 +- lib/dijit/_editor/nls/sl/FontChoice.js | 2 +- lib/dijit/_editor/nls/sl/LinkDialog.js | 2 +- lib/dijit/_editor/nls/sl/commands.js | 2 +- lib/dijit/_editor/nls/sv/FontChoice.js | 2 +- lib/dijit/_editor/nls/th/FontChoice.js | 2 +- lib/dijit/_editor/nls/th/LinkDialog.js | 2 +- lib/dijit/_editor/nls/tr/FontChoice.js | 2 +- lib/dijit/_editor/nls/zh-tw/FontChoice.js | 2 +- lib/dijit/_editor/nls/zh-tw/commands.js | 2 +- lib/dijit/_editor/nls/zh/FontChoice.js | 2 +- lib/dijit/_editor/nls/zh/LinkDialog.js | 2 +- lib/dijit/_editor/plugins/AlwaysShowToolbar.js | 293 +- lib/dijit/_editor/plugins/EnterKeyHandling.js | 1007 +- lib/dijit/_editor/plugins/FontChoice.js | 812 +- lib/dijit/_editor/plugins/FullScreen.js | 647 +- lib/dijit/_editor/plugins/LinkDialog.js | 714 +- lib/dijit/_editor/plugins/NewPage.js | 93 +- lib/dijit/_editor/plugins/Print.js | 166 +- lib/dijit/_editor/plugins/TabIndent.js | 80 +- lib/dijit/_editor/plugins/TextColor.js | 143 +- lib/dijit/_editor/plugins/ToggleDir.js | 98 +- lib/dijit/_editor/plugins/ViewSource.js | 844 +- lib/dijit/_editor/range.js | 950 +- lib/dijit/_editor/selection.js | 620 +- lib/dijit/_tree/dndSource.js | 15 +- lib/dijit/dijit-all.js | 77 +- lib/dijit/dijit-all.js.uncompressed.js | 28580 ------------------- lib/dijit/dijit.js | 38 +- lib/dijit/dijit.js.uncompressed.js | 5961 ---- lib/dijit/form/Button.js | 463 +- lib/dijit/form/CheckBox.js | 262 +- lib/dijit/form/ComboBox.js | 1812 +- lib/dijit/form/ComboButton.js | 9 +- lib/dijit/form/CurrencyTextBox.js | 103 +- lib/dijit/form/DateTextBox.js | 34 +- lib/dijit/form/DropDownButton.js | 9 +- lib/dijit/form/FilteringSelect.js | 301 +- lib/dijit/form/Form.js | 231 +- lib/dijit/form/HorizontalRule.js | 92 +- lib/dijit/form/HorizontalRuleLabels.js | 115 +- lib/dijit/form/HorizontalSlider.js | 526 +- lib/dijit/form/MappedTextBox.js | 9 +- lib/dijit/form/MultiSelect.js | 148 +- lib/dijit/form/NumberSpinner.js | 89 +- lib/dijit/form/NumberTextBox.js | 370 +- lib/dijit/form/RadioButton.js | 10 +- lib/dijit/form/RangeBoundTextBox.js | 9 +- lib/dijit/form/Select.js | 419 +- lib/dijit/form/SimpleTextarea.js | 144 +- lib/dijit/form/Slider.js | 13 +- lib/dijit/form/TextBox.js | 616 +- lib/dijit/form/Textarea.js | 252 +- lib/dijit/form/TimeTextBox.js | 81 +- lib/dijit/form/ToggleButton.js | 9 +- lib/dijit/form/ValidationTextBox.js | 675 +- lib/dijit/form/VerticalRule.js | 30 +- lib/dijit/form/VerticalRuleLabels.js | 30 +- lib/dijit/form/VerticalSlider.js | 39 +- lib/dijit/form/_DateTimeTextBox.js | 374 +- lib/dijit/form/_FormMixin.js | 601 +- lib/dijit/form/_FormSelectWidget.js | 867 +- lib/dijit/form/_FormWidget.js | 515 +- lib/dijit/form/_Spinner.js | 167 +- lib/dijit/form/nls/da/validate.js | 2 +- lib/dijit/form/nls/kk/ComboBox.js | 1 + lib/dijit/form/nls/kk/Textarea.js | 1 + lib/dijit/form/nls/kk/validate.js | 1 + lib/dijit/form/nls/pl/Textarea.js | 2 +- lib/dijit/form/nls/sl/ComboBox.js | 2 +- lib/dijit/form/nls/sl/Textarea.js | 2 +- lib/dijit/form/nls/sl/validate.js | 2 +- lib/dijit/icons/commonIcons.css | 22 +- lib/dijit/icons/commonIcons_rtl.css | 14 +- lib/dijit/icons/editorIcons.css | 25 +- lib/dijit/icons/editorIcons_rtl.css | 17 +- lib/dijit/layout/AccordionContainer.js | 686 +- lib/dijit/layout/AccordionPane.js | 28 +- lib/dijit/layout/BorderContainer.js | 830 +- lib/dijit/layout/ContentPane.js | 860 +- lib/dijit/layout/LayoutContainer.js | 96 +- lib/dijit/layout/LinkPane.js | 51 +- lib/dijit/layout/ScrollingTabController.js | 662 +- lib/dijit/layout/SplitContainer.js | 913 +- lib/dijit/layout/StackContainer.js | 460 +- lib/dijit/layout/StackController.js | 484 +- lib/dijit/layout/TabContainer.js | 77 +- lib/dijit/layout/TabController.js | 216 +- lib/dijit/layout/_ContentPaneResizeMixin.js | 260 + lib/dijit/layout/_LayoutWidget.js | 411 +- lib/dijit/layout/_TabContainerBase.js | 193 +- lib/dijit/lib/main.js | 20 + lib/dijit/nls/dijit-all_ROOT.js | 1 - lib/dijit/nls/dijit-all_ar.js | 1 - lib/dijit/nls/dijit-all_ca.js | 1 - lib/dijit/nls/dijit-all_cs.js | 1 - lib/dijit/nls/dijit-all_da.js | 1 - lib/dijit/nls/dijit-all_de-de.js | 1 - lib/dijit/nls/dijit-all_de.js | 1 - lib/dijit/nls/dijit-all_el.js | 1 - lib/dijit/nls/dijit-all_en-gb.js | 1 - lib/dijit/nls/dijit-all_en-us.js | 1 - lib/dijit/nls/dijit-all_en.js | 1 - lib/dijit/nls/dijit-all_es-es.js | 1 - lib/dijit/nls/dijit-all_es.js | 1 - lib/dijit/nls/dijit-all_fi-fi.js | 1 - lib/dijit/nls/dijit-all_fi.js | 1 - lib/dijit/nls/dijit-all_fr-fr.js | 1 - lib/dijit/nls/dijit-all_fr.js | 1 - lib/dijit/nls/dijit-all_he-il.js | 1 - lib/dijit/nls/dijit-all_he.js | 1 - lib/dijit/nls/dijit-all_hu.js | 1 - lib/dijit/nls/dijit-all_it-it.js | 1 - lib/dijit/nls/dijit-all_it.js | 1 - lib/dijit/nls/dijit-all_ja-jp.js | 1 - lib/dijit/nls/dijit-all_ja.js | 1 - lib/dijit/nls/dijit-all_ko-kr.js | 1 - lib/dijit/nls/dijit-all_ko.js | 1 - lib/dijit/nls/dijit-all_nb.js | 1 - lib/dijit/nls/dijit-all_nl-nl.js | 1 - lib/dijit/nls/dijit-all_nl.js | 1 - lib/dijit/nls/dijit-all_pl.js | 1 - lib/dijit/nls/dijit-all_pt-br.js | 1 - lib/dijit/nls/dijit-all_pt-pt.js | 1 - lib/dijit/nls/dijit-all_pt.js | 1 - lib/dijit/nls/dijit-all_ru.js | 1 - lib/dijit/nls/dijit-all_sk.js | 1 - lib/dijit/nls/dijit-all_sl.js | 1 - lib/dijit/nls/dijit-all_sv.js | 1 - lib/dijit/nls/dijit-all_th.js | 1 - lib/dijit/nls/dijit-all_tr.js | 1 - lib/dijit/nls/dijit-all_xx.js | 1 - lib/dijit/nls/dijit-all_zh-cn.js | 1 - lib/dijit/nls/dijit-all_zh-tw.js | 1 - lib/dijit/nls/dijit-all_zh.js | 1 - lib/dijit/nls/kk/common.js | 1 + lib/dijit/nls/kk/loading.js | 1 + lib/dijit/nls/sl/loading.js | 2 +- lib/dijit/package.json | 24 + lib/dijit/resources/_modules.js | 20 +- lib/dijit/robot.js | 9 +- lib/dijit/robotx.js | 32 +- lib/dijit/themes/a11y/colors3x4-rtl.png | Bin 282 -> 0 bytes lib/dijit/themes/a11y/colors7x10-rtl.png | Bin 808 -> 0 bytes lib/dijit/themes/claro/Calendar.css | 370 +- lib/dijit/themes/claro/Calendar.less | 273 + lib/dijit/themes/claro/Calendar_rtl.css | 14 +- lib/dijit/themes/claro/Calendar_rtl.less | 19 + lib/dijit/themes/claro/ColorPalette.css | 45 +- lib/dijit/themes/claro/ColorPalette.less | 44 + lib/dijit/themes/claro/Common.css | 95 +- lib/dijit/themes/claro/Common.less | 76 + lib/dijit/themes/claro/Dialog.css | 265 +- lib/dijit/themes/claro/Dialog.less | 203 + lib/dijit/themes/claro/Dialog_rtl.css | 10 +- lib/dijit/themes/claro/Dialog_rtl.less | 13 + lib/dijit/themes/claro/Editor.css | 62 +- lib/dijit/themes/claro/Editor.less | 59 + lib/dijit/themes/claro/Editor_rtl.css | 6 +- lib/dijit/themes/claro/Editor_rtl.less | 9 + lib/dijit/themes/claro/InlineEditBox.css | 19 +- lib/dijit/themes/claro/InlineEditBox.less | 25 + lib/dijit/themes/claro/Menu.css | 235 +- lib/dijit/themes/claro/Menu.less | 188 + lib/dijit/themes/claro/Menu_rtl.css | 8 +- lib/dijit/themes/claro/Menu_rtl.less | 11 + lib/dijit/themes/claro/ProgressBar.css | 61 +- lib/dijit/themes/claro/ProgressBar.less | 56 + lib/dijit/themes/claro/README | 64 + lib/dijit/themes/claro/TimePicker.css | 164 +- lib/dijit/themes/claro/TimePicker.less | 124 + lib/dijit/themes/claro/TimePicker_rtl.css | 8 +- lib/dijit/themes/claro/TimePicker_rtl.less | 12 + lib/dijit/themes/claro/TitlePane.css | 79 +- lib/dijit/themes/claro/TitlePane.less | 74 + lib/dijit/themes/claro/TitlePane_rtl.css | 4 +- lib/dijit/themes/claro/TitlePane_rtl.less | 7 + lib/dijit/themes/claro/Toolbar.css | 233 +- lib/dijit/themes/claro/Toolbar.less | 157 + lib/dijit/themes/claro/Toolbar_rtl.css | 30 + lib/dijit/themes/claro/Toolbar_rtl.less | 32 + lib/dijit/themes/claro/Tree.css | 156 +- lib/dijit/themes/claro/Tree.less | 133 + lib/dijit/themes/claro/claro.css | 4715 +-- lib/dijit/themes/claro/claro_rtl.css | 396 +- lib/dijit/themes/claro/compile.js | 62 + lib/dijit/themes/claro/document.css | 118 +- lib/dijit/themes/claro/document.less | 45 + lib/dijit/themes/claro/form/Button.css | 185 +- lib/dijit/themes/claro/form/Button.less | 154 + lib/dijit/themes/claro/form/Button_rtl.css | 23 +- lib/dijit/themes/claro/form/Button_rtl.less | 16 + lib/dijit/themes/claro/form/Checkbox.css | 91 +- lib/dijit/themes/claro/form/Checkbox.less | 79 + lib/dijit/themes/claro/form/Common.css | 227 +- lib/dijit/themes/claro/form/Common.less | 194 + lib/dijit/themes/claro/form/Common_rtl.css | 11 +- lib/dijit/themes/claro/form/Common_rtl.less | 13 + lib/dijit/themes/claro/form/NumberSpinner.css | 160 +- lib/dijit/themes/claro/form/NumberSpinner.less | 150 + lib/dijit/themes/claro/form/RadioButton.css | 96 +- lib/dijit/themes/claro/form/RadioButton.less | 84 + lib/dijit/themes/claro/form/Select.css | 124 +- lib/dijit/themes/claro/form/Select.less | 124 + lib/dijit/themes/claro/form/Select_rtl.css | 4 +- lib/dijit/themes/claro/form/Select_rtl.less | 6 + lib/dijit/themes/claro/form/Slider.css | 422 +- lib/dijit/themes/claro/form/Slider.less | 362 + lib/dijit/themes/claro/form/Slider_rtl.css | 20 +- lib/dijit/themes/claro/form/Slider_rtl.less | 33 + lib/dijit/themes/claro/images/loading.gif | Bin 751 -> 0 bytes lib/dijit/themes/claro/images/tooltip.png | Bin 1941 -> 1818 bytes lib/dijit/themes/claro/images/tooltipGradient.png | Bin 0 -> 1030 bytes .../themes/claro/layout/AccordionContainer.css | 145 +- .../themes/claro/layout/AccordionContainer.less | 116 + lib/dijit/themes/claro/layout/BorderContainer.css | 130 +- lib/dijit/themes/claro/layout/BorderContainer.less | 128 + lib/dijit/themes/claro/layout/ContentPane.css | 39 +- lib/dijit/themes/claro/layout/ContentPane.less | 43 + lib/dijit/themes/claro/layout/TabContainer.css | 536 +- lib/dijit/themes/claro/layout/TabContainer.less | 408 + lib/dijit/themes/claro/layout/TabContainer_rtl.css | 72 +- .../themes/claro/layout/TabContainer_rtl.less | 81 + lib/dijit/themes/claro/layout/images/tabBottom.png | Bin 753 -> 718 bytes lib/dijit/themes/claro/layout/images/tabTop.png | Bin 748 -> 721 bytes lib/dijit/themes/claro/variables.less | 189 + lib/dijit/themes/dijit.css | 880 +- lib/dijit/themes/dijit_rtl.css | 62 +- lib/dijit/themes/nihilo/Calendar.css | 66 +- lib/dijit/themes/nihilo/Calendar_rtl.css | 4 +- lib/dijit/themes/nihilo/ColorPalette.css | 4 +- lib/dijit/themes/nihilo/Common.css | 6 +- lib/dijit/themes/nihilo/Dialog.css | 84 +- lib/dijit/themes/nihilo/Dialog_rtl.css | 1 + lib/dijit/themes/nihilo/Editor.css | 9 +- lib/dijit/themes/nihilo/Editor_rtl.css | 8 +- lib/dijit/themes/nihilo/Menu.css | 27 +- lib/dijit/themes/nihilo/Menu_rtl.css | 8 +- lib/dijit/themes/nihilo/ProgressBar.css | 21 +- lib/dijit/themes/nihilo/TimePicker.css | 13 +- lib/dijit/themes/nihilo/TimePicker_rtl.css | 2 +- lib/dijit/themes/nihilo/TitlePane.css | 13 +- lib/dijit/themes/nihilo/TitlePane_rtl.css | 6 +- lib/dijit/themes/nihilo/Toolbar.css | 23 +- lib/dijit/themes/nihilo/Tree.css | 37 +- lib/dijit/themes/nihilo/Tree_rtl.css | 12 +- lib/dijit/themes/nihilo/form/Button.css | 43 +- lib/dijit/themes/nihilo/form/Button_rtl.css | 3 +- lib/dijit/themes/nihilo/form/Checkbox.css | 47 +- lib/dijit/themes/nihilo/form/Common.css | 33 +- lib/dijit/themes/nihilo/form/RadioButton.css | 46 +- lib/dijit/themes/nihilo/form/Select.css | 18 +- lib/dijit/themes/nihilo/form/Slider.css | 35 +- lib/dijit/themes/nihilo/form/Slider_rtl.css | 11 +- lib/dijit/themes/nihilo/form/TimeTextBox.css | 2 +- .../themes/nihilo/layout/AccordionContainer.css | 11 + .../nihilo/layout/AccordionContainer_rtl.css | 5 +- lib/dijit/themes/nihilo/layout/BorderContainer.css | 35 +- lib/dijit/themes/nihilo/layout/ContentPane.css | 10 +- lib/dijit/themes/nihilo/layout/SplitContainer.css | 17 +- lib/dijit/themes/nihilo/layout/TabContainer.css | 247 +- .../themes/nihilo/layout/TabContainer_rtl.css | 19 +- lib/dijit/themes/nihilo/nihilo.css | 3444 +-- lib/dijit/themes/nihilo/nihilo_rtl.css | 251 +- lib/dijit/themes/soria/Calendar.css | 66 +- lib/dijit/themes/soria/Calendar_rtl.css | 4 +- lib/dijit/themes/soria/ColorPalette.css | 4 +- lib/dijit/themes/soria/Common.css | 6 +- lib/dijit/themes/soria/Dialog.css | 84 +- lib/dijit/themes/soria/Dialog_rtl.css | 2 +- lib/dijit/themes/soria/Editor.css | 10 +- lib/dijit/themes/soria/Editor_rtl.css | 6 +- lib/dijit/themes/soria/Menu.css | 27 +- lib/dijit/themes/soria/Menu_rtl.css | 4 +- lib/dijit/themes/soria/ProgressBar.css | 21 +- lib/dijit/themes/soria/TimePicker.css | 11 +- lib/dijit/themes/soria/TimePicker_rtl.css | 2 +- lib/dijit/themes/soria/TitlePane.css | 14 +- lib/dijit/themes/soria/TitlePane_rtl.css | 6 +- lib/dijit/themes/soria/Toolbar.css | 27 +- lib/dijit/themes/soria/Tree.css | 37 +- lib/dijit/themes/soria/Tree_rtl.css | 12 +- lib/dijit/themes/soria/form/Button.css | 35 +- lib/dijit/themes/soria/form/Button_rtl.css | 2 +- lib/dijit/themes/soria/form/Checkbox.css | 47 +- lib/dijit/themes/soria/form/Common.css | 33 +- lib/dijit/themes/soria/form/RadioButton.css | 46 +- lib/dijit/themes/soria/form/Select.css | 18 +- lib/dijit/themes/soria/form/Slider.css | 36 +- lib/dijit/themes/soria/form/Slider_rtl.css | 11 +- lib/dijit/themes/soria/form/TimeTextBox.css | 2 +- .../themes/soria/layout/AccordionContainer.css | 13 +- .../themes/soria/layout/AccordionContainer_rtl.css | 5 +- lib/dijit/themes/soria/layout/BorderContainer.css | 36 +- lib/dijit/themes/soria/layout/ContentPane.css | 10 +- lib/dijit/themes/soria/layout/SplitContainer.css | 17 +- lib/dijit/themes/soria/layout/TabContainer.css | 178 +- lib/dijit/themes/soria/layout/TabContainer_rtl.css | 19 +- lib/dijit/themes/soria/soria.css | 3384 +-- lib/dijit/themes/soria/soria_rtl.css | 252 +- lib/dijit/themes/tundra/Calendar.css | 69 +- lib/dijit/themes/tundra/Calendar_rtl.css | 4 +- lib/dijit/themes/tundra/ColorPalette.css | 4 +- lib/dijit/themes/tundra/Common.css | 8 +- lib/dijit/themes/tundra/Dialog.css | 80 +- lib/dijit/themes/tundra/Dialog_rtl.css | 2 +- lib/dijit/themes/tundra/Editor.css | 6 +- lib/dijit/themes/tundra/Editor_rtl.css | 6 +- lib/dijit/themes/tundra/Menu.css | 25 +- lib/dijit/themes/tundra/Menu_rtl.css | 4 +- lib/dijit/themes/tundra/ProgressBar.css | 15 +- lib/dijit/themes/tundra/TimePicker.css | 12 +- lib/dijit/themes/tundra/TimePicker_rtl.css | 2 +- lib/dijit/themes/tundra/TitlePane.css | 12 +- lib/dijit/themes/tundra/TitlePane_rtl.css | 4 +- lib/dijit/themes/tundra/Toolbar.css | 31 +- lib/dijit/themes/tundra/Tree.css | 34 +- lib/dijit/themes/tundra/Tree_rtl.css | 8 +- lib/dijit/themes/tundra/form/Button.css | 40 +- lib/dijit/themes/tundra/form/Checkbox.css | 31 +- lib/dijit/themes/tundra/form/Common.css | 40 +- lib/dijit/themes/tundra/form/RadioButton.css | 28 +- lib/dijit/themes/tundra/form/Select.css | 18 +- lib/dijit/themes/tundra/form/Slider.css | 40 +- lib/dijit/themes/tundra/form/Slider_rtl.css | 13 +- .../themes/tundra/layout/AccordionContainer.css | 8 +- lib/dijit/themes/tundra/layout/BorderContainer.css | 22 +- lib/dijit/themes/tundra/layout/ContentPane.css | 10 +- lib/dijit/themes/tundra/layout/SplitContainer.css | 3 + lib/dijit/themes/tundra/layout/TabContainer.css | 128 +- .../themes/tundra/layout/TabContainer_rtl.css | 21 +- lib/dijit/themes/tundra/tundra.css | 3476 +-- lib/dijit/themes/tundra/tundra_rtl.css | 225 +- lib/dijit/tree/ForestStoreModel.js | 345 +- lib/dijit/tree/TreeStoreModel.js | 510 +- lib/dijit/tree/_dndContainer.js | 216 +- lib/dijit/tree/_dndSelector.js | 392 +- lib/dijit/tree/dndSource.js | 762 +- lib/dijit/tree/model.js | 143 +- 433 files changed, 41177 insertions(+), 67211 deletions(-) create mode 100644 lib/dijit/_WidgetBase.js create mode 100644 lib/dijit/_editor/nls/kk/FontChoice.js create mode 100644 lib/dijit/_editor/nls/kk/LinkDialog.js create mode 100644 lib/dijit/_editor/nls/kk/commands.js delete mode 100644 lib/dijit/dijit-all.js.uncompressed.js delete mode 100644 lib/dijit/dijit.js.uncompressed.js create mode 100644 lib/dijit/form/nls/kk/ComboBox.js create mode 100644 lib/dijit/form/nls/kk/Textarea.js create mode 100644 lib/dijit/form/nls/kk/validate.js create mode 100644 lib/dijit/layout/_ContentPaneResizeMixin.js create mode 100644 lib/dijit/lib/main.js delete mode 100644 lib/dijit/nls/dijit-all_ROOT.js delete mode 100644 lib/dijit/nls/dijit-all_ar.js delete mode 100644 lib/dijit/nls/dijit-all_ca.js delete mode 100644 lib/dijit/nls/dijit-all_cs.js delete mode 100644 lib/dijit/nls/dijit-all_da.js delete mode 100644 lib/dijit/nls/dijit-all_de-de.js delete mode 100644 lib/dijit/nls/dijit-all_de.js delete mode 100644 lib/dijit/nls/dijit-all_el.js delete mode 100644 lib/dijit/nls/dijit-all_en-gb.js delete mode 100644 lib/dijit/nls/dijit-all_en-us.js delete mode 100644 lib/dijit/nls/dijit-all_en.js delete mode 100644 lib/dijit/nls/dijit-all_es-es.js delete mode 100644 lib/dijit/nls/dijit-all_es.js delete mode 100644 lib/dijit/nls/dijit-all_fi-fi.js delete mode 100644 lib/dijit/nls/dijit-all_fi.js delete mode 100644 lib/dijit/nls/dijit-all_fr-fr.js delete mode 100644 lib/dijit/nls/dijit-all_fr.js delete mode 100644 lib/dijit/nls/dijit-all_he-il.js delete mode 100644 lib/dijit/nls/dijit-all_he.js delete mode 100644 lib/dijit/nls/dijit-all_hu.js delete mode 100644 lib/dijit/nls/dijit-all_it-it.js delete mode 100644 lib/dijit/nls/dijit-all_it.js delete mode 100644 lib/dijit/nls/dijit-all_ja-jp.js delete mode 100644 lib/dijit/nls/dijit-all_ja.js delete mode 100644 lib/dijit/nls/dijit-all_ko-kr.js delete mode 100644 lib/dijit/nls/dijit-all_ko.js delete mode 100644 lib/dijit/nls/dijit-all_nb.js delete mode 100644 lib/dijit/nls/dijit-all_nl-nl.js delete mode 100644 lib/dijit/nls/dijit-all_nl.js delete mode 100644 lib/dijit/nls/dijit-all_pl.js delete mode 100644 lib/dijit/nls/dijit-all_pt-br.js delete mode 100644 lib/dijit/nls/dijit-all_pt-pt.js delete mode 100644 lib/dijit/nls/dijit-all_pt.js delete mode 100644 lib/dijit/nls/dijit-all_ru.js delete mode 100644 lib/dijit/nls/dijit-all_sk.js delete mode 100644 lib/dijit/nls/dijit-all_sl.js delete mode 100644 lib/dijit/nls/dijit-all_sv.js delete mode 100644 lib/dijit/nls/dijit-all_th.js delete mode 100644 lib/dijit/nls/dijit-all_tr.js delete mode 100644 lib/dijit/nls/dijit-all_xx.js delete mode 100644 lib/dijit/nls/dijit-all_zh-cn.js delete mode 100644 lib/dijit/nls/dijit-all_zh-tw.js delete mode 100644 lib/dijit/nls/dijit-all_zh.js create mode 100644 lib/dijit/nls/kk/common.js create mode 100644 lib/dijit/nls/kk/loading.js create mode 100644 lib/dijit/package.json delete mode 100644 lib/dijit/themes/a11y/colors3x4-rtl.png delete mode 100644 lib/dijit/themes/a11y/colors7x10-rtl.png create mode 100644 lib/dijit/themes/claro/Calendar.less create mode 100644 lib/dijit/themes/claro/Calendar_rtl.less create mode 100644 lib/dijit/themes/claro/ColorPalette.less create mode 100644 lib/dijit/themes/claro/Common.less create mode 100644 lib/dijit/themes/claro/Dialog.less create mode 100644 lib/dijit/themes/claro/Dialog_rtl.less create mode 100644 lib/dijit/themes/claro/Editor.less create mode 100644 lib/dijit/themes/claro/Editor_rtl.less create mode 100644 lib/dijit/themes/claro/InlineEditBox.less create mode 100644 lib/dijit/themes/claro/Menu.less create mode 100644 lib/dijit/themes/claro/Menu_rtl.less create mode 100644 lib/dijit/themes/claro/ProgressBar.less create mode 100644 lib/dijit/themes/claro/README create mode 100644 lib/dijit/themes/claro/TimePicker.less create mode 100644 lib/dijit/themes/claro/TimePicker_rtl.less create mode 100644 lib/dijit/themes/claro/TitlePane.less create mode 100644 lib/dijit/themes/claro/TitlePane_rtl.less create mode 100644 lib/dijit/themes/claro/Toolbar.less create mode 100644 lib/dijit/themes/claro/Toolbar_rtl.css create mode 100644 lib/dijit/themes/claro/Toolbar_rtl.less create mode 100644 lib/dijit/themes/claro/Tree.less create mode 100644 lib/dijit/themes/claro/compile.js create mode 100644 lib/dijit/themes/claro/document.less create mode 100644 lib/dijit/themes/claro/form/Button.less create mode 100644 lib/dijit/themes/claro/form/Button_rtl.less create mode 100644 lib/dijit/themes/claro/form/Checkbox.less create mode 100644 lib/dijit/themes/claro/form/Common.less create mode 100644 lib/dijit/themes/claro/form/Common_rtl.less create mode 100644 lib/dijit/themes/claro/form/NumberSpinner.less create mode 100644 lib/dijit/themes/claro/form/RadioButton.less create mode 100644 lib/dijit/themes/claro/form/Select.less create mode 100644 lib/dijit/themes/claro/form/Select_rtl.less create mode 100644 lib/dijit/themes/claro/form/Slider.less create mode 100644 lib/dijit/themes/claro/form/Slider_rtl.less delete mode 100644 lib/dijit/themes/claro/images/loading.gif create mode 100644 lib/dijit/themes/claro/images/tooltipGradient.png create mode 100644 lib/dijit/themes/claro/layout/AccordionContainer.less create mode 100644 lib/dijit/themes/claro/layout/BorderContainer.less create mode 100644 lib/dijit/themes/claro/layout/ContentPane.less create mode 100644 lib/dijit/themes/claro/layout/TabContainer.less create mode 100644 lib/dijit/themes/claro/layout/TabContainer_rtl.less create mode 100644 lib/dijit/themes/claro/variables.less (limited to 'lib/dijit') diff --git a/lib/dijit/Calendar.js b/lib/dijit/Calendar.js index fa82770ee..b092ed797 100644 --- a/lib/dijit/Calendar.js +++ b/lib/dijit/Calendar.js @@ -1,12 +1,12 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + 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.Calendar"]){ -dojo._hasResource["dijit.Calendar"]=true; +if(!dojo._hasResource["dijit.Calendar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dijit.Calendar"] = true; dojo.provide("dijit.Calendar"); dojo.require("dojo.cldr.supplemental"); dojo.require("dojo.date"); @@ -14,252 +14,596 @@ dojo.require("dojo.date.locale"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dijit._CssStateMixin"); -dojo.declare("dijit.Calendar",[dijit._Widget,dijit._Templated,dijit._CssStateMixin],{templateString:dojo.cache("dijit","templates/Calendar.html","\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t\"\"\n\t\t\t\t-\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t\"\"\n\t\t\t\t+\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t

\n\t\t\t
\n"),value:new Date(),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",baseClass:"dijitCalendar",cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{tabIndex:"domNode"}),setValue:function(_1){ -dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use set('value', ...) instead.","","2.0"); -this.set("value",_1); -},_getValueAttr:function(){ -var _2=new this.dateClassObj(this.value); -_2.setHours(0,0,0,0); -if(_2.getDate()_7){ -_b-=7; -} -dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_c,i){ -i+=_b; -var _d=new this.dateClassObj(_6),_e,_f="dijitCalendar",adj=0; -if(i<_7){ -_e=_9-_7+i+1; -adj=-1; -_f+="Previous"; -}else{ -if(i>=(_7+_8)){ -_e=i-_7-_8+1; -adj=1; -_f+="Next"; -}else{ -_e=i-_7+1; -_f+="Current"; -} -} -if(adj){ -_d=this.dateFuncObj.add(_d,"month",adj); -} -_d.setDate(_e); -if(!this.dateFuncObj.compare(_d,_a,"date")){ -_f="dijitCalendarCurrentDate "+_f; -} -if(this._isSelectedDate(_d,this.lang)){ -_f="dijitCalendarSelectedDate "+_f; -} -if(this.isDisabledDate(_d,this.lang)){ -_f="dijitCalendarDisabledDate "+_f; -} -var _10=this.getClassForDate(_d,this.lang); -if(_10){ -_f=_10+" "+_f; -} -_c.className=_f+"Month dijitCalendarDateTemplate"; -_c.dijitDateValue=_d.valueOf(); -var _11=dojo.query(".dijitCalendarDateLabel",_c)[0],_12=_d.getDateLocalized?_d.getDateLocalized(this.lang):_d.getDate(); -this._setText(_11,_12); -},this); -var _13=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_6); -this._setText(this.monthLabelNode,_13[_6.getMonth()]); -dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(_14,i){ -dojo.toggleClass(_14,"dijitHidden",!(i in _13)); -this._setText(_14,_13[i]); -},this); -var y=_6.getFullYear()-1; -var d=new this.dateClassObj(); -dojo.forEach(["previous","current","next"],function(_15){ -d.setFullYear(y++); -this._setText(this[_15+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang})); -},this); -var _16=this; -var _17=function(_18,_19,adj){ -_16._connects.push(dijit.typematic.addMouseListener(_16[_18],_16,function(_1a){ -if(_1a>=0){ -_16._adjustDisplay(_19,adj); -} -},0.8,500)); -}; -_17("incrementMonth","month",1); -_17("decrementMonth","month",-1); -_17("nextYearLabelNode","year",1); -_17("previousYearLabelNode","year",-1); -},goToToday:function(){ -this.set("value",new this.dateClassObj()); -},constructor:function(_1b){ -var _1c=(_1b.datePackage&&(_1b.datePackage!="dojo.date"))?_1b.datePackage+".Date":"Date"; -this.dateClassObj=dojo.getObject(_1c,false); -this.datePackage=_1b.datePackage||this.datePackage; -this.dateFuncObj=dojo.getObject(this.datePackage,false); -this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false); -},postMixInProperties:function(){ -if(isNaN(this.value)){ -delete this.value; -} -this.inherited(arguments); -},postCreate:function(){ -this.inherited(arguments); -dojo.setSelectable(this.domNode,false); -var _1d=dojo.hitch(this,function(_1e,n){ -var _1f=dojo.query(_1e,this.domNode)[0]; -for(var i=0;i` field. For a form element, use dijit.form.DateTextBox instead. + // + // Note that the parser takes all dates attributes passed in the + // [RFC 3339 format](http://www.faqs.org/rfcs/rfc3339.html), e.g. `2005-06-30T08:05:00-07:00` + // so that they are serializable and locale-independent. + // + // example: + // | var calendar = new dijit.Calendar({}, dojo.byId("calendarNode")); + // + // example: + // |
+ + templateString: dojo.cache("dijit", "templates/Calendar.html", "\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t\"\"\n\t\t\t\t-\n\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t\"\"\n\t\t\t\t+\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t

\n\t\t\t
\n"), + widgetsInTemplate: true, + + // value: Date + // The currently selected Date, initially set to invalid date to indicate no selection. + value: new Date(""), + // TODO: for 2.0 make this a string (ISO format) rather than a Date + + // datePackage: String + // JavaScript namespace to find Calendar routines. Uses Gregorian Calendar routines + // at dojo.date by default. + datePackage: "dojo.date", + + // dayWidth: String + // How to represent the days of the week in the calendar header. See dojo.date.locale + dayWidth: "narrow", + + // tabIndex: Integer + // Order fields are traversed when user hits the tab key + tabIndex: "0", + + // currentFocus: Date + // Date object containing the currently focused date, or the date which would be focused + // if the calendar itself was focused. Also indicates which year and month to display, + // i.e. the current "page" the calendar is on. + currentFocus: new Date(), + + baseClass:"dijitCalendar", + + // Set node classes for various mouse events, see dijit._CssStateMixin for more details + cssStateNodes: { + "decrementMonth": "dijitCalendarArrow", + "incrementMonth": "dijitCalendarArrow", + "previousYearLabelNode": "dijitCalendarPreviousYear", + "nextYearLabelNode": "dijitCalendarNextYear" + }, + + _isValidDate: function(/*Date*/ value){ + // summary: + // Runs various tests on the value, checking that it's a valid date, rather + // than blank or NaN. + // tags: + // private + return value && !isNaN(value) && typeof value == "object" && + value.toString() != this.constructor.prototype.value.toString(); + }, + + setValue: function(/*Date*/ value){ + // summary: + // Deprecated. Use set('value', ...) instead. + // tags: + // deprecated + dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use set('value', ...) instead.", "", "2.0"); + this.set('value', value); + }, + + _getValueAttr: function(){ + // summary: + // Support get('value') + + // this.value is set to 1AM, but return midnight, local time for back-compat + var value = new this.dateClassObj(this.value); + value.setHours(0, 0, 0, 0); + + // If daylight savings pushes midnight to the previous date, fix the Date + // object to point at 1am so it will represent the correct day. See #9366 + if(value.getDate() < this.value.getDate()){ + value = this.dateFuncObj.add(value, "hour", 1); + } + return value; + }, + + _setValueAttr: function(/*Date|Number*/ value, /*Boolean*/ priorityChange){ + // summary: + // Support set("value", ...) + // description: + // Set the current date and update the UI. If the date is disabled, the value will + // not change, but the display will change to the corresponding month. + // value: + // Either a Date or the number of seconds since 1970. + // tags: + // protected + if(value){ + // convert from Number to Date, or make copy of Date object so that setHours() call below + // doesn't affect original value + value = new this.dateClassObj(value); + } + if(this._isValidDate(value)){ + if(!this._isValidDate(this.value) || this.dateFuncObj.compare(value, this.value)){ + value.setHours(1, 0, 0, 0); // round to nearest day (1am to avoid issues when DST shift occurs at midnight, see #8521, #9366) + + if(!this.isDisabledDate(value, this.lang)){ + this._set("value", value); + + // Set focus cell to the new value. Arguably this should only happen when there isn't a current + // focus point. This will also repopulate the grid, showing the new selected value (and possibly + // new month/year). + this.set("currentFocus", value); + + if(priorityChange || typeof priorityChange == "undefined"){ + this.onChange(this.get('value')); + this.onValueSelected(this.get('value')); // remove in 2.0 + } + } + } + }else{ + // clear value, and repopulate grid (to deselect the previously selected day) without changing currentFocus + this._set("value", null); + this.set("currentFocus", this.currentFocus); + } + }, + + _setText: function(node, text){ + // summary: + // This just sets the content of node to the specified text. + // Can't do "node.innerHTML=text" because of an IE bug w/tables, see #3434. + // tags: + // private + while(node.firstChild){ + node.removeChild(node.firstChild); + } + node.appendChild(dojo.doc.createTextNode(text)); + }, + + _populateGrid: function(){ + // summary: + // Fills in the calendar grid with each day (1-31) + // tags: + // private + + var month = new this.dateClassObj(this.currentFocus); + month.setDate(1); + + var firstDay = month.getDay(), + daysInMonth = this.dateFuncObj.getDaysInMonth(month), + daysInPreviousMonth = this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(month, "month", -1)), + today = new this.dateClassObj(), + dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang); + if(dayOffset > firstDay){ dayOffset -= 7; } + + // Iterate through dates in the calendar and fill in date numbers and style info + dojo.query(".dijitCalendarDateTemplate", this.domNode).forEach(function(template, i){ + i += dayOffset; + var date = new this.dateClassObj(month), + number, clazz = "dijitCalendar", adj = 0; + + if(i < firstDay){ + number = daysInPreviousMonth - firstDay + i + 1; + adj = -1; + clazz += "Previous"; + }else if(i >= (firstDay + daysInMonth)){ + number = i - firstDay - daysInMonth + 1; + adj = 1; + clazz += "Next"; + }else{ + number = i - firstDay + 1; + clazz += "Current"; + } + + if(adj){ + date = this.dateFuncObj.add(date, "month", adj); + } + date.setDate(number); + + if(!this.dateFuncObj.compare(date, today, "date")){ + clazz = "dijitCalendarCurrentDate " + clazz; + } + + if(this._isSelectedDate(date, this.lang)){ + clazz = "dijitCalendarSelectedDate " + clazz; + } + + if(this.isDisabledDate(date, this.lang)){ + clazz = "dijitCalendarDisabledDate " + clazz; + } + + var clazz2 = this.getClassForDate(date, this.lang); + if(clazz2){ + clazz = clazz2 + " " + clazz; + } + + template.className = clazz + "Month dijitCalendarDateTemplate"; + template.dijitDateValue = date.valueOf(); // original code + dojo.attr(template, "dijitDateValue", date.valueOf()); // so I can dojo.query() it + var label = dojo.query(".dijitCalendarDateLabel", template)[0], + text = date.getDateLocalized ? date.getDateLocalized(this.lang) : date.getDate(); + this._setText(label, text); + }, this); + + // Repopulate month drop down list based on current year. + // Need to do this to hide leap months in Hebrew calendar. + var monthNames = this.dateLocaleModule.getNames('months', 'wide', 'standAlone', this.lang, month); + this.monthDropDownButton.dropDown.set("months", monthNames); + + // Set name of current month and also fill in spacer element with all the month names + // (invisible) so that the maximum width will affect layout. But not on IE6 because then + // the center overlaps the right (due to a browser bug). + this.monthDropDownButton.containerNode.innerHTML = + (dojo.isIE == 6 ? "" : "
" + this.monthDropDownButton.dropDown.domNode.innerHTML + "
") + + "
" + monthNames[month.getMonth()] + "
"; + + // Fill in localized prev/current/next years + var y = month.getFullYear() - 1; + var d = new this.dateClassObj(); + dojo.forEach(["previous", "current", "next"], function(name){ + d.setFullYear(y++); + this._setText(this[name+"YearLabelNode"], + this.dateLocaleModule.format(d, {selector:'year', locale:this.lang})); + }, this); + }, + + goToToday: function(){ + // summary: + // Sets calendar's value to today's date + this.set('value', new this.dateClassObj()); + }, + + constructor: function(/*Object*/args){ + var dateClass = (args.datePackage && (args.datePackage != "dojo.date"))? args.datePackage + ".Date" : "Date"; + this.dateClassObj = dojo.getObject(dateClass, false); + this.datePackage = args.datePackage || this.datePackage; + this.dateFuncObj = dojo.getObject(this.datePackage, false); + this.dateLocaleModule = dojo.getObject(this.datePackage + ".locale", false); + }, + + postMixInProperties: function(){ + // Parser.instantiate sometimes passes in NaN for IE. Use default value in prototype instead. + // TODO: remove this for 2.0 (thanks to #11511) + if(isNaN(this.value)){ delete this.value; } + + this.inherited(arguments); + }, + + buildRendering: function(){ + this.inherited(arguments); + dojo.setSelectable(this.domNode, false); + + var cloneClass = dojo.hitch(this, function(clazz, n){ + var template = dojo.query(clazz, this.domNode)[0]; + for(var i=0; i= 0){ _this._adjustDisplay(dateProp, adj); } + }, 0.8, 500) + ); + }; + typematic("incrementMonth", "month", 1); + typematic("decrementMonth", "month", -1); + typematic("nextYearLabelNode", "year", 1); + typematic("previousYearLabelNode", "year", -1); + }, + + _adjustDisplay: function(/*String*/ part, /*int*/ amount){ + // summary: + // Moves calendar forwards or backwards by months or years + // part: + // "month" or "year" + // amount: + // Number of months or years + // tags: + // private + this._setCurrentFocusAttr(this.dateFuncObj.add(this.currentFocus, part, amount)); + }, + + _setCurrentFocusAttr: function(/*Date*/ date, /*Boolean*/ forceFocus){ + // summary: + // If the calendar currently has focus, then focuses specified date, + // changing the currently displayed month/year if necessary. + // If the calendar doesn't have focus, updates currently + // displayed month/year, and sets the cell that will get focus. + // forceFocus: + // If true, will focus() the cell even if calendar itself doesn't have focus + + var oldFocus = this.currentFocus, + oldCell = oldFocus ? dojo.query("[dijitDateValue=" + oldFocus.valueOf() + "]", this.domNode)[0] : null; + + // round specified value to nearest day (1am to avoid issues when DST shift occurs at midnight, see #8521, #9366) + date = new this.dateClassObj(date); + date.setHours(1, 0, 0, 0); + + this._set("currentFocus", date); + + // TODO: only re-populate grid when month/year has changed + this._populateGrid(); + + // set tabIndex=0 on new cell, and focus it (but only if Calendar itself is focused) + var newCell = dojo.query("[dijitDateValue=" + date.valueOf() + "]", this.domNode)[0]; + newCell.setAttribute("tabIndex", this.tabIndex); + if(this._focused || forceFocus){ + newCell.focus(); + } + + // set tabIndex=-1 on old focusable cell + if(oldCell && oldCell != newCell){ + if(dojo.isWebKit){ // see #11064 about webkit bug + oldCell.setAttribute("tabIndex", "-1"); + }else{ + oldCell.removeAttribute("tabIndex"); + } + } + }, + + focus: function(){ + // summary: + // Focus the calendar by focusing one of the calendar cells + this._setCurrentFocusAttr(this.currentFocus, true); + }, + + _onMonthSelect: function(/*Number*/ newMonth){ + // summary: + // Handler for when user selects a month from the drop down list + // tags: + // protected + + // move to selected month, bounding by the number of days in the month + // (ex: dec 31 --> jan 28, not jan 31) + this.currentFocus = this.dateFuncObj.add(this.currentFocus, "month", + newMonth - this.currentFocus.getMonth()); + this._populateGrid(); + }, + + _onDayClick: function(/*Event*/ evt){ + // summary: + // Handler for day clicks, selects the date if appropriate + // tags: + // protected + dojo.stopEvent(evt); + for(var node = evt.target; node && !node.dijitDateValue; node = node.parentNode); + if(node && !dojo.hasClass(node, "dijitCalendarDisabledDate")){ + this.set('value', node.dijitDateValue); + } + }, + + _onDayMouseOver: function(/*Event*/ evt){ + // summary: + // Handler for mouse over events on days, sets hovered style + // tags: + // protected + + // event can occur on or the inside the td, + // set node to the . + var node = + dojo.hasClass(evt.target, "dijitCalendarDateLabel") ? + evt.target.parentNode : + evt.target; + + if(node && (node.dijitDateValue || node == this.previousYearLabelNode || node == this.nextYearLabelNode) ){ + dojo.addClass(node, "dijitCalendarHoveredDate"); + this._currentNode = node; + } + }, + + _onDayMouseOut: function(/*Event*/ evt){ + // summary: + // Handler for mouse out events on days, clears hovered style + // tags: + // protected + + if(!this._currentNode){ return; } + + // if mouse out occurs moving from to inside , ignore it + if(evt.relatedTarget && evt.relatedTarget.parentNode == this._currentNode){ return; } + var cls = "dijitCalendarHoveredDate"; + if(dojo.hasClass(this._currentNode, "dijitCalendarActiveDate")) { + cls += " dijitCalendarActiveDate"; + } + dojo.removeClass(this._currentNode, cls); + this._currentNode = null; + }, + + _onDayMouseDown: function(/*Event*/ evt){ + var node = evt.target.parentNode; + if(node && node.dijitDateValue){ + dojo.addClass(node, "dijitCalendarActiveDate"); + this._currentNode = node; + } + }, + + _onDayMouseUp: function(/*Event*/ evt){ + var node = evt.target.parentNode; + if(node && node.dijitDateValue){ + dojo.removeClass(node, "dijitCalendarActiveDate"); + } + }, + +//TODO: use typematic + handleKey: function(/*Event*/ evt){ + // summary: + // Provides keyboard navigation of calendar. + // description: + // Called from _onKeyPress() to handle keypress on a stand alone Calendar, + // and also from `dijit.form._DateTimeTextBox` to pass a keypress event + // from the `dijit.form.DateTextBox` to be handled in this widget + // returns: + // False if the key was recognized as a navigation key, + // to indicate that the event was handled by Calendar and shouldn't be propogated + // tags: + // protected + var dk = dojo.keys, + increment = -1, + interval, + newValue = this.currentFocus; + switch(evt.keyCode){ + case dk.RIGHT_ARROW: + increment = 1; + //fallthrough... + case dk.LEFT_ARROW: + interval = "day"; + if(!this.isLeftToRight()){ increment *= -1; } + break; + case dk.DOWN_ARROW: + increment = 1; + //fallthrough... + case dk.UP_ARROW: + interval = "week"; + break; + case dk.PAGE_DOWN: + increment = 1; + //fallthrough... + case dk.PAGE_UP: + interval = evt.ctrlKey || evt.altKey ? "year" : "month"; + break; + case dk.END: + // go to the next month + newValue = this.dateFuncObj.add(newValue, "month", 1); + // subtract a day from the result when we're done + interval = "day"; + //fallthrough... + case dk.HOME: + newValue = new this.dateClassObj(newValue); + newValue.setDate(1); + break; + case dk.ENTER: + case dk.SPACE: + this.set("value", this.currentFocus); + break; + default: + return true; + } + + if(interval){ + newValue = this.dateFuncObj.add(newValue, interval, increment); + } + + this._setCurrentFocusAttr(newValue); + + return false; + }, + + _onKeyPress: function(/*Event*/ evt){ + // summary: + // For handling keypress events on a stand alone calendar + if(!this.handleKey(evt)){ + dojo.stopEvent(evt); + } + }, + + onValueSelected: function(/*Date*/ date){ + // summary: + // Notification that a date cell was selected. It may be the same as the previous value. + // description: + // Formerly used by `dijit.form._DateTimeTextBox` (and thus `dijit.form.DateTextBox`) + // to get notification when the user has clicked a date. Now onExecute() (above) is used. + // tags: + // protected + }, + + onChange: function(/*Date*/ date){ + // summary: + // Called only when the selected date has changed + }, + + _isSelectedDate: function(/*Date*/ dateObject, /*String?*/ locale){ + // summary: + // Extension point so developers can subclass Calendar to + // support multiple (concurrently) selected dates + // tags: + // protected extension + return this._isValidDate(this.value) && !this.dateFuncObj.compare(dateObject, this.value, "date") + }, + + isDisabledDate: function(/*Date*/ dateObject, /*String?*/ locale){ + // summary: + // May be overridden to disable certain dates in the calendar e.g. `isDisabledDate=dojo.date.locale.isWeekend` + // tags: + // extension +/*===== + return false; // Boolean +=====*/ + }, + + getClassForDate: function(/*Date*/ dateObject, /*String?*/ locale){ + // summary: + // May be overridden to return CSS classes to associate with the date entry for the given dateObject, + // for example to indicate a holiday in specified locale. + // tags: + // extension + +/*===== + return ""; // String +=====*/ + } + } +); + +dojo.declare("dijit.Calendar._MonthDropDown", [dijit._Widget, dijit._Templated], { + // summary: + // The month drop down + + // months: String[] + // List of names of months, possibly w/some undefined entries for Hebrew leap months + // (ex: ["January", "February", undefined, "April", ...]) + months: [], + + templateString: "
", + + _setMonthsAttr: function(/*String[]*/ months){ + this.domNode.innerHTML = dojo.map(months, function(month, idx){ + return month ? "
" + month + "
" : ""; + }).join(""); + }, + + _onClick: function(/*Event*/ evt){ + this.onChange(dojo.attr(evt.target, "month")); + }, + + onChange: function(/*Number*/ month){ + // summary: + // Callback when month is selected from drop down + }, + + _onMenuHover: function(evt){ + dojo.toggleClass(evt.target, "dijitCalendarMonthLabelHover", evt.type == "mouseover"); + } }); -_1d(".dijitCalendarDayLabelTemplate",6); -_1d(".dijitCalendarDateTemplate",6); -_1d(".dijitCalendarWeekTemplate",5); -var _20=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang); -var _21=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang); -dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_22,i){ -this._setText(_22,_20[(i+_21)%7]); -},this); -var _23=new this.dateClassObj(this.value); -var _24=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_23); -_1d(".dijitCalendarMonthLabelTemplate",_24.length-1); -dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(_25,i){ -dojo.attr(_25,"month",i); -if(i in _24){ -this._setText(_25,_24[i]); -} -dojo.place(_25.cloneNode(true),this.monthLabelSpacer); -},this); -this.value=null; -this.set("value",_23); -},_onMenuHover:function(e){ -dojo.stopEvent(e); -dojo.toggleClass(e.target,"dijitMenuItemHover"); -},_adjustDisplay:function(_26,_27){ -this.displayMonth=this.dateFuncObj.add(this.displayMonth,_26,_27); -this._populateGrid(); -},_onMonthToggle:function(evt){ -dojo.stopEvent(evt); -if(evt.type=="mousedown"){ -var _28=dojo.position(this.monthLabelNode); -var dim={width:_28.w+"px",top:-this.displayMonth.getMonth()*_28.h+"px"}; -if((dojo.isIE&&dojo.isQuirks)||dojo.isIE<7){ -dim.left=-_28.w/2+"px"; -} -dojo.style(this.monthDropDown,dim); -this._popupHandler=this.connect(document,"onmouseup","_onMonthToggle"); -}else{ -this.disconnect(this._popupHandler); -delete this._popupHandler; -} -dojo.toggleClass(this.monthDropDown,"dijitHidden"); -dojo.toggleClass(this.monthLabelNode,"dijitVisible"); -},_onMonthSelect:function(evt){ -this._onMonthToggle(evt); -this.displayMonth.setMonth(dojo.attr(evt.target,"month")); -this._populateGrid(); -},_onDayClick:function(evt){ -dojo.stopEvent(evt); -for(var _29=evt.target;_29&&!_29.dijitDateValue;_29=_29.parentNode){ -} -if(_29&&!dojo.hasClass(_29,"dijitCalendarDisabledDate")){ -this.set("value",_29.dijitDateValue); -this.onValueSelected(this.get("value")); -} -},_onDayMouseOver:function(evt){ -var _2a=dojo.hasClass(evt.target,"dijitCalendarDateLabel")?evt.target.parentNode:evt.target; -if(_2a&&(_2a.dijitDateValue||_2a==this.previousYearLabelNode||_2a==this.nextYearLabelNode)){ -dojo.addClass(_2a,"dijitCalendarHoveredDate"); -this._currentNode=_2a; -} -},_onDayMouseOut:function(evt){ -if(!this._currentNode){ -return; -} -if(evt.relatedTarget&&evt.relatedTarget.parentNode==this._currentNode){ -return; -} -dojo.removeClass(this._currentNode,"dijitCalendarHoveredDate"); -if(dojo.hasClass(this._currentNode,"dijitCalendarActiveDate")){ -dojo.removeClass(this._currentNode,"dijitCalendarActiveDate"); -} -this._currentNode=null; -},_onDayMouseDown:function(evt){ -var _2b=evt.target.parentNode; -if(_2b&&_2b.dijitDateValue){ -dojo.addClass(_2b,"dijitCalendarActiveDate"); -this._currentNode=_2b; -} -},_onDayMouseUp:function(evt){ -var _2c=evt.target.parentNode; -if(_2c&&_2c.dijitDateValue){ -dojo.removeClass(_2c,"dijitCalendarActiveDate"); -} -},_onKeyPress:function(evt){ -var dk=dojo.keys,_2d=-1,_2e,_2f=this.value; -switch(evt.keyCode){ -case dk.RIGHT_ARROW: -_2d=1; -case dk.LEFT_ARROW: -_2e="day"; -if(!this.isLeftToRight()){ -_2d*=-1; -} -break; -case dk.DOWN_ARROW: -_2d=1; -case dk.UP_ARROW: -_2e="week"; -break; -case dk.PAGE_DOWN: -_2d=1; -case dk.PAGE_UP: -_2e=evt.ctrlKey?"year":"month"; -break; -case dk.END: -_2f=this.dateFuncObj.add(_2f,"month",1); -_2e="day"; -case dk.HOME: -_2f=new Date(_2f).setDate(1); -break; -case dk.ENTER: -this.onValueSelected(this.get("value")); -break; -case dk.ESCAPE: -default: -return; -} -dojo.stopEvent(evt); -if(_2e){ -_2f=this.dateFuncObj.add(_2f,_2e,_2d); -} -this.set("value",_2f); -},onValueSelected:function(_30){ -},onChange:function(_31){ -},_isSelectedDate:function(_32,_33){ -return !this.dateFuncObj.compare(_32,this.value,"date"); -},isDisabledDate:function(_34,_35){ -},getClassForDate:function(_36,_37){ -}}); + } diff --git a/lib/dijit/CheckedMenuItem.js b/lib/dijit/CheckedMenuItem.js index a84837897..ab24dfb95 100644 --- a/lib/dijit/CheckedMenuItem.js +++ b/lib/dijit/CheckedMenuItem.js @@ -1,24 +1,54 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + 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.CheckedMenuItem"]){ -dojo._hasResource["dijit.CheckedMenuItem"]=true; +if(!dojo._hasResource["dijit.CheckedMenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dijit.CheckedMenuItem"] = true; dojo.provide("dijit.CheckedMenuItem"); dojo.require("dijit.MenuItem"); -dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:dojo.cache("dijit","templates/CheckedMenuItem.html","\n\t\n\t\t\"\"\n\t\t\n\t\n\t\n\t\n\t \n\n"),checked:false,_setCheckedAttr:function(_1){ -dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_1); -dijit.setWaiState(this.domNode,"checked",_1); -this.checked=_1; -},onChange:function(_2){ -},_onClick:function(e){ -if(!this.disabled){ -this.set("checked",!this.checked); -this.onChange(this.checked); -} -this.inherited(arguments); -}}); + + +dojo.declare("dijit.CheckedMenuItem", + dijit.MenuItem, + { + // summary: + // A checkbox-like menu item for toggling on and off + + templateString: dojo.cache("dijit", "templates/CheckedMenuItem.html", "\n\t\n\t\t\"\"\n\t\t\n\t\n\t\n\t\n\t \n\n"), + + // checked: Boolean + // Our checked state + checked: false, + _setCheckedAttr: function(/*Boolean*/ checked){ + // summary: + // Hook so attr('checked', bool) works. + // Sets the class and state for the check box. + dojo.toggleClass(this.domNode, "dijitCheckedMenuItemChecked", checked); + dijit.setWaiState(this.domNode, "checked", checked); + this._set("checked", checked); + }, + + onChange: function(/*Boolean*/ checked){ + // summary: + // User defined function to handle check/uncheck events + // tags: + // callback + }, + + _onClick: function(/*Event*/ e){ + // summary: + // Clicking this item just toggles its state + // tags: + // private + if(!this.disabled){ + this.set("checked", !this.checked); + this.onChange(this.checked); + } + this.inherited(arguments); + } + }); + } diff --git a/lib/dijit/ColorPalette.js b/lib/dijit/ColorPalette.js index 62aae00df..62c9d8df6 100644 --- a/lib/dijit/ColorPalette.js +++ b/lib/dijit/ColorPalette.js @@ -1,31 +1,142 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + 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.ColorPalette"]){ -dojo._hasResource["dijit.ColorPalette"]=true; +if(!dojo._hasResource["dijit.ColorPalette"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dijit.ColorPalette"] = true; dojo.provide("dijit.ColorPalette"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojo.colors"); dojo.require("dojo.i18n"); +dojo.require("dojo.string"); dojo.require("dijit._PaletteMixin"); -dojo.requireLocalization("dojo","colors",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"); -dojo.declare("dijit.ColorPalette",[dijit._Widget,dijit._Templated,dijit._PaletteMixin],{palette:"7x10",_palettes:{"7x10":[["white","seashell","cornsilk","lemonchiffon","lightyellow","palegreen","paleturquoise","lightcyan","lavender","plum"],["lightgray","pink","bisque","moccasin","khaki","lightgreen","lightseagreen","lightskyblue","cornflowerblue","violet"],["silver","lightcoral","sandybrown","orange","palegoldenrod","chartreuse","mediumturquoise","skyblue","mediumslateblue","orchid"],["gray","red","orangered","darkorange","yellow","limegreen","darkseagreen","royalblue","slateblue","mediumorchid"],["dimgray","crimson","chocolate","coral","gold","forestgreen","seagreen","blue","blueviolet","darkorchid"],["darkslategray","firebrick","saddlebrown","sienna","olive","green","darkcyan","mediumblue","darkslateblue","darkmagenta"],["black","darkred","maroon","brown","darkolivegreen","darkgreen","midnightblue","navy","indigo","purple"]],"3x4":[["white","lime","green","blue"],["silver","yellow","fuchsia","navy"],["gray","red","purple","black"]]},_imagePaths:{"7x10":dojo.moduleUrl("dijit.themes","a11y/colors7x10.png"),"3x4":dojo.moduleUrl("dijit.themes","a11y/colors3x4.png"),"7x10-rtl":dojo.moduleUrl("dijit.themes","a11y/colors7x10-rtl.png"),"3x4-rtl":dojo.moduleUrl("dijit.themes","a11y/colors3x4-rtl.png")},templateString:dojo.cache("dijit","templates/ColorPalette.html","
\n\t\"\"/\n\t\n\t\t\n\t
\n
\n"),baseClass:"dijitColorPalette",dyeClass:"dijit._Color",buildRendering:function(){ -this.inherited(arguments); -this.imageNode.setAttribute("src",this._imagePaths[this.palette+(this.isLeftToRight()?"":"-rtl")].toString()); -var _1=dojo.i18n.getLocalization("dojo","colors",this.lang); -this._preparePalette(this._palettes[this.palette],_1); -}}); -dojo.declare("dijit._Color",dojo.Color,{constructor:function(_2){ -this._alias=_2; -this.setColor(dojo.Color.named[_2]); -},getValue:function(){ -return this.toHex(); -},fillCell:function(_3,_4){ -dojo.create("img",{src:_4,"class":"dijitPaletteImg",alt:this._alias},_3); -}}); +dojo.requireLocalization("dojo", "colors", 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.ColorPalette", + [dijit._Widget, dijit._Templated, dijit._PaletteMixin], + { + // summary: + // A keyboard accessible color-picking widget + // description: + // Grid showing various colors, so the user can pick a certain color. + // Can be used standalone, or as a popup. + // + // example: + // |
+ // + // example: + // | var picker = new dijit.ColorPalette({ },srcNode); + // | picker.startup(); + + + // palette: [const] String + // Size of grid, either "7x10" or "3x4". + palette: "7x10", + + // _palettes: [protected] Map + // This represents the value of the colors. + // The first level is a hashmap of the different palettes available. + // The next two dimensions represent the columns and rows of colors. + _palettes: { + "7x10": [["white", "seashell", "cornsilk", "lemonchiffon","lightyellow", "palegreen", "paleturquoise", "lightcyan", "lavender", "plum"], + ["lightgray", "pink", "bisque", "moccasin", "khaki", "lightgreen", "lightseagreen", "lightskyblue", "cornflowerblue", "violet"], + ["silver", "lightcoral", "sandybrown", "orange", "palegoldenrod", "chartreuse", "mediumturquoise", "skyblue", "mediumslateblue","orchid"], + ["gray", "red", "orangered", "darkorange", "yellow", "limegreen", "darkseagreen", "royalblue", "slateblue", "mediumorchid"], + ["dimgray", "crimson", "chocolate", "coral", "gold", "forestgreen", "seagreen", "blue", "blueviolet", "darkorchid"], + ["darkslategray","firebrick","saddlebrown", "sienna", "olive", "green", "darkcyan", "mediumblue","darkslateblue", "darkmagenta" ], + ["black", "darkred", "maroon", "brown", "darkolivegreen", "darkgreen", "midnightblue", "navy", "indigo", "purple"]], + + "3x4": [["white", "lime", "green", "blue"], + ["silver", "yellow", "fuchsia", "navy"], + ["gray", "red", "purple", "black"]] + }, + + // templateString: String + // The template of this widget. + templateString: dojo.cache("dijit", "templates/ColorPalette.html", "
\n\t\n\t\t\n\t
\n
\n"), + + baseClass: "dijitColorPalette", + + buildRendering: function(){ + // Instantiate the template, which makes a skeleton into which we'll insert a bunch of + // nodes + this.inherited(arguments); + + // Creates nodes in each cell of the template. + // Pass in "customized" dijit._Color constructor for specified palette and high-contrast vs. normal mode + this._preparePalette( + this._palettes[this.palette], + dojo.i18n.getLocalization("dojo", "colors", this.lang), + dojo.declare(dijit._Color, { + hc: dojo.hasClass(dojo.body(), "dijit_a11y"), + palette: this.palette + }) + ); + } +}); + +dojo.declare("dijit._Color", dojo.Color, { + // summary: + // Object associated with each cell in a ColorPalette palette. + // Implements dijit.Dye. + + // Template for each cell in normal (non-high-contrast mode). Each cell contains a wrapper + // node for showing the border (called dijitPaletteImg for back-compat), and dijitColorPaletteSwatch + // for showing the color. + template: + "" + + "${alt}" + + "", + + // Template for each cell in high contrast mode. Each cell contains an image with the whole palette, + // but scrolled and clipped to show the correct color only + hcTemplate: + "" + + "${alt}" + + "", + + // _imagePaths: [protected] Map + // This is stores the path to the palette images used for high-contrast mode display + _imagePaths: { + "7x10": dojo.moduleUrl("dijit.themes", "a11y/colors7x10.png"), + "3x4": dojo.moduleUrl("dijit.themes", "a11y/colors3x4.png") + }, + + constructor: function(/*String*/alias, /*Number*/ row, /*Number*/ col){ + this._alias = alias; + this._row = row; + this._col = col; + this.setColor(dojo.Color.named[alias]); + }, + + getValue: function(){ + // summary: + // Note that although dijit._Color is initialized with a value like "white" getValue() always + // returns a hex value + return this.toHex(); + }, + + fillCell: function(/*DOMNode*/ cell, /*String*/ blankGif){ + var html = dojo.string.substitute(this.hc ? this.hcTemplate : this.template, { + // substitution variables for normal mode + color: this.toHex(), + blankGif: blankGif, + alt: this._alias, + + // variables used for high contrast mode + image: this._imagePaths[this.palette].toString(), + left: this._col * -20 - 5, + top: this._row * -20 - 5, + size: this.palette == "7x10" ? "height: 145px; width: 206px" : "height: 64px; width: 86px" + }); + + dojo.place(html, cell); + } +}); + } diff --git a/lib/dijit/Declaration.js b/lib/dijit/Declaration.js index 57cbfd031..1cfa8ecad 100644 --- a/lib/dijit/Declaration.js +++ b/lib/dijit/Declaration.js @@ -1,36 +1,106 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + 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.Declaration"]){ -dojo._hasResource["dijit.Declaration"]=true; +if(!dojo._hasResource["dijit.Declaration"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dijit.Declaration"] = true; dojo.provide("dijit.Declaration"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); -dojo.declare("dijit.Declaration",dijit._Widget,{_noScript:true,widgetClass:"",defaults:null,mixins:[],buildRendering:function(){ -var _1=this.srcNodeRef.parentNode.removeChild(this.srcNodeRef),_2=dojo.query("> script[type^='dojo/method'][event]",_1).orphan(),_3=dojo.query("> script[type^='dojo/method']",_1).orphan(),_4=dojo.query("> script[type^='dojo/connect']",_1).orphan(),_5=_1.nodeName; -var _6=this.defaults||{}; -dojo.forEach(_2,function(s){ -var _7=s.getAttribute("event"),_8=dojo.parser._functionFromScript(s); -_6[_7]=_8; -}); -this.mixins=this.mixins.length?dojo.map(this.mixins,function(_9){ -return dojo.getObject(_9); -}):[dijit._Widget,dijit._Templated]; -_6.widgetsInTemplate=true; -_6._skipNodeCache=true; -_6.templateString="<"+_5+" class='"+_1.className+"' dojoAttachPoint='"+(_1.getAttribute("dojoAttachPoint")||"")+"' dojoAttachEvent='"+(_1.getAttribute("dojoAttachEvent")||"")+"' >"+_1.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+""; -dojo.query("[dojoType]",_1).forEach(function(_a){ -_a.removeAttribute("dojoType"); -}); -var wc=dojo.declare(this.widgetClass,this.mixins,_6); -var _b=_4.concat(_3); -dojo.forEach(_b,function(s){ -var _c=s.getAttribute("event")||"postscript",_d=dojo.parser._functionFromScript(s); -dojo.connect(wc.prototype,_c,_d); -}); -}}); + + +dojo.declare( + "dijit.Declaration", + dijit._Widget, + { + // summary: + // The Declaration widget allows a developer to declare new widget + // classes directly from a snippet of markup. + + // _noScript: [private] Boolean + // Flag to parser to leave alone the script tags contained inside of me + _noScript: true, + + // stopParser: [private] Boolean + // Flag to parser to not try and parse widgets declared inside of me + stopParser: true, + + // widgetClass: [const] String + // Name of class being declared, ex: "acme.myWidget" + widgetClass: "", + + // propList: [const] Object + // Set of attributes for this widget along with default values, ex: + // {delay: 100, title: "hello world"} + defaults: null, + + // mixins: [const] String[] + // List containing the prototype for this widget, and also any mixins, + // ex: ["dijit._Widget", "dijit._Container"] + mixins: [], + + buildRendering: function(){ + var src = this.srcNodeRef.parentNode.removeChild(this.srcNodeRef), + methods = dojo.query("> script[type^='dojo/method']", src).orphan(), + connects = dojo.query("> script[type^='dojo/connect']", src).orphan(), + srcType = src.nodeName; + + var propList = this.defaults || {}; + + // For all methods defined like + // +}; +=====*/ + +// All the stuff in _base (these are the function that are guaranteed available without an explicit dojo.require) + +// And some other stuff that we tend to pull in all the time anyway -if(!dojo._hasResource["dojo.window"]){dojo._hasResource["dojo.window"]=true;dojo.provide("dojo.window");dojo.window.getBox=function(){var _1=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _2=dojo._docScroll();return {w:_1.clientWidth,h:_1.clientHeight,l:_2.x,t:_2.y};};dojo.window.get=function(_3){if(dojo.isIE&&window!==document.parentWindow){_3.parentWindow.execScript("document._parentWindow = window;","Javascript");var _4=_3._parentWindow;_3._parentWindow=null;return _4;}return _3.parentWindow||_3.defaultView;};dojo.window.scrollIntoView=function(_5,_6){try{_5=dojo.byId(_5);var _7=_5.ownerDocument||dojo.doc,_8=_7.body||dojo.body(),_9=_7.documentElement||_8.parentNode,_a=dojo.isIE,_b=dojo.isWebKit;if((!(dojo.isMoz||_a||_b||dojo.isOpera)||_5==_8||_5==_9)&&(typeof _5.scrollIntoView!="undefined")){_5.scrollIntoView(false);return;}var _c=_7.compatMode=="BackCompat",_d=_c?_8:_9,_e=_b?_8:_d,_f=_d.clientWidth,_10=_d.clientHeight,rtl=!dojo._isBodyLtr(),_11=_6||dojo.position(_5),el=_5.parentNode,_12=function(el){return ((_a<=6||(_a&&_c))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_12(_5)){return;}while(el){if(el==_8){el=_e;}var _13=dojo.position(el),_14=_12(el);if(el==_e){_13.w=_f;_13.h=_10;if(_e==_9&&_a&&rtl){_13.x+=_e.offsetWidth-_13.w;}if(_13.x<0||!_a){_13.x=0;}if(_13.y<0||!_a){_13.y=0;}}else{var pb=dojo._getPadBorderExtents(el);_13.w-=pb.w;_13.h-=pb.h;_13.x+=pb.l;_13.y+=pb.t;}if(el!=_e){var _15=el.clientWidth,_16=_13.w-_15;if(_15>0&&_16>0){_13.w=_15;if(_a&&rtl){_13.x+=_16;}}_15=el.clientHeight;_16=_13.h-_15;if(_15>0&&_16>0){_13.h=_15;}}if(_14){if(_13.y<0){_13.h+=_13.y;_13.y=0;}if(_13.x<0){_13.w+=_13.x;_13.x=0;}if(_13.y+_13.h>_10){_13.h=_10-_13.y;}if(_13.x+_13.w>_f){_13.w=_f-_13.x;}}var l=_11.x-_13.x,t=_11.y-Math.max(_13.y,0),r=l+_11.w-_13.w,bot=t+_11.h-_13.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);_11.x+=el.scrollLeft;el.scrollLeft+=(_a>=8&&!_c&&rtl)?-s:s;_11.x-=el.scrollLeft;}if(bot*t>0){_11.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_11.y-=el.scrollTop;}el=(el!=_e)&&!_14&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_5.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_17){if(this._hash[_17.id]){throw new Error("Tried to register widget with id=="+_17.id+" but that id is already registered");}this._hash[_17.id]=_17;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_18,_19){_19=_19||dojo.global;var i=0,id;for(id in this._hash){_18.call(_19,this._hash[id],i++,this._hash);}return this;},filter:function(_1a,_1b){_1b=_1b||dojo.global;var res=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_1a.call(_1b,w,i++,this._hash)){res.add(w);}}return res;},byId:function(id){return this._hash[id];},byClass:function(cls){var res=new dijit.WidgetSet(),id,_1c;for(id in this._hash){_1c=this._hash[id];if(_1c.declaredClass==cls){res.add(_1c);}}return res;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_1d,_1e){return dojo.map(this.toArray(),_1d,_1e);},every:function(_1f,_20){_20=_20||dojo.global;var x=0,i;for(i in this._hash){if(!_1f.call(_20,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_21,_22){_22=_22||dojo.global;var x=0,i;for(i in this._hash){if(_21.call(_22,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){dijit.registry=new dijit.WidgetSet();var _23=dijit.registry._hash,_24=dojo.attr,_25=dojo.hasAttr,_26=dojo.style;dijit.byId=function(id){return typeof id=="string"?_23[id]:id;};var _27={};dijit.getUniqueId=function(_28){var id;do{id=_28+"_"+(_28 in _27?++_27[_28]:_27[_28]=0);}while(_23[id]);return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;};dijit.findWidgets=function(_29){var _2a=[];function _2b(_2c){for(var _2d=_2c.firstChild;_2d;_2d=_2d.nextSibling){if(_2d.nodeType==1){var _2e=_2d.getAttribute("widgetId");if(_2e){_2a.push(_23[_2e]);}else{_2b(_2d);}}}};_2b(_29);return _2a;};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(_2f){if(!_2f._destroyed){if(_2f.destroyRecursive){_2f.destroyRecursive();}else{if(_2f.destroy){_2f.destroy();}}}});};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll();});}dijit.byNode=function(_30){return _23[_30.getAttribute("widgetId")];};dijit.getEnclosingWidget=function(_31){while(_31){var id=_31.getAttribute&&_31.getAttribute("widgetId");if(id){return _23[id];}_31=_31.parentNode;}return null;};var _32=(dijit._isElementShown=function(_33){var s=_26(_33);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_24(_33,"type")!="hidden");});dijit.hasDefaultTabStop=function(_34){switch(_34.nodeName.toLowerCase()){case "a":return _25(_34,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":if(dojo.isMoz){try{return _34.contentDocument.designMode=="on";}catch(err){return false;}}else{if(dojo.isWebKit){var doc=_34.contentDocument,_35=doc&&doc.body;return _35&&_35.contentEditable=="true";}else{try{doc=_34.contentWindow.document;_35=doc&&doc.body;return _35&&_35.firstChild&&_35.firstChild.contentEditable=="true";}catch(e){return false;}}}default:return _34.contentEditable=="true";}};var _36=(dijit.isTabNavigable=function(_37){if(_24(_37,"disabled")){return false;}else{if(_25(_37,"tabIndex")){return _24(_37,"tabIndex")>=0;}else{return dijit.hasDefaultTabStop(_37);}}});dijit._getTabNavigable=function(_38){var _39,_3a,_3b,_3c,_3d,_3e;var _3f=function(_40){dojo.query("> *",_40).forEach(function(_41){if((dojo.isIE&&_41.scopeName!=="HTML")||!_32(_41)){return;}if(_36(_41)){var _42=_24(_41,"tabIndex");if(!_25(_41,"tabIndex")||_42==0){if(!_39){_39=_41;}_3a=_41;}else{if(_42>0){if(!_3b||_42<_3c){_3c=_42;_3b=_41;}if(!_3d||_42>=_3e){_3e=_42;_3d=_41;}}}}if(_41.nodeName.toUpperCase()!="SELECT"){_3f(_41);}});};if(_32(_38)){_3f(_38);}return {first:_39,last:_3a,lowest:_3b,highest:_3d};};dijit.getFirstInTabbingOrder=function(_43){var _44=dijit._getTabNavigable(dojo.byId(_43));return _44.lowest?_44.lowest:_44.first;};dijit.getLastInTabbingOrder=function(_45){var _46=dijit._getTabNavigable(dojo.byId(_45));return _46.last?_46.last:_46.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;})();}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i=_65;i--){_66=dijit.byId(_64[i]);if(_66){_66._focused=false;_66._hasBeenBlurred=true;if(_66._onBlur){_66._onBlur(by);}dojo.publish("widgetBlur",[_66,by]);}}for(i=_65;i<_63.length;i++){_66=dijit.byId(_63[i]);if(_66){_66._focused=true;if(_66._onFocus){_66._onFocus(by);}dojo.publish("widgetFocus",[_66,by]);}}}});dojo.addOnLoad(function(){var _67=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_67);_67=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_68){this.pairs=[];this.returnWrappers=_68||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_69,_6a,_6b,_6c,_6d){this.pairs[((_6d)?"unshift":"push")]([_69,_6a,_6b,_6c]);},match:function(){for(var i=0;i0&&_a1[pi].parent===_a1[pi-1].widget;pi--){}return _a1[pi];},open:function(_a2){var _a3=this._stack,_a4=_a2.popup,_a5=_a2.orient||((_a2.parent?_a2.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_a6=_a2.around,id=(_a2.around&&_a2.around.id)?(_a2.around.id+"_dropdown"):("popup_"+this._idGen++);var _a7=_a4.domNode.parentNode;if(!_a7||!dojo.hasClass(_a7,"dijitPopup")){this.moveOffScreen(_a4.domNode);_a7=_a4.domNode.parentNode;}dojo.attr(_a7,{id:id,style:{zIndex:this._beginZIndex+_a3.length},"class":"dijitPopup "+(_a4.baseClass||_a4["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:_a2.parent?_a2.parent.id:""});if(dojo.isIE||dojo.isMoz){var _a8=_a7.childNodes[1];if(!_a8){_a8=new dijit.BackgroundIframe(_a7);}}var _a9=_a6?dijit.placeOnScreenAroundElement(_a7,_a6,_a5,_a4.orient?dojo.hitch(_a4,"orient"):null):dijit.placeOnScreen(_a7,_a2,_a5=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_a2.padding);_a7.style.visibility="visible";_a4.domNode.style.visibility="visible";var _aa=[];_aa.push(dojo.connect(_a7,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_a2.onCancel){dojo.stopEvent(evt);_a2.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _ab=this.getTopPopup();if(_ab&&_ab.onCancel){_ab.onCancel();}}}}));if(_a4.onCancel){_aa.push(dojo.connect(_a4,"onCancel",_a2.onCancel));}_aa.push(dojo.connect(_a4,_a4.onExecute?"onExecute":"onChange",this,function(){var _ac=this.getTopPopup();if(_ac&&_ac.onExecute){_ac.onExecute();}}));_a3.push({wrapper:_a7,iframe:_a8,widget:_a4,parent:_a2.parent,onExecute:_a2.onExecute,onCancel:_a2.onCancel,onClose:_a2.onClose,handlers:_aa});if(_a4.onOpen){_a4.onOpen(_a9);}return _a9;},close:function(_ad){var _ae=this._stack;while(dojo.some(_ae,function(_af){return _af.widget==_ad;})){var top=_ae.pop(),_b0=top.wrapper,_b1=top.iframe,_b2=top.widget,_b3=top.onClose;if(_b2.onClose){_b2.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_b2&&_b2.domNode){this.moveOffScreen(_b2.domNode);}else{dojo.destroy(_b0);}if(_b3){_b3();}}}};dijit._frames=new function(){var _b4=[];this.pop=function(){var _b5;if(_b4.length){_b5=_b4.pop();_b5.style.display="";}else{if(dojo.isIE){var _b6=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _b7="