gridx-rails 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/LICENSE +2 -0
- data/README.md +18 -0
- data/Rakefile +36 -0
- data/app/assets/images/gridx/mobile/themes/iphone/images/ajax-loader.gif +0 -0
- data/app/assets/images/gridx/mobile/themes/iphone/images/arrow.png +0 -0
- data/app/assets/images/gridx/resources/images/checkboxpartial.png +0 -0
- data/app/assets/images/gridx/resources/images/checkboxpartialdisabled.png +0 -0
- data/app/assets/images/gridx/resources/images/claro-grid-header-onepixel.bmp +0 -0
- data/app/assets/images/gridx/resources/images/dndCopy.png +0 -0
- data/app/assets/images/gridx/resources/images/dndMove.png +0 -0
- data/app/assets/images/gridx/resources/images/dndNoCopy.png +0 -0
- data/app/assets/images/gridx/resources/images/dndNoMove.png +0 -0
- data/app/assets/images/gridx/resources/images/gridxCellChanged.png +0 -0
- data/app/assets/images/gridx/resources/images/header.png +0 -0
- data/app/assets/images/gridx/resources/images/header_shadow.png +0 -0
- data/app/assets/images/gridx/resources/images/loadingAnimation.gif +0 -0
- data/app/assets/images/gridx/resources/images/row_back.png +0 -0
- data/app/assets/images/gridx/resources/images/row_back_changed.png +0 -0
- data/app/assets/images/gridx/resources/images/sprite_icons.png +0 -0
- data/app/assets/images/gridx/resources/images/treeExpandImages.png +0 -0
- data/app/assets/images/gridx/resources/images/treeExpand_loading.gif +0 -0
- data/app/assets/javascripts/gridx/Grid.js +224 -0
- data/app/assets/javascripts/gridx/GridCommon.js +52 -0
- data/app/assets/javascripts/gridx/allModules.js +105 -0
- data/app/assets/javascripts/gridx/core/Cell.js +86 -0
- data/app/assets/javascripts/gridx/core/Column.js +183 -0
- data/app/assets/javascripts/gridx/core/Core.js +447 -0
- data/app/assets/javascripts/gridx/core/Row.js +174 -0
- data/app/assets/javascripts/gridx/core/_Module.js +285 -0
- data/app/assets/javascripts/gridx/core/model/Model.js +495 -0
- data/app/assets/javascripts/gridx/core/model/_Extension.js +84 -0
- data/app/assets/javascripts/gridx/core/model/cache/Async.js +469 -0
- data/app/assets/javascripts/gridx/core/model/cache/Sync.js +59 -0
- data/app/assets/javascripts/gridx/core/model/cache/_Cache.js +386 -0
- data/app/assets/javascripts/gridx/core/model/extensions/ClientFilter.js +303 -0
- data/app/assets/javascripts/gridx/core/model/extensions/FormatSort.js +103 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Mark.js +370 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Modify.js +418 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Move.js +429 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Query.js +50 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Sort.js +81 -0
- data/app/assets/javascripts/gridx/core/util.js +13 -0
- data/app/assets/javascripts/gridx/mobile/Grid.js +300 -0
- data/app/assets/javascripts/gridx/mobile/LazyLoad.js +88 -0
- data/app/assets/javascripts/gridx/mobile/PullRefresh.js +117 -0
- data/app/assets/javascripts/gridx/mobile/Sort.js +66 -0
- data/app/assets/javascripts/gridx/mobile/nls/LazyLoad.js +38 -0
- data/app/assets/javascripts/gridx/mobile/nls/PullRefresh.js +39 -0
- data/app/assets/javascripts/gridx/mobile/nls/ar/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ar/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ar/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/bg/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/bg/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/bg/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ca/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ca/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ca/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/common.js +37 -0
- data/app/assets/javascripts/gridx/mobile/nls/cs/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/cs/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/cs/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/da/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/da/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/da/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/de/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/de/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/de/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/el/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/el/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/el/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/es/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/es/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/es/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/fi/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/fi/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/fi/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/fr/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/fr/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/fr/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/he/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/he/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/he/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/hr/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/hr/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/hr/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/hu/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/hu/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/hu/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/it/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/it/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/it/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ja/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ja/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ja/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/kk/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/kk/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/kk/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ko/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ko/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ko/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/nb/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/nb/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/nb/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/nl/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/nl/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/nl/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/pl/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/pl/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/pl/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt-pt/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt-pt/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt-pt/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ro/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ro/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ro/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ru/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ru/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ru/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/sk/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/sk/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/sk/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/sl/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/sl/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/sl/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/sv/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/sv/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/sv/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/th/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/th/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/th/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/tr/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/tr/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/tr/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/uk/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/uk/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/uk/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh-tw/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh-tw/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh-tw/common.js +5 -0
- data/app/assets/javascripts/gridx/modules/AutoScroll.js +100 -0
- data/app/assets/javascripts/gridx/modules/Bar.js +322 -0
- data/app/assets/javascripts/gridx/modules/Body.js +1059 -0
- data/app/assets/javascripts/gridx/modules/CellWidget.js +538 -0
- data/app/assets/javascripts/gridx/modules/ColumnLock.js +254 -0
- data/app/assets/javascripts/gridx/modules/ColumnResizer.js +278 -0
- data/app/assets/javascripts/gridx/modules/ColumnWidth.js +320 -0
- data/app/assets/javascripts/gridx/modules/Dod.js +368 -0
- data/app/assets/javascripts/gridx/modules/Edit.js +1024 -0
- data/app/assets/javascripts/gridx/modules/Filter.js +482 -0
- data/app/assets/javascripts/gridx/modules/Focus.js +439 -0
- data/app/assets/javascripts/gridx/modules/GroupHeader.js +437 -0
- data/app/assets/javascripts/gridx/modules/HLayout.js +139 -0
- data/app/assets/javascripts/gridx/modules/HScroller.js +172 -0
- data/app/assets/javascripts/gridx/modules/Header.js +289 -0
- data/app/assets/javascripts/gridx/modules/HeaderMenu.js +63 -0
- data/app/assets/javascripts/gridx/modules/HeaderRegions.js +201 -0
- data/app/assets/javascripts/gridx/modules/HiddenColumns.js +274 -0
- data/app/assets/javascripts/gridx/modules/IndirectSelect.js +287 -0
- data/app/assets/javascripts/gridx/modules/IndirectSelectColumn.js +277 -0
- data/app/assets/javascripts/gridx/modules/Menu.js +167 -0
- data/app/assets/javascripts/gridx/modules/NavigableCell.js +170 -0
- data/app/assets/javascripts/gridx/modules/NestedSort.js +280 -0
- data/app/assets/javascripts/gridx/modules/PagedBody.js +409 -0
- data/app/assets/javascripts/gridx/modules/Pagination.js +293 -0
- data/app/assets/javascripts/gridx/modules/Persist.js +266 -0
- data/app/assets/javascripts/gridx/modules/Printer.js +49 -0
- data/app/assets/javascripts/gridx/modules/RowHeader.js +412 -0
- data/app/assets/javascripts/gridx/modules/RowLock.js +143 -0
- data/app/assets/javascripts/gridx/modules/SingleSort.js +276 -0
- data/app/assets/javascripts/gridx/modules/SummaryBar.js +33 -0
- data/app/assets/javascripts/gridx/modules/TitleBar.js +51 -0
- data/app/assets/javascripts/gridx/modules/ToolBar.js +55 -0
- data/app/assets/javascripts/gridx/modules/TouchScroll.js +103 -0
- data/app/assets/javascripts/gridx/modules/TouchVScroller.js +89 -0
- data/app/assets/javascripts/gridx/modules/Traverse.js +159 -0
- data/app/assets/javascripts/gridx/modules/Tree.js +646 -0
- data/app/assets/javascripts/gridx/modules/VLayout.js +152 -0
- data/app/assets/javascripts/gridx/modules/VScroller.js +342 -0
- data/app/assets/javascripts/gridx/modules/View.js +540 -0
- data/app/assets/javascripts/gridx/modules/VirtualVScroller.js +445 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/DropDownPager.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/DropDownSizer.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/GotoPageButton.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/LinkPager.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/LinkSizer.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/Summary.js +16 -0
- data/app/assets/javascripts/gridx/modules/dnd/Avatar.js +45 -0
- data/app/assets/javascripts/gridx/modules/dnd/Column.js +210 -0
- data/app/assets/javascripts/gridx/modules/dnd/Row.js +286 -0
- data/app/assets/javascripts/gridx/modules/dnd/_Base.js +60 -0
- data/app/assets/javascripts/gridx/modules/dnd/_Dnd.js +371 -0
- data/app/assets/javascripts/gridx/modules/exporter/CSV.js +43 -0
- data/app/assets/javascripts/gridx/modules/exporter/Exporter.js +34 -0
- data/app/assets/javascripts/gridx/modules/exporter/Table.js +42 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Cell.js +491 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Column.js +290 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Row.js +458 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/_Base.js +244 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/_RowCellBase.js +35 -0
- data/app/assets/javascripts/gridx/modules/filter/DistinctComboBoxMenu.js +22 -0
- data/app/assets/javascripts/gridx/modules/filter/Filter.js +16 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterBar.js +649 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterConfirmDialog.js +33 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterDialog.js +179 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterPane.js +340 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterTooltip.js +103 -0
- data/app/assets/javascripts/gridx/modules/filter/QuickFilter.js +33 -0
- data/app/assets/javascripts/gridx/modules/move/Column.js +223 -0
- data/app/assets/javascripts/gridx/modules/move/Row.js +154 -0
- data/app/assets/javascripts/gridx/modules/pagination/Pagination.js +16 -0
- data/app/assets/javascripts/gridx/modules/pagination/PaginationBar.js +68 -0
- data/app/assets/javascripts/gridx/modules/pagination/PaginationBarDD.js +40 -0
- data/app/assets/javascripts/gridx/modules/pagination/_PaginationBarBase.js +105 -0
- data/app/assets/javascripts/gridx/modules/select/Cell.js +229 -0
- data/app/assets/javascripts/gridx/modules/select/Column.js +209 -0
- data/app/assets/javascripts/gridx/modules/select/Row.js +302 -0
- data/app/assets/javascripts/gridx/modules/select/_Base.js +99 -0
- data/app/assets/javascripts/gridx/modules/select/_RowCellBase.js +51 -0
- data/app/assets/javascripts/gridx/nls/Body.js +47 -0
- data/app/assets/javascripts/gridx/nls/FilterBar.js +133 -0
- data/app/assets/javascripts/gridx/nls/NestedSort.js +45 -0
- data/app/assets/javascripts/gridx/nls/PaginationBar.js +68 -0
- data/app/assets/javascripts/gridx/nls/QuickFilter.js +40 -0
- data/app/assets/javascripts/gridx/nls/SummaryBar.js +38 -0
- data/app/assets/javascripts/gridx/nls/ar/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ar/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ar/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ar/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ar/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ar/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/bg/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/bg/FilterBar.js +88 -0
- data/app/assets/javascripts/gridx/nls/bg/NestedSort.js +12 -0
- data/app/assets/javascripts/gridx/nls/bg/PaginationBar.js +28 -0
- data/app/assets/javascripts/gridx/nls/bg/QuickFilter.js +8 -0
- data/app/assets/javascripts/gridx/nls/bg/SummaryBar.js +6 -0
- data/app/assets/javascripts/gridx/nls/ca/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ca/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ca/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/ca/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/ca/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/ca/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/cs/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/cs/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/cs/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/cs/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/cs/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/cs/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/da/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/da/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/da/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/da/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/da/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/da/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/de/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/de/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/de/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/de/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/de/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/de/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/el/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/el/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/el/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/el/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/el/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/el/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/es/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/es/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/es/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/es/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/es/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/es/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/fi/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/fi/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/fi/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/fi/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/fi/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/fi/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/fr/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/fr/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/fr/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/fr/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/fr/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/fr/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/he/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/he/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/he/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/he/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/he/QuickFilter.js +6 -0
- data/app/assets/javascripts/gridx/nls/he/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/hr/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/hr/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/hr/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/hr/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/hr/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/hr/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/hu/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/hu/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/hu/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/hu/PaginationBar.js +33 -0
- data/app/assets/javascripts/gridx/nls/hu/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/hu/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/it/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/it/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/it/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/it/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/it/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/it/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/ja/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ja/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ja/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ja/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ja/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ja/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/kk/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/kk/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/kk/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/kk/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/kk/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/kk/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/ko/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ko/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ko/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ko/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ko/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ko/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/nb/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/nb/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/nb/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/nb/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/nb/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/nb/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/nl/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/nl/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/nl/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/nl/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/nl/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/nl/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/pl/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/pl/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pl/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/pl/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/pl/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/pl/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/pt/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/pt/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pt/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/pt/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/pt/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/pt/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/pt-br/Body.js +6 -0
- data/app/assets/javascripts/gridx/nls/pt-br/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pt-br/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/pt-br/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/pt-br/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/pt-br/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/ro/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ro/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ro/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/ro/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/ro/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/ro/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/ru/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ru/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ru/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ru/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ru/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ru/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/sk/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/sk/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/sk/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/sk/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/sk/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/sk/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/sl/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/sl/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/sl/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/sl/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/sl/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/sl/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/sv/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/sv/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/sv/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/sv/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/sv/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/sv/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/th/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/th/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/th/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/th/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/th/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/th/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/tr/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/tr/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/tr/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/tr/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/tr/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/tr/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/uk/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/uk/FilterBar.js +88 -0
- data/app/assets/javascripts/gridx/nls/uk/NestedSort.js +12 -0
- data/app/assets/javascripts/gridx/nls/uk/PaginationBar.js +28 -0
- data/app/assets/javascripts/gridx/nls/uk/QuickFilter.js +8 -0
- data/app/assets/javascripts/gridx/nls/uk/SummaryBar.js +6 -0
- data/app/assets/javascripts/gridx/nls/zh/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/zh/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/zh/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/zh/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/support/DropDownPager.js +111 -0
- data/app/assets/javascripts/gridx/support/DropDownSizer.js +112 -0
- data/app/assets/javascripts/gridx/support/GotoPageButton.js +92 -0
- data/app/assets/javascripts/gridx/support/GotoPagePane.js +61 -0
- data/app/assets/javascripts/gridx/support/LinkPager.js +180 -0
- data/app/assets/javascripts/gridx/support/LinkSizer.js +138 -0
- data/app/assets/javascripts/gridx/support/QuickFilter.js +138 -0
- data/app/assets/javascripts/gridx/support/Summary.js +49 -0
- data/app/assets/javascripts/gridx/support/_LinkPageBase.js +92 -0
- data/app/assets/javascripts/gridx/support/exporter/exporter.js +350 -0
- data/app/assets/javascripts/gridx/support/exporter/toCSV.js +75 -0
- data/app/assets/javascripts/gridx/support/exporter/toTable.js +92 -0
- data/app/assets/javascripts/gridx/support/menu/AZFilterMenu.js +57 -0
- data/app/assets/javascripts/gridx/support/menu/NumberFilterMenu.js +87 -0
- data/app/assets/javascripts/gridx/support/menu/_FilterMenuBase.js +83 -0
- data/app/assets/javascripts/gridx/support/printer.js +157 -0
- data/app/assets/javascripts/gridx/templates/FilterBar.html +8 -0
- data/app/assets/javascripts/gridx/templates/FilterConfirmDialog.html +5 -0
- data/app/assets/javascripts/gridx/templates/FilterDialog.html +19 -0
- data/app/assets/javascripts/gridx/templates/FilterPane.html +64 -0
- data/app/assets/javascripts/gridx/templates/GotoPagePane.html +28 -0
- data/app/assets/javascripts/gridx/templates/Grid.html +19 -0
- data/app/assets/javascripts/gridx/templates/LinkPager.html +24 -0
- data/app/assets/javascripts/gridx/templates/PaginationBar.html +60 -0
- data/app/assets/javascripts/gridx/templates/PaginationBarDD.html +23 -0
- data/app/assets/javascripts/gridx/templates/QuickFilter.html +38 -0
- data/app/assets/stylesheets/gridx/mobile/themes/iphone/Grid.css +107 -0
- data/app/assets/stylesheets/gridx/resources/Dod.css +39 -0
- data/app/assets/stylesheets/gridx/resources/Gridx.css +10 -0
- data/app/assets/stylesheets/gridx/resources/Gridx_rtl.css +5 -0
- data/app/assets/stylesheets/gridx/resources/Tree.css +46 -0
- data/app/assets/stylesheets/gridx/resources/Tree_rtl.css +4 -0
- data/app/assets/stylesheets/gridx/resources/bar.css +24 -0
- data/app/assets/stylesheets/gridx/resources/basic.css +482 -0
- data/app/assets/stylesheets/gridx/resources/basic_rtl.css +37 -0
- data/app/assets/stylesheets/gridx/resources/claro/Gridx.css +16 -0
- data/app/assets/stylesheets/gridx/resources/claro/Gridx_rtl.css +7 -0
- data/app/assets/stylesheets/gridx/resources/claro/basic.css +109 -0
- data/app/assets/stylesheets/gridx/resources/claro/basic_rtl.css +21 -0
- data/app/assets/stylesheets/gridx/resources/claro/filter.css +47 -0
- data/app/assets/stylesheets/gridx/resources/claro/lock.css +19 -0
- data/app/assets/stylesheets/gridx/resources/claro/pagination.css +33 -0
- data/app/assets/stylesheets/gridx/resources/claro/select.css +20 -0
- data/app/assets/stylesheets/gridx/resources/dnd.css +108 -0
- data/app/assets/stylesheets/gridx/resources/filter.css +321 -0
- data/app/assets/stylesheets/gridx/resources/filter_rtl.css +38 -0
- data/app/assets/stylesheets/gridx/resources/lock.css +20 -0
- data/app/assets/stylesheets/gridx/resources/pagination.css +142 -0
- data/app/assets/stylesheets/gridx/resources/pagination_rtl.css +54 -0
- data/app/assets/stylesheets/gridx/resources/select.css +39 -0
- data/app/assets/stylesheets/gridx/resources/sort.css +154 -0
- data/app/assets/stylesheets/gridx/resources/sort_rtl.css +51 -0
- data/lib/gridx-rails/engine.rb +8 -0
- data/lib/gridx-rails/version.rb +3 -0
- data/lib/gridx-rails.rb +4 -0
- data/lib/tasks/gridx-rails_tasks.rake +52 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +78 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/gridx-rails_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +621 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/connect",
|
|
4
|
+
"../core/_Module",
|
|
5
|
+
"dojo/dom-class",
|
|
6
|
+
"dojo/keys",
|
|
7
|
+
"dojo/_base/event",
|
|
8
|
+
"dijit/registry",
|
|
9
|
+
"dijit/Menu"
|
|
10
|
+
], function(declare, connect, _Module, domClass, keys, event, registry, Menu){
|
|
11
|
+
|
|
12
|
+
/*=====
|
|
13
|
+
var Menu = declare(_Module, {
|
|
14
|
+
// context: __MenuContext
|
|
15
|
+
// An object representing the current context when user triggers a context menu.
|
|
16
|
+
// This property is updated everytime a menu of grid is popped up.
|
|
17
|
+
// Users can refer to this in their menu action handlers by grid.menu.context.
|
|
18
|
+
context: null,
|
|
19
|
+
|
|
20
|
+
bind: function(menu, args){
|
|
21
|
+
// summary:
|
|
22
|
+
// Bind a memu to grid, according to the provided args
|
|
23
|
+
// menu: dijit.Menu | ID
|
|
24
|
+
// The menu to be binded.
|
|
25
|
+
// args: __MenuArgs
|
|
26
|
+
// Indicates how to bind the menu
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
unbind: function(menu){
|
|
30
|
+
// summary:
|
|
31
|
+
// Unbind a menu from grid.
|
|
32
|
+
// menu: dijit.Menu | ID
|
|
33
|
+
// The menu to be unbinded.
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
Menu.__MenuArgs = declare([], {
|
|
38
|
+
// hookPoint: String?
|
|
39
|
+
// Indicates from where the menu should occur.
|
|
40
|
+
// One of "cell", "headercell", "row", "header", "body", "grid". If invalid, default to "grid".
|
|
41
|
+
hookPoint: '',
|
|
42
|
+
|
|
43
|
+
// selected: Boolean?
|
|
44
|
+
// Indicates whether to bind this menu only to the selected items. Default is false.
|
|
45
|
+
selected: false
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
Menu.__MenuContext = declare([], {
|
|
49
|
+
// grid: Grid
|
|
50
|
+
// This grid that triggers this menu.
|
|
51
|
+
grid: null,
|
|
52
|
+
|
|
53
|
+
// column: Column
|
|
54
|
+
// The column that triggers this menu. Only valid for "headercell" hookpoint.
|
|
55
|
+
column: null,
|
|
56
|
+
|
|
57
|
+
// row: Row
|
|
58
|
+
// The row that triggers this menu. Only valid for "row" hookpoint.
|
|
59
|
+
row: null,
|
|
60
|
+
|
|
61
|
+
// cell: Cell
|
|
62
|
+
// The cell that triggers this menu. Only valid for "cell" hookpoint.
|
|
63
|
+
cell: null
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return Menu;
|
|
67
|
+
=====*/
|
|
68
|
+
|
|
69
|
+
return declare(_Module, {
|
|
70
|
+
name: 'menu',
|
|
71
|
+
|
|
72
|
+
constructor: function(){
|
|
73
|
+
this._menus = {};
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
//Public---------------------------------------------
|
|
77
|
+
context: null,
|
|
78
|
+
|
|
79
|
+
bind: function(/* dijit.Menu|ID */ menu, /* __MenuArgs? */ args){
|
|
80
|
+
args = args || {};
|
|
81
|
+
var t = this,
|
|
82
|
+
g = t.grid,
|
|
83
|
+
hookPoint = args.hookPoint && args.hookPoint.toLowerCase() || 'grid',
|
|
84
|
+
type = args.selected ? hookPoint + '-selected' : hookPoint,
|
|
85
|
+
evtName = t._evtMap[hookPoint],
|
|
86
|
+
m = t._menus[type] = t._menus[type] || {},
|
|
87
|
+
showMenu = function(evt){
|
|
88
|
+
t._showMenu(type, evt);
|
|
89
|
+
},
|
|
90
|
+
keyShowMenu = function(evt){
|
|
91
|
+
if(evt.keyCode == keys.F10 && evt.shiftKey){
|
|
92
|
+
t._showMenu(type, evt);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
connect.disconnect(m.open);
|
|
96
|
+
connect.disconnect(m.keyopen);
|
|
97
|
+
connect.disconnect(m.close);
|
|
98
|
+
m.menu = registry.byId(menu);
|
|
99
|
+
if(evtName){
|
|
100
|
+
m.open = t.connect(g, evtName[0], showMenu);
|
|
101
|
+
m.keyopen = t.connect(g, evtName[1], keyShowMenu);
|
|
102
|
+
}else if(hookPoint == 'body'){
|
|
103
|
+
m.open = t.connect(g.bodyNode, 'oncontextmenu', showMenu);
|
|
104
|
+
m.keyopen = t.connect(g.bodyNode, 'onkeydown', keyShowMenu);
|
|
105
|
+
}else{
|
|
106
|
+
m.open = t.connect(g.domNode, 'oncontextmenu', showMenu);
|
|
107
|
+
m.keyopen = t.connect(g.domNode, 'onkeydown', keyShowMenu);
|
|
108
|
+
}
|
|
109
|
+
m.close = t.connect(m.menu, 'onClose', function(){
|
|
110
|
+
t._mutex = 0;
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
unbind: function(menu){
|
|
115
|
+
var type, menus = this._menus, m;
|
|
116
|
+
menu = registry.byId(menu);
|
|
117
|
+
for(type in menus){
|
|
118
|
+
m = menus[type];
|
|
119
|
+
if(m.menu == menu){
|
|
120
|
+
connect.disconnect(m.open);
|
|
121
|
+
connect.disconnect(m.keyopen);
|
|
122
|
+
connect.disconnect(m.close);
|
|
123
|
+
delete menus[type];
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
//[private]==
|
|
130
|
+
_evtMap: {
|
|
131
|
+
header: ['onHeaderContextMenu', 'onHeaderKeyDown'],
|
|
132
|
+
headercell: ['onHeaderCellContextMenu', 'onHeaderCellKeyDown'],
|
|
133
|
+
cell: ['onCellContextMenu', 'onCellKeyDown'],
|
|
134
|
+
row: ['onRowContextMenu', 'onRowKeyDown']
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
_showMenu: function(type, e){
|
|
138
|
+
var t = this, menus = t._menus;
|
|
139
|
+
if(!t._mutex && menus[type].menu){
|
|
140
|
+
var g = t.grid,
|
|
141
|
+
rid = e.rowId,
|
|
142
|
+
cid = e.columnId,
|
|
143
|
+
isRow = !type.indexOf('row'),
|
|
144
|
+
isCell = !type.indexOf('cell'),
|
|
145
|
+
isHeaderCell = !type.indexOf('headercell'),
|
|
146
|
+
isSelectedType = type.indexOf('-') > 0,
|
|
147
|
+
selected = !!((isCell && domClass.contains(e.cellNode, "gridxCellSelected")) ||
|
|
148
|
+
(isHeaderCell && domClass.contains(g.header.getHeaderNode(cid), "gridxColumnSelected")) ||
|
|
149
|
+
(isRow && domClass.contains(g.body.getRowNode({rowId: rid}), "gridxRowSelected")));
|
|
150
|
+
if(isSelectedType == selected || (!isSelectedType && selected && !menus[type + '-selected'])){
|
|
151
|
+
t.context = {
|
|
152
|
+
grid: g,
|
|
153
|
+
column: isHeaderCell && g.column(cid, 1),
|
|
154
|
+
row: isRow && g.row(rid, 1),
|
|
155
|
+
cell: isCell && g.cell(rid, cid, 1)
|
|
156
|
+
};
|
|
157
|
+
event.stop(e);
|
|
158
|
+
t._mutex = 1;
|
|
159
|
+
menus[type].menu._openMyself({
|
|
160
|
+
target: e.target,
|
|
161
|
+
coords: e.keyCode != keys.F10 && "pageX" in e ? {x: e.pageX, y: e.pageY} : null
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/event",
|
|
4
|
+
"dojo/_base/sniff",
|
|
5
|
+
"dojo/dom-class",
|
|
6
|
+
"dojo/keys",
|
|
7
|
+
"dijit/a11y",
|
|
8
|
+
"../core/_Module"
|
|
9
|
+
], function(declare, event, has, domClass, keys, a11y, _Module){
|
|
10
|
+
|
|
11
|
+
/*=====
|
|
12
|
+
return declare(_Module, {
|
|
13
|
+
// summary:
|
|
14
|
+
// This module allow the elements in grid cell be focusable.
|
|
15
|
+
// description:
|
|
16
|
+
// When focus is on a cell, press F2 to focus the first focusable element in that cell.
|
|
17
|
+
// TAB to move focus to the next focusable element in that cell.
|
|
18
|
+
// If there's no more focusable elements in current cell, focus the focusable element in next cell.
|
|
19
|
+
// If the current cell is the last cell in current view, move focus to the first cell.
|
|
20
|
+
// SHIFT+TAB to move focus to the previous focusable element in that cell.
|
|
21
|
+
// If there's no more focusable elements in current cell, focus the focusable element in the previous cell.
|
|
22
|
+
// If the current cell is the first cell in current view, move focus to the last cell.
|
|
23
|
+
// Press ESC to move focus back to the cell itself.
|
|
24
|
+
});
|
|
25
|
+
=====*/
|
|
26
|
+
|
|
27
|
+
return _Module.register(
|
|
28
|
+
declare(_Module, {
|
|
29
|
+
name: 'navigableCell',
|
|
30
|
+
|
|
31
|
+
preload: function(){
|
|
32
|
+
var t = this,
|
|
33
|
+
focus = t.grid.focus;
|
|
34
|
+
focus.registerArea({
|
|
35
|
+
name: 'navigablecell',
|
|
36
|
+
priority: 1,
|
|
37
|
+
scope: t,
|
|
38
|
+
doFocus: t._doFocus,
|
|
39
|
+
doBlur: t._doBlur,
|
|
40
|
+
onFocus: t._onFocus,
|
|
41
|
+
onBlur: t._onBlur,
|
|
42
|
+
connects: [
|
|
43
|
+
t.connect(t.grid, 'onCellKeyDown', '_onKey')
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
_doFocus: function(evt, step){
|
|
49
|
+
if(this._navigating){
|
|
50
|
+
var elems = this._navElems,
|
|
51
|
+
func = function(){
|
|
52
|
+
var toFocus = step < 0 ? (elems.highest || elems.last) : (elems.lowest || elems.first);
|
|
53
|
+
if(toFocus){
|
|
54
|
+
toFocus.focus();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
if(has('webkit')){
|
|
58
|
+
func();
|
|
59
|
+
}else{
|
|
60
|
+
setTimeout(func, 5);
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
_doBlur: function(evt, step){
|
|
68
|
+
if(evt){
|
|
69
|
+
var t = this,
|
|
70
|
+
m = t.model,
|
|
71
|
+
g = t.grid,
|
|
72
|
+
view = g.view,
|
|
73
|
+
body = g.body,
|
|
74
|
+
elems = t._navElems,
|
|
75
|
+
firstElem = elems.lowest || elems.first,
|
|
76
|
+
lastElem = elems.last || elems.highest || firstElem,
|
|
77
|
+
target = has('ie') ? evt.srcElement : evt.target;
|
|
78
|
+
if(target == (step > 0 ? lastElem : firstElem)){
|
|
79
|
+
event.stop(evt);
|
|
80
|
+
m.when({id: t._focusRowId}, function(){
|
|
81
|
+
var rowIndex = view.getRowInfo({
|
|
82
|
+
parentId: m.treePath(t._focusRowId).pop(),
|
|
83
|
+
rowIndex: m.idToIndex(t._focusRowId)
|
|
84
|
+
}).visualIndex,
|
|
85
|
+
colIndex = g._columnsById[t._focusColId].index,
|
|
86
|
+
dir = step > 0 ? 1 : -1,
|
|
87
|
+
checker = function(r, c){
|
|
88
|
+
return t._isNavigable(g._columns[c].id);
|
|
89
|
+
};
|
|
90
|
+
body._nextCell(rowIndex, colIndex, dir, checker).then(function(obj){
|
|
91
|
+
t._focusColId = g._columns[obj.c].id;
|
|
92
|
+
//This kind of breaks the encapsulation...
|
|
93
|
+
var rowInfo = view.getRowInfo({visualIndex: obj.r});
|
|
94
|
+
t._focusRowId = m.indexToId(rowInfo.rowIndex, rowInfo.parentId);
|
|
95
|
+
body._focusCellCol = obj.c;
|
|
96
|
+
body._focusCellRow = obj.r;
|
|
97
|
+
t._beginNavigate(t._focusRowId, t._focusColId);
|
|
98
|
+
t._doFocus(null, step);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
}else{
|
|
104
|
+
this._navigating = false;
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
_isNavigable: function(colId){
|
|
110
|
+
var col = this.grid._columnsById[colId];
|
|
111
|
+
return col && (col.navigable || col.navigable === undefined);
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
_beginNavigate: function(rowId, colId){
|
|
115
|
+
var t = this;
|
|
116
|
+
if(t._isNavigable(colId)){
|
|
117
|
+
t._focusColId = colId;
|
|
118
|
+
t._focusRowId = rowId;
|
|
119
|
+
var navElems = t._navElems = a11y._getTabNavigable(t.grid.body.getCellNode({
|
|
120
|
+
rowId: rowId,
|
|
121
|
+
colId: colId
|
|
122
|
+
}));
|
|
123
|
+
//Intentional assignment
|
|
124
|
+
return t._navigating = (navElems.highest || navElems.last) && (navElems.lowest || navElems.first);
|
|
125
|
+
}
|
|
126
|
+
return false;
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
_onBlur: function(){
|
|
130
|
+
this._navigating = false;
|
|
131
|
+
//FIXME: this breaks encapsulation.
|
|
132
|
+
if(this.grid.edit){
|
|
133
|
+
this.grid.edit._applyAll();
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
_onFocus: function(evt){
|
|
138
|
+
var node = evt.target, dn = this.grid.domNode;
|
|
139
|
+
while(node && node !== dn && !domClass.contains(node, 'gridxCell')){
|
|
140
|
+
node = node.parentNode;
|
|
141
|
+
}
|
|
142
|
+
if(node && node !== dn){
|
|
143
|
+
var cellNode = node,
|
|
144
|
+
colId = node.getAttribute('colid');
|
|
145
|
+
this.grid.hScroller.scrollToColumn(colId);
|
|
146
|
+
while(node && !domClass.contains(node, 'gridxRow')){
|
|
147
|
+
node = node.parentNode;
|
|
148
|
+
}
|
|
149
|
+
if(node){
|
|
150
|
+
var rowId = node.getAttribute('rowid');
|
|
151
|
+
return cellNode != evt.target && this._beginNavigate(rowId, colId);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return false;
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
_onKey: function(e){
|
|
158
|
+
var t = this, focus = t.grid.focus;
|
|
159
|
+
if(e.keyCode == keys.F2 && !t._navigating && focus.currentArea() == 'body'){
|
|
160
|
+
if(t._beginNavigate(e.rowId, e.columnId)){
|
|
161
|
+
event.stop(e);
|
|
162
|
+
focus.focusArea('navigablecell');
|
|
163
|
+
}
|
|
164
|
+
}else if(e.keyCode == keys.ESCAPE && t._navigating && focus.currentArea() == 'navigablecell'){
|
|
165
|
+
t._navigating = false;
|
|
166
|
+
focus.focusArea('body');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}));
|
|
170
|
+
});
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/array",
|
|
4
|
+
"dojo/_base/lang",
|
|
5
|
+
"dojo/_base/event",
|
|
6
|
+
"dojo/query",
|
|
7
|
+
"dojo/string",
|
|
8
|
+
"dojo/dom-class",
|
|
9
|
+
"dojo/dom-construct",
|
|
10
|
+
"dojo/keys",
|
|
11
|
+
"../core/_Module",
|
|
12
|
+
"../core/model/extensions/Sort",
|
|
13
|
+
"dojo/i18n",
|
|
14
|
+
"dojo/i18n!../nls/NestedSort",
|
|
15
|
+
"./HeaderRegions"
|
|
16
|
+
], function(declare, array, lang, event, query, string, domClass, domConstruct, keys, _Module, Sort, i18n){
|
|
17
|
+
|
|
18
|
+
/*=====
|
|
19
|
+
return declare(_Module, {
|
|
20
|
+
// summary:
|
|
21
|
+
// Sort multiple columns in a nested way.
|
|
22
|
+
|
|
23
|
+
getSortData: function(){
|
|
24
|
+
// summary:
|
|
25
|
+
// TODOC
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
sort: function(sortData){
|
|
29
|
+
// summary:
|
|
30
|
+
// TODOC
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
isSorted: function(colId){
|
|
34
|
+
// summary:
|
|
35
|
+
// TODOC
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
clear: function(){
|
|
39
|
+
// summary:
|
|
40
|
+
// Clear the sorting state
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
isSortable: function(colId){
|
|
44
|
+
// summary:
|
|
45
|
+
// TODOC
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
=====*/
|
|
49
|
+
|
|
50
|
+
var filter = array.filter,
|
|
51
|
+
indexOf = array.indexOf,
|
|
52
|
+
removeClass = domClass.remove,
|
|
53
|
+
addClass = domClass.add,
|
|
54
|
+
a11yText = {
|
|
55
|
+
'dojoxGridDescending': '<span class="gridxNestedSortBtnText">▾</span>',
|
|
56
|
+
'dojoxGridAscending': '<span class="gridxNestedSortBtnText">▴</span>',
|
|
57
|
+
'dojoxGridAscendingTip': '<span class="gridxNestedSortBtnText">۸</span>',
|
|
58
|
+
'dojoxGridDescendingTip': '<span class="gridxNestedSortBtnText">۷</span>',
|
|
59
|
+
'dojoxGridUnsortedTip': '<span class="gridxNestedSortBtnText">x</span>' //'✖'
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return declare(_Module, {
|
|
63
|
+
name: 'sort',
|
|
64
|
+
|
|
65
|
+
required: ['headerRegions'],
|
|
66
|
+
|
|
67
|
+
modelExtensions: [Sort],
|
|
68
|
+
|
|
69
|
+
preload: function(args){
|
|
70
|
+
var t = this,
|
|
71
|
+
g = t.grid;
|
|
72
|
+
t._nls = i18n.getLocalization('gridx', 'NestedSort', g.lang);
|
|
73
|
+
t._sortData = t.arg('initialOrder', []);
|
|
74
|
+
if(g.persist){
|
|
75
|
+
var d = g.persist.registerAndLoad('sort', function(){
|
|
76
|
+
return t._sortData;
|
|
77
|
+
});
|
|
78
|
+
if(d){
|
|
79
|
+
t._sortData = d;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
t._sortData = filter(t._sortData, function(d){
|
|
83
|
+
return t.isSortable(d.colId);
|
|
84
|
+
});
|
|
85
|
+
if(t._sortData.length){
|
|
86
|
+
g.model.sort(t._sortData);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
t.connect(g.headerRegions, 'refresh', t._updateUI);
|
|
90
|
+
|
|
91
|
+
g.headerRegions.add(lang.hitch(t, t._createBtn, 1), 10, 1);
|
|
92
|
+
g.headerRegions.add(lang.hitch(t, t._createBtn, 0), 11, 1);
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
columnMixin: {
|
|
96
|
+
isSorted: function(){
|
|
97
|
+
return this.grid.sort.isSorted(this.id);
|
|
98
|
+
},
|
|
99
|
+
isSortable: function(){
|
|
100
|
+
return this.grid.sort.isSortable(this.id);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
getSortData: function(){
|
|
105
|
+
return this._sortData;
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
sort: function(sortData){
|
|
109
|
+
var t = this;
|
|
110
|
+
t._sortData = filter(sortData, function(d){
|
|
111
|
+
return t.isSortable(d.colId);
|
|
112
|
+
});
|
|
113
|
+
t._doSort();
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
isSorted: function(colId){
|
|
117
|
+
var ret = 0;
|
|
118
|
+
array.some(this._sortData, function(d){
|
|
119
|
+
if(d.colId == colId){
|
|
120
|
+
ret = d.descending ? -1 : 1;
|
|
121
|
+
return 1;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return ret;
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
isSortable: function(colId){
|
|
128
|
+
var col = this.grid._columnsById[colId];
|
|
129
|
+
return col && (col.sortable || col.sortable === undefined);
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
clear: function(){
|
|
133
|
+
this._sortData.length = 0;
|
|
134
|
+
this._doSort();
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
//Private---------------------------------------------------------------------------
|
|
138
|
+
_createBtn: function(isSingle, col){
|
|
139
|
+
var t = this;
|
|
140
|
+
if(t.isSortable(col.id)){
|
|
141
|
+
var btn = domConstruct.create('div', {
|
|
142
|
+
'class': 'gridxSortBtn gridxSortBtn' + (isSingle ? 'Single' : 'Nested'),
|
|
143
|
+
tabIndex: -1,
|
|
144
|
+
title: isSingle ?
|
|
145
|
+
t._nls.singleSort + ' - ' + t._nls.ascending :
|
|
146
|
+
t._nls.nestedSort + ' - ' + t._nls.ascending,
|
|
147
|
+
innerHTML: isSingle ?
|
|
148
|
+
a11yText.dojoxGridAscendingTip + ' ' :
|
|
149
|
+
t._sortData.length + 1 + a11yText.dojoxGridAscendingTip
|
|
150
|
+
});
|
|
151
|
+
t.connect(btn, 'onmousedown', function(){
|
|
152
|
+
t._sort(col, btn, isSingle);
|
|
153
|
+
});
|
|
154
|
+
t.connect(btn, 'onkeydown', function(e){
|
|
155
|
+
if(e.keyCode == keys.ENTER){
|
|
156
|
+
event.stop(e);
|
|
157
|
+
t._sort(col, btn, isSingle);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
return btn;
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
_sort: function(col, btn, isSingle){
|
|
165
|
+
var t = this, d,
|
|
166
|
+
sortData = t._sortData;
|
|
167
|
+
if(isSingle){
|
|
168
|
+
if(sortData.length > 1){
|
|
169
|
+
sortData.length = 0;
|
|
170
|
+
}
|
|
171
|
+
d = filter(sortData, function(data){
|
|
172
|
+
return data.colId === col.id;
|
|
173
|
+
})[0];
|
|
174
|
+
sortData.length = 0;
|
|
175
|
+
if(d){
|
|
176
|
+
sortData.push(d);
|
|
177
|
+
}
|
|
178
|
+
}else{
|
|
179
|
+
d = filter(sortData, function(d){
|
|
180
|
+
return d.colId === col.id;
|
|
181
|
+
})[0];
|
|
182
|
+
}
|
|
183
|
+
if(d){
|
|
184
|
+
if(d.descending){
|
|
185
|
+
sortData.splice(indexOf(sortData, d), 1);
|
|
186
|
+
}
|
|
187
|
+
d.descending = !d.descending;
|
|
188
|
+
}else{
|
|
189
|
+
d = {
|
|
190
|
+
colId: col.id,
|
|
191
|
+
descending: false
|
|
192
|
+
};
|
|
193
|
+
sortData.push(d);
|
|
194
|
+
}
|
|
195
|
+
t._doSort();
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
_doSort: function(){
|
|
199
|
+
var g = this.grid,
|
|
200
|
+
d = this._sortData;
|
|
201
|
+
this._updateUI();
|
|
202
|
+
g.model.sort(d.length ? d : null);
|
|
203
|
+
g.body.refresh();
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
_updateUI: function(){
|
|
207
|
+
var t = this,
|
|
208
|
+
nls = t._nls,
|
|
209
|
+
g = t.grid,
|
|
210
|
+
dn = g.domNode,
|
|
211
|
+
sortData = t._sortData;
|
|
212
|
+
removeClass(dn, 'gridxSingleSorted');
|
|
213
|
+
removeClass(dn, 'gridxNestedSorted');
|
|
214
|
+
if(sortData.length == 1){
|
|
215
|
+
addClass(dn, 'gridxSingleSorted');
|
|
216
|
+
}else if(sortData.length > 1){
|
|
217
|
+
addClass(dn, 'gridxNestedSorted');
|
|
218
|
+
}
|
|
219
|
+
query('.gridxCell', g.header.domNode).forEach(function(cell){
|
|
220
|
+
var colid = cell.getAttribute('colid');
|
|
221
|
+
if(t.isSortable(colid)){
|
|
222
|
+
array.forEach(['', 'Desc', 'Asc', 'Main'], function(s){
|
|
223
|
+
removeClass(cell, 'gridxCellSorted' + s);
|
|
224
|
+
});
|
|
225
|
+
var singleBtn = query('.gridxSortBtnSingle', cell)[0],
|
|
226
|
+
nestedBtn = query('.gridxSortBtnNested', cell)[0];
|
|
227
|
+
singleBtn.title = nls.singleSort + ' - ' + nls.ascending;
|
|
228
|
+
nestedBtn.title = nls.nestedSort + ' - ' + nls.ascending;
|
|
229
|
+
singleBtn.innerHTML = a11yText.dojoxGridAscendingTip + ' ';
|
|
230
|
+
nestedBtn.innerHTML = sortData.length + 1 + a11yText.dojoxGridAscendingTip;
|
|
231
|
+
var d = filter(sortData, function(data){
|
|
232
|
+
return data.colId === colid;
|
|
233
|
+
})[0];
|
|
234
|
+
t._setWaiState(cell, colid, d);
|
|
235
|
+
if(d){
|
|
236
|
+
nestedBtn.innerHTML = indexOf(sortData, d) + 1;
|
|
237
|
+
addClass(cell, 'gridxCellSorted');
|
|
238
|
+
if(d == sortData[0]){
|
|
239
|
+
addClass(cell, 'gridxCellSortedMain');
|
|
240
|
+
}
|
|
241
|
+
var len = sortData.length;
|
|
242
|
+
if(d.descending){
|
|
243
|
+
addClass(cell, 'gridxCellSortedDesc');
|
|
244
|
+
if(len == 1){
|
|
245
|
+
singleBtn.title = nls.singleSort + ' - ' + nls.unsorted;
|
|
246
|
+
singleBtn.innerHTML = a11yText.dojoxGridDescending + ' ';
|
|
247
|
+
}else{
|
|
248
|
+
nestedBtn.title = nls.nestedSort + ' - ' + nls.unsorted;
|
|
249
|
+
nestedBtn.innerHTML += a11yText.dojoxGridDescending;
|
|
250
|
+
}
|
|
251
|
+
}else{
|
|
252
|
+
addClass(cell, 'gridxCellSortedAsc');
|
|
253
|
+
if(len == 1){
|
|
254
|
+
singleBtn.title = nls.singleSort + ': ' + nls.descending;
|
|
255
|
+
singleBtn.innerHTML = a11yText.dojoxGridAscending + ' ';
|
|
256
|
+
}else{
|
|
257
|
+
nestedBtn.title = nls.nestedSort + ' - ' + nls.descending;
|
|
258
|
+
nestedBtn.innerHTML += a11yText.dojoxGridAscending;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
_setWaiState: function(cell, colid, data){
|
|
267
|
+
var col = this.grid.column(colid),
|
|
268
|
+
columnInfo = 'Column ' + col.name(),
|
|
269
|
+
orderState = 'none', orderAction = 'ascending';
|
|
270
|
+
if(data){
|
|
271
|
+
orderState = data.descending ? 'descending' : 'ascending';
|
|
272
|
+
orderAction = data.descending ? 'none' : 'descending';
|
|
273
|
+
}
|
|
274
|
+
var a11ySingleLabel = string.substitute(this._nls.waiSingleSortLabel, [columnInfo, orderState, orderAction]),
|
|
275
|
+
a11yNestedLabel = string.substitute(this._nls.waiNestedSortLabel, [columnInfo, orderState, orderAction]);
|
|
276
|
+
query('.gridxSortBtnSingle', cell)[0].setAttribute("aria-label", a11ySingleLabel);
|
|
277
|
+
query('.gridxSortBtnNested', cell)[0].setAttribute("aria-label", a11yNestedLabel);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
});
|