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,254 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/dom-style",
|
|
3
|
+
"dojo/dom-class",
|
|
4
|
+
"dojo/dom-geometry",
|
|
5
|
+
"dojo/_base/lang",
|
|
6
|
+
"../core/_Module",
|
|
7
|
+
"dojo/_base/declare",
|
|
8
|
+
"dojo/_base/array",
|
|
9
|
+
"dojo/_base/window",
|
|
10
|
+
"dojo/query",
|
|
11
|
+
"dojo/_base/sniff"
|
|
12
|
+
], function(domStyle, domClass, domGeometry, lang, _Module, declare, array, win, query, has){
|
|
13
|
+
|
|
14
|
+
/*=====
|
|
15
|
+
return declare(_Module, {
|
|
16
|
+
// summary:
|
|
17
|
+
// Column lock machinery.
|
|
18
|
+
// description:
|
|
19
|
+
// This module provides a way to lock consecutive leading columns.
|
|
20
|
+
// Columns can be locked in following ways:
|
|
21
|
+
// example:
|
|
22
|
+
// Columns can be locked when Grid is initially rendered.
|
|
23
|
+
// | var grid = new Grid({
|
|
24
|
+
// | columnLockCount: 2
|
|
25
|
+
// | modules: [
|
|
26
|
+
// | "gridx.modules.ColumnLock",
|
|
27
|
+
// | ...
|
|
28
|
+
// | ],
|
|
29
|
+
// | });
|
|
30
|
+
// Lock or unlock columns dynamically
|
|
31
|
+
// | // lock 2 leading columns
|
|
32
|
+
// | grid.columnLock.lock(2)
|
|
33
|
+
// | // unlock all columns
|
|
34
|
+
// | grid.columnLock.unLock();
|
|
35
|
+
|
|
36
|
+
// count: [readonly] Integer
|
|
37
|
+
// Number of columns that will be locked by default
|
|
38
|
+
count: 0,
|
|
39
|
+
|
|
40
|
+
lock: function(count){
|
|
41
|
+
// summary:
|
|
42
|
+
// Dynamically lock consecutive #count leading columns.
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
unlock: function(){
|
|
46
|
+
// summary:
|
|
47
|
+
// Unlock all columns.
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
=====*/
|
|
51
|
+
|
|
52
|
+
return declare(_Module, {
|
|
53
|
+
name: 'columnLock',
|
|
54
|
+
|
|
55
|
+
required: ['body'],
|
|
56
|
+
|
|
57
|
+
count: 0,
|
|
58
|
+
|
|
59
|
+
load: function(args, deferStartup){
|
|
60
|
+
this.count = this.arg('count');
|
|
61
|
+
var _this = this, g = this.grid, body = win.body();
|
|
62
|
+
deferStartup.then(function(){
|
|
63
|
+
if(!g.columnWidth || !g.columnWidth.arg('autoResize')){
|
|
64
|
+
_this.connect(g.body, 'onAfterRow', function(row){
|
|
65
|
+
_this._lockColumns(row.node());
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
_this.connect(g.header, 'onRender', '_updateHeader');
|
|
69
|
+
_this.connect(g.columnWidth, 'onUpdate', '_updateHeader');
|
|
70
|
+
_this.connect(g, 'resize', '_updateUI');
|
|
71
|
+
if(g.columnResizer){
|
|
72
|
+
//make it compatible with column resizer
|
|
73
|
+
_this.connect(g.columnResizer, 'onResize', '_updateHeader');
|
|
74
|
+
_this.connect(g.columnResizer, 'onResize', '_updateBody');
|
|
75
|
+
}
|
|
76
|
+
if(g.header){
|
|
77
|
+
g.header.loaded.then(function(){
|
|
78
|
+
_this._updateHeader();
|
|
79
|
+
});
|
|
80
|
+
if(g.move && g.move.column){
|
|
81
|
+
_this.connect(g.move.column, 'move', '_updateHeader');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
_this._hackHScroller();
|
|
85
|
+
if(_this.count){
|
|
86
|
+
_this.lock(_this.count);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
_this.loaded.callback();
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
lock: function(/*Integer*/count){
|
|
94
|
+
if(this.grid.columnWidth && this.grid.columnWidth.arg('autoResize'))return;
|
|
95
|
+
if(count >= this.grid._columns.length){
|
|
96
|
+
this.count = 0;
|
|
97
|
+
console.warn('Warning: lock count is larger than columns count, do nothing.');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.unlock();
|
|
101
|
+
|
|
102
|
+
if(count){
|
|
103
|
+
domClass.add(this.grid.domNode, 'gridxColumnLock');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
this.count = count;
|
|
107
|
+
this._updateUI();
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
unlock: function(){
|
|
111
|
+
if(this.grid.columnWidth && this.grid.columnWidth.arg('autoResize'))return;
|
|
112
|
+
domClass.remove(this.grid.domNode, 'gridxColumnLock');
|
|
113
|
+
|
|
114
|
+
var rowNode = query('.gridxHeaderRowInner', this.grid.headerNode)[0];
|
|
115
|
+
this._unlockColumns(rowNode);
|
|
116
|
+
|
|
117
|
+
array.forEach(this.grid.bodyNode.childNodes, this._unlockColumns, this);
|
|
118
|
+
|
|
119
|
+
this.count = 0;
|
|
120
|
+
this._updateUI();
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
_unlockColumns: function(rowNode){
|
|
124
|
+
var ltr = this.grid.isLeftToRight();
|
|
125
|
+
var r = rowNode.firstChild.rows[0];
|
|
126
|
+
for(var i = 0; i < this.count; i++){
|
|
127
|
+
var cell = r.cells[i];
|
|
128
|
+
domClass.remove(cell, 'gridxLockedCell');
|
|
129
|
+
domStyle.set(cell, {height: 'auto'});
|
|
130
|
+
}
|
|
131
|
+
rowNode.style[ltr ? 'paddingLeft' : 'paddingRight'] = '0px';
|
|
132
|
+
rowNode.style.width = 'auto';
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
_updateUI: function(){
|
|
136
|
+
if(this.grid.header){
|
|
137
|
+
this._updateHeader();
|
|
138
|
+
}
|
|
139
|
+
this._updateBody();
|
|
140
|
+
this._updateScroller();
|
|
141
|
+
this.grid.hScroller && this.grid.hScroller._doScroll();
|
|
142
|
+
this.grid.header.onRender();
|
|
143
|
+
},
|
|
144
|
+
_lockColumns: function(rowNode){
|
|
145
|
+
// summary:
|
|
146
|
+
// Lock columns for one row
|
|
147
|
+
if(!this.count || this.count >= this.grid._columns.length){
|
|
148
|
+
this.count = 0;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
var isHeader = domClass.contains(rowNode, 'gridxHeaderRowInner');
|
|
153
|
+
var ltr = this.grid.isLeftToRight();
|
|
154
|
+
var r = rowNode.firstChild.rows[0], i;
|
|
155
|
+
for(i = 0; i < this.count; i++){
|
|
156
|
+
domStyle.set(r.cells[i], 'height', 'auto');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
var h1 = domGeometry.getContentBox(r.cells[r.cells.length - 1]).h,
|
|
160
|
+
h2 = domGeometry.getMarginBox(r.cells[r.cells.length - 1]).h;
|
|
161
|
+
|
|
162
|
+
if(has('ie') > 8){
|
|
163
|
+
//in IE 9 +, sometimes computed height will contain decimal pixels like 34.4 px,
|
|
164
|
+
//so that the locked cells will have different height with the unlocked ones.
|
|
165
|
+
//plus the height by 1 can force IE to ceil the decimal to integer like from 34.4px to 35px
|
|
166
|
+
|
|
167
|
+
h3 = domStyle.getComputedStyle(rowNode.firstChild).height;
|
|
168
|
+
if(String(h3).toString().indexOf('.') >= 0){ //decimal
|
|
169
|
+
h2++;
|
|
170
|
+
h1++;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
domStyle.set(rowNode.firstChild, 'height', h2 + 'px');
|
|
174
|
+
|
|
175
|
+
var lead = isHeader ? this.grid.hLayout.lead : 0,
|
|
176
|
+
pl = lead,
|
|
177
|
+
cols = this.grid._columns;
|
|
178
|
+
for(i = 0; i < this.count; i++){
|
|
179
|
+
var cell = r.cells[i],
|
|
180
|
+
s;
|
|
181
|
+
domClass.add(cell, 'gridxLockedCell');
|
|
182
|
+
// if(has('ie') > 8){
|
|
183
|
+
// s = {height: h1 + 1 + 'px'};
|
|
184
|
+
// }else{
|
|
185
|
+
s = {height: h1 + 'px'};
|
|
186
|
+
// }
|
|
187
|
+
s[ltr ? 'left' : 'right'] = pl + 'px';
|
|
188
|
+
domStyle.set(cell, s);
|
|
189
|
+
|
|
190
|
+
pl += cell.offsetWidth;
|
|
191
|
+
}
|
|
192
|
+
rowNode.style[ltr ? 'paddingLeft' : 'paddingRight'] = pl - lead + 'px';
|
|
193
|
+
rowNode.style.width = this.grid.bodyNode.offsetWidth - pl + lead + 'px';
|
|
194
|
+
|
|
195
|
+
//This is useful for virtual scrolling.
|
|
196
|
+
rowNode.scrollLeft = this.grid.hScroller ? this.grid.hScroller.domNode.scrollLeft : 0;
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
_updateHeader: function(){
|
|
200
|
+
// summary:
|
|
201
|
+
// Update the header for column lock
|
|
202
|
+
var rowNode = this.grid.header.innerNode;
|
|
203
|
+
var sl = rowNode.scrollLeft;
|
|
204
|
+
this._lockColumns(rowNode);
|
|
205
|
+
rowNode.scrollLeft = sl;
|
|
206
|
+
this._updateScroller();//used for column dnd to sync hscroller.
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
_updateBody: function(){
|
|
210
|
+
// summary:
|
|
211
|
+
// Update the body for column lock
|
|
212
|
+
array.forEach(this.grid.bodyNode.childNodes, this._lockColumns, this);
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
_updateScroller: function(){
|
|
216
|
+
// summary:
|
|
217
|
+
// Update h-scroller for column lock
|
|
218
|
+
if(this.grid.hScroller){this.grid.hScroller.refresh();}
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
_hackHScroller: function(){
|
|
222
|
+
// summary:
|
|
223
|
+
// This method changes behavior of hscroller. It will scroll each row instead of the body node
|
|
224
|
+
// while some columns are locked.
|
|
225
|
+
var _this = this;
|
|
226
|
+
lang.mixin(this.grid.hScroller, {
|
|
227
|
+
_doScroll: function(){
|
|
228
|
+
// summary:
|
|
229
|
+
// Sync the grid body with the scroller.
|
|
230
|
+
|
|
231
|
+
var scrollLeft = this.domNode.scrollLeft;
|
|
232
|
+
if(_this.count){
|
|
233
|
+
array.forEach(this.grid.bodyNode.childNodes, function(rowNode){
|
|
234
|
+
rowNode.scrollLeft = scrollLeft;
|
|
235
|
+
//to be compatible with row lock
|
|
236
|
+
if(rowNode.style.position == 'absolute'){
|
|
237
|
+
var l = 0;
|
|
238
|
+
array.forEach(rowNode.firstChild.rows[0].cells, function(cell){
|
|
239
|
+
if(domClass.contains(cell, 'gridxLockedCell')){
|
|
240
|
+
cell.style.left = scrollLeft + l + 'px';
|
|
241
|
+
l += cell.offsetWidth;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}else{
|
|
247
|
+
this.grid.bodyNode.scrollLeft = scrollLeft;
|
|
248
|
+
}
|
|
249
|
+
this.grid.onHScroll(this.grid.hScroller._lastLeft);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
});
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/window",
|
|
4
|
+
"dojo/_base/event",
|
|
5
|
+
"dojo/dom",
|
|
6
|
+
"dojo/dom-style",
|
|
7
|
+
"dojo/dom-class",
|
|
8
|
+
"dojo/dom-construct",
|
|
9
|
+
"dojo/dom-geometry",
|
|
10
|
+
"dojo/keys",
|
|
11
|
+
"dojo/query",
|
|
12
|
+
'dojo/sniff',
|
|
13
|
+
"../core/_Module"
|
|
14
|
+
// "dojo/NodeList-traverse"
|
|
15
|
+
], function(declare, win, event, dom, domStyle, domClass, domConstruct, domGeometry, keys, query, sniff, _Module){
|
|
16
|
+
|
|
17
|
+
/*=====
|
|
18
|
+
Column.setWidth = function(width){
|
|
19
|
+
// summary:
|
|
20
|
+
// Set width of the target column
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return declare(_Module, {
|
|
24
|
+
// summary:
|
|
25
|
+
// Column Resizer machinery.
|
|
26
|
+
// description:
|
|
27
|
+
// This module provides a way to resize column width.
|
|
28
|
+
|
|
29
|
+
// minWidth: Integer
|
|
30
|
+
// min column width in px
|
|
31
|
+
minWidth: 20,
|
|
32
|
+
|
|
33
|
+
detectWidth: 5,
|
|
34
|
+
|
|
35
|
+
step: 2,
|
|
36
|
+
|
|
37
|
+
setWidth: function(olId, width){
|
|
38
|
+
// summary:
|
|
39
|
+
// Set width of the target column
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
onResize: function(colId, newWidth, oldWidth){
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
=====*/
|
|
46
|
+
|
|
47
|
+
return declare(_Module, {
|
|
48
|
+
name: 'columnResizer',
|
|
49
|
+
|
|
50
|
+
load: function(){
|
|
51
|
+
var t = this,
|
|
52
|
+
g = t.grid;
|
|
53
|
+
t.batchConnect(
|
|
54
|
+
[g.header.domNode, 'onmousemove', '_mousemove'],
|
|
55
|
+
[g, 'onHeaderMouseOut', '_mouseout'],
|
|
56
|
+
[g, 'onHeaderMouseDown', '_mousedown', t, t.name],
|
|
57
|
+
[g, 'onHeaderKeyDown', '_keydown'],
|
|
58
|
+
[win.doc, 'onmousemove', '_updateResizer'],
|
|
59
|
+
[win.doc, 'onmouseup', '_mouseup']);
|
|
60
|
+
t.loaded.callback();
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
columnMixin: {
|
|
64
|
+
setWidth: function(width){
|
|
65
|
+
this.grid.columnResizer.setWidth(this.id, width);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
//Public---------------------------------------------------------------------
|
|
70
|
+
minWidth: 20,
|
|
71
|
+
|
|
72
|
+
detectWidth: 5,
|
|
73
|
+
|
|
74
|
+
step: 2,
|
|
75
|
+
|
|
76
|
+
setWidth: function(colId, width){
|
|
77
|
+
var t = this,
|
|
78
|
+
g = t.grid,
|
|
79
|
+
col = g._columnsById[colId];
|
|
80
|
+
if(col){
|
|
81
|
+
var headerNode = g.header.getHeaderNode(colId),
|
|
82
|
+
headerNodeStyle = headerNode.style,
|
|
83
|
+
oldWidth = domStyle.get(headerNode, 'width'),
|
|
84
|
+
minWidth = t.arg('minWidth'),
|
|
85
|
+
cols = g._columns;
|
|
86
|
+
|
|
87
|
+
width = parseInt(width, 10);
|
|
88
|
+
if(width < minWidth){
|
|
89
|
+
width = minWidth;
|
|
90
|
+
}
|
|
91
|
+
headerNodeStyle.width = width + 'px';
|
|
92
|
+
headerNodeStyle.minWidth = width + 'px';
|
|
93
|
+
headerNodeStyle.maxWidth = width + 'px';
|
|
94
|
+
width = headerNode.clientWidth;
|
|
95
|
+
//set again in case actual effect is different from what we expect.
|
|
96
|
+
headerNodeStyle.width = width + 'px';
|
|
97
|
+
headerNodeStyle.minWidth = width + 'px';
|
|
98
|
+
headerNodeStyle.maxWidth = width + 'px';
|
|
99
|
+
//Use actual width as our new column width
|
|
100
|
+
col.width = width + 'px';
|
|
101
|
+
for(var i = 0, len = cols.length; i < len; ++i){
|
|
102
|
+
cols[i].declaredWidth = cols[i].width;
|
|
103
|
+
}
|
|
104
|
+
query('[colid="' + g._escapeId(colId) + '"]', g.bodyNode).forEach(function(cell){
|
|
105
|
+
var cs = cell.style;
|
|
106
|
+
cs.width = width + 'px';
|
|
107
|
+
cs.minWidth = width + 'px';
|
|
108
|
+
cs.maxWidth = width + 'px';
|
|
109
|
+
});
|
|
110
|
+
g.body.onRender();
|
|
111
|
+
g.vLayout.reLayout();
|
|
112
|
+
if(g.autoWidth){
|
|
113
|
+
g.hLayout.reLayout();
|
|
114
|
+
}
|
|
115
|
+
t.onResize(colId, width, oldWidth);
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
//Event--------------------------------------------------------------
|
|
120
|
+
onResize: function(/* colId, newWidth, oldWidth */){},
|
|
121
|
+
|
|
122
|
+
//Private-----------------------------------------------------------
|
|
123
|
+
_mousemove: function(e){
|
|
124
|
+
var t = this;
|
|
125
|
+
if(!t._resizing && !t._ismousedown){
|
|
126
|
+
var detectWidth = t.arg('detectWidth'),
|
|
127
|
+
g = t.grid,
|
|
128
|
+
ltr = g.isLeftToRight(),
|
|
129
|
+
body = win.body(),
|
|
130
|
+
flags = g._eventFlags;
|
|
131
|
+
if(!query('.gridxCell', g.header.innerNode).some(function(cellNode){
|
|
132
|
+
var pos = domGeometry.position(cellNode),
|
|
133
|
+
x = ltr ? pos.x + pos.w : pos.x,
|
|
134
|
+
col = g._columnsById[cellNode.getAttribute('colid')];
|
|
135
|
+
//check if in resize range
|
|
136
|
+
if(x - detectWidth <= e.clientX && x + detectWidth >= e.clientX){
|
|
137
|
+
var n = query(e._target || e.target).closest('td', g.header.innerNode)[0],
|
|
138
|
+
npos = n && domGeometry.position(n);
|
|
139
|
+
if(n && (e.clientX <= npos.x + detectWidth || e.clientX >= npos.x + npos.w - detectWidth)){
|
|
140
|
+
domClass.add(body, 'gridxColumnResizing');
|
|
141
|
+
t._targetCell = cellNode;
|
|
142
|
+
t._cellPos = pos;
|
|
143
|
+
//Forbid anything else to happen when we are resizing a column!
|
|
144
|
+
flags.onHeaderMouseDown = t.name;
|
|
145
|
+
return t._readyToResize = 1;//Intentional assignment
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
})){
|
|
149
|
+
//Not in resize region.
|
|
150
|
+
flags.onHeaderMouseDown = undefined;
|
|
151
|
+
domClass.remove(body, 'gridxColumnResizing');
|
|
152
|
+
}
|
|
153
|
+
flags.onHeaderCellMouseDown = flags.onHeaderMouseDown;
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
_mouseout: function(e){
|
|
158
|
+
if(!this._resizing){
|
|
159
|
+
var pos = domGeometry.position(this.grid.header.domNode);
|
|
160
|
+
if(sniff('chrome')){
|
|
161
|
+
for(var i in pos){
|
|
162
|
+
pos[i] = Math.floor(pos[i]);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if(e.clientY <= pos.y || e.clientY >= pos.y + pos.h ||
|
|
167
|
+
e.clientX <= pos.x || e.clientX >= pos.x + pos.w){
|
|
168
|
+
this._readyToResize = 0;
|
|
169
|
+
domClass.remove(win.body(), 'gridxColumnResizing');
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
_mousedown: function(e){
|
|
175
|
+
var t = this;
|
|
176
|
+
if(t._readyToResize){
|
|
177
|
+
//begin resize
|
|
178
|
+
t._resizing = 1;
|
|
179
|
+
var g = t.grid,
|
|
180
|
+
refNode = query('.gridxCell', g.header.innerNode)[0];
|
|
181
|
+
dom.setSelectable(g.domNode, false);
|
|
182
|
+
win.doc.onselectstart = function(){
|
|
183
|
+
return false;
|
|
184
|
+
};
|
|
185
|
+
t._containerPos = domGeometry.position(g.domNode);
|
|
186
|
+
t._headerPos = domGeometry.position(g.header.domNode);
|
|
187
|
+
t._padBorder = domGeometry.getMarginBox(refNode).w - domGeometry.getContentBox(refNode).w;
|
|
188
|
+
t._initResizer();
|
|
189
|
+
t._updateResizer(e);
|
|
190
|
+
//Only mouse down, not moved yet
|
|
191
|
+
t._moving = 0;
|
|
192
|
+
}else{
|
|
193
|
+
t._ismousedown = 1;
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
_initResizer: function(){
|
|
198
|
+
var t = this,
|
|
199
|
+
g = t.grid,
|
|
200
|
+
hs = g.hScroller,
|
|
201
|
+
n = hs && hs.container.offsetHeight ? hs.container : g.bodyNode,
|
|
202
|
+
headerTop = g.header.domNode.offsetTop,
|
|
203
|
+
h = n.parentNode.offsetTop + n.offsetHeight - g.header.domNode.offsetTop,
|
|
204
|
+
resizer = t._resizer;
|
|
205
|
+
if(!resizer){
|
|
206
|
+
resizer = t._resizer = domConstruct.create('div', {
|
|
207
|
+
className: 'gridxColumnResizer'
|
|
208
|
+
}, g.domNode, 'last');
|
|
209
|
+
t.connect(resizer, 'mouseup', '_mouseup');
|
|
210
|
+
}
|
|
211
|
+
var rs = resizer.style;
|
|
212
|
+
rs.top = headerTop + 'px';
|
|
213
|
+
rs.height = h + 'px';
|
|
214
|
+
rs.display = 'block';
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
_updateResizer: function(e){
|
|
218
|
+
var t = this;
|
|
219
|
+
if(t._resizing){
|
|
220
|
+
var ltr = t.grid.isLeftToRight(),
|
|
221
|
+
minWidth = t.arg('minWidth') + t._padBorder,
|
|
222
|
+
pos = t._cellPos,
|
|
223
|
+
left = e.clientX,
|
|
224
|
+
limit = ltr ? pos.x + minWidth : pos.x + pos.w - minWidth;
|
|
225
|
+
if(ltr ? left < limit : left > limit){
|
|
226
|
+
//Column is narrower than minWidth, the resizer should not move further.
|
|
227
|
+
left = limit;
|
|
228
|
+
}
|
|
229
|
+
t._width = (ltr ? left - pos.x : pos.x + pos.w - left) - t._padBorder;
|
|
230
|
+
//subtract the width of the border so that the resizer appears at center.
|
|
231
|
+
t._resizer.style.left = (left - t._containerPos.x - 2) + 'px';
|
|
232
|
+
//Now mouse is moving.
|
|
233
|
+
t._moving = 1;
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
_mouseup: function(e){
|
|
238
|
+
var t = this;
|
|
239
|
+
t._ismousedown = 0;
|
|
240
|
+
if(t._resizing){
|
|
241
|
+
//end resize
|
|
242
|
+
t._resizing = t._readyToResize = 0;
|
|
243
|
+
domClass.remove(win.body(), 'gridxColumnResizing');
|
|
244
|
+
dom.setSelectable(t.grid.domNode, true);
|
|
245
|
+
win.doc.onselectstart = null;
|
|
246
|
+
//Only change width when mouse moved.
|
|
247
|
+
if(t._moving){
|
|
248
|
+
t._moving = 0;
|
|
249
|
+
t.setWidth(t._targetCell.getAttribute('colid'), t._width + 'px');
|
|
250
|
+
}
|
|
251
|
+
t._resizer.style.display = 'none';
|
|
252
|
+
//If mouse is still in header region, should get ready for next resize operation
|
|
253
|
+
var x = e.clientX,
|
|
254
|
+
y = e.clientY,
|
|
255
|
+
headerPos = t._headerPos;
|
|
256
|
+
if(x >= headerPos.x && x <= headerPos.x + headerPos.w &&
|
|
257
|
+
y >= headerPos.y && y <= headerPos.y + headerPos.h){
|
|
258
|
+
e._target = t._targetCell;
|
|
259
|
+
t._mousemove(e);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
_keydown: function(evt){
|
|
265
|
+
//support keyboard to resize a column
|
|
266
|
+
if((evt.keyCode == keys.LEFT_ARROW || evt.keyCode == keys.RIGHT_ARROW) && evt.ctrlKey && evt.shiftKey){
|
|
267
|
+
var t = this,
|
|
268
|
+
g = t.grid,
|
|
269
|
+
colId = evt.columnId,
|
|
270
|
+
cellNode = query('[colid="' + g._escapeId(colId) + '"].gridxCell', g.header.innerNode)[0],
|
|
271
|
+
step = t.arg('step');
|
|
272
|
+
step = evt.keyCode == keys.LEFT_ARROW ^ !!g.isLeftToRight() ? step : -step;
|
|
273
|
+
t.setWidth(colId, domStyle.get(cellNode, 'width') + step);
|
|
274
|
+
event.stop(evt);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
});
|