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,201 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/Deferred",
|
|
4
|
+
"dojo/_base/array",
|
|
5
|
+
"dojo/query",
|
|
6
|
+
"dojo/dom-construct",
|
|
7
|
+
"dojo/dom-class",
|
|
8
|
+
"dojo/dom-style",
|
|
9
|
+
"dojo/keys",
|
|
10
|
+
"dojo/_base/event",
|
|
11
|
+
"../core/_Module"
|
|
12
|
+
], function(declare, Deferred, array, query, domConstruct, domClass, domStyle, keys, event, _Module){
|
|
13
|
+
|
|
14
|
+
/*=====
|
|
15
|
+
return declare(_Module, {
|
|
16
|
+
// summary:
|
|
17
|
+
// This module makes it easy to add custom contents to column header.
|
|
18
|
+
// Other modules such as NestedSort or HeaderMenu can be based upon this module.
|
|
19
|
+
|
|
20
|
+
add: function(creater, priority, skipRefresh){
|
|
21
|
+
// summary:
|
|
22
|
+
// Add a region to the header.
|
|
23
|
+
// creater: function(column)
|
|
24
|
+
// A function returning a DOM node, which will be used as the region to be added to header.
|
|
25
|
+
// priority: Number
|
|
26
|
+
// A priority value indicating where the region should appear in header.
|
|
27
|
+
// The smaller the value, the closer it'll be from the right border of the header (left border if RTL).
|
|
28
|
+
// skipRefresh: Boolean
|
|
29
|
+
// If true, the header won't be automatically refreshed immediately after this function,
|
|
30
|
+
// so that user can add multiple regions all at once and then call the "refresh" method to show them all.
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
refresh: function(){
|
|
34
|
+
// summary:
|
|
35
|
+
// Refresh the header so that changes to the regions can be reflected.
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
=====*/
|
|
39
|
+
|
|
40
|
+
return _Module.register(
|
|
41
|
+
declare(_Module, {
|
|
42
|
+
name: 'headerRegions',
|
|
43
|
+
|
|
44
|
+
forced: ['header'],
|
|
45
|
+
|
|
46
|
+
constructor: function(){
|
|
47
|
+
this._regions = [];
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
load: function(){
|
|
51
|
+
var t = this;
|
|
52
|
+
t.refresh();
|
|
53
|
+
t._initFocus();
|
|
54
|
+
t.aspect(t.grid.header, 'onRender', 'refresh');
|
|
55
|
+
t.aspect(t.grid, 'onHeaderKeyDown', '_onKey');
|
|
56
|
+
t.loaded.callback();
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
add: function(creater, priority, skipRefresh){
|
|
60
|
+
this._regions.push({
|
|
61
|
+
c: creater,
|
|
62
|
+
p: priority || 0,
|
|
63
|
+
n: {}
|
|
64
|
+
});
|
|
65
|
+
if(!skipRefresh){
|
|
66
|
+
this.refresh();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
refresh: function(){
|
|
71
|
+
var t = this,
|
|
72
|
+
g = t.grid,
|
|
73
|
+
regionNodes = t._regionNodes = [],
|
|
74
|
+
regions = t._regions;
|
|
75
|
+
if(regions.length){
|
|
76
|
+
array.forEach(t._regionCnnts || [], function(cnnt){
|
|
77
|
+
cnnt.remove();
|
|
78
|
+
t._cnnts.splice(array.indexOf(t._cnnts, cnnt), 1);
|
|
79
|
+
});
|
|
80
|
+
t._regionCnnts = [];
|
|
81
|
+
regions.sort(function(a, b){
|
|
82
|
+
return b.p - a.p;
|
|
83
|
+
});
|
|
84
|
+
query('.gridxCell', g.header.domNode).forEach(function(node){
|
|
85
|
+
var colId = node.getAttribute('colid'),
|
|
86
|
+
col = g.column(colId, 1),
|
|
87
|
+
nameNode = query('.gridxSortNode', node)[0];
|
|
88
|
+
regionNodes.push(nameNode);
|
|
89
|
+
nameNode.setAttribute('tabindex', -1);
|
|
90
|
+
t._regionCnnts.push(t.connect(nameNode, 'onblur', '_onRegionBlur'));
|
|
91
|
+
array.forEach(regions, function(region){
|
|
92
|
+
var regionNode = region.n[colId];
|
|
93
|
+
if(!regionNode){
|
|
94
|
+
regionNode = region.n[colId] = region.c(col);
|
|
95
|
+
if(regionNode){
|
|
96
|
+
regionNode.setAttribute('tabindex', -1);
|
|
97
|
+
domClass.add(regionNode, 'gridxHeaderRegion');
|
|
98
|
+
t.connect(regionNode, 'onblur', '_onRegionBlur');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if(regionNode){
|
|
102
|
+
domConstruct.place(regionNode, node, 'first');
|
|
103
|
+
regionNodes.push(regionNode);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
if(!regionNodes[t._curRegionIdx]){
|
|
108
|
+
t._curRegionIdx = 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
//Private-------------------------------------------------------------
|
|
114
|
+
_onRegionBlur: function(e){
|
|
115
|
+
var dn = this.grid.header.domNode;
|
|
116
|
+
query('.gridxHeaderRegionFocus', dn).removeClass('gridxHeaderRegionFocus');
|
|
117
|
+
domClass.remove(dn, 'gridxHeaderFocus');
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
_initFocus: function(){
|
|
121
|
+
var t = this,
|
|
122
|
+
g = t.grid;
|
|
123
|
+
g.focus.registerArea({
|
|
124
|
+
name: 'header',
|
|
125
|
+
priority: 0,
|
|
126
|
+
focusNode: g.header.domNode,
|
|
127
|
+
scope: t,
|
|
128
|
+
doFocus: t._doFocus,
|
|
129
|
+
onFocus: t._onFocus
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
_doFocus: function(e){
|
|
134
|
+
this._focusRegion(this._regionNodes[this._curRegionIdx]);
|
|
135
|
+
return true;
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
_onFocus: function(e){
|
|
139
|
+
var target = e.target,
|
|
140
|
+
header = this.grid.header.domNode,
|
|
141
|
+
i = array.indexOf(this._regionNodes, target),
|
|
142
|
+
n = i < 0 ? query(target, header).closest('.gridxSortNode')[0] : target;
|
|
143
|
+
n = n || query(target, header).closest('.gridxHeaderRegion')[0];
|
|
144
|
+
this._focusRegion(n);
|
|
145
|
+
return n;
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
_focusRegion: function(region){
|
|
149
|
+
if(region){
|
|
150
|
+
var t = this,
|
|
151
|
+
g = t.grid,
|
|
152
|
+
header = g.header.domNode,
|
|
153
|
+
headerCell = query(region).closest('.gridxCell', header)[0];
|
|
154
|
+
t._curRegionIdx = array.indexOf(t._regionNodes, region);
|
|
155
|
+
try{
|
|
156
|
+
region.focus();
|
|
157
|
+
}catch(e){
|
|
158
|
+
//In IE if region is hidden, this line will throw error.
|
|
159
|
+
}
|
|
160
|
+
setTimeout(function(){
|
|
161
|
+
query('.gridxHeaderRegionFocus', header).removeClass('gridxHeaderRegionFocus');
|
|
162
|
+
domClass.add(headerCell, 'gridxHeaderRegionFocus');
|
|
163
|
+
domClass.add(header, 'gridxHeaderFocus');
|
|
164
|
+
//make it asnyc so that IE will not lose focus
|
|
165
|
+
//firefox and ie will lose focus when region is invisible, focus it again.
|
|
166
|
+
region.focus();
|
|
167
|
+
if(g.hScroller){
|
|
168
|
+
g.hScroller.scrollToColumn(headerCell.getAttribute('colid'));
|
|
169
|
+
}
|
|
170
|
+
}, 0);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
_onKey: function(e){
|
|
175
|
+
if(!e.ctrlKey && !e.shiftKey && !e.altKey){
|
|
176
|
+
var ltr = this.grid.isLeftToRight(),
|
|
177
|
+
nextKey = ltr ? keys.RIGHT_ARROW : keys.LEFT_ARROW,
|
|
178
|
+
prevKey = ltr ? keys.LEFT_ARROW : keys.RIGHT_ARROW;
|
|
179
|
+
if(e.keyCode == nextKey){
|
|
180
|
+
this._moveFocus(1);
|
|
181
|
+
event.stop(e);
|
|
182
|
+
}else if(e.keyCode == prevKey){
|
|
183
|
+
this._moveFocus(-1);
|
|
184
|
+
event.stop(e);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
_moveFocus: function(dir){
|
|
190
|
+
var t = this,
|
|
191
|
+
i = t._curRegionIdx + dir,
|
|
192
|
+
regionNodes = t._regionNodes;
|
|
193
|
+
while(regionNodes[i] && domStyle.get(regionNodes[i], 'display') == 'none'){
|
|
194
|
+
i += dir;
|
|
195
|
+
}
|
|
196
|
+
if(regionNodes[i]){
|
|
197
|
+
t._focusRegion(regionNodes[i]);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}));
|
|
201
|
+
});
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/Deferred",
|
|
4
|
+
"dojo/_base/array",
|
|
5
|
+
"dojo/query",
|
|
6
|
+
"../core/_Module"
|
|
7
|
+
], function(declare, Deferred, array, query, _Module){
|
|
8
|
+
|
|
9
|
+
/*=====
|
|
10
|
+
return declare(_Module, {
|
|
11
|
+
// summary:
|
|
12
|
+
// module name: hiddenColumns.
|
|
13
|
+
// Hide columns.
|
|
14
|
+
// description:
|
|
15
|
+
// Hide columns and change the column array at the same time so that other grid features
|
|
16
|
+
// are not affected by hidden columns. That means, hidden columns can no longer be accessed
|
|
17
|
+
// through grid.columns() function.
|
|
18
|
+
|
|
19
|
+
// init: String[]
|
|
20
|
+
// IDs of columns to be hidden when grid is initially created.
|
|
21
|
+
init: [],
|
|
22
|
+
|
|
23
|
+
add: function(colId){
|
|
24
|
+
// summary:
|
|
25
|
+
// Hide all the given columns in arguments.
|
|
26
|
+
// colId: String|gridx.core.Column...
|
|
27
|
+
// Column IDs can be provided directly as arguments.
|
|
28
|
+
// gridx.core.Column object can also be provided.
|
|
29
|
+
// example:
|
|
30
|
+
// | //Hide columnA
|
|
31
|
+
// | grid.hiddenColumns.add("columnA");
|
|
32
|
+
// | //Hide columnB, columnC and columnD
|
|
33
|
+
// | grid.hiddenColumns.add("columnB", "columnC", "columnD");
|
|
34
|
+
// | //Column object is also acceptable.
|
|
35
|
+
// | var col = grid.column("columnA");
|
|
36
|
+
// | grid.hiddenColumns.add(col);
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
remove: function(colId){
|
|
40
|
+
// summary:
|
|
41
|
+
// Show all the given columns in arguments.
|
|
42
|
+
// colId: String|gridx.core.Column...
|
|
43
|
+
// Column IDs can be provided directly as arguments.
|
|
44
|
+
// gridx.core.Column object can also be provided.
|
|
45
|
+
// example:
|
|
46
|
+
// | //show columnA
|
|
47
|
+
// | grid.hiddenColumns.remove("columnA");
|
|
48
|
+
// | //show columnB, columnC and columnD
|
|
49
|
+
// | grid.hiddenColumns.remove("columnB", "columnC", "columnD");
|
|
50
|
+
// | //Column object is also acceptable.
|
|
51
|
+
// | var col = { id: "columnA", ...}; //Can also be a column object retreived before it is hidden.
|
|
52
|
+
// | grid.hiddenColumns.remove(col);
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
clear: function(){
|
|
56
|
+
// summary:
|
|
57
|
+
// Show all hidden columns.
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
get: function(){
|
|
61
|
+
// summary:
|
|
62
|
+
// Get an array of current hidden column IDs.
|
|
63
|
+
// returns:
|
|
64
|
+
// An array of current hidden column IDs.
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
=====*/
|
|
68
|
+
|
|
69
|
+
return declare(_Module, {
|
|
70
|
+
name: 'hiddenColumns',
|
|
71
|
+
|
|
72
|
+
load: function(args, startup){
|
|
73
|
+
var t = this,
|
|
74
|
+
g = t.grid,
|
|
75
|
+
ids = t.arg('init', []);
|
|
76
|
+
t._cols = g._columns.slice();
|
|
77
|
+
t.aspect(g, 'setColumns', function(){
|
|
78
|
+
t._cols = g._columns.slice();
|
|
79
|
+
});
|
|
80
|
+
if(g.move && g.move.column){
|
|
81
|
+
t.connect(g.move.column, 'onMoved', '_syncOrder');
|
|
82
|
+
}
|
|
83
|
+
if(g.persist){
|
|
84
|
+
ids = ids.concat(g.persist.registerAndLoad('hiddenColumns', function(){
|
|
85
|
+
return t.get();
|
|
86
|
+
}) || []);
|
|
87
|
+
}
|
|
88
|
+
if(ids.length){
|
|
89
|
+
startup.then(function(){
|
|
90
|
+
t.add.apply(t, ids);
|
|
91
|
+
t.loaded.callback();
|
|
92
|
+
});
|
|
93
|
+
}else{
|
|
94
|
+
t.loaded.callback();
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
add: function(){
|
|
99
|
+
var t = this,
|
|
100
|
+
g = t.grid,
|
|
101
|
+
columnsById = g._columnsById,
|
|
102
|
+
columns = g._columns,
|
|
103
|
+
columnLock = g.columnLock,
|
|
104
|
+
lockCount = 0,
|
|
105
|
+
hash = {},
|
|
106
|
+
cols = array.filter(array.map(arguments, function(id){
|
|
107
|
+
id = id && typeof id == "object" ? id.id : id;
|
|
108
|
+
return columnsById[id];
|
|
109
|
+
}), function(col){
|
|
110
|
+
return col && !col.ignore && (col.hidable === undefined || col.hidable);
|
|
111
|
+
});
|
|
112
|
+
//remove duplicated arguments.
|
|
113
|
+
for(var i = 0, len = cols.length; i < len; ++i){
|
|
114
|
+
hash[cols[i].id] = cols[i];
|
|
115
|
+
}
|
|
116
|
+
cols = [];
|
|
117
|
+
for(var arg in hash){
|
|
118
|
+
cols.push(hash[arg]);
|
|
119
|
+
}
|
|
120
|
+
if(columnLock){
|
|
121
|
+
lockCount = columnLock.count;
|
|
122
|
+
columnLock.unlock();
|
|
123
|
+
}
|
|
124
|
+
array.forEach(cols, function(col){
|
|
125
|
+
if(col.index < lockCount){
|
|
126
|
+
//If a locked column is hidden, should unlock it.
|
|
127
|
+
--lockCount;
|
|
128
|
+
}
|
|
129
|
+
col.hidden = true;
|
|
130
|
+
delete columnsById[col.id];
|
|
131
|
+
columns.splice(array.indexOf(columns, col), 1);
|
|
132
|
+
//Directly remove dom nodes instead of refreshing the whole body to make it faster.
|
|
133
|
+
query('[colid="' + g._escapeId(col.id) + '"].gridxCell', g.domNode).forEach(function(node){
|
|
134
|
+
node.parentNode.removeChild(node);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
if(cols.length){
|
|
138
|
+
array.forEach(columns, function(col, i){
|
|
139
|
+
col.index = i;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
g.columnWidth._adaptWidth();
|
|
143
|
+
query('.gridxCell', g.bodyNode).forEach(function(node){
|
|
144
|
+
var s = node.style,
|
|
145
|
+
w = s.width = s.minWidth = s.maxWidth = columnsById[node.getAttribute('colid')].width;
|
|
146
|
+
});
|
|
147
|
+
//FIXME: this seems ugly....
|
|
148
|
+
if(g.vScroller._doVirtualScroll){
|
|
149
|
+
g.body.onForcedScroll();
|
|
150
|
+
}
|
|
151
|
+
return t._refresh(0).then(function(){
|
|
152
|
+
if(columnLock && lockCount > 0){
|
|
153
|
+
columnLock.lock(lockCount);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
remove: function(){
|
|
159
|
+
var t = this,
|
|
160
|
+
g = t.grid,
|
|
161
|
+
columns = g._columns,
|
|
162
|
+
columnLock = g.columnLock,
|
|
163
|
+
lockCount = 0,
|
|
164
|
+
changed;
|
|
165
|
+
if(columnLock){
|
|
166
|
+
lockCount = columnLock.count;
|
|
167
|
+
columnLock.unlock();
|
|
168
|
+
}
|
|
169
|
+
array.forEach(arguments, function(id){
|
|
170
|
+
id = id && typeof id == "object" ? id.id : id;
|
|
171
|
+
var c,
|
|
172
|
+
index = -1,
|
|
173
|
+
i = 0,
|
|
174
|
+
len = t._cols.length;
|
|
175
|
+
for(; i < len; ++i){
|
|
176
|
+
c = t._cols[i];
|
|
177
|
+
if(c.id == id && c.hidden){
|
|
178
|
+
delete c.hidden;
|
|
179
|
+
c.index = ++index;
|
|
180
|
+
break;
|
|
181
|
+
}else if(!c.hidden){
|
|
182
|
+
index = c.index;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if(i < len){
|
|
186
|
+
changed = 1;
|
|
187
|
+
t.grid._columnsById[id] = c;
|
|
188
|
+
columns.splice(index, 0, c);
|
|
189
|
+
for(i = index + 1; i < columns.length; ++i){
|
|
190
|
+
columns[i].index = i;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
return t._refresh(changed).then(function(){
|
|
195
|
+
if(columnLock && lockCount > 0){
|
|
196
|
+
columnLock.lock(lockCount);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
clear: function(){
|
|
202
|
+
var g = this.grid,
|
|
203
|
+
columnLock = g.columnLock,
|
|
204
|
+
lockCount = 0,
|
|
205
|
+
changed;
|
|
206
|
+
if(columnLock){
|
|
207
|
+
lockCount = columnLock.count;
|
|
208
|
+
columnLock.unlock();
|
|
209
|
+
}
|
|
210
|
+
g._columns = array.map(this._cols, function(col, i){
|
|
211
|
+
col.index = i;
|
|
212
|
+
if(col.hidden){
|
|
213
|
+
changed = 1;
|
|
214
|
+
delete col.hidden;
|
|
215
|
+
g._columnsById[col.id] = col;
|
|
216
|
+
}
|
|
217
|
+
return col;
|
|
218
|
+
});
|
|
219
|
+
return this._refresh(changed).then(function(){
|
|
220
|
+
if(columnLock && lockCount > 0){
|
|
221
|
+
columnLock.lock(lockCount);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
get: function(){
|
|
227
|
+
var t = this,
|
|
228
|
+
res = [],
|
|
229
|
+
cols = t._cols,
|
|
230
|
+
i = 0;
|
|
231
|
+
for(; i < cols.length; ++i){
|
|
232
|
+
if(cols[i].hidden){
|
|
233
|
+
res.push(cols[i].id);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return res;
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
_syncOrder: function(){
|
|
240
|
+
var t = this,
|
|
241
|
+
cols = t._cols,
|
|
242
|
+
columns = t.grid._columns,
|
|
243
|
+
i = 0,
|
|
244
|
+
j = 0,
|
|
245
|
+
c, k;
|
|
246
|
+
//Sort the cached columns to have the same order as g._columns.
|
|
247
|
+
for(; i < columns.length && j < cols.length; ++i, ++j){
|
|
248
|
+
//j must not overflow here because t._cols and g._columns are synced up.
|
|
249
|
+
for(c = cols[j]; c.hidden; c = cols[j]){
|
|
250
|
+
++j;
|
|
251
|
+
}
|
|
252
|
+
if(columns[i] != c){
|
|
253
|
+
k = array.indexOf(cols, columns[i]);
|
|
254
|
+
cols[j] = cols[k];
|
|
255
|
+
cols[k] = c;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
|
|
260
|
+
_refresh: function(changed){
|
|
261
|
+
var g = this.grid;
|
|
262
|
+
if(changed){
|
|
263
|
+
g.header.refresh();
|
|
264
|
+
g.columnWidth._adaptWidth();
|
|
265
|
+
return g.body.refresh();
|
|
266
|
+
}else{
|
|
267
|
+
var d = new Deferred();
|
|
268
|
+
g.header.onRender();
|
|
269
|
+
d.callback();
|
|
270
|
+
return d;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
});
|