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,223 @@
|
|
1
|
+
define([
|
2
|
+
/*====="../../core/Column", =====*/
|
3
|
+
"dojo/_base/declare",
|
4
|
+
"dojo/query",
|
5
|
+
"dojo/_base/array",
|
6
|
+
"dojo/keys",
|
7
|
+
"../../core/_Module"
|
8
|
+
], function(/*=====Column, =====*/declare, query, array, keys, _Module){
|
9
|
+
|
10
|
+
/*=====
|
11
|
+
Column.moveTo = function(target){
|
12
|
+
// summary:
|
13
|
+
// Move this column to the position before the column with index "target"
|
14
|
+
// target: Integer
|
15
|
+
// The target index
|
16
|
+
};
|
17
|
+
|
18
|
+
return declare(_Module, {
|
19
|
+
// summary:
|
20
|
+
// This module provides several APIs to move columns within grid.
|
21
|
+
// description:
|
22
|
+
// This module does not include any UI. So different kind of column dnd UI implementations can be built
|
23
|
+
// upon this module.
|
24
|
+
// But this module does provide a keyboard support for reordering columns. When focus is on a column header,
|
25
|
+
// pressing CTRL+LEFT/RIGHT ARROW will move the column around within grid.
|
26
|
+
|
27
|
+
// moveSelected: Boolean
|
28
|
+
// When moving using keyboard, whether to move all selected columns together.
|
29
|
+
moveSelected: true,
|
30
|
+
|
31
|
+
// constraints: Hash-Object
|
32
|
+
// Define several constraint ranges. Columns within these ranges can not be moved out of the range.
|
33
|
+
// Columns outside these ranges can not be moved into these ranges.
|
34
|
+
// Hash key is the starting column index, value is the end column index.
|
35
|
+
// End index should be always larger than start index.
|
36
|
+
// For example: { 0: 3 } means the first 4 columns can only be moved within themselves,
|
37
|
+
// they can not be moved out and other columns can not be moved in.
|
38
|
+
constraints: Object,
|
39
|
+
|
40
|
+
move: function(columnIndexes, target){
|
41
|
+
// summary:
|
42
|
+
// Move some columns to the given target position
|
43
|
+
// columnIndexes: Integer[]
|
44
|
+
// The current indexes of columns to move
|
45
|
+
// target: Integer
|
46
|
+
// The moved columns will be inserted before the column with this index.
|
47
|
+
},
|
48
|
+
|
49
|
+
moveRange: function(start, count, target){
|
50
|
+
// summary:
|
51
|
+
// Move a range of columns to a given target position
|
52
|
+
// start: Integer
|
53
|
+
// The index of the first column to move
|
54
|
+
// count: Integer
|
55
|
+
// The count of columns to move
|
56
|
+
},
|
57
|
+
|
58
|
+
onMoved: function(){
|
59
|
+
// summary:
|
60
|
+
// Fired when column move is performed successfully
|
61
|
+
// tags:
|
62
|
+
// callback
|
63
|
+
}
|
64
|
+
});
|
65
|
+
=====*/
|
66
|
+
|
67
|
+
return declare(_Module, {
|
68
|
+
name: 'moveColumn',
|
69
|
+
|
70
|
+
getAPIPath: function(){
|
71
|
+
return {
|
72
|
+
move: {
|
73
|
+
column: this
|
74
|
+
}
|
75
|
+
};
|
76
|
+
},
|
77
|
+
|
78
|
+
preload: function(){
|
79
|
+
this.aspect(this.grid, 'onHeaderCellKeyDown', '_onKeyDown');
|
80
|
+
},
|
81
|
+
|
82
|
+
columnMixin: {
|
83
|
+
moveTo: function(target){
|
84
|
+
this.grid.move.column.moveRange(this.index(), 1, target);
|
85
|
+
return this;
|
86
|
+
}
|
87
|
+
},
|
88
|
+
|
89
|
+
//public---------------------------------------------------------------
|
90
|
+
moveSelected: true,
|
91
|
+
|
92
|
+
//constraints: null,
|
93
|
+
|
94
|
+
_isInConstraints: function(idx, target){
|
95
|
+
var c = this.arg('constraints', {}),
|
96
|
+
outRange = function(a, b, start){
|
97
|
+
return idx >= start && idx <= c[start] && (target < start || target > c[start] + 1);
|
98
|
+
};
|
99
|
+
for(var start in c){
|
100
|
+
if(outRange(idx, target, start) || outRange(target, idx, start)){
|
101
|
+
return 0;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
return 1;
|
105
|
+
},
|
106
|
+
|
107
|
+
move: function(columnIndexes, target){
|
108
|
+
if(typeof columnIndexes === 'number'){
|
109
|
+
columnIndexes = [columnIndexes];
|
110
|
+
}
|
111
|
+
var map = [], i, len, columns = this.grid._columns, pos, movedCols = [];
|
112
|
+
for(i = 0, len = columnIndexes.length; i < len; ++i){
|
113
|
+
if(this._isInConstraints(columnIndexes[i], target)){
|
114
|
+
map[columnIndexes[i]] = true;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
for(i = map.length - 1; i >= 0; --i){
|
118
|
+
if(map[i]){
|
119
|
+
movedCols.unshift(columns[i]);
|
120
|
+
columns.splice(i, 1);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
for(i = 0, len = columns.length; i < len; ++i){
|
124
|
+
if(columns[i].index >= target){
|
125
|
+
pos = i;
|
126
|
+
break;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
if(pos === undefined){
|
130
|
+
pos = columns.length;
|
131
|
+
}
|
132
|
+
this._moveComplete(movedCols, pos);
|
133
|
+
},
|
134
|
+
|
135
|
+
moveRange: function(start, count, target){
|
136
|
+
if(target < start || target > start + count){
|
137
|
+
var colsToMove = [];
|
138
|
+
for(var i = 0; i < count; ++i){
|
139
|
+
if(this._isInConstraints(start + i, target)){
|
140
|
+
colsToMove.push(start + i);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
this.move(colsToMove, target);
|
144
|
+
}
|
145
|
+
},
|
146
|
+
|
147
|
+
//Events--------------------------------------------------------------------
|
148
|
+
onMoved: function(){},
|
149
|
+
|
150
|
+
//Private-------------------------------------------------------------------
|
151
|
+
_moveComplete: function(movedCols, target){
|
152
|
+
var g = this.grid,
|
153
|
+
map = {},
|
154
|
+
columns = g._columns,
|
155
|
+
i, movedColIds = {},
|
156
|
+
targetId = target < columns.length ? columns[target].id : null,
|
157
|
+
update = function(tr){
|
158
|
+
var cells = query('> .gridxCell', tr).filter(function(cellNode){
|
159
|
+
return movedColIds[cellNode.getAttribute('colid')];
|
160
|
+
});
|
161
|
+
if(targetId === null){
|
162
|
+
cells.place(tr);
|
163
|
+
}else{
|
164
|
+
var nextNode = query('> [colid="' + g._escapeId(targetId) + '"]', tr)[0];
|
165
|
+
if(nextNode){
|
166
|
+
cells.place(nextNode, 'before');
|
167
|
+
}else if(target > 0){
|
168
|
+
var tid = columns[target - 1].id;
|
169
|
+
var prevNode = query('> [colid="' + g._escapeId(tid) + '"]', tr)[0];
|
170
|
+
if(prevNode){
|
171
|
+
cells.place(prevNode, 'after');
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
};
|
176
|
+
for(i = movedCols.length - 1; i >= 0; --i){
|
177
|
+
map[movedCols[i].index] = target + i;
|
178
|
+
movedColIds[movedCols[i].id] = 1;
|
179
|
+
}
|
180
|
+
[].splice.apply(columns, [target, 0].concat(movedCols));
|
181
|
+
for(i = columns.length - 1; i >= 0; --i){
|
182
|
+
columns[i].index = i;
|
183
|
+
}
|
184
|
+
query('.gridxHeaderRowInner > table > tbody > tr', g.headerNode).forEach(update);
|
185
|
+
query('.gridxRow > table > tbody > tr', g.bodyNode).forEach(update);
|
186
|
+
this.onMoved(map);
|
187
|
+
},
|
188
|
+
|
189
|
+
_onKeyDown: function(e){
|
190
|
+
var t = this,
|
191
|
+
g = t.grid,
|
192
|
+
selector = t.arg('moveSelected') && g.select && g.select.column,
|
193
|
+
ltr = g.isLeftToRight(),
|
194
|
+
preKey = ltr ? keys.LEFT_ARROW : keys.RIGHT_ARROW,
|
195
|
+
postKey = ltr ? keys.RIGHT_ARROW : keys.LEFT_ARROW;
|
196
|
+
if(e.ctrlKey && !e.shiftKey && !e.altKey && (e.keyCode == preKey || e.keyCode == postKey)){
|
197
|
+
var target = e.columnIndex,
|
198
|
+
colIdxes = selector && selector.isSelected(e.columnId) ?
|
199
|
+
array.map(selector.getSelected(), function(id){
|
200
|
+
return g._columnsById[id].index;
|
201
|
+
}) : [e.columnIndex],
|
202
|
+
node = g.header.getHeaderNode(e.columnId);
|
203
|
+
if(e.keyCode == preKey){
|
204
|
+
while(array.indexOf(colIdxes, target) >= 0){
|
205
|
+
target--;
|
206
|
+
}
|
207
|
+
if(target >= 0){
|
208
|
+
t.move(colIdxes, target);
|
209
|
+
g.header._focusNode(node);
|
210
|
+
}
|
211
|
+
}else if(e.keyCode == postKey){
|
212
|
+
while(array.indexOf(colIdxes, target) >= 0){
|
213
|
+
target++;
|
214
|
+
}
|
215
|
+
if(target < g._columns.length){
|
216
|
+
t.move(colIdxes, target + 1);
|
217
|
+
g.header._focusNode(node);
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
});
|
223
|
+
});
|
@@ -0,0 +1,154 @@
|
|
1
|
+
define([
|
2
|
+
/*====="../../core/Row", =====*/
|
3
|
+
"dojo/_base/declare",
|
4
|
+
"dojo/_base/array",
|
5
|
+
"dojo/keys",
|
6
|
+
"../../core/_Module",
|
7
|
+
"../../core/model/extensions/Move"
|
8
|
+
], function(/*=====Row, =====*/declare, array, keys, _Module, Move){
|
9
|
+
|
10
|
+
/*=====
|
11
|
+
Row.moveTo = function(target, skipUpdateBody){
|
12
|
+
};
|
13
|
+
|
14
|
+
return declare(_Module, {
|
15
|
+
// summary:
|
16
|
+
// This module provides some APIs to move rows within grid
|
17
|
+
// description:
|
18
|
+
// This module requires the "Move" model extension.
|
19
|
+
// This module does not include any UI. So different kind of row dnd UI implementations can be built
|
20
|
+
// upon this module.
|
21
|
+
// But this module does provide a keyboard support for reordering rows. When focus is on a row,
|
22
|
+
// pressing CTRL+UP/DOWN ARROW will move the row around within grid.
|
23
|
+
// This module uses gridx/core/model/extensions/Move.
|
24
|
+
|
25
|
+
// moveSelected: Boolean
|
26
|
+
// When moving using keyboard, whether to move all selected rows together.
|
27
|
+
moveSelected: true,
|
28
|
+
|
29
|
+
move: function(rowIndexes, target, skipUpdateBody){
|
30
|
+
// summary:
|
31
|
+
// Move some rows to target position
|
32
|
+
// rowIndexes: Integer[]
|
33
|
+
// An array of row indexes
|
34
|
+
// target: Integer
|
35
|
+
// The rows will be moved to the position before the target row
|
36
|
+
// skipUpdateBody: Boolean?
|
37
|
+
// If set to true, the grid will not refresh immediately, so that several
|
38
|
+
// grid operations can be done altogether.
|
39
|
+
},
|
40
|
+
|
41
|
+
moveRange: function(start, count, target, skipUpdateBody){
|
42
|
+
// summary:
|
43
|
+
// Move a range of rows to target position
|
44
|
+
// start: Integer
|
45
|
+
// The index of the first row to be moved
|
46
|
+
// count: Integer
|
47
|
+
// The count of rows to be moved
|
48
|
+
// skipUpdateBody: Boolean?
|
49
|
+
//
|
50
|
+
},
|
51
|
+
|
52
|
+
onMoved: function(rowIndexMapping){
|
53
|
+
// summary:
|
54
|
+
// Fired when row move is performed successfully
|
55
|
+
// tags:
|
56
|
+
// callback
|
57
|
+
}
|
58
|
+
});
|
59
|
+
=====*/
|
60
|
+
|
61
|
+
return declare(_Module, {
|
62
|
+
name: 'moveRow',
|
63
|
+
|
64
|
+
modelExtensions: [Move],
|
65
|
+
|
66
|
+
constructor: function(){
|
67
|
+
this.connect(this.model, 'onMoved', '_onMoved');
|
68
|
+
},
|
69
|
+
|
70
|
+
getAPIPath: function(){
|
71
|
+
return {
|
72
|
+
move: {
|
73
|
+
row: this
|
74
|
+
}
|
75
|
+
};
|
76
|
+
},
|
77
|
+
|
78
|
+
preload: function(){
|
79
|
+
this.aspect(this.grid, 'onRowKeyDown', '_onKeyDown');
|
80
|
+
},
|
81
|
+
|
82
|
+
rowMixin: {
|
83
|
+
moveTo: function(target, skipUpdateBody){
|
84
|
+
this.grid.move.row.move([this.index()], target, skipUpdateBody);
|
85
|
+
return this;
|
86
|
+
}
|
87
|
+
},
|
88
|
+
|
89
|
+
//Public-----------------------------------------------------------------
|
90
|
+
moveSelected: true,
|
91
|
+
|
92
|
+
move: function(rowIndexes, target, skipUpdateBody){
|
93
|
+
var m = this.model;
|
94
|
+
m.moveIndexes(rowIndexes, target);
|
95
|
+
if(!skipUpdateBody){
|
96
|
+
m.when();
|
97
|
+
}
|
98
|
+
},
|
99
|
+
|
100
|
+
moveRange: function(start, count, target, skipUpdateBody){
|
101
|
+
var m = this.model;
|
102
|
+
m.move(start, count, target);
|
103
|
+
if(!skipUpdateBody){
|
104
|
+
m.when();
|
105
|
+
}
|
106
|
+
},
|
107
|
+
|
108
|
+
//Events------------------------------------------------------------------
|
109
|
+
onMoved: function(/* rowIndexMapping */){},
|
110
|
+
|
111
|
+
//Private-----------------------------------------------------------------
|
112
|
+
_onMoved: function(){
|
113
|
+
this.grid.body.refresh();
|
114
|
+
this.onMoved();
|
115
|
+
},
|
116
|
+
|
117
|
+
_onKeyDown: function(e){
|
118
|
+
var t = this,
|
119
|
+
g = t.grid,
|
120
|
+
selector = g.select && g.select.row;
|
121
|
+
if(e.ctrlKey && !e.shiftKey && !e.altKey && (e.keyCode == keys.UP_ARROW || e.keyCode == keys.DOWN_ARROW)){
|
122
|
+
var target = e.rowIndex,
|
123
|
+
doMove = function(rowIdxes){
|
124
|
+
if(e.keyCode == keys.UP_ARROW){
|
125
|
+
while(array.indexOf(rowIdxes, target) >= 0){
|
126
|
+
target--;
|
127
|
+
}
|
128
|
+
if(target >= 0){
|
129
|
+
t.move(rowIdxes, target);
|
130
|
+
}
|
131
|
+
}else{
|
132
|
+
while(array.indexOf(rowIdxes, target) >= 0){
|
133
|
+
target++;
|
134
|
+
}
|
135
|
+
if(target < g.view.rootStart + g.view.rootCount){
|
136
|
+
t.move(rowIdxes, target + 1);
|
137
|
+
}
|
138
|
+
}
|
139
|
+
};
|
140
|
+
if(t.arg('moveSelected') && selector && selector.isSelected(e.rowId)){
|
141
|
+
var selected = selector.getSelected();
|
142
|
+
g.model.when({id: selected}, function(){
|
143
|
+
var rowIdxes = array.map(selected, function(id){
|
144
|
+
return g.model.idToIndex(id);
|
145
|
+
});
|
146
|
+
doMove(rowIdxes);
|
147
|
+
});
|
148
|
+
}else{
|
149
|
+
doMove([g.model.idToIndex(e.rowId)]);
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
});
|
154
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
define([
|
2
|
+
/*====='dojo/_base/declare',=====*/
|
3
|
+
'dojo/_base/kernel',
|
4
|
+
'../Pagination'
|
5
|
+
], function(/*=====declare, =====*/kernel, Pagination){
|
6
|
+
kernel.deprecated('Pagination is moved from gridx/modules/pagination/Pagination to gridx/modules/Pagination.', 'Use the new path instead.', '1.3');
|
7
|
+
|
8
|
+
/*=====
|
9
|
+
return declare([], {
|
10
|
+
// summary:
|
11
|
+
// Moved to gridx/modules/Pagination. This path is deprecated.
|
12
|
+
});
|
13
|
+
=====*/
|
14
|
+
|
15
|
+
return Pagination;
|
16
|
+
});
|
@@ -0,0 +1,68 @@
|
|
1
|
+
define([
|
2
|
+
'dojo/_base/declare',
|
3
|
+
'dojo/dom-class',
|
4
|
+
'./_PaginationBarBase',
|
5
|
+
'../../support/LinkPager',
|
6
|
+
'../../support/LinkSizer',
|
7
|
+
'../../support/GotoPageButton'
|
8
|
+
], function(declare, domClass, _PaginationBarBase, LinkPager, LinkSizer, GotoPageButton){
|
9
|
+
|
10
|
+
/*=====
|
11
|
+
return declare(_PaginationBarBase, {
|
12
|
+
// summary:
|
13
|
+
// Show link button pagination bar at the bottom of grid.
|
14
|
+
// description:
|
15
|
+
// This module directly uses gridx/modules/Bar to show gridx/support/Summary, gridx/support/LinkPager, gridx/support/LinkSizer,
|
16
|
+
// and gridx/support/GotoPageButton.
|
17
|
+
// This module depends on "bar" and "pagination" modules.
|
18
|
+
|
19
|
+
// visibleSteppers: Integer
|
20
|
+
visibleSteppers: 3,
|
21
|
+
|
22
|
+
// sizeSeparator: String
|
23
|
+
sizeSeparator: '|',
|
24
|
+
|
25
|
+
// gotoButton: Boolean|String
|
26
|
+
gotoButton: true
|
27
|
+
});
|
28
|
+
=====*/
|
29
|
+
|
30
|
+
return declare(_PaginationBarBase, {
|
31
|
+
visibleSteppers: 3,
|
32
|
+
|
33
|
+
sizeSeparator: '|',
|
34
|
+
|
35
|
+
gotoButton: true,
|
36
|
+
|
37
|
+
_init: function(pos){
|
38
|
+
var t = this,
|
39
|
+
gotoBtnProt = GotoPageButton.prototype;
|
40
|
+
t._add(LinkPager, 1, pos, 'stepper', {
|
41
|
+
className: 'gridxPagerStepperTD',
|
42
|
+
visibleSteppers: t.arg('visibleSteppers')
|
43
|
+
});
|
44
|
+
t._add(LinkSizer, 2, pos, 'sizeSwitch', {
|
45
|
+
className: 'gridxPagerSizeSwitchTD',
|
46
|
+
sizes: t.arg('sizes'),
|
47
|
+
sizeSeparator: t.arg('sizeSeparator')
|
48
|
+
});
|
49
|
+
t._add(GotoPageButton, 3, pos, 'gotoButton', {
|
50
|
+
className: 'gridxPagerGoto',
|
51
|
+
dialogClass: t.arg('dialogClass') || gotoBtnProt.dialogClass,
|
52
|
+
dialogProps: t.arg('dialogProps') || gotoBtnProt.dialogProps,
|
53
|
+
buttonClass: t.arg('buttonClass') || gotoBtnProt.buttonClass,
|
54
|
+
numberTextBoxClass: t.arg('numberTextBoxClass') || gotoBtnProt.numberTextBoxClass
|
55
|
+
});
|
56
|
+
},
|
57
|
+
|
58
|
+
_refresh: function(bar, pos){
|
59
|
+
var t = this;
|
60
|
+
domClass.toggle(bar[1].domNode, 'dijitHidden', !t._exist(pos, 'stepper'));
|
61
|
+
domClass.toggle(bar[2].domNode, 'dijitHidden', !t._exist(pos, 'sizeSwitch'));
|
62
|
+
domClass.toggle(bar[3].domNode.parentNode, 'dijitHidden', !t._exist(pos, 'gotoButton'));
|
63
|
+
bar[1].visibleSteppers = t.arg('visibleSteppers');
|
64
|
+
bar[2].sizes = t.arg('sizes');
|
65
|
+
bar[2].sizeSeparator = t.arg('sizeSeparator');
|
66
|
+
}
|
67
|
+
});
|
68
|
+
});
|
@@ -0,0 +1,40 @@
|
|
1
|
+
define([
|
2
|
+
'dojo/_base/declare',
|
3
|
+
'dojo/dom-class',
|
4
|
+
'./_PaginationBarBase',
|
5
|
+
'../../support/DropDownPager',
|
6
|
+
'../../support/DropDownSizer'
|
7
|
+
], function(declare, domClass, _PaginationBarBase, DropDownPager, DropDownSizer){
|
8
|
+
|
9
|
+
/*=====
|
10
|
+
return declare(_PaginationBarBase, {
|
11
|
+
});
|
12
|
+
=====*/
|
13
|
+
|
14
|
+
return declare(_PaginationBarBase, {
|
15
|
+
_init: function(pos){
|
16
|
+
var t = this,
|
17
|
+
pagerProt = DropDownPager.prototype,
|
18
|
+
sizerProt = DropDownSizer.prototype;
|
19
|
+
t._add(DropDownPager, 1, pos, 'stepper', {
|
20
|
+
className: 'gridxPagerStepperTD',
|
21
|
+
visibleSteppers: t.arg('visibleSteppers'),
|
22
|
+
stepperClass: t.arg('stepperClass') || pagerProt.stepperClass,
|
23
|
+
stepperProps: t.arg('stepperProps') || pagerProt.stepperProps
|
24
|
+
});
|
25
|
+
t._add(DropDownSizer, 2, pos, 'sizeSwitch', {
|
26
|
+
className: 'gridxPagerSizeSwitchTD',
|
27
|
+
sizes: t.arg('sizes'),
|
28
|
+
sizeSeparator: t.arg('sizeSeparator'),
|
29
|
+
sizerClass: t.arg('sizerClass') || sizerProt.sizerClass,
|
30
|
+
sizerProps: t.arg('sizerProps') || sizerProt.sizerProps
|
31
|
+
});
|
32
|
+
},
|
33
|
+
|
34
|
+
_refresh: function(bar, pos){
|
35
|
+
domClass.toggle(bar[1].domNode, 'dijitHidden', !this._exist(pos, 'stepper'));
|
36
|
+
domClass.toggle(bar[2].domNode, 'dijitHidden', !this._exist(pos, 'sizeSwitch'));
|
37
|
+
bar[2].sizes = this.arg('sizes');
|
38
|
+
}
|
39
|
+
});
|
40
|
+
});
|
@@ -0,0 +1,105 @@
|
|
1
|
+
define([
|
2
|
+
'dojo/_base/declare',
|
3
|
+
'dojo/_base/lang',
|
4
|
+
'dojo/dom-class',
|
5
|
+
'../../core/_Module',
|
6
|
+
'../../support/Summary',
|
7
|
+
'../Bar'
|
8
|
+
], function(declare, lang, domClass, _Module, Summary){
|
9
|
+
|
10
|
+
/*=====
|
11
|
+
return declare(_Module, {
|
12
|
+
// sizes: Integer[]
|
13
|
+
sizes: [10, 25, 50, 0],
|
14
|
+
|
15
|
+
// position: String
|
16
|
+
// The position of the pagination bar, can be "bottom" (default), "top" or "both" (any other value means "both")
|
17
|
+
position: 'bottom',
|
18
|
+
|
19
|
+
// description: Boolean|String
|
20
|
+
// Whether (and where) to show "description" part of the pagination bar UI.
|
21
|
+
// Can be true/false, or "bottom", or "top"
|
22
|
+
description: true,
|
23
|
+
|
24
|
+
// stepper: Boolean|String
|
25
|
+
// Whether (and where) to show "page stepper" part of the pagination bar UI.
|
26
|
+
// Can be true/false, or "bottom", or "top"
|
27
|
+
stepper: true,
|
28
|
+
|
29
|
+
// sizeSwith: Boolean|String
|
30
|
+
// Whether (and where) to show "page size switcher" part of the pagination bar UI.
|
31
|
+
// Can be true/false, or "bottom", or "top"
|
32
|
+
sizeSwitch: true,
|
33
|
+
|
34
|
+
refresh: function(){
|
35
|
+
// summary:
|
36
|
+
// Redraw the pagination bar using corrent parameters.
|
37
|
+
}
|
38
|
+
});
|
39
|
+
=====*/
|
40
|
+
|
41
|
+
return declare(_Module, {
|
42
|
+
name: 'paginationBar',
|
43
|
+
|
44
|
+
required: ['bar', 'pagination'],
|
45
|
+
|
46
|
+
sizes: [10, 25, 50, 0],
|
47
|
+
|
48
|
+
position: 'bottom',
|
49
|
+
|
50
|
+
description: true,
|
51
|
+
|
52
|
+
stepper: true,
|
53
|
+
|
54
|
+
sizeSwitch: true,
|
55
|
+
|
56
|
+
preload: function(){
|
57
|
+
for(var t = this, i = 0, positions = ['top', 'bottom']; i < positions.length; ++i){
|
58
|
+
var pos = positions[i];
|
59
|
+
if(t._exist(pos)){
|
60
|
+
t._add(Summary, 0, pos, 'description', {
|
61
|
+
className: 'gridxPagerDescriptionTD'
|
62
|
+
});
|
63
|
+
t._init(pos);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
},
|
67
|
+
|
68
|
+
refresh: function(){
|
69
|
+
var t = this,
|
70
|
+
bar = t.grid.bar,
|
71
|
+
update = function(bar, pos){
|
72
|
+
if(bar){
|
73
|
+
bar = bar[0];
|
74
|
+
domClass.toggle(bar[0].domNode, 'dijitHidden', !t._exist(pos, 'description'));
|
75
|
+
t._refresh(bar, pos);
|
76
|
+
for(var i = 0; i < bar.length; ++i){
|
77
|
+
bar[i].refresh();
|
78
|
+
}
|
79
|
+
}
|
80
|
+
};
|
81
|
+
update(bar.plugins.pagingtop, 'top');
|
82
|
+
update(bar.plugins.pagingbottom, 'bottom');
|
83
|
+
},
|
84
|
+
|
85
|
+
//Private--------------------------------------------------------------------------
|
86
|
+
_add: function(plugin, col, bar, name, args){
|
87
|
+
this.grid.bar.defs.push(lang.mixin({
|
88
|
+
bar: 'paging' + bar,
|
89
|
+
priority: bar == 'top' ? -1 : 2,
|
90
|
+
container: bar == 'top' ? 'headerNode' : 'footerNode',
|
91
|
+
barClass: 'gridxPaginationBar',
|
92
|
+
row: 0,
|
93
|
+
col: col,
|
94
|
+
'class': this._exist(bar, name) ? '' : 'dijitHidden',
|
95
|
+
pluginClass: plugin
|
96
|
+
}, args));
|
97
|
+
},
|
98
|
+
|
99
|
+
_exist: function(pos, argName){
|
100
|
+
var v = this.arg(argName || 'position');
|
101
|
+
v = v && String(v).toLowerCase();
|
102
|
+
return v && ((v != 'top' && v != 'bottom') || v == pos);
|
103
|
+
}
|
104
|
+
});
|
105
|
+
});
|