gridx-rails 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/LICENSE +2 -0
- data/README.md +18 -0
- data/Rakefile +36 -0
- data/app/assets/images/gridx/mobile/themes/iphone/images/ajax-loader.gif +0 -0
- data/app/assets/images/gridx/mobile/themes/iphone/images/arrow.png +0 -0
- data/app/assets/images/gridx/resources/images/checkboxpartial.png +0 -0
- data/app/assets/images/gridx/resources/images/checkboxpartialdisabled.png +0 -0
- data/app/assets/images/gridx/resources/images/claro-grid-header-onepixel.bmp +0 -0
- data/app/assets/images/gridx/resources/images/dndCopy.png +0 -0
- data/app/assets/images/gridx/resources/images/dndMove.png +0 -0
- data/app/assets/images/gridx/resources/images/dndNoCopy.png +0 -0
- data/app/assets/images/gridx/resources/images/dndNoMove.png +0 -0
- data/app/assets/images/gridx/resources/images/gridxCellChanged.png +0 -0
- data/app/assets/images/gridx/resources/images/header.png +0 -0
- data/app/assets/images/gridx/resources/images/header_shadow.png +0 -0
- data/app/assets/images/gridx/resources/images/loadingAnimation.gif +0 -0
- data/app/assets/images/gridx/resources/images/row_back.png +0 -0
- data/app/assets/images/gridx/resources/images/row_back_changed.png +0 -0
- data/app/assets/images/gridx/resources/images/sprite_icons.png +0 -0
- data/app/assets/images/gridx/resources/images/treeExpandImages.png +0 -0
- data/app/assets/images/gridx/resources/images/treeExpand_loading.gif +0 -0
- data/app/assets/javascripts/gridx/Grid.js +224 -0
- data/app/assets/javascripts/gridx/GridCommon.js +52 -0
- data/app/assets/javascripts/gridx/allModules.js +105 -0
- data/app/assets/javascripts/gridx/core/Cell.js +86 -0
- data/app/assets/javascripts/gridx/core/Column.js +183 -0
- data/app/assets/javascripts/gridx/core/Core.js +447 -0
- data/app/assets/javascripts/gridx/core/Row.js +174 -0
- data/app/assets/javascripts/gridx/core/_Module.js +285 -0
- data/app/assets/javascripts/gridx/core/model/Model.js +495 -0
- data/app/assets/javascripts/gridx/core/model/_Extension.js +84 -0
- data/app/assets/javascripts/gridx/core/model/cache/Async.js +469 -0
- data/app/assets/javascripts/gridx/core/model/cache/Sync.js +59 -0
- data/app/assets/javascripts/gridx/core/model/cache/_Cache.js +386 -0
- data/app/assets/javascripts/gridx/core/model/extensions/ClientFilter.js +303 -0
- data/app/assets/javascripts/gridx/core/model/extensions/FormatSort.js +103 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Mark.js +370 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Modify.js +418 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Move.js +429 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Query.js +50 -0
- data/app/assets/javascripts/gridx/core/model/extensions/Sort.js +81 -0
- data/app/assets/javascripts/gridx/core/util.js +13 -0
- data/app/assets/javascripts/gridx/mobile/Grid.js +300 -0
- data/app/assets/javascripts/gridx/mobile/LazyLoad.js +88 -0
- data/app/assets/javascripts/gridx/mobile/PullRefresh.js +117 -0
- data/app/assets/javascripts/gridx/mobile/Sort.js +66 -0
- data/app/assets/javascripts/gridx/mobile/nls/LazyLoad.js +38 -0
- data/app/assets/javascripts/gridx/mobile/nls/PullRefresh.js +39 -0
- data/app/assets/javascripts/gridx/mobile/nls/ar/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ar/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ar/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/bg/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/bg/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/bg/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ca/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ca/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ca/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/common.js +37 -0
- data/app/assets/javascripts/gridx/mobile/nls/cs/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/cs/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/cs/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/da/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/da/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/da/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/de/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/de/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/de/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/el/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/el/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/el/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/es/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/es/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/es/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/fi/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/fi/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/fi/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/fr/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/fr/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/fr/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/he/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/he/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/he/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/hr/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/hr/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/hr/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/hu/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/hu/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/hu/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/it/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/it/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/it/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ja/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ja/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ja/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/kk/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/kk/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/kk/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ko/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ko/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ko/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/nb/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/nb/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/nb/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/nl/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/nl/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/nl/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/pl/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/pl/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/pl/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt-pt/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt-pt/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/pt-pt/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ro/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ro/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ro/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/ru/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/ru/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/ru/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/sk/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/sk/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/sk/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/sl/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/sl/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/sl/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/sv/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/sv/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/sv/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/th/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/th/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/th/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/tr/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/tr/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/tr/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/uk/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/uk/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/uk/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh/common.js +5 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh-tw/LazyLoad.js +6 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh-tw/PullRefresh.js +7 -0
- data/app/assets/javascripts/gridx/mobile/nls/zh-tw/common.js +5 -0
- data/app/assets/javascripts/gridx/modules/AutoScroll.js +100 -0
- data/app/assets/javascripts/gridx/modules/Bar.js +322 -0
- data/app/assets/javascripts/gridx/modules/Body.js +1059 -0
- data/app/assets/javascripts/gridx/modules/CellWidget.js +538 -0
- data/app/assets/javascripts/gridx/modules/ColumnLock.js +254 -0
- data/app/assets/javascripts/gridx/modules/ColumnResizer.js +278 -0
- data/app/assets/javascripts/gridx/modules/ColumnWidth.js +320 -0
- data/app/assets/javascripts/gridx/modules/Dod.js +368 -0
- data/app/assets/javascripts/gridx/modules/Edit.js +1024 -0
- data/app/assets/javascripts/gridx/modules/Filter.js +482 -0
- data/app/assets/javascripts/gridx/modules/Focus.js +439 -0
- data/app/assets/javascripts/gridx/modules/GroupHeader.js +437 -0
- data/app/assets/javascripts/gridx/modules/HLayout.js +139 -0
- data/app/assets/javascripts/gridx/modules/HScroller.js +172 -0
- data/app/assets/javascripts/gridx/modules/Header.js +289 -0
- data/app/assets/javascripts/gridx/modules/HeaderMenu.js +63 -0
- data/app/assets/javascripts/gridx/modules/HeaderRegions.js +201 -0
- data/app/assets/javascripts/gridx/modules/HiddenColumns.js +274 -0
- data/app/assets/javascripts/gridx/modules/IndirectSelect.js +287 -0
- data/app/assets/javascripts/gridx/modules/IndirectSelectColumn.js +277 -0
- data/app/assets/javascripts/gridx/modules/Menu.js +167 -0
- data/app/assets/javascripts/gridx/modules/NavigableCell.js +170 -0
- data/app/assets/javascripts/gridx/modules/NestedSort.js +280 -0
- data/app/assets/javascripts/gridx/modules/PagedBody.js +409 -0
- data/app/assets/javascripts/gridx/modules/Pagination.js +293 -0
- data/app/assets/javascripts/gridx/modules/Persist.js +266 -0
- data/app/assets/javascripts/gridx/modules/Printer.js +49 -0
- data/app/assets/javascripts/gridx/modules/RowHeader.js +412 -0
- data/app/assets/javascripts/gridx/modules/RowLock.js +143 -0
- data/app/assets/javascripts/gridx/modules/SingleSort.js +276 -0
- data/app/assets/javascripts/gridx/modules/SummaryBar.js +33 -0
- data/app/assets/javascripts/gridx/modules/TitleBar.js +51 -0
- data/app/assets/javascripts/gridx/modules/ToolBar.js +55 -0
- data/app/assets/javascripts/gridx/modules/TouchScroll.js +103 -0
- data/app/assets/javascripts/gridx/modules/TouchVScroller.js +89 -0
- data/app/assets/javascripts/gridx/modules/Traverse.js +159 -0
- data/app/assets/javascripts/gridx/modules/Tree.js +646 -0
- data/app/assets/javascripts/gridx/modules/VLayout.js +152 -0
- data/app/assets/javascripts/gridx/modules/VScroller.js +342 -0
- data/app/assets/javascripts/gridx/modules/View.js +540 -0
- data/app/assets/javascripts/gridx/modules/VirtualVScroller.js +445 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/DropDownPager.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/DropDownSizer.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/GotoPageButton.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/LinkPager.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/LinkSizer.js +16 -0
- data/app/assets/javascripts/gridx/modules/barPlugins/Summary.js +16 -0
- data/app/assets/javascripts/gridx/modules/dnd/Avatar.js +45 -0
- data/app/assets/javascripts/gridx/modules/dnd/Column.js +210 -0
- data/app/assets/javascripts/gridx/modules/dnd/Row.js +286 -0
- data/app/assets/javascripts/gridx/modules/dnd/_Base.js +60 -0
- data/app/assets/javascripts/gridx/modules/dnd/_Dnd.js +371 -0
- data/app/assets/javascripts/gridx/modules/exporter/CSV.js +43 -0
- data/app/assets/javascripts/gridx/modules/exporter/Exporter.js +34 -0
- data/app/assets/javascripts/gridx/modules/exporter/Table.js +42 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Cell.js +491 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Column.js +290 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Row.js +458 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/_Base.js +244 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/_RowCellBase.js +35 -0
- data/app/assets/javascripts/gridx/modules/filter/DistinctComboBoxMenu.js +22 -0
- data/app/assets/javascripts/gridx/modules/filter/Filter.js +16 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterBar.js +649 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterConfirmDialog.js +33 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterDialog.js +179 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterPane.js +340 -0
- data/app/assets/javascripts/gridx/modules/filter/FilterTooltip.js +103 -0
- data/app/assets/javascripts/gridx/modules/filter/QuickFilter.js +33 -0
- data/app/assets/javascripts/gridx/modules/move/Column.js +223 -0
- data/app/assets/javascripts/gridx/modules/move/Row.js +154 -0
- data/app/assets/javascripts/gridx/modules/pagination/Pagination.js +16 -0
- data/app/assets/javascripts/gridx/modules/pagination/PaginationBar.js +68 -0
- data/app/assets/javascripts/gridx/modules/pagination/PaginationBarDD.js +40 -0
- data/app/assets/javascripts/gridx/modules/pagination/_PaginationBarBase.js +105 -0
- data/app/assets/javascripts/gridx/modules/select/Cell.js +229 -0
- data/app/assets/javascripts/gridx/modules/select/Column.js +209 -0
- data/app/assets/javascripts/gridx/modules/select/Row.js +302 -0
- data/app/assets/javascripts/gridx/modules/select/_Base.js +99 -0
- data/app/assets/javascripts/gridx/modules/select/_RowCellBase.js +51 -0
- data/app/assets/javascripts/gridx/nls/Body.js +47 -0
- data/app/assets/javascripts/gridx/nls/FilterBar.js +133 -0
- data/app/assets/javascripts/gridx/nls/NestedSort.js +45 -0
- data/app/assets/javascripts/gridx/nls/PaginationBar.js +68 -0
- data/app/assets/javascripts/gridx/nls/QuickFilter.js +40 -0
- data/app/assets/javascripts/gridx/nls/SummaryBar.js +38 -0
- data/app/assets/javascripts/gridx/nls/ar/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ar/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ar/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ar/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ar/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ar/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/bg/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/bg/FilterBar.js +88 -0
- data/app/assets/javascripts/gridx/nls/bg/NestedSort.js +12 -0
- data/app/assets/javascripts/gridx/nls/bg/PaginationBar.js +28 -0
- data/app/assets/javascripts/gridx/nls/bg/QuickFilter.js +8 -0
- data/app/assets/javascripts/gridx/nls/bg/SummaryBar.js +6 -0
- data/app/assets/javascripts/gridx/nls/ca/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ca/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ca/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/ca/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/ca/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/ca/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/cs/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/cs/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/cs/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/cs/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/cs/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/cs/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/da/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/da/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/da/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/da/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/da/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/da/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/de/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/de/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/de/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/de/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/de/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/de/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/el/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/el/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/el/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/el/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/el/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/el/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/es/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/es/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/es/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/es/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/es/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/es/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/fi/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/fi/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/fi/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/fi/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/fi/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/fi/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/fr/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/fr/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/fr/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/fr/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/fr/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/fr/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/he/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/he/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/he/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/he/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/he/QuickFilter.js +6 -0
- data/app/assets/javascripts/gridx/nls/he/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/hr/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/hr/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/hr/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/hr/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/hr/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/hr/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/hu/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/hu/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/hu/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/hu/PaginationBar.js +33 -0
- data/app/assets/javascripts/gridx/nls/hu/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/hu/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/it/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/it/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/it/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/it/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/it/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/it/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/ja/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ja/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ja/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ja/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ja/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ja/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/kk/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/kk/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/kk/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/kk/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/kk/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/kk/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/ko/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ko/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ko/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ko/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ko/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ko/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/nb/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/nb/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/nb/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/nb/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/nb/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/nb/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/nl/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/nl/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/nl/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/nl/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/nl/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/nl/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/pl/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/pl/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pl/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/pl/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/pl/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/pl/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/pt/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/pt/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pt/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/pt/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/pt/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/pt/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/pt-br/Body.js +6 -0
- data/app/assets/javascripts/gridx/nls/pt-br/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pt-br/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/pt-br/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/pt-br/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/pt-br/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/pt-pt/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/ro/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ro/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ro/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/ro/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/ro/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/ro/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/ru/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/ru/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/ru/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/ru/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/ru/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/ru/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/sk/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/sk/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/sk/NestedSort.js +13 -0
- data/app/assets/javascripts/gridx/nls/sk/PaginationBar.js +30 -0
- data/app/assets/javascripts/gridx/nls/sk/QuickFilter.js +9 -0
- data/app/assets/javascripts/gridx/nls/sk/SummaryBar.js +7 -0
- data/app/assets/javascripts/gridx/nls/sl/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/sl/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/sl/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/sl/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/sl/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/sl/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/sv/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/sv/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/sv/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/sv/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/sv/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/sv/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/th/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/th/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/th/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/th/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/th/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/th/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/tr/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/tr/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/tr/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/tr/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/tr/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/tr/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/uk/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/uk/FilterBar.js +88 -0
- data/app/assets/javascripts/gridx/nls/uk/NestedSort.js +12 -0
- data/app/assets/javascripts/gridx/nls/uk/PaginationBar.js +28 -0
- data/app/assets/javascripts/gridx/nls/uk/QuickFilter.js +8 -0
- data/app/assets/javascripts/gridx/nls/uk/SummaryBar.js +6 -0
- data/app/assets/javascripts/gridx/nls/zh/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/zh/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/zh/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/zh/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/Body.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/FilterBar.js +89 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/NestedSort.js +11 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/PaginationBar.js +34 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/QuickFilter.js +7 -0
- data/app/assets/javascripts/gridx/nls/zh-tw/SummaryBar.js +5 -0
- data/app/assets/javascripts/gridx/support/DropDownPager.js +111 -0
- data/app/assets/javascripts/gridx/support/DropDownSizer.js +112 -0
- data/app/assets/javascripts/gridx/support/GotoPageButton.js +92 -0
- data/app/assets/javascripts/gridx/support/GotoPagePane.js +61 -0
- data/app/assets/javascripts/gridx/support/LinkPager.js +180 -0
- data/app/assets/javascripts/gridx/support/LinkSizer.js +138 -0
- data/app/assets/javascripts/gridx/support/QuickFilter.js +138 -0
- data/app/assets/javascripts/gridx/support/Summary.js +49 -0
- data/app/assets/javascripts/gridx/support/_LinkPageBase.js +92 -0
- data/app/assets/javascripts/gridx/support/exporter/exporter.js +350 -0
- data/app/assets/javascripts/gridx/support/exporter/toCSV.js +75 -0
- data/app/assets/javascripts/gridx/support/exporter/toTable.js +92 -0
- data/app/assets/javascripts/gridx/support/menu/AZFilterMenu.js +57 -0
- data/app/assets/javascripts/gridx/support/menu/NumberFilterMenu.js +87 -0
- data/app/assets/javascripts/gridx/support/menu/_FilterMenuBase.js +83 -0
- data/app/assets/javascripts/gridx/support/printer.js +157 -0
- data/app/assets/javascripts/gridx/templates/FilterBar.html +8 -0
- data/app/assets/javascripts/gridx/templates/FilterConfirmDialog.html +5 -0
- data/app/assets/javascripts/gridx/templates/FilterDialog.html +19 -0
- data/app/assets/javascripts/gridx/templates/FilterPane.html +64 -0
- data/app/assets/javascripts/gridx/templates/GotoPagePane.html +28 -0
- data/app/assets/javascripts/gridx/templates/Grid.html +19 -0
- data/app/assets/javascripts/gridx/templates/LinkPager.html +24 -0
- data/app/assets/javascripts/gridx/templates/PaginationBar.html +60 -0
- data/app/assets/javascripts/gridx/templates/PaginationBarDD.html +23 -0
- data/app/assets/javascripts/gridx/templates/QuickFilter.html +38 -0
- data/app/assets/stylesheets/gridx/mobile/themes/iphone/Grid.css +107 -0
- data/app/assets/stylesheets/gridx/resources/Dod.css +39 -0
- data/app/assets/stylesheets/gridx/resources/Gridx.css +10 -0
- data/app/assets/stylesheets/gridx/resources/Gridx_rtl.css +5 -0
- data/app/assets/stylesheets/gridx/resources/Tree.css +46 -0
- data/app/assets/stylesheets/gridx/resources/Tree_rtl.css +4 -0
- data/app/assets/stylesheets/gridx/resources/bar.css +24 -0
- data/app/assets/stylesheets/gridx/resources/basic.css +482 -0
- data/app/assets/stylesheets/gridx/resources/basic_rtl.css +37 -0
- data/app/assets/stylesheets/gridx/resources/claro/Gridx.css +16 -0
- data/app/assets/stylesheets/gridx/resources/claro/Gridx_rtl.css +7 -0
- data/app/assets/stylesheets/gridx/resources/claro/basic.css +109 -0
- data/app/assets/stylesheets/gridx/resources/claro/basic_rtl.css +21 -0
- data/app/assets/stylesheets/gridx/resources/claro/filter.css +47 -0
- data/app/assets/stylesheets/gridx/resources/claro/lock.css +19 -0
- data/app/assets/stylesheets/gridx/resources/claro/pagination.css +33 -0
- data/app/assets/stylesheets/gridx/resources/claro/select.css +20 -0
- data/app/assets/stylesheets/gridx/resources/dnd.css +108 -0
- data/app/assets/stylesheets/gridx/resources/filter.css +321 -0
- data/app/assets/stylesheets/gridx/resources/filter_rtl.css +38 -0
- data/app/assets/stylesheets/gridx/resources/lock.css +20 -0
- data/app/assets/stylesheets/gridx/resources/pagination.css +142 -0
- data/app/assets/stylesheets/gridx/resources/pagination_rtl.css +54 -0
- data/app/assets/stylesheets/gridx/resources/select.css +39 -0
- data/app/assets/stylesheets/gridx/resources/sort.css +154 -0
- data/app/assets/stylesheets/gridx/resources/sort_rtl.css +51 -0
- data/lib/gridx-rails/engine.rb +8 -0
- data/lib/gridx-rails/version.rb +3 -0
- data/lib/gridx-rails.rb +4 -0
- data/lib/tasks/gridx-rails_tasks.rake +52 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +78 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/gridx-rails_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +621 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/lang",
|
|
4
|
+
"dojo/_base/Deferred"
|
|
5
|
+
], function(declare, lang, Deferred){
|
|
6
|
+
|
|
7
|
+
/*=====
|
|
8
|
+
return declare([], {
|
|
9
|
+
// summary:
|
|
10
|
+
// Represents a row of a grid
|
|
11
|
+
// description:
|
|
12
|
+
// An instance of this class represents a grid row.
|
|
13
|
+
// This class should not be directly instantiated by users. It should be returned by grid APIs.
|
|
14
|
+
|
|
15
|
+
// id: [readonly] String
|
|
16
|
+
// The ID of this row
|
|
17
|
+
id: null,
|
|
18
|
+
|
|
19
|
+
// grid: [readonly] gridx.Grid
|
|
20
|
+
// Reference to the grid
|
|
21
|
+
grid: null,
|
|
22
|
+
|
|
23
|
+
// model: [readonly] grid.core.model.Model
|
|
24
|
+
// Reference to this grid model
|
|
25
|
+
model: null,
|
|
26
|
+
|
|
27
|
+
index: function(){
|
|
28
|
+
// summary:
|
|
29
|
+
// Get the index of this row
|
|
30
|
+
// returns:
|
|
31
|
+
// The row index
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
parent: function(){
|
|
35
|
+
// summary:
|
|
36
|
+
// Get the parent row of this row.
|
|
37
|
+
// returns:
|
|
38
|
+
// The parent row object
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
cell: function(column, isId){
|
|
42
|
+
// summary:
|
|
43
|
+
// Get a cell object in this row
|
|
44
|
+
// column: gridx.core.Column|Integer|String
|
|
45
|
+
// Column index or column ID or a column object
|
|
46
|
+
// isId: Boolean?
|
|
47
|
+
// If the column parameter is a numeric ID, set this to true
|
|
48
|
+
// returns:
|
|
49
|
+
// If the params are valid return the cell object, else return null.
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
cells: function(start, count){
|
|
53
|
+
// summary:
|
|
54
|
+
// Get cells in this row.
|
|
55
|
+
// start: Integer?
|
|
56
|
+
// The column index of the first cell in the returned array.
|
|
57
|
+
// If omitted, defaults to 0, so row.cells() gets all the cells.
|
|
58
|
+
// count: Integer?
|
|
59
|
+
// The number of cells to return.
|
|
60
|
+
// If omitted, all the cells starting from column 'start' will be returned.
|
|
61
|
+
// returns:
|
|
62
|
+
// An array of cells in this row
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
data: function(){
|
|
66
|
+
// summary:
|
|
67
|
+
// Get the grid data in this row.
|
|
68
|
+
// description:
|
|
69
|
+
// Grid data means the result of the formatter functions (if exist).
|
|
70
|
+
// It can be different from store data (a.k.a. raw data).
|
|
71
|
+
// returns:
|
|
72
|
+
// An associative array using column IDs as keys and grid data as values
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
rawData: function(){
|
|
76
|
+
// summary:
|
|
77
|
+
// Get the store data in this row.
|
|
78
|
+
// description:
|
|
79
|
+
// Store data means the data defined in store. It is the data before applying the formatter functions.
|
|
80
|
+
// It can be different from grid data (a.k.a. formatted data)
|
|
81
|
+
// returns:
|
|
82
|
+
// An associative array using store fields as keys and store data as values
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
item: function(){
|
|
86
|
+
// summary:
|
|
87
|
+
// Get the store item of this row
|
|
88
|
+
// description:
|
|
89
|
+
// If using the old dojo.data store, store items usually have complicated structures,
|
|
90
|
+
// and they are also useful when doing store operations.
|
|
91
|
+
// returns:
|
|
92
|
+
// A store item
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
setRawData: function(rawData){
|
|
96
|
+
// summary:
|
|
97
|
+
// Set new raw data of this row into the store
|
|
98
|
+
// rawData: Object
|
|
99
|
+
// The new data to be set. It can be incomplete, only providing a few fields.
|
|
100
|
+
// returns:
|
|
101
|
+
// If using server side store, a Deferred object is returned to indicate when the operation is finished.
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
=====*/
|
|
105
|
+
|
|
106
|
+
return declare([], {
|
|
107
|
+
constructor: function(grid, id){
|
|
108
|
+
this.grid = grid;
|
|
109
|
+
this.model = grid.model;
|
|
110
|
+
this.id = id;
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
index: function(){
|
|
114
|
+
return this.model.idToIndex(this.id);
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
parent: function(){
|
|
118
|
+
return this.grid.row(this.model.parentId(this.id), 1);
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
cell: function(column, isId){
|
|
122
|
+
return this.grid.cell(this, column, isId);
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
cells: function(start, count){
|
|
126
|
+
var t = this,
|
|
127
|
+
g = t.grid,
|
|
128
|
+
cells = [],
|
|
129
|
+
cols = g._columns,
|
|
130
|
+
total = cols.length,
|
|
131
|
+
i = start || 0,
|
|
132
|
+
end = count >= 0 ? start + count : total;
|
|
133
|
+
for(; i < end && i < total; ++i){
|
|
134
|
+
cells.push(g.cell(t.id, cols[i].id, 1));
|
|
135
|
+
}
|
|
136
|
+
return cells;
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
data: function(){
|
|
140
|
+
return this.model.byId(this.id).data;
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
rawData: function(){
|
|
144
|
+
return this.model.byId(this.id).rawData;
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
item: function(){
|
|
148
|
+
return this.model.byId(this.id).item;
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
setRawData: function(rawData){
|
|
152
|
+
var t = this,
|
|
153
|
+
s = t.grid.store,
|
|
154
|
+
item = t.item(),
|
|
155
|
+
field, d;
|
|
156
|
+
|
|
157
|
+
if(s.setValue){
|
|
158
|
+
d = new Deferred();
|
|
159
|
+
try{
|
|
160
|
+
for(field in rawData){
|
|
161
|
+
s.setValue(item, field, rawData[field]);
|
|
162
|
+
}
|
|
163
|
+
s.save({
|
|
164
|
+
onComplete: lang.hitch(d, d.callback),
|
|
165
|
+
onError: lang.hitch(d, d.errback)
|
|
166
|
+
});
|
|
167
|
+
}catch(e){
|
|
168
|
+
d.errback(e);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return d || Deferred.when(s.put(lang.mixin(lang.clone(item), rawData)));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/lang",
|
|
4
|
+
"dojo/_base/array",
|
|
5
|
+
"dojo/_base/Deferred",
|
|
6
|
+
"dojo/_base/connect",
|
|
7
|
+
"dojo/aspect"
|
|
8
|
+
], function(declare, lang, array, Deferred, connect, aspect){
|
|
9
|
+
|
|
10
|
+
/*=====
|
|
11
|
+
return declare([], {
|
|
12
|
+
// summary:
|
|
13
|
+
// Base class for gridx modules.
|
|
14
|
+
// description:
|
|
15
|
+
// Actually any dojo class can be a gridx module, but this base class provide some useful methods.
|
|
16
|
+
|
|
17
|
+
// name: String
|
|
18
|
+
// The API set name of this module. This name represents the API set that this module implements,
|
|
19
|
+
// instead of this module itself. Two different modules can have the same name, so that they provide
|
|
20
|
+
// two different implementations of this API set.
|
|
21
|
+
// For example, simple row selection and extended row selection are two modules implementing a same set of APIs.
|
|
22
|
+
// They can be used in two different grids in one page (maybe due to different requirements),
|
|
23
|
+
// without worrying about conflicting with eachother. And any module of grid can be replaced by a new implementation
|
|
24
|
+
// without re-writing any other modules.
|
|
25
|
+
// This property is mandatary.
|
|
26
|
+
name: "SomeModule",
|
|
27
|
+
|
|
28
|
+
// forced: String[]
|
|
29
|
+
// An array of module names. All these modules must exist, and have finished loading before this module loads.
|
|
30
|
+
// This property can be omitted.
|
|
31
|
+
forced: [],
|
|
32
|
+
|
|
33
|
+
// optional: String[]
|
|
34
|
+
// An array of module names. These modules can be absent, but if they do exist,
|
|
35
|
+
// they must be loaded before this module loads.
|
|
36
|
+
// This property can be omitted.
|
|
37
|
+
optional: [],
|
|
38
|
+
|
|
39
|
+
// required: []
|
|
40
|
+
// An array of module names. These modules must exist, but they can be loaded at any time.
|
|
41
|
+
// This property can be omitted.
|
|
42
|
+
required: [],
|
|
43
|
+
|
|
44
|
+
getAPIPath: function(){
|
|
45
|
+
// summary:
|
|
46
|
+
// This function defines how to access this module's methods from the grid object.
|
|
47
|
+
// description:
|
|
48
|
+
// The returned object of this function will be "recursively" mixed into the grid object.
|
|
49
|
+
// That is, any property of object type in grid will be preserved. For example, if this function
|
|
50
|
+
// returns { abc: { def: 'ghi'} }, and the grid already has a property called "abc", and
|
|
51
|
+
// grid.abc is { jkl: 'mno'}. Then after mixin, grid.abc will still have this jkl property:
|
|
52
|
+
// | {
|
|
53
|
+
// | abc: {
|
|
54
|
+
// | jkl: 'mno',
|
|
55
|
+
// | def: 'ghi'
|
|
56
|
+
// | }
|
|
57
|
+
// | }
|
|
58
|
+
// This mechanism makes it possible for different modules to provide APIs to a same sub-API object.
|
|
59
|
+
// Sub-API object is used to provide structures for grid APIs, so as to avoid API conflicts as much as possible.
|
|
60
|
+
// This function can be omitted.
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
preload: function(args){
|
|
64
|
+
// summary:
|
|
65
|
+
// Preload this module.
|
|
66
|
+
// description:
|
|
67
|
+
// If this function exists, it is called after all modules are created ("new"-ed), but not yet loaded.
|
|
68
|
+
// At this time point, all the module APIs are already accessable, so all the mothods of those modules that
|
|
69
|
+
// do not need to load can be used here.
|
|
70
|
+
// Note that this function is not the "load" process, so the module dependancy is not honored. For example,
|
|
71
|
+
// if module A forcedly depends on module B, it is still possible that module A.preload is called before
|
|
72
|
+
// module B.preload.
|
|
73
|
+
// This function can be omitted.
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
load: function(args, deferStartup){
|
|
77
|
+
// summary:
|
|
78
|
+
// Completely load this module.
|
|
79
|
+
// description:
|
|
80
|
+
// This is the formal loading process of this module. This function will not be called until all the "forced"
|
|
81
|
+
// and existing "optional" modules are loaded. When the loading process of this module is finished (Note that
|
|
82
|
+
// this might be an async process), this.loaded.callback() must be called to tell any other modules that
|
|
83
|
+
// depend on this module.
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
// grid: gridx.Grid
|
|
87
|
+
// Reference to the grid
|
|
88
|
+
grid: null,
|
|
89
|
+
|
|
90
|
+
// model: gridx.core.model.Model
|
|
91
|
+
// Reference to the grid model
|
|
92
|
+
model: null,
|
|
93
|
+
|
|
94
|
+
// loaded: dojo.Deferred
|
|
95
|
+
// Indicate when this module is completely loaded.
|
|
96
|
+
loaded: null,
|
|
97
|
+
|
|
98
|
+
arg: function(argName, defaultValue, validate){
|
|
99
|
+
// summary:
|
|
100
|
+
// This method provides a normalized way to access module arguments.
|
|
101
|
+
// description:
|
|
102
|
+
// There are two ways to provide module arguments when creating grid.
|
|
103
|
+
// One is to write them in the module declaration object:
|
|
104
|
+
// | var grid = new Grid({
|
|
105
|
+
// | ......
|
|
106
|
+
// | modules: [
|
|
107
|
+
// | {
|
|
108
|
+
// | moduleClass: gridx.modules.Pagination,
|
|
109
|
+
// | initialPage: 1 //Put module arguments in module declaration object
|
|
110
|
+
// | }
|
|
111
|
+
// | ],
|
|
112
|
+
// | ......
|
|
113
|
+
// | });
|
|
114
|
+
// This way is straightforward, but quite verbose. And if user would like to set arguments
|
|
115
|
+
// for pre-included core modules (e.g. Header, Body), he'd have to explictly declare the
|
|
116
|
+
// module. This would be too demanding for a grid user, so we need another approach.
|
|
117
|
+
// The other way is to treat them as grid arguments:
|
|
118
|
+
// | var grid = new Grid({
|
|
119
|
+
// | ......
|
|
120
|
+
// | modules: [
|
|
121
|
+
// | gridx.modules.Pagination
|
|
122
|
+
// | ],
|
|
123
|
+
// | paginationInitialPage: 1, //Treat module arguments as grid arguments
|
|
124
|
+
// | ......
|
|
125
|
+
// | });
|
|
126
|
+
// In this way, there's no need to provide a module declaration object, but one has to tell
|
|
127
|
+
// grid for which module the arguments is applied. One can simply put the module name at the
|
|
128
|
+
// front of every module argument:
|
|
129
|
+
// "pagination" -- module name
|
|
130
|
+
// "initialPage" -- module argument
|
|
131
|
+
// ---------------------------------
|
|
132
|
+
// paginationInitialPage -- module argument treated as grid argument
|
|
133
|
+
// Note the first letter of the module arugment must be capitalized in the combined argument.
|
|
134
|
+
//
|
|
135
|
+
// This "arg" method makes it possible to access module arguments without worring about where
|
|
136
|
+
// they are declared. The priority of every kinds of declarations are:
|
|
137
|
+
// Module argument > Grid argument > default value > Base class argument (inherited)
|
|
138
|
+
// After this method, the argument will automatically become module argument. But it is still
|
|
139
|
+
// recommended to alway access arguments by this.arg(...);
|
|
140
|
+
// argName: String
|
|
141
|
+
// The name of this argument. This is the "short" name, not the name prefixed with module name.
|
|
142
|
+
// defaultValue: anything?
|
|
143
|
+
// This value will by asigned to the argument if there's no user provided values.
|
|
144
|
+
// validate: Function?
|
|
145
|
+
// This is a validation function and it must return a boolean value. If the user provided value
|
|
146
|
+
// can not pass validation, the default value will be used.
|
|
147
|
+
// Note if this function is provided, defaultValue must also be provided.
|
|
148
|
+
// returns:
|
|
149
|
+
// The value of this argument.
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
connect: function(obj, e, method, scope, flag){
|
|
153
|
+
// summary:
|
|
154
|
+
// Connect an event handler to an event or function.
|
|
155
|
+
// description:
|
|
156
|
+
// Similar to widget.connect, the scope of the listener will be default to this module.
|
|
157
|
+
// But in this API, the scope argument is placed behind the listener function, so as to
|
|
158
|
+
// avoid arguemnt checking logic.
|
|
159
|
+
// This method also allows conditional event firing using the flag argument.
|
|
160
|
+
// obj: Object
|
|
161
|
+
// e: String
|
|
162
|
+
// method: String|Function
|
|
163
|
+
// scope: Object?
|
|
164
|
+
// flag: Anything
|
|
165
|
+
// If provided, the listener will only be triggered when grid._eventFlags[e] is set to flag.
|
|
166
|
+
// returns:
|
|
167
|
+
// The connect handle
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
batchConnect: function(){
|
|
171
|
+
// summary:
|
|
172
|
+
// Do a lot of connects in a batch.
|
|
173
|
+
// description:
|
|
174
|
+
// This method is used to optimize code size.
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
subscribe: function(topic, method, scope){
|
|
178
|
+
// summary:
|
|
179
|
+
// Subscribe to a topic.
|
|
180
|
+
// description:
|
|
181
|
+
// This is similar to widget.subscribe, except that the "scope" argument in this method is behind the listener function.
|
|
182
|
+
// returns:
|
|
183
|
+
// The subscription handle
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
=====*/
|
|
187
|
+
|
|
188
|
+
var isFunc = lang.isFunction,
|
|
189
|
+
c = 'connect', //To reduce code size
|
|
190
|
+
|
|
191
|
+
moduleBase = declare([], {
|
|
192
|
+
constructor: function(grid, args){
|
|
193
|
+
var t = this;
|
|
194
|
+
t.grid = grid;
|
|
195
|
+
t.model = grid.model;
|
|
196
|
+
t.loaded = new Deferred;
|
|
197
|
+
t._cnnts = [];
|
|
198
|
+
t._sbscs = [];
|
|
199
|
+
lang.mixin(t, args);
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
destroy: function(){
|
|
203
|
+
var f = array.forEach;
|
|
204
|
+
f(this._cnnts, connect.disconnect);
|
|
205
|
+
f(this._sbscs, connect.unsubscribe);
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
getAPIPath: function(){
|
|
209
|
+
var path = {};
|
|
210
|
+
path[this.name] = this;
|
|
211
|
+
return path;
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
arg: function(argName, defaultValue, validate){
|
|
215
|
+
if(arguments.length == 2 && isFunc(defaultValue)){
|
|
216
|
+
validate = defaultValue;
|
|
217
|
+
defaultValue = undefined;
|
|
218
|
+
}
|
|
219
|
+
var t = this, g = t.grid, r = t[argName];
|
|
220
|
+
if(!t.hasOwnProperty(argName)){
|
|
221
|
+
var gridArgName = t.name + argName.substring(0, 1).toUpperCase() + argName.substring(1);
|
|
222
|
+
if(g[gridArgName] === undefined){
|
|
223
|
+
if(defaultValue !== undefined){
|
|
224
|
+
r = defaultValue;
|
|
225
|
+
}
|
|
226
|
+
}else{
|
|
227
|
+
r = g[gridArgName];
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
t[argName] = (validate && !validate(r)) ? defaultValue : r;
|
|
231
|
+
return r;
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
aspect: function(obj, e, method, scope, pos){
|
|
235
|
+
var cnnt = aspect[pos || 'after'](obj, e, lang.hitch(scope || this, method), 1);
|
|
236
|
+
this._cnnts.push(cnnt);
|
|
237
|
+
return cnnt;
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
connect: function(obj, e, method, scope, flag){
|
|
241
|
+
var t = this,
|
|
242
|
+
cnnt,
|
|
243
|
+
g = t.grid,
|
|
244
|
+
s = scope || t;
|
|
245
|
+
if(obj === g && typeof e == 'string'){
|
|
246
|
+
cnnt = connect[c](obj, e, function(){
|
|
247
|
+
var a = arguments;
|
|
248
|
+
if(g._eventFlags[e] === flag){
|
|
249
|
+
if(isFunc(method)){
|
|
250
|
+
method.apply(s, a);
|
|
251
|
+
}else if(isFunc(s[method])){
|
|
252
|
+
s[method].apply(s, a);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}else{
|
|
257
|
+
cnnt = connect[c](obj, e, s, method);
|
|
258
|
+
}
|
|
259
|
+
t._cnnts.push(cnnt);
|
|
260
|
+
return cnnt;
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
batchConnect: function(){
|
|
264
|
+
for(var i = 0, args = arguments, len = args.length; i < len; ++i){
|
|
265
|
+
if(lang.isArrayLike(args[i])){
|
|
266
|
+
this[c].apply(this, args[i]);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
subscribe: function(topic, method, scope){
|
|
272
|
+
var s = connect.subscribe(topic, scope || this, method);
|
|
273
|
+
this._sbscs.push(s);
|
|
274
|
+
return s;
|
|
275
|
+
}
|
|
276
|
+
}),
|
|
277
|
+
mods = moduleBase._modules = {};
|
|
278
|
+
|
|
279
|
+
moduleBase.register = function(modClass){
|
|
280
|
+
var p = modClass.prototype;
|
|
281
|
+
return mods[p.name || p.declaredClass] = modClass;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
return moduleBase;
|
|
285
|
+
});
|