gridx-rails 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,412 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/declare",
|
3
|
+
"dojo/query",
|
4
|
+
"dojo/_base/lang",
|
5
|
+
"dojo/_base/sniff",
|
6
|
+
"dojo/aspect",
|
7
|
+
"dojo/dom-construct",
|
8
|
+
"dojo/dom-class",
|
9
|
+
"dojo/dom-style",
|
10
|
+
"dojo/dom-geometry",
|
11
|
+
"dojo/keys",
|
12
|
+
"../core/_Module"
|
13
|
+
], function(declare, query, lang, has, aspect, domConstruct, domClass, domStyle, domGeo, keys, _Module){
|
14
|
+
|
15
|
+
/*=====
|
16
|
+
return declare(_Module, {
|
17
|
+
// summary:
|
18
|
+
// This modules provides a header before each row.
|
19
|
+
// description:
|
20
|
+
// Row header can be used as a UI handler for row selection, especially when
|
21
|
+
// cell selection is turned on and selectRowTriggerOnCell is turned off.
|
22
|
+
// It can also be used as a place to hold the checkbox/radiobutton for IndirectSelect
|
23
|
+
|
24
|
+
// width: String
|
25
|
+
// The width (CSS value) of a row header.
|
26
|
+
width: '20px',
|
27
|
+
|
28
|
+
onMoveToRowHeaderCell: function(){
|
29
|
+
// summary:
|
30
|
+
// Fired when focus is moved to a row header using keyboard.
|
31
|
+
// tags:
|
32
|
+
// private callback
|
33
|
+
},
|
34
|
+
|
35
|
+
// headerProvider: Function
|
36
|
+
// A functionn that returns an HTML string to fill the header cell of row headers.
|
37
|
+
headerProvider: null,
|
38
|
+
|
39
|
+
// cellProvider: Function
|
40
|
+
// A function that returns an HTML string to fill the body cells of row headers.
|
41
|
+
cellProvider: null
|
42
|
+
});
|
43
|
+
=====*/
|
44
|
+
|
45
|
+
return declare(_Module, {
|
46
|
+
name: 'rowHeader',
|
47
|
+
|
48
|
+
constructor: function(){
|
49
|
+
this.headerNode = domConstruct.create('div', {
|
50
|
+
'class': 'gridxRowHeaderHeader',
|
51
|
+
role: 'row',
|
52
|
+
innerHTML: ['<table role="presentation" border="0" cellspacing="0" cellpadding="0" style="width: ',
|
53
|
+
this.arg('width'),
|
54
|
+
';"><tr><td class="gridxRowHeaderHeaderCell" role="rowheader" tabindex="-1"></td></tr></table>'
|
55
|
+
].join('')
|
56
|
+
});
|
57
|
+
this.bodyNode = domConstruct.create('div', {
|
58
|
+
'class': 'gridxRowHeaderBody'
|
59
|
+
});
|
60
|
+
},
|
61
|
+
|
62
|
+
destroy: function(){
|
63
|
+
this.inherited(arguments);
|
64
|
+
domConstruct.destroy(this.headerNode);
|
65
|
+
domConstruct.destroy(this.bodyNode);
|
66
|
+
},
|
67
|
+
|
68
|
+
preload: function(){
|
69
|
+
var t = this,
|
70
|
+
rhhn = t.headerNode,
|
71
|
+
rhbn = t.bodyNode,
|
72
|
+
g = t.grid,
|
73
|
+
body = g.body,
|
74
|
+
w = t.arg('width');
|
75
|
+
//register events
|
76
|
+
g._initEvents(['RowHeaderHeader', 'RowHeaderCell'], g._eventNames);
|
77
|
+
//modify header
|
78
|
+
g.header.domNode.appendChild(rhhn);
|
79
|
+
rhhn.style.width = w;
|
80
|
+
t.headerCellNode = query('td', rhhn)[0];
|
81
|
+
g._connectEvents(rhhn, '_onHeaderMouseEvent', t);
|
82
|
+
//modify body
|
83
|
+
g.mainNode.appendChild(rhbn);
|
84
|
+
rhbn.style.width = w;
|
85
|
+
g.hLayout.register(null, rhbn);
|
86
|
+
|
87
|
+
t.batchConnect(
|
88
|
+
[body, 'onRender', '_onRendered'],
|
89
|
+
[body, 'onAfterRow', '_onAfterRow'],
|
90
|
+
[body, 'onAfterCell', '_onAfterCell'],
|
91
|
+
[body, 'onUnrender', '_onUnrender'],
|
92
|
+
[body, 'onEmpty', function(){
|
93
|
+
rhbn.innerHTML = '';
|
94
|
+
}],
|
95
|
+
[g.bodyNode, 'onscroll', '_onScroll'],
|
96
|
+
[g, 'onRowMouseOver', '_onRowMouseOver'],
|
97
|
+
[g, 'onRowMouseOut', '_onRowMouseOver'],
|
98
|
+
[g, '_onResizeEnd', '_onResize'],
|
99
|
+
g.columnWidth && [g.columnWidth, 'onUpdate', '_onResize'],
|
100
|
+
g.columnResizer && [g.columnResizer, 'onResize', '_onResize'],
|
101
|
+
[g, 'onRowHeaderCellMouseOver', '_onCellMouseOver'],
|
102
|
+
[g, 'onRowHeaderCellMouseOut', '_onCellMouseOver'],
|
103
|
+
[t.model, 'onSizeChange', '_onSizeChange']);
|
104
|
+
//TODO: need to organize this into connect/disconnect system
|
105
|
+
t._cnnts.push(
|
106
|
+
aspect.before(body, 'renderRows', lang.hitch(t, t._onRenderRows), true),
|
107
|
+
aspect.before(body, '_onDelete', lang.hitch(t, t._onDelete), true));
|
108
|
+
|
109
|
+
g._connectEvents(rhbn, '_onBodyMouseEvent', t);
|
110
|
+
t._initFocus();
|
111
|
+
},
|
112
|
+
|
113
|
+
load: function(args, startup){
|
114
|
+
var t = this,
|
115
|
+
g = t.grid,
|
116
|
+
bn = t.bodyNode;
|
117
|
+
startup.then(function(){
|
118
|
+
var w = bn.offsetWidth || domStyle.get(bn, 'width'),
|
119
|
+
ltr = g.isLeftToRight(),
|
120
|
+
mainBorder = domGeo.getBorderExtents(g.mainNode);
|
121
|
+
bn.style[ltr ? 'left' : 'right'] = -(w + (ltr ? mainBorder.l : mainBorder.r)) + 'px';
|
122
|
+
t.loaded.callback();
|
123
|
+
});
|
124
|
+
},
|
125
|
+
|
126
|
+
//Public--------------------------------------------------------------------------
|
127
|
+
width: '20px',
|
128
|
+
|
129
|
+
onMoveToRowHeaderCell: function(){},
|
130
|
+
|
131
|
+
//Private-------------------------------------------------------
|
132
|
+
_onRenderRows: function(start, count, position){
|
133
|
+
var nd = this.bodyNode;
|
134
|
+
if(count > 0){
|
135
|
+
var str = this._buildRows(start, count);
|
136
|
+
if(position == 'top'){
|
137
|
+
domConstruct.place(str, nd, 'first');
|
138
|
+
}else if(position == 'bottom'){
|
139
|
+
domConstruct.place(str, nd, 'last');
|
140
|
+
}else{
|
141
|
+
nd.innerHTML = str;
|
142
|
+
nd.scrollTop = 0;
|
143
|
+
}
|
144
|
+
}else if(position != 'top' && position != 'bottom'){
|
145
|
+
nd.innerHTML = '';
|
146
|
+
}
|
147
|
+
},
|
148
|
+
|
149
|
+
_onAfterRow: function(row){
|
150
|
+
var t = this,
|
151
|
+
visualIndex = row.visualIndex(),
|
152
|
+
n = query('[visualindex="' + visualIndex + '"].gridxRowHeaderRow', t.bodyNode)[0],
|
153
|
+
bn = t.grid.dod? query('[visualindex="' + visualIndex + '"].gridxRow', t.grid.bodyNode)[0] : query('[visualindex="' + visualIndex + '"].gridxRow .gridxRowTable', t.grid.bodyNode)[0],
|
154
|
+
nt = n.firstChild,
|
155
|
+
cp = t.arg('cellProvider');
|
156
|
+
n.setAttribute('rowid', row.id);
|
157
|
+
n.setAttribute('rowindex', row.index());
|
158
|
+
n.setAttribute('parentid', t.model.treePath(row.id).pop() || '');
|
159
|
+
if(cp){
|
160
|
+
nt.firstChild.firstChild.firstChild.innerHTML = cp.call(t, row);
|
161
|
+
}
|
162
|
+
t._syncRowHeight(nt, bn);
|
163
|
+
},
|
164
|
+
|
165
|
+
_onAfterCell: function(cell){
|
166
|
+
//This is to ensure the rowHeader get correct height for editable cells
|
167
|
+
var t = this,
|
168
|
+
visualIndex = cell.row.visualIndex(),
|
169
|
+
n = query('[visualindex="' + visualIndex + '"].gridxRowHeaderRow', t.bodyNode)[0],
|
170
|
+
bn = query('[visualindex="' + visualIndex + '"].gridxRow .gridxRowTable', t.grid.bodyNode)[0];
|
171
|
+
t._syncRowHeight(n.firstChild, bn);
|
172
|
+
},
|
173
|
+
|
174
|
+
_syncRowHeight: function(rowHeaderNode, bodyNode){
|
175
|
+
//Check if the table is collasped.
|
176
|
+
var t = this;
|
177
|
+
if(t._isCollapse === undefined){
|
178
|
+
var refNode = query('.gridxCell', t.grid.header.innerNode)[0];
|
179
|
+
t._isCollapse = refNode && domStyle.get(refNode, 'borderCollapse') == 'collapse';
|
180
|
+
}
|
181
|
+
//Use setTimeout to ensure the row header height correct reflects the body row height.
|
182
|
+
//FIXME: This is tricky and may not be working in some special cases.
|
183
|
+
function getHeight(){
|
184
|
+
return has('ie') <= 8 || t._isCollapse ? bodyNode.offsetHeight + 'px' : domStyle.getComputedStyle(bodyNode).height;
|
185
|
+
}
|
186
|
+
rowHeaderNode.style.height = getHeight();
|
187
|
+
setTimeout(function(){
|
188
|
+
rowHeaderNode.style.height = getHeight();
|
189
|
+
}, 0);
|
190
|
+
},
|
191
|
+
|
192
|
+
_onRendered: function(start, count){
|
193
|
+
var t = this,
|
194
|
+
hp = t.arg('headerProvider');
|
195
|
+
if(hp){
|
196
|
+
t.headerCellNode.innerHTML = hp();
|
197
|
+
}
|
198
|
+
t._onScroll();
|
199
|
+
},
|
200
|
+
|
201
|
+
_onSizeChange: function(size, oldSize){
|
202
|
+
var t = this,
|
203
|
+
g = t.grid,
|
204
|
+
hp = this.arg('headerProvider');
|
205
|
+
if(!size && hp){
|
206
|
+
t.headerCellNode.innerHTML = '';
|
207
|
+
}
|
208
|
+
t._onScroll();
|
209
|
+
},
|
210
|
+
|
211
|
+
_onDelete: function(id){
|
212
|
+
var nodes = this.model.isId(id) && query('[rowid="' + this.grid._escapeId(id) + '"].gridxRowHeaderRow', this.bodyNode);
|
213
|
+
if(nodes && nodes.length){
|
214
|
+
var node = nodes[nodes.length - 1],
|
215
|
+
pid = node.getAttribute('parentid'),
|
216
|
+
pids = {},
|
217
|
+
toDeleteC = 1;
|
218
|
+
pids[id] = 1;
|
219
|
+
for(sn = node.nextSibling; sn && pids[sn.getAttribute('parentid')]; sn = sn.nextSibling){
|
220
|
+
rid = sn.getAttribute('rowid');
|
221
|
+
toDeleteC++;
|
222
|
+
pids[rid] = 1;
|
223
|
+
}
|
224
|
+
for(; sn; sn = sn.nextSibling){
|
225
|
+
if(sn.getAttribute('parentid') == pid){
|
226
|
+
sn.setAttribute('rowindex', parseInt(sn.getAttribute('rowindex'), 10) - 1);
|
227
|
+
}
|
228
|
+
var vidx = parseInt(sn.getAttribute('visualindex'), 10);
|
229
|
+
sn.setAttribute('visualindex', vidx - toDeleteC);
|
230
|
+
}
|
231
|
+
}
|
232
|
+
},
|
233
|
+
|
234
|
+
_onUnrender: function(id, refresh){
|
235
|
+
//If this is fired in partial refresh, don't destroy the row header, save if for later use.
|
236
|
+
if(refresh != 'refresh'){
|
237
|
+
var nodes = this.model.isId(id) && query('[rowid="' + this.grid._escapeId(id) + '"].gridxRowHeaderRow', this.bodyNode);
|
238
|
+
if(nodes && nodes.length){
|
239
|
+
//remove the last node instead of the first, because when refreshing, there'll be 2 nodes with same id.
|
240
|
+
domConstruct.destroy(nodes[nodes.length - 1]);
|
241
|
+
}
|
242
|
+
}
|
243
|
+
},
|
244
|
+
|
245
|
+
_onScroll: function(){
|
246
|
+
this.bodyNode.scrollTop = this.grid.bodyNode.scrollTop;
|
247
|
+
},
|
248
|
+
|
249
|
+
_onResize: function(){
|
250
|
+
var ie = has('ie');
|
251
|
+
for(var brn = this.grid.bodyNode.firstChild, n = this.bodyNode.firstChild;
|
252
|
+
brn && n;
|
253
|
+
brn = brn.nextSibling, n = n.nextSibling){
|
254
|
+
var bn = this.grid.dod? brn : brn.firstChild;
|
255
|
+
n.firstChild.style.height = ie > 8? domStyle.getComputedStyle(bn).height : bn.offsetHeight + 'px';
|
256
|
+
|
257
|
+
// n.firstChild.style.height = ie > 8? domStyle.getComputedStyle(brn.firstChild).height : brn.firstChild.offsetHeight + 'px';
|
258
|
+
}
|
259
|
+
var t = this,
|
260
|
+
g = t.grid,
|
261
|
+
bn = t.bodyNode,
|
262
|
+
w = bn.offsetWidth || domStyle.get(bn, 'width'),
|
263
|
+
ltr = g.isLeftToRight(),
|
264
|
+
mainBorder = domGeo.getBorderExtents(g.mainNode);
|
265
|
+
bn.style[ltr ? 'left' : 'right'] = -(w + (ltr ? mainBorder.l : mainBorder.r)) + 'px';
|
266
|
+
},
|
267
|
+
|
268
|
+
_buildRows: function(start, count){
|
269
|
+
var sb = [];
|
270
|
+
for(var i = 0; i < count; ++i){
|
271
|
+
sb.push('<div class="gridxRowHeaderRow" role="row" visualindex="', start + i,
|
272
|
+
'"><table role="presentation" border="0" cellspacing="0" cellpadding="0" style="height: 24px;"><tr><td class="gridxRowHeaderCell" role="rowheader" tabindex="-1"></td></tr></table></div>');
|
273
|
+
}
|
274
|
+
return sb.join('');
|
275
|
+
},
|
276
|
+
|
277
|
+
//Events
|
278
|
+
_onHeaderMouseEvent: function(eventName, e){
|
279
|
+
var g = this.grid,
|
280
|
+
evtCell = 'onRowHeaderHeader' + eventName;
|
281
|
+
if(g._isConnected(evtCell)){
|
282
|
+
g[evtCell](e);
|
283
|
+
}
|
284
|
+
},
|
285
|
+
|
286
|
+
_onBodyMouseEvent: function(eventName, e){
|
287
|
+
var g = this.grid,
|
288
|
+
evtCell = 'onRowHeaderCell' + eventName,
|
289
|
+
evtRow = 'onRow' + eventName,
|
290
|
+
cellConnected = g._isConnected(evtCell),
|
291
|
+
rowConnected = g._isConnected(evtRow);
|
292
|
+
if(cellConnected || rowConnected){
|
293
|
+
this._decorateBodyEvent(e);
|
294
|
+
if(e.rowIndex >= 0){
|
295
|
+
if(e.isRowHeader && cellConnected){
|
296
|
+
g[evtCell](e);
|
297
|
+
}
|
298
|
+
if(rowConnected){
|
299
|
+
g[evtRow](e);
|
300
|
+
}
|
301
|
+
}
|
302
|
+
}
|
303
|
+
},
|
304
|
+
|
305
|
+
_decorateBodyEvent: function(e){
|
306
|
+
var node = e.target || e.originalTarget;
|
307
|
+
while(node && node != this.bodyNode){
|
308
|
+
if(domClass.contains(node, 'gridxRowHeaderCell')){
|
309
|
+
e.isRowHeader = true;
|
310
|
+
e.rowHeaderCellNode = node;
|
311
|
+
}else if(node.tagName.toLowerCase() === 'div' && domClass.contains(node, 'gridxRowHeaderRow')){
|
312
|
+
e.rowId = node.getAttribute('rowid');
|
313
|
+
e.parentId = node.getAttribute('parentid');
|
314
|
+
e.rowIndex = parseInt(node.getAttribute('rowindex'), 10);
|
315
|
+
e.visualIndex = parseInt(node.getAttribute('visualindex'), 10);
|
316
|
+
return;
|
317
|
+
}
|
318
|
+
node = node.parentNode;
|
319
|
+
}
|
320
|
+
},
|
321
|
+
|
322
|
+
_onRowMouseOver: function(e){
|
323
|
+
var rowNode = query('> [rowid="' + this.grid._escapeId(e.rowId) + '"].gridxRowHeaderRow', this.bodyNode)[0];
|
324
|
+
if(rowNode){
|
325
|
+
domClass.toggle(rowNode, "gridxRowOver", e.type.toLowerCase() == 'mouseover');
|
326
|
+
}
|
327
|
+
},
|
328
|
+
|
329
|
+
_onCellMouseOver: function(e){
|
330
|
+
var cellNode = query('> [rowid="' + this.grid._escapeId(e.rowId) + '"].gridxRowHeaderRow .gridxRowHeaderCell', this.bodyNode)[0];
|
331
|
+
if(cellNode){
|
332
|
+
domClass.toggle(cellNode, "gridxRowHeaderCellOver", e.type.toLowerCase() == 'mouseover');
|
333
|
+
}
|
334
|
+
},
|
335
|
+
|
336
|
+
//Focus--------------------------------------------------------
|
337
|
+
_initFocus: function(){
|
338
|
+
var t = this,
|
339
|
+
focus = t.grid.focus;
|
340
|
+
if(focus){
|
341
|
+
focus.registerArea({
|
342
|
+
name: 'rowHeader',
|
343
|
+
priority: 0.9,
|
344
|
+
focusNode: t.bodyNode,
|
345
|
+
scope: t,
|
346
|
+
doFocus: t._doFocus,
|
347
|
+
onFocus: t._onFocus,
|
348
|
+
doBlur: t._blur,
|
349
|
+
onBlur: t._blur,
|
350
|
+
connects: [
|
351
|
+
t.connect(t.bodyNode, 'onkeydown', '_onKeyDown')
|
352
|
+
]
|
353
|
+
});
|
354
|
+
}
|
355
|
+
},
|
356
|
+
|
357
|
+
_doFocus: function(evt){
|
358
|
+
if(this._focusRow(this.grid.body._focusCellRow)){
|
359
|
+
this.grid.focus.stopEvent(evt);
|
360
|
+
return true;
|
361
|
+
}
|
362
|
+
},
|
363
|
+
|
364
|
+
_onFocus: function(evt){
|
365
|
+
var t = this,
|
366
|
+
node = evt.target;
|
367
|
+
while(node != t.bodyNode){
|
368
|
+
if(domClass.contains(node, 'gridxRowHeaderRow')){
|
369
|
+
var r = t.grid.body._focusCellRow = parseInt(node.getAttribute('visualindex'), 10);
|
370
|
+
t._focusRow(r);
|
371
|
+
return true;
|
372
|
+
}
|
373
|
+
node = node.parentNode;
|
374
|
+
}
|
375
|
+
},
|
376
|
+
|
377
|
+
_focusRow: function(visIndex){
|
378
|
+
var t = this,
|
379
|
+
node = query('[visualindex="' + visIndex + '"] .gridxRowHeaderCell', t.bodyNode)[0];
|
380
|
+
t._blur();
|
381
|
+
node = node || t.bodyNode.firstChild;
|
382
|
+
if(node){
|
383
|
+
domClass.add(node, 'gridxCellFocus');
|
384
|
+
node.focus();
|
385
|
+
}
|
386
|
+
return node;
|
387
|
+
},
|
388
|
+
|
389
|
+
_blur: function(){
|
390
|
+
query('.gridxCellFocus', this.bodyNode).forEach(function(node){
|
391
|
+
domClass.remove(node, 'gridxCellFocus');
|
392
|
+
});
|
393
|
+
return true;
|
394
|
+
},
|
395
|
+
|
396
|
+
_onKeyDown: function(evt){
|
397
|
+
var t = this, g = t.grid;
|
398
|
+
if(g.focus.currentArea() == 'rowHeader' &&
|
399
|
+
evt.keyCode == keys.UP_ARROW || evt.keyCode == keys.DOWN_ARROW){
|
400
|
+
g.focus.stopEvent(evt);
|
401
|
+
var step = evt.keyCode == keys.UP_ARROW ? -1 : 1,
|
402
|
+
body = g.body,
|
403
|
+
r = body._focusCellRow + step;
|
404
|
+
body._focusCellRow = r = r < 0 ? 0 : (r >= g.view.visualCount ? g.view.visualCount - 1 : r);
|
405
|
+
g.vScroller.scrollToRow(r).then(function(){
|
406
|
+
t._focusRow(r);
|
407
|
+
t.onMoveToRowHeaderCell(r, evt);
|
408
|
+
});
|
409
|
+
}
|
410
|
+
}
|
411
|
+
});
|
412
|
+
});
|
@@ -0,0 +1,143 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/kernel",
|
3
|
+
"dojo/_base/lang",
|
4
|
+
"../core/_Module",
|
5
|
+
"dojo/_base/declare",
|
6
|
+
"dojo/_base/array",
|
7
|
+
"dojo/dom-class",
|
8
|
+
'dojo/aspect',
|
9
|
+
"dojo/query"
|
10
|
+
], function(kernel, lang, _Module, declare, array, domClass, aspect, query){
|
11
|
+
kernel.experimental('gridx/modules/RowLock');
|
12
|
+
|
13
|
+
/*=====
|
14
|
+
return declare(_Module, {
|
15
|
+
// summary:
|
16
|
+
// Lock up some rows at the top of the grid body, so that they don't scroll vertically.
|
17
|
+
// description:
|
18
|
+
// This module is not compatible with VirtualVScroller.
|
19
|
+
|
20
|
+
lock: function(count){
|
21
|
+
// summary:
|
22
|
+
// TODOC
|
23
|
+
},
|
24
|
+
|
25
|
+
unlock: function(){
|
26
|
+
// summary:
|
27
|
+
// TODOC
|
28
|
+
}
|
29
|
+
});
|
30
|
+
=====*/
|
31
|
+
|
32
|
+
return declare(_Module, {
|
33
|
+
name: 'rowLock',
|
34
|
+
required: ['vLayout'],
|
35
|
+
forced: ['hLayout', 'body'],
|
36
|
+
count: 0,
|
37
|
+
load: function(args, deferStartup){
|
38
|
+
this.count = this.arg('count');
|
39
|
+
var _this = this,
|
40
|
+
g = this.grid;
|
41
|
+
|
42
|
+
deferStartup.then(function(){
|
43
|
+
|
44
|
+
if(_this.grid.vScroller)_this.connect(g.vScrollerNode, 'onscroll', function(){
|
45
|
+
_this._updatePosition();
|
46
|
+
});
|
47
|
+
|
48
|
+
_this.lock(_this.count);
|
49
|
+
_this.loaded.callback();
|
50
|
+
});
|
51
|
+
aspect.before(g.body, 'refresh', function(){
|
52
|
+
_this.grid.bodyNode.style.paddingTop = '0px';
|
53
|
+
});
|
54
|
+
|
55
|
+
this.connect(g.body, 'refresh', function(){
|
56
|
+
//FIX ME
|
57
|
+
//the lock can't run before vscroll._doScroll()
|
58
|
+
_this.grid.bodyNode.style.paddingTop = '0px';
|
59
|
+
setTimeout(function(){
|
60
|
+
_this.lock(_this.count);
|
61
|
+
}, 0);
|
62
|
+
});
|
63
|
+
},
|
64
|
+
|
65
|
+
lock: function(count){
|
66
|
+
this.unlock();
|
67
|
+
this.count = count;
|
68
|
+
this._foreachLockedRows(function(node){
|
69
|
+
node.style.position = 'absolute';
|
70
|
+
domClass.add(node, 'gridxLockedRow');
|
71
|
+
}, function(rowHeaderNode){
|
72
|
+
rowHeaderNode.style.position = 'absolute';
|
73
|
+
});
|
74
|
+
|
75
|
+
this._adjustBody();
|
76
|
+
this._updatePosition();
|
77
|
+
},
|
78
|
+
|
79
|
+
unlock: function(){
|
80
|
+
this._foreachLockedRows(function(node){
|
81
|
+
node.style.position = 'static';
|
82
|
+
domClass.remove(node, 'gridxLockedRow');
|
83
|
+
}, function(rowHeaderNode){
|
84
|
+
rowHeaderNode.style.position = 'static';
|
85
|
+
});
|
86
|
+
this.grid.bodyNode.style.paddingTop = '0px';
|
87
|
+
if(this.grid.rowHeader){
|
88
|
+
this.grid.rowHeader.bodyNode.style.paddingTop = '0px';
|
89
|
+
}
|
90
|
+
this.count = 0;
|
91
|
+
|
92
|
+
},
|
93
|
+
|
94
|
+
_adjustBody: function(){
|
95
|
+
// summary:
|
96
|
+
// Called after content is changed or column width is resized, which
|
97
|
+
// may cause row height change of locked rows.
|
98
|
+
var h = 0;
|
99
|
+
this._foreachLockedRows(function(node){
|
100
|
+
h += node.offsetHeight;
|
101
|
+
}, function(rowHeaderNode){
|
102
|
+
|
103
|
+
});
|
104
|
+
this.grid.bodyNode.style.paddingTop = h + 'px';
|
105
|
+
if(this.grid.rowHeader){
|
106
|
+
this.grid.rowHeader.bodyNode.style.paddingTop = h + 'px';
|
107
|
+
}
|
108
|
+
},
|
109
|
+
|
110
|
+
_updatePosition: function(){
|
111
|
+
// summary:
|
112
|
+
// Update position of locked rows so that they look like locked.
|
113
|
+
if(!this.count){return;}
|
114
|
+
var t = this.grid.bodyNode.scrollTop, h = 0, _this = this;
|
115
|
+
this._foreachLockedRows(function(node){
|
116
|
+
node.style.top = t + h + 'px';
|
117
|
+
h += node.offsetHeight;
|
118
|
+
}, function(rowHeaderNode){
|
119
|
+
rowHeaderNode.style.top = t + h + 'px';
|
120
|
+
});
|
121
|
+
},
|
122
|
+
|
123
|
+
_foreachLockedRows: function(callback, rowHeaderCallback){
|
124
|
+
rowHeaderCallback = rowHeaderCallback? rowHeaderCallback : callback;
|
125
|
+
var nodes = this.grid.bodyNode.childNodes;
|
126
|
+
var rowHeaderNodes = this.grid.rowHeader? this.grid.rowHeader.bodyNode.childNodes : [];
|
127
|
+
for(var i = 0; i < this.count; i++){
|
128
|
+
if(rowHeaderNodes[i]){
|
129
|
+
rowHeaderCallback(rowHeaderNodes[i]);
|
130
|
+
}
|
131
|
+
if(nodes[i]){
|
132
|
+
callback(nodes[i]);
|
133
|
+
}
|
134
|
+
}
|
135
|
+
},
|
136
|
+
|
137
|
+
_restoreLock: function(){
|
138
|
+
console.log('restore lock')
|
139
|
+
this.lock(this.count);
|
140
|
+
}
|
141
|
+
|
142
|
+
});
|
143
|
+
});
|