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,538 @@
|
|
|
1
|
+
define([
|
|
2
|
+
/*====="../core/Cell", =====*/
|
|
3
|
+
"dojo/_base/declare",
|
|
4
|
+
"dojo/query",
|
|
5
|
+
"dojo/_base/array",
|
|
6
|
+
"dojo/_base/event",
|
|
7
|
+
"dojo/_base/sniff",
|
|
8
|
+
"dojo/dom-class",
|
|
9
|
+
"dojo/keys",
|
|
10
|
+
"dijit/registry",
|
|
11
|
+
"dijit/a11y",
|
|
12
|
+
"dijit/_WidgetBase",
|
|
13
|
+
"dijit/_TemplatedMixin",
|
|
14
|
+
"dijit/_WidgetsInTemplateMixin",
|
|
15
|
+
"../core/_Module",
|
|
16
|
+
"./NavigableCell"
|
|
17
|
+
], function(/*=====Cell, =====*/declare, query, array, event, has, domClass, keys,
|
|
18
|
+
registry, a11y, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Module){
|
|
19
|
+
|
|
20
|
+
/*=====
|
|
21
|
+
Cell.widget = function(){
|
|
22
|
+
// summary:
|
|
23
|
+
// Get the cell widget in this cell.
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var CellWidget = declare(_Module, {
|
|
27
|
+
// summary:
|
|
28
|
+
// This module makes it possible to efficiently show widgets within a grid cell.
|
|
29
|
+
// description:
|
|
30
|
+
// Since widget declarations need to be parsed by dojo.parser, it can NOT be directly
|
|
31
|
+
// created by the decorator function. This module takes advantage of the _TemplatedMixin
|
|
32
|
+
// and the _WidgetInTemplateMixin so that users can write "templates" containing widgets
|
|
33
|
+
// in decorator function.
|
|
34
|
+
// This modules also limits the total number of widgets, so that the performance of grid
|
|
35
|
+
// can be configured to a tolerable level when there're lots of widgets in grid.
|
|
36
|
+
|
|
37
|
+
// backupCount: Integer
|
|
38
|
+
// The count of backup widgets for every column which contains widgets
|
|
39
|
+
backupCount: 20,
|
|
40
|
+
|
|
41
|
+
setCellDecorator: function(rowId, colId, decorator, setCellValue){
|
|
42
|
+
// summary:
|
|
43
|
+
// This method is used to decorate a specific cell instead of a whole column.
|
|
44
|
+
// rowId: String
|
|
45
|
+
// The row ID of the cell
|
|
46
|
+
// colId: String
|
|
47
|
+
// The column ID of the cell
|
|
48
|
+
// decorator: Function(data)
|
|
49
|
+
// The decorator function for this cell.
|
|
50
|
+
// setCellValue: Function()?
|
|
51
|
+
// This function can be provided to customiz the way of setting widget value
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
restoreCellDecorator: function(rowId, colId){
|
|
55
|
+
// summary:
|
|
56
|
+
// Remove a cell decorator defined by the "setCellDecorator" method.
|
|
57
|
+
// rowId: String
|
|
58
|
+
// The row ID of the cell
|
|
59
|
+
// colId: String
|
|
60
|
+
// The column ID of the cell
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
getCellWidget: function(rowId, colId){
|
|
64
|
+
// summary:
|
|
65
|
+
// Get the CellWidget displayed in the given cell.
|
|
66
|
+
// description:
|
|
67
|
+
// When this module is used, the string returned from decorator function will be
|
|
68
|
+
// the template string of a CellWidget. This method gets this widget so that
|
|
69
|
+
// more control can be applied to it.
|
|
70
|
+
// rowId: string
|
|
71
|
+
// The row ID of the cell
|
|
72
|
+
// colId: string
|
|
73
|
+
// The column ID of the cell
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
onCellWidgetCreated: function(widget, column){
|
|
77
|
+
// summary:
|
|
78
|
+
// Fired when a cell widget is created.
|
|
79
|
+
// widget: CellWidget.__CellWidget
|
|
80
|
+
// The created cell widget.
|
|
81
|
+
// column: gridx.core.Column
|
|
82
|
+
// The column this cell widget is created for.
|
|
83
|
+
// tags:
|
|
84
|
+
// callback
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
CellWidget.__CellWidget = declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
|
|
89
|
+
// summary:
|
|
90
|
+
// The container widget created in a cell.
|
|
91
|
+
|
|
92
|
+
// cell: gridx.core.Cell
|
|
93
|
+
cell: null
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
CellWidget.__ColumnDefinition = declare([], {
|
|
97
|
+
// summary:
|
|
98
|
+
// Column definition parameters defined by CellWidget.
|
|
99
|
+
|
|
100
|
+
// navigable: Boolean
|
|
101
|
+
// If a cell is navigable, that means the focusable elements in the cell can be focused.
|
|
102
|
+
// Use F2 to enter navigation mode, ESC to exit navigation mode and return focus back to cell.
|
|
103
|
+
// Pressing TAB during navigation mode will focus the next focusalbe element in all cells.
|
|
104
|
+
// That means if the current focused element is the last one in the current cell, then pressing TAB
|
|
105
|
+
// will focus the first focusable element in the next cell.
|
|
106
|
+
navigable: true,
|
|
107
|
+
|
|
108
|
+
// widgetsInCell: Boolean
|
|
109
|
+
// Indicating whether this column should use this CellWidget module.
|
|
110
|
+
// CellWidget module reuses widgets in cell, so if there is no widgets in cell, you don't need this module at all.
|
|
111
|
+
widgetsInCell: false,
|
|
112
|
+
|
|
113
|
+
decorator: function(){
|
|
114
|
+
// summary:
|
|
115
|
+
// This decorator function is slightly different from the one when this module is not used.
|
|
116
|
+
// This function should return a template string (see the doc for template string in dijit._TemplatedMixin
|
|
117
|
+
// and dijit._WidgetsInTemplateMixin).
|
|
118
|
+
// In the template string, dijits or widgets can be used and they will be properly set value if they
|
|
119
|
+
// have the CSS class 'gridxHasGridCellValue' in their DOM node.
|
|
120
|
+
// Since setting value will be done automatically, and the created widgets will be reused between rows,
|
|
121
|
+
// so there's no arguments for this function.
|
|
122
|
+
// By default the dijits or widgets will be set value using the grid data (the result of the formatter function,
|
|
123
|
+
// if there is a formatter function for this column), not the store data (the raw data stored in store).
|
|
124
|
+
// If you'd like to use store data in some dijit, you can simly add a CSS class 'gridxUseStoreData' to it.
|
|
125
|
+
// returns:
|
|
126
|
+
// html string.
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
setCellValue: function(gridData, storeData, cellWidget){
|
|
130
|
+
// summary:
|
|
131
|
+
// If the settings in the decorator function can not meet your requirements, you use this function as a kind of complement.
|
|
132
|
+
// gridData: anything
|
|
133
|
+
// The data shown in grid cell. It's the result of formatter function if that function exists.
|
|
134
|
+
// storeData: anything
|
|
135
|
+
// The raw data in dojo store.
|
|
136
|
+
// cellWidget: CellWidget.__CellWidget
|
|
137
|
+
// A widget representing the whole cell. This is the container of the templateString returned by decorator.
|
|
138
|
+
// So you can access any dojoAttachPoint from it (maybe your special dijit or node, and then set value for them).
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
onCellWidgetCreated: function(widget, column){
|
|
142
|
+
// summary:
|
|
143
|
+
// Fired when a cell widget is created.
|
|
144
|
+
// widget: CellWidget.__CellWidget
|
|
145
|
+
// The created cell widget.
|
|
146
|
+
// column: gridx.core.Column
|
|
147
|
+
// The column this cell widget is created for.
|
|
148
|
+
// tags:
|
|
149
|
+
// callback
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
initializeCellWidget: function(widget, cell){
|
|
153
|
+
// summary:
|
|
154
|
+
// Do special initialization for the current cell.
|
|
155
|
+
// Called every time a cell widget is applied into a cell, no matter if it is just created or reused.
|
|
156
|
+
// widget: CellWidget.__CellWidget
|
|
157
|
+
// The created cell widget.
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
uninitializeCellWidget: function(widget, cell){
|
|
161
|
+
// summary:
|
|
162
|
+
// Called every time a cell widget is reused to a cell.
|
|
163
|
+
// widget: CellWidget.__CellWidget
|
|
164
|
+
// The created cell widget.
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
getCellWidgetConnects: function(widget, cell){
|
|
168
|
+
// summary:
|
|
169
|
+
// Return an array of connection arguments.
|
|
170
|
+
// CellWidget will take care of connecting/disconnecting them.
|
|
171
|
+
// Called every time a cell widget is applied into a cell, no matter if it is just created or reused.
|
|
172
|
+
// widget: CellWidget.__CellWidget
|
|
173
|
+
// The created cell widget.
|
|
174
|
+
// returns:
|
|
175
|
+
// An array of connection arguments.
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
needCellWidget: function(cell){
|
|
179
|
+
// summary:
|
|
180
|
+
// Decide whether this cell should show cell widget.
|
|
181
|
+
// cell: gridx.core.Cell
|
|
182
|
+
// The cell object containing this widget.
|
|
183
|
+
// returns:
|
|
184
|
+
// Boolean
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
return CellWidget;
|
|
189
|
+
=====*/
|
|
190
|
+
|
|
191
|
+
var dummyFunc = function(){ return ''; },
|
|
192
|
+
|
|
193
|
+
CellWidget = declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
|
|
194
|
+
|
|
195
|
+
content: '',
|
|
196
|
+
|
|
197
|
+
setCellValue: null,
|
|
198
|
+
|
|
199
|
+
cell: null,
|
|
200
|
+
|
|
201
|
+
postMixInProperties: function(){
|
|
202
|
+
this.templateString = ['<div class="gridxCellWidget">', this.content, '</div>'].join('');
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
postCreate: function(){
|
|
206
|
+
var dn = this.domNode;
|
|
207
|
+
this.connect(dn, 'onmousedown', function(e){
|
|
208
|
+
if(e.target != dn){
|
|
209
|
+
e.cancelBubble = true;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
this._cellCnnts = [];
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
startup: function(){
|
|
216
|
+
var t = this,
|
|
217
|
+
cell = t.cell,
|
|
218
|
+
cellWidget = cell.grid.cellWidget,
|
|
219
|
+
col = cell.column,
|
|
220
|
+
started = t._started;
|
|
221
|
+
t.inherited(arguments);
|
|
222
|
+
array.forEach(t._cellCnnts, t.disconnect, t);
|
|
223
|
+
if(started){
|
|
224
|
+
//Do not uninitialized on first creation.
|
|
225
|
+
cellWidget.uninitializeCellWidget(t, cell);
|
|
226
|
+
}
|
|
227
|
+
cellWidget.initializeCellWidget(t, cell);
|
|
228
|
+
if(col.getCellWidgetConnects){
|
|
229
|
+
var output = [];
|
|
230
|
+
cellWidget.collectCellWidgetConnects(t, output);
|
|
231
|
+
t._cellCnnts = array.map(output, function(cnnt){
|
|
232
|
+
return t.connect.apply(t, cnnt);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
setValue: function(gridData, storeData, isInit){
|
|
238
|
+
try{
|
|
239
|
+
var t = this;
|
|
240
|
+
query('.gridxHasGridCellValue', t.domNode).map(function(node){
|
|
241
|
+
return registry.byNode(node);
|
|
242
|
+
}).forEach(function(widget){
|
|
243
|
+
if(widget){
|
|
244
|
+
var useStoreData = domClass.contains(widget.domNode, 'gridxUseStoreData'),
|
|
245
|
+
data = useStoreData ? storeData : gridData,
|
|
246
|
+
handleOnChange = widget._handleOnChange;
|
|
247
|
+
//If we are just rendering this cell, setting widget value should not trigger onChange event,
|
|
248
|
+
//which will then trigger edit apply. But things are complicated because onChange is
|
|
249
|
+
//fired asynchronously, and maybe sometimes not fired.
|
|
250
|
+
//FIXME: How to ensure the onChange event does not fire if isInit is true?
|
|
251
|
+
/*var onChange = widget.onChange;
|
|
252
|
+
if(isInit && onChange && !onChange._init && widget.get('value') !== data){
|
|
253
|
+
widget.onChange = function(){
|
|
254
|
+
widget.onChange = onChange;
|
|
255
|
+
};
|
|
256
|
+
widget.onChange._init = true;
|
|
257
|
+
}*/
|
|
258
|
+
widget._handleOnChange = function(){
|
|
259
|
+
widget._handleOnChange = handleOnChange;
|
|
260
|
+
};
|
|
261
|
+
if(!t.setCellValue){
|
|
262
|
+
widget.set('value', data);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
// console.log('lazy is: ', lazyData);
|
|
267
|
+
if(t.setCellValue){
|
|
268
|
+
t.setCellValue(gridData, storeData, t, isInit);
|
|
269
|
+
}
|
|
270
|
+
}catch(e){
|
|
271
|
+
console.error('Can not set cell value: ', e);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
return declare(_Module, {
|
|
277
|
+
name: 'cellWidget',
|
|
278
|
+
|
|
279
|
+
required: ['navigableCell'],
|
|
280
|
+
|
|
281
|
+
cellMixin: {
|
|
282
|
+
widget: function(){
|
|
283
|
+
return this.grid.cellWidget.getCellWidget(this.row.id, this.column.id);
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
constructor: function(){
|
|
288
|
+
this._init();
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
preload: function(){
|
|
292
|
+
var t = this, body = t.grid.body;
|
|
293
|
+
t.batchConnect(
|
|
294
|
+
[body, 'onAfterRow', '_showDijits'],
|
|
295
|
+
[body, 'onAfterCell', '_showDijit'],
|
|
296
|
+
[body, 'onUnrender', '_onUnrenderRow']);
|
|
297
|
+
},
|
|
298
|
+
|
|
299
|
+
destroy: function(){
|
|
300
|
+
this.inherited(arguments);
|
|
301
|
+
var i, id, col, cw, columns = this.grid._columns;
|
|
302
|
+
for(i = columns.length - 1; i >= 0; --i){
|
|
303
|
+
col = columns[i];
|
|
304
|
+
cw = col._cellWidgets;
|
|
305
|
+
if(cw){
|
|
306
|
+
for(id in cw){
|
|
307
|
+
cw[id].destroyRecursive();
|
|
308
|
+
}
|
|
309
|
+
delete col._cellWidgets;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
//Public-----------------------------------------------------------------
|
|
315
|
+
backupCount: 50,
|
|
316
|
+
|
|
317
|
+
setCellDecorator: function(rowId, colId, decorator, setCellValue){
|
|
318
|
+
var rowDecs = this._decorators[rowId];
|
|
319
|
+
if(!rowDecs){
|
|
320
|
+
rowDecs = this._decorators[rowId] = {};
|
|
321
|
+
}
|
|
322
|
+
var cellDec = rowDecs[colId];
|
|
323
|
+
if(!cellDec){
|
|
324
|
+
cellDec = rowDecs[colId] = {};
|
|
325
|
+
}
|
|
326
|
+
cellDec.decorator = decorator;
|
|
327
|
+
cellDec.setCellValue = setCellValue;
|
|
328
|
+
cellDec.widget = null;
|
|
329
|
+
},
|
|
330
|
+
|
|
331
|
+
restoreCellDecorator: function(rowId, colId){
|
|
332
|
+
var rowDecs = this._decorators[rowId];
|
|
333
|
+
if(rowDecs){
|
|
334
|
+
var cellDec = rowDecs[colId];
|
|
335
|
+
if(cellDec){
|
|
336
|
+
if(cellDec.widget){
|
|
337
|
+
//Because dijit.form.TextBox use setTimeout to fire onInput event,
|
|
338
|
+
//so we can not simply destroy the widget when ENTER key is pressed for an editing cell!!
|
|
339
|
+
var parentNode = cellDec.widget.domNode.parentNode;
|
|
340
|
+
if(parentNode){
|
|
341
|
+
parentNode.innerHTML = null;
|
|
342
|
+
}
|
|
343
|
+
window.setTimeout(function(){
|
|
344
|
+
cellDec.widget.destroyRecursive();
|
|
345
|
+
cellDec.widget = null;
|
|
346
|
+
cellDec.decorator = null;
|
|
347
|
+
cellDec.setCellValue = null;
|
|
348
|
+
}, 100);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
delete rowDecs[colId];
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
getCellWidget: function(rowId, colId){
|
|
356
|
+
var cellNode = this.grid.body.getCellNode({
|
|
357
|
+
rowId: rowId,
|
|
358
|
+
colId: colId
|
|
359
|
+
});
|
|
360
|
+
if(cellNode){
|
|
361
|
+
var widgetNode = query('.gridxCellWidget', cellNode)[0];
|
|
362
|
+
if(widgetNode){
|
|
363
|
+
return registry.byNode(widgetNode);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return null;
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
onCellWidgetCreated: function(widget, column){
|
|
370
|
+
if(column.onCellWidgetCreated){
|
|
371
|
+
column.onCellWidgetCreated(widget, column);
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
initializeCellWidget: function(widget, cell){
|
|
376
|
+
var column = cell.column;
|
|
377
|
+
if(column.initializeCellWidget){
|
|
378
|
+
column.initializeCellWidget(widget, cell);
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
|
|
382
|
+
uninitializeCellWidget: function(widget, cell){
|
|
383
|
+
var column = cell.column;
|
|
384
|
+
if(column.uninitializeCellWidget){
|
|
385
|
+
column.uninitializeCellWidget(widget, cell);
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
|
|
389
|
+
collectCellWidgetConnects: function(widget, output){
|
|
390
|
+
var column = widget.cell.column;
|
|
391
|
+
if(column.getCellWidgetConnects){
|
|
392
|
+
output.push.apply(output, column.getCellWidgetConnects(widget, widget.cell));
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
//Private---------------------------------------------------------------
|
|
397
|
+
_init: function(){
|
|
398
|
+
this._decorators = {};
|
|
399
|
+
var i, col, columns = this.grid._columns;
|
|
400
|
+
for(i = columns.length - 1; i >= 0; --i){
|
|
401
|
+
col = columns[i];
|
|
402
|
+
if(col.widgetsInCell){
|
|
403
|
+
col.userDecorator = col.decorator || dummyFunc;
|
|
404
|
+
col.decorator = this._dummyDecorator;
|
|
405
|
+
col._cellWidgets = {};
|
|
406
|
+
col._backupWidgets = [];
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
|
|
411
|
+
_dummyDecorator: function(data, rowId, visualIndex, cell){
|
|
412
|
+
var column = cell.column;
|
|
413
|
+
if(!column.needCellWidget || column.needCellWidget(cell)){
|
|
414
|
+
return '';
|
|
415
|
+
}
|
|
416
|
+
return data;
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
_showDijits: function(row){
|
|
420
|
+
var t = this;
|
|
421
|
+
array.forEach(row.cells(), function(cell){
|
|
422
|
+
var col = cell.column.def();
|
|
423
|
+
if((!col.needCellWidget || col.needCellWidget(cell)) &&
|
|
424
|
+
(col.userDecorator || t._getSpecialCellDec(cell.row.id, col.id))){
|
|
425
|
+
var cellNode = cell.contentNode();
|
|
426
|
+
if(cellNode){
|
|
427
|
+
var cellWidget = t._prepareCellWidget(cell);
|
|
428
|
+
if(has('ie')){
|
|
429
|
+
while(cellNode.childNodes.length){
|
|
430
|
+
cellNode.removeChild(cellNode.firstChild);
|
|
431
|
+
}
|
|
432
|
+
}else{
|
|
433
|
+
cellNode.innerHTML = "";
|
|
434
|
+
}
|
|
435
|
+
cellWidget.placeAt(cellNode);
|
|
436
|
+
cellWidget.startup();
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
},
|
|
441
|
+
|
|
442
|
+
_showDijit: function(cell){
|
|
443
|
+
var col = cell.column.def();
|
|
444
|
+
if((!col.needCellWidget || col.needCellWidget(cell)) &&
|
|
445
|
+
(col.userDecorator || this._getSpecialCellDec(cell.row.id, col.id))){
|
|
446
|
+
var cellWidget = this._prepareCellWidget(cell),
|
|
447
|
+
cellNode = cell.contentNode();
|
|
448
|
+
cellNode.innerHTML = "";
|
|
449
|
+
cellWidget.placeAt(cellNode);
|
|
450
|
+
cellWidget.startup();
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
_prepareCellWidget: function(cell){
|
|
455
|
+
var col = cell.column.def(),
|
|
456
|
+
widget = this._getSpecialWidget(cell);
|
|
457
|
+
if(!widget){
|
|
458
|
+
widget = col._backupWidgets.shift();
|
|
459
|
+
if(!widget){
|
|
460
|
+
widget = new CellWidget({
|
|
461
|
+
content: col.userDecorator(),
|
|
462
|
+
setCellValue: col.setCellValue
|
|
463
|
+
});
|
|
464
|
+
this.onCellWidgetCreated(widget, cell.column);
|
|
465
|
+
if(col.onCellWidgetCreated){
|
|
466
|
+
col.onCellWidgetCreated(widget, cell.column);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
col._cellWidgets[cell.row.id] = widget;
|
|
470
|
+
}
|
|
471
|
+
widget.cell = cell;
|
|
472
|
+
widget.setValue(cell.data(), cell.rawData(), true);
|
|
473
|
+
return widget;
|
|
474
|
+
},
|
|
475
|
+
|
|
476
|
+
_onUnrenderRow: function(id){
|
|
477
|
+
var cols = this.grid._columns,
|
|
478
|
+
backupCount = this.arg('backupCount'),
|
|
479
|
+
backup = function(col, rowId){
|
|
480
|
+
var w = col._cellWidgets[rowId];
|
|
481
|
+
if(col._backupWidgets.length < backupCount){
|
|
482
|
+
//We still need this widget, so if it is still visible,
|
|
483
|
+
//we should safely remove it from the DOM tree first,
|
|
484
|
+
//in case some other logic accidently removes it.
|
|
485
|
+
if(w.domNode.parentNode){
|
|
486
|
+
w.domNode.parentNode.removeChild(w.domNode);
|
|
487
|
+
}
|
|
488
|
+
col._backupWidgets.push(w);
|
|
489
|
+
}else{
|
|
490
|
+
w.destroyRecursive();
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
for(var i = 0, len = cols.length; i < len; ++i){
|
|
494
|
+
var col = cols[i],
|
|
495
|
+
cellWidgets = col._cellWidgets;
|
|
496
|
+
if(cellWidgets){
|
|
497
|
+
if(this.model.isId(id)){
|
|
498
|
+
if(cellWidgets[id]){
|
|
499
|
+
backup(col, id);
|
|
500
|
+
delete cellWidgets[id];
|
|
501
|
+
}
|
|
502
|
+
}else{
|
|
503
|
+
for(var j in cellWidgets){
|
|
504
|
+
backup(col, j);
|
|
505
|
+
}
|
|
506
|
+
col._cellWidgets = {};
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
|
|
512
|
+
_getSpecialCellDec: function(rowId, colId){
|
|
513
|
+
var rowDecs = this._decorators[rowId];
|
|
514
|
+
return rowDecs && rowDecs[colId];
|
|
515
|
+
},
|
|
516
|
+
|
|
517
|
+
_getSpecialWidget: function(cell){
|
|
518
|
+
var rowDecs = this._decorators[cell.row.id];
|
|
519
|
+
if(rowDecs){
|
|
520
|
+
var cellDec = rowDecs[cell.column.id];
|
|
521
|
+
if(cellDec){
|
|
522
|
+
if(!cellDec.widget && cellDec.decorator){
|
|
523
|
+
try{
|
|
524
|
+
cellDec.widget = new CellWidget({
|
|
525
|
+
content: cellDec.decorator(cell.data(), cell.row.id, cell.row.visualIndex(), cell),
|
|
526
|
+
setCellValue: cellDec.setCellValue
|
|
527
|
+
});
|
|
528
|
+
}catch(e){
|
|
529
|
+
console.error('Edit:', e);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return cellDec.widget;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
return null;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
});
|