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,210 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/declare",
|
3
|
+
"dojo/_base/array",
|
4
|
+
"dojo/dom-geometry",
|
5
|
+
"dojo/dom-class",
|
6
|
+
"dojo/query",
|
7
|
+
"./_Base",
|
8
|
+
"../../core/_Module"
|
9
|
+
], function(declare, array, domGeometry, domClass, query, _Base, _Module){
|
10
|
+
|
11
|
+
/*=====
|
12
|
+
return declare(_Base, {
|
13
|
+
// summary:
|
14
|
+
// This module provides an implementation of column drag & drop.
|
15
|
+
// description:
|
16
|
+
// This module supports column reordering within grid, dragging out of grid, and dragging into grid.
|
17
|
+
// This module depends on "_dnd", "selectColumn" and "moveColumn" modules.
|
18
|
+
|
19
|
+
// accept: String[]
|
20
|
+
// Can drag in what kind of stuff
|
21
|
+
// For now can not drag in any columns.
|
22
|
+
accept: [],
|
23
|
+
|
24
|
+
// provide: String[]
|
25
|
+
// Can drag out what kind of stuff
|
26
|
+
provide: []
|
27
|
+
});
|
28
|
+
=====*/
|
29
|
+
|
30
|
+
return declare(_Base, {
|
31
|
+
name: 'dndColumn',
|
32
|
+
|
33
|
+
required: ['_dnd', 'selectColumn', 'moveColumn'],
|
34
|
+
|
35
|
+
getAPIPath: function(){
|
36
|
+
return {
|
37
|
+
dnd: {
|
38
|
+
column: this
|
39
|
+
}
|
40
|
+
};
|
41
|
+
},
|
42
|
+
|
43
|
+
preload: function(){
|
44
|
+
var t = this,
|
45
|
+
g = t.grid;
|
46
|
+
t.inherited(arguments);
|
47
|
+
t._selector = g.select.column;
|
48
|
+
t.connect(g.header, 'onRender', '_initHeader');
|
49
|
+
},
|
50
|
+
|
51
|
+
load: function(){
|
52
|
+
this._initHeader();
|
53
|
+
this.loaded.callback();
|
54
|
+
},
|
55
|
+
|
56
|
+
//Public---------------------------------------------------------------------------------------
|
57
|
+
accept: [],
|
58
|
+
|
59
|
+
provide: ['grid/columns'],
|
60
|
+
|
61
|
+
//Package--------------------------------------------------------------------------------------
|
62
|
+
_checkDndReady: function(evt){
|
63
|
+
var t = this;
|
64
|
+
if(t._selector.isSelected(evt.columnId)){
|
65
|
+
t._selectedColIds = t._selector.getSelected();
|
66
|
+
t.grid.dnd._dnd.profile = t;
|
67
|
+
return true;
|
68
|
+
}
|
69
|
+
return false;
|
70
|
+
},
|
71
|
+
|
72
|
+
onDraggedOut: function(/*source*/){
|
73
|
+
//TODO: Support drag columns out (remove columns).
|
74
|
+
},
|
75
|
+
|
76
|
+
//Private--------------------------------------------------------------------------------------
|
77
|
+
_cssName: "Column",
|
78
|
+
|
79
|
+
_initHeader: function(){
|
80
|
+
query('.gridxCell', this.grid.header.domNode).attr('aria-grabbed', 'false');
|
81
|
+
},
|
82
|
+
|
83
|
+
_onBeginDnd: function(source){
|
84
|
+
var t = this;
|
85
|
+
source.delay = t.arg('delay');
|
86
|
+
array.forEach(t._selectedColIds, function(id){
|
87
|
+
query('[colid="' + t.grid._escapeId(id) + '"].gridxCell', t.grid.header.domNode).attr('aria-grabbed', 'true');
|
88
|
+
});
|
89
|
+
},
|
90
|
+
|
91
|
+
_getDndCount: function(){
|
92
|
+
return this._selectedColIds.length;
|
93
|
+
},
|
94
|
+
|
95
|
+
_onEndDnd: function(){
|
96
|
+
query('[aria-grabbed="true"].gridxCell', this.grid.header.domNode).attr('aria-grabbed', 'false');
|
97
|
+
},
|
98
|
+
|
99
|
+
_buildDndNodes: function(){
|
100
|
+
var gid = this.grid.id;
|
101
|
+
return array.map(this._selectedColIds, function(colId){
|
102
|
+
return ["<div id='", gid, "_dndcolumn_", colId, "' gridid='", gid, "' columnid='", colId, "'></div>"].join('');
|
103
|
+
}).join('');
|
104
|
+
},
|
105
|
+
|
106
|
+
_onBeginAutoScroll: function(){
|
107
|
+
var autoScroll = this.grid.autoScroll;
|
108
|
+
this._autoScrollV = autoScroll.vertical;
|
109
|
+
autoScroll.vertical = false;
|
110
|
+
},
|
111
|
+
|
112
|
+
_onEndAutoScroll: function(){
|
113
|
+
this.grid.autoScroll.vertical = this._autoScrollV;
|
114
|
+
},
|
115
|
+
|
116
|
+
_getItemData: function(id){
|
117
|
+
return id.substring((this.grid.id + '_dndcolumn_').length);
|
118
|
+
},
|
119
|
+
|
120
|
+
//---------------------------------------------------------------------------------------------
|
121
|
+
_calcTargetAnchorPos: function(evt, containerPos){
|
122
|
+
var node = evt.target,
|
123
|
+
t = this,
|
124
|
+
g = t.grid,
|
125
|
+
ltr = g.isLeftToRight(),
|
126
|
+
columns = g._columns,
|
127
|
+
ret = {
|
128
|
+
height: containerPos.h + "px",
|
129
|
+
width: '',
|
130
|
+
top: ''
|
131
|
+
},
|
132
|
+
escapeId = g._escapeId,
|
133
|
+
func = function(n){
|
134
|
+
var id = n.getAttribute('colid'),
|
135
|
+
index = g._columnsById[id].index,
|
136
|
+
first = n,
|
137
|
+
last = n,
|
138
|
+
firstIdx = index,
|
139
|
+
lastIdx = index;
|
140
|
+
if(t._selector.isSelected(id)){
|
141
|
+
firstIdx = index;
|
142
|
+
while(firstIdx > 0 && t._selector.isSelected(columns[firstIdx - 1].id)){
|
143
|
+
--firstIdx;
|
144
|
+
}
|
145
|
+
first = query(".gridxHeaderRow [colid='" + escapeId(columns[firstIdx].id) + "']", g.headerNode)[0];
|
146
|
+
lastIdx = index;
|
147
|
+
while(lastIdx < columns.length - 1 && t._selector.isSelected(columns[lastIdx + 1].id)){
|
148
|
+
++lastIdx;
|
149
|
+
}
|
150
|
+
last = query(".gridxHeaderRow [colid='" + escapeId(columns[lastIdx].id) + "']", g.headerNode)[0];
|
151
|
+
}
|
152
|
+
if(first && last){
|
153
|
+
var firstPos = domGeometry.position(first),
|
154
|
+
lastPos = domGeometry.position(last),
|
155
|
+
middle = (firstPos.x + lastPos.x + lastPos.w) / 2,
|
156
|
+
pre = evt.clientX < middle;
|
157
|
+
if(pre){
|
158
|
+
ret.left = (firstPos.x - containerPos.x - 1) + "px";
|
159
|
+
}else{
|
160
|
+
ret.left = (lastPos.x + lastPos.w - containerPos.x - 1) + "px";
|
161
|
+
}
|
162
|
+
t._target = pre ^ ltr ? lastIdx + 1 : firstIdx;
|
163
|
+
}else{
|
164
|
+
delete t._target;
|
165
|
+
}
|
166
|
+
return ret;
|
167
|
+
};
|
168
|
+
while(node){
|
169
|
+
if(domClass.contains(node, 'gridxCell')){
|
170
|
+
return func(node);
|
171
|
+
}
|
172
|
+
node = node.parentNode;
|
173
|
+
}
|
174
|
+
//For FF, when dragging from another grid, the evt.target is always grid.bodyNode!
|
175
|
+
// so have to get the cell node by position, which is relatively slow.
|
176
|
+
var rowNode = query(".gridxRow", g.bodyNode)[0],
|
177
|
+
rowPos = domGeometry.position(rowNode.firstChild);
|
178
|
+
if(rowPos.x + rowPos.w <= evt.clientX){
|
179
|
+
ret.left = (rowPos.x + rowPos.w - containerPos.x - 1) + 'px';
|
180
|
+
t._target = columns.length;
|
181
|
+
}else if(rowPos.x >= evt.clientX){
|
182
|
+
ret.left = (rowPos.x - containerPos.x - 1) + 'px';
|
183
|
+
t._target = 0;
|
184
|
+
}else if(query(".gridxCell", rowNode).some(function(cellNode){
|
185
|
+
var cellPos = domGeometry.position(cellNode);
|
186
|
+
if(cellPos.x <= evt.clientX && cellPos.x + cellPos.w >= evt.clientX){
|
187
|
+
node = cellNode;
|
188
|
+
return true;
|
189
|
+
}
|
190
|
+
})){
|
191
|
+
return func(node);
|
192
|
+
}
|
193
|
+
return ret;
|
194
|
+
},
|
195
|
+
|
196
|
+
_onDropInternal: function(nodes, copy){
|
197
|
+
var t = this;
|
198
|
+
if(t._target >= 0){
|
199
|
+
var indexes = array.map(t._selectedColIds, function(colId){
|
200
|
+
return t.grid._columnsById[colId].index;
|
201
|
+
});
|
202
|
+
t.grid.move.column.move(indexes, t._target);
|
203
|
+
}
|
204
|
+
},
|
205
|
+
|
206
|
+
_onDropExternal: function(/*source, nodes, copy*/){
|
207
|
+
//TODO: Support drag in columns from another grid or non-grid source
|
208
|
+
}
|
209
|
+
});
|
210
|
+
});
|
@@ -0,0 +1,286 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/declare",
|
3
|
+
"dojo/_base/array",
|
4
|
+
"dojo/_base/Deferred",
|
5
|
+
"dojo/_base/lang",
|
6
|
+
"dojo/dom-class",
|
7
|
+
"dojo/dom-geometry",
|
8
|
+
"dojo/_base/sniff",
|
9
|
+
"./_Base",
|
10
|
+
"../../core/_Module"
|
11
|
+
], function(declare, array, Deferred, lang, domClass, domGeometry, has, _Base, _Module){
|
12
|
+
|
13
|
+
/*=====
|
14
|
+
return declare(_Base, {
|
15
|
+
// summary:
|
16
|
+
// This module provides an implementation of row drag & drop.
|
17
|
+
// description:
|
18
|
+
// This module supports row reordering within grid, dragging out of grid, and dragging into grid.
|
19
|
+
// This module depends on "_dnd" and "moveRow" modules.
|
20
|
+
|
21
|
+
// accept: String[]
|
22
|
+
// Can drag in what kind of stuff
|
23
|
+
accept: [],
|
24
|
+
|
25
|
+
// provide: String[]
|
26
|
+
// Can drag out what kind of stuff
|
27
|
+
provide: []
|
28
|
+
});
|
29
|
+
=====*/
|
30
|
+
|
31
|
+
var hitch = lang.hitch,
|
32
|
+
forEach = array.forEach;
|
33
|
+
|
34
|
+
function getSourceData(source, nodes){
|
35
|
+
if(source.grid){
|
36
|
+
var d = new Deferred(),
|
37
|
+
success = hitch(d, d.callback),
|
38
|
+
fail = hitch(d, d.errback),
|
39
|
+
dataArr = [],
|
40
|
+
sg = source.grid,
|
41
|
+
rowIds = sg.dnd.row._selectedRowIds;
|
42
|
+
sg.model.when({id: rowIds}, function(){
|
43
|
+
forEach(rowIds, function(id){
|
44
|
+
var idx = sg.model.idToIndex(id),
|
45
|
+
row = sg.model.byId(id);
|
46
|
+
if(row){
|
47
|
+
dataArr.push(lang.clone(row.rawData));
|
48
|
+
}
|
49
|
+
});
|
50
|
+
}).then(function(){
|
51
|
+
success(dataArr);
|
52
|
+
}, fail);
|
53
|
+
return d;
|
54
|
+
}else{
|
55
|
+
return source.getGridDndRowData && source.getGridDndRowData(nodes) || [];
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
return declare(_Base, {
|
60
|
+
name: 'dndRow',
|
61
|
+
|
62
|
+
required: ['_dnd', 'moveRow'],
|
63
|
+
|
64
|
+
getAPIPath: function(){
|
65
|
+
return {
|
66
|
+
dnd: {
|
67
|
+
row: this
|
68
|
+
}
|
69
|
+
};
|
70
|
+
},
|
71
|
+
|
72
|
+
//Public---------------------------------------------------------------------------
|
73
|
+
accept: ['grid/rows'],
|
74
|
+
|
75
|
+
provide: ['grid/rows'],
|
76
|
+
|
77
|
+
onDraggedOut: function(targetSource){
|
78
|
+
var t = this,
|
79
|
+
targetAccept = [];
|
80
|
+
if(targetSource.grid){
|
81
|
+
targetAccept = targetSource.grid.dnd._dnd.profile.arg('accept');
|
82
|
+
}else{
|
83
|
+
for(var n in targetSource.accept){
|
84
|
+
targetAccept.push(n);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
if(!t.checkArg('copyWhenDragOut', targetAccept)){
|
88
|
+
var g = t.grid,
|
89
|
+
m = g.model,
|
90
|
+
s = g.store,
|
91
|
+
rowIds = t._selectedRowIds;
|
92
|
+
if(s.fetch){
|
93
|
+
var items = [];
|
94
|
+
g.model.when({id: rowIds}, function(){
|
95
|
+
forEach(rowIds, function(id){
|
96
|
+
var row = m.byId(id);
|
97
|
+
if(row){
|
98
|
+
items.push(row.item);
|
99
|
+
}
|
100
|
+
});
|
101
|
+
}).then(function(){
|
102
|
+
forEach(items, s.deleteItem, s);
|
103
|
+
s.save();
|
104
|
+
});
|
105
|
+
}else{
|
106
|
+
forEach(rowIds, s.remove, s);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
//Package-----------------------------------------------------------------------------------
|
112
|
+
_checkDndReady: function(evt){
|
113
|
+
var t = this, m = t.model;
|
114
|
+
if(!m.getMark || m.getMark(evt.rowId)){
|
115
|
+
t.grid.dnd._dnd.profile = t;
|
116
|
+
t._selectedRowIds = m.getMarkedIds ? m.getMarkedIds() : [evt.rowId];
|
117
|
+
return true;
|
118
|
+
}
|
119
|
+
return false;
|
120
|
+
},
|
121
|
+
|
122
|
+
//Private-----------------------------------------------------------------------------
|
123
|
+
_cssName: 'Row',
|
124
|
+
|
125
|
+
_onBeginDnd: function(source){
|
126
|
+
source.delay = this.arg('delay');
|
127
|
+
},
|
128
|
+
|
129
|
+
_getDndCount: function(){
|
130
|
+
return this._selectedRowIds.length;
|
131
|
+
},
|
132
|
+
|
133
|
+
_onEndDnd: function(){},
|
134
|
+
|
135
|
+
_buildDndNodes: function(){
|
136
|
+
var gid = this.grid.id;
|
137
|
+
return array.map(this._selectedRowIds, function(rowId){
|
138
|
+
return ["<div id='", gid, '_dndrow_', rowId, "' gridid='", gid, "' rowid='", rowId, "'></div>"].join('');
|
139
|
+
}).join('');
|
140
|
+
},
|
141
|
+
|
142
|
+
_onBeginAutoScroll: function(){
|
143
|
+
var autoScroll = this.grid.autoScroll;
|
144
|
+
this._autoScrollH = autoScroll.horizontal;
|
145
|
+
autoScroll.horizontal = false;
|
146
|
+
},
|
147
|
+
|
148
|
+
_onEndAutoScroll: function(){
|
149
|
+
this.grid.autoScroll.horizontal = this._autoScrollH;
|
150
|
+
},
|
151
|
+
|
152
|
+
_getItemData: function(id){
|
153
|
+
return id.substring((this.grid.id + '_dndrow_').length);
|
154
|
+
},
|
155
|
+
|
156
|
+
//----------------------------------------------------------------------------
|
157
|
+
_calcTargetAnchorPos: function(evt, containerPos){
|
158
|
+
var t = this,
|
159
|
+
node = evt.target,
|
160
|
+
view = t.grid.view,
|
161
|
+
ret = {
|
162
|
+
width: containerPos.w + "px",
|
163
|
+
height: '',
|
164
|
+
left: ''
|
165
|
+
},
|
166
|
+
isSelected = function(n){
|
167
|
+
return t.model.getMark && t.model.getMark(n.getAttribute('rowid'));
|
168
|
+
},
|
169
|
+
getVIdx = function(n){
|
170
|
+
return parseInt(n.getAttribute('visualindex'), 10);
|
171
|
+
},
|
172
|
+
calcPos = function(node){
|
173
|
+
var n = node, first = n, last = n;
|
174
|
+
if(isSelected(n)){
|
175
|
+
var prenode = n.previousSibling;
|
176
|
+
while(prenode && isSelected(prenode)){
|
177
|
+
n = prenode;
|
178
|
+
prenode = prenode.previousSibling;
|
179
|
+
}
|
180
|
+
first = n;
|
181
|
+
n = node;
|
182
|
+
var nextnode = n.nextSibling;
|
183
|
+
while(nextnode && isSelected(nextnode)){
|
184
|
+
n = nextnode;
|
185
|
+
nextnode = nextnode.nextSibling;
|
186
|
+
}
|
187
|
+
last = n;
|
188
|
+
}
|
189
|
+
if(first && last){
|
190
|
+
var firstPos = domGeometry.position(first),
|
191
|
+
lastPos = domGeometry.position(last),
|
192
|
+
middle = (firstPos.y + lastPos.y + lastPos.h) / 2;
|
193
|
+
if(evt.clientY < middle){
|
194
|
+
t._target = getVIdx(first);
|
195
|
+
ret.top = (firstPos.y - containerPos.y) + "px";
|
196
|
+
}else{
|
197
|
+
t._target = getVIdx(last) + 1;
|
198
|
+
ret.top = (lastPos.y + lastPos.h - containerPos.y) + "px";
|
199
|
+
}
|
200
|
+
}else{
|
201
|
+
delete t._target;
|
202
|
+
}
|
203
|
+
return ret;
|
204
|
+
};
|
205
|
+
if(!has('ff')){
|
206
|
+
//In FF, this conflicts with the overflow:hidden css rule for grid row DIV, which is required by ColumnLock.
|
207
|
+
while(node){
|
208
|
+
if(domClass.contains(node, 'gridxRow')){
|
209
|
+
return calcPos(node);
|
210
|
+
}
|
211
|
+
node = node.parentNode;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
var bn = t.grid.bodyNode,
|
215
|
+
nodes = bn.childNodes;
|
216
|
+
if(!nodes.length){
|
217
|
+
ret.top = '0px';
|
218
|
+
t._target = 0;
|
219
|
+
}else{
|
220
|
+
node = bn.firstChild;
|
221
|
+
var idx = getVIdx(node),
|
222
|
+
pos = domGeometry.position(node);
|
223
|
+
if(idx === 0 && evt.clientY <= pos.y + pos.h){
|
224
|
+
ret.top = (pos.y - containerPos.y) + 'px';
|
225
|
+
t._target = 0;
|
226
|
+
}else{
|
227
|
+
node = bn.lastChild;
|
228
|
+
idx = getVIdx(node);
|
229
|
+
pos = domGeometry.position(node);
|
230
|
+
if(idx === view.visualCount - 1 && evt.clientY > pos.y + pos.h){
|
231
|
+
ret.top = (pos.y + pos.h - containerPos.y) + 'px';
|
232
|
+
t._target = view.visualCount;
|
233
|
+
}else{
|
234
|
+
var rowFound = array.some(nodes, function(rowNode){
|
235
|
+
pos = domGeometry.position(rowNode);
|
236
|
+
if(pos.y <= evt.clientY && pos.y + pos.h >= evt.clientY){
|
237
|
+
node = rowNode;
|
238
|
+
return true;
|
239
|
+
}
|
240
|
+
});
|
241
|
+
return rowFound ? calcPos(node) : null;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
245
|
+
return ret;
|
246
|
+
},
|
247
|
+
|
248
|
+
_onDropInternal: function(nodes, copy){
|
249
|
+
var t = this, g = t.grid;
|
250
|
+
if(t._target >= 0){
|
251
|
+
t.model.when({id: t._selectedRowIds}, function(){
|
252
|
+
var indexes = array.map(t._selectedRowIds, function(rowId){
|
253
|
+
return t.model.idToIndex(rowId);
|
254
|
+
});
|
255
|
+
g.move.row.move(indexes, g.view.getRowInfo({
|
256
|
+
visualIndex: t._target
|
257
|
+
}).rowIndex);
|
258
|
+
});
|
259
|
+
}
|
260
|
+
},
|
261
|
+
|
262
|
+
_onDropExternal: function(source, nodes, copy){
|
263
|
+
var d = new Deferred(),
|
264
|
+
success = hitch(d, d.callback),
|
265
|
+
fail = hitch(d, d.errback),
|
266
|
+
g = this.grid,
|
267
|
+
target = this._target,
|
268
|
+
targetRow, preRow,
|
269
|
+
sourceData = getSourceData(source, nodes);
|
270
|
+
g.model.when([target - 1, target], function(){
|
271
|
+
targetRow = g.model.byIndex(target);
|
272
|
+
preRow = g.model.byIndex(target - 1);
|
273
|
+
}).then(function(){
|
274
|
+
//Inserting and deleting (and other operations that changes store) are better to happen outside
|
275
|
+
//"model.when", because during "when", it is not allowed to clear cache.
|
276
|
+
Deferred.when(sourceData, function(dataArr){
|
277
|
+
if(dataArr && dataArr.length){
|
278
|
+
var inserted = g.model.insert(dataArr, preRow && preRow.item, targetRow && targetRow.item);
|
279
|
+
Deferred.when(inserted, success, fail);
|
280
|
+
}
|
281
|
+
}, fail);
|
282
|
+
}, fail);
|
283
|
+
return d;
|
284
|
+
}
|
285
|
+
});
|
286
|
+
});
|
@@ -0,0 +1,60 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/declare",
|
3
|
+
"dojo/_base/array",
|
4
|
+
"dojo/_base/lang",
|
5
|
+
"../../core/_Module",
|
6
|
+
"./Avatar",
|
7
|
+
"./_Dnd"
|
8
|
+
], function(declare, array, lang, _Module, Avatar){
|
9
|
+
|
10
|
+
/*=====
|
11
|
+
return declare(_Module, {
|
12
|
+
// summary:
|
13
|
+
// Base class for dnd modules.
|
14
|
+
|
15
|
+
// delay: Number
|
16
|
+
// The time delay before starting dnd after mouse down.
|
17
|
+
delay: 2,
|
18
|
+
|
19
|
+
// enabled: Boolean
|
20
|
+
// Whether this module is enabled.
|
21
|
+
enabled: true,
|
22
|
+
|
23
|
+
// canRearrange: Boolean
|
24
|
+
// Whether rearrange within grid using dnd is allowed.
|
25
|
+
canRearrange: true,
|
26
|
+
|
27
|
+
// copyWhenDragOut: Boolean|Object
|
28
|
+
// When dragging out, whehter to delete in this grid.
|
29
|
+
// If it is a boolean value, it is effective for all targets.
|
30
|
+
// If it is an associative array, it can be set on different drag targets.
|
31
|
+
// (key is an "accept" string of the dnd target).
|
32
|
+
copyWhenDragOut: false,
|
33
|
+
|
34
|
+
// avatar: function
|
35
|
+
// The avatar constructor used during dnd.
|
36
|
+
avatar: null
|
37
|
+
});
|
38
|
+
=====*/
|
39
|
+
|
40
|
+
return declare(_Module, {
|
41
|
+
delay: 2,
|
42
|
+
enabled: true,
|
43
|
+
canRearrange: true,
|
44
|
+
copyWhenDragOut: false,
|
45
|
+
avatar: Avatar,
|
46
|
+
|
47
|
+
preload: function(args){
|
48
|
+
var dnd = this.grid.dnd._dnd;
|
49
|
+
dnd.register(this.name, this);
|
50
|
+
dnd.avatar = this.arg('avatar');
|
51
|
+
},
|
52
|
+
|
53
|
+
checkArg: function(name, arr){
|
54
|
+
var arg = this.arg(name);
|
55
|
+
return (arg && lang.isObject(arg)) ? array.some(arr, function(v){
|
56
|
+
return arg[v];
|
57
|
+
}) : arg;
|
58
|
+
}
|
59
|
+
});
|
60
|
+
});
|