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,183 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/declare"
|
3
|
+
], function(declare){
|
4
|
+
|
5
|
+
/*=====
|
6
|
+
var Column = declare([], {
|
7
|
+
// summary:
|
8
|
+
// Represents a column of a grid
|
9
|
+
// description:
|
10
|
+
// An instance of this class represents a grid column.
|
11
|
+
// This class should not be directly instantiated by users. It should be returned by grid APIs.
|
12
|
+
|
13
|
+
// id: [readonly] String
|
14
|
+
// The ID of this column
|
15
|
+
id: null,
|
16
|
+
|
17
|
+
// grid: [readonly] gridx.Grid
|
18
|
+
// Reference to the grid
|
19
|
+
grid: null,
|
20
|
+
|
21
|
+
// model: [readonly] grid.core.model.Model
|
22
|
+
// Reference to this grid model
|
23
|
+
model: null,
|
24
|
+
|
25
|
+
index: function(){
|
26
|
+
// summary:
|
27
|
+
// Get the index of this column
|
28
|
+
// returns:
|
29
|
+
// The index of this column
|
30
|
+
},
|
31
|
+
|
32
|
+
def: function(){
|
33
|
+
// summary:
|
34
|
+
// Get the definition of this column
|
35
|
+
// returns:
|
36
|
+
// The definition of this column
|
37
|
+
},
|
38
|
+
|
39
|
+
cell: function(row, isId, parentId){
|
40
|
+
// summary:
|
41
|
+
// Get a cell object in this column
|
42
|
+
// row: gridx.core.Row|Integer|String
|
43
|
+
// Row index or row ID or a row object
|
44
|
+
// returns:
|
45
|
+
// If the params are valid and the row is in cache return a cell object, else return null
|
46
|
+
},
|
47
|
+
|
48
|
+
cells: function(start, count, parentId){
|
49
|
+
// summary:
|
50
|
+
// Get cells in this column.
|
51
|
+
// If some rows are not in cache, there will be NULLs in the returned array.
|
52
|
+
// start: Integer?
|
53
|
+
// The row index of the first cell in the returned array.
|
54
|
+
// If omitted, defaults to 0, so column.cells() gets all the cells.
|
55
|
+
// count: Integer?
|
56
|
+
// The number of cells to return.
|
57
|
+
// If omitted, all the cells starting from row 'start' will be returned.
|
58
|
+
// returns:
|
59
|
+
// An array of cells in this column
|
60
|
+
},
|
61
|
+
|
62
|
+
name: function(){
|
63
|
+
// summary:
|
64
|
+
// Get the name of this column.
|
65
|
+
// description:
|
66
|
+
// Column name is the string displayed in the grid header cell.
|
67
|
+
// Column names can be anything. Two columns can share one name. But they must have different IDs.
|
68
|
+
// returns:
|
69
|
+
// The name of this column
|
70
|
+
},
|
71
|
+
|
72
|
+
setName: function(name){
|
73
|
+
// summary:
|
74
|
+
// Set the name of this column
|
75
|
+
// name: String
|
76
|
+
// The new name
|
77
|
+
// returns:
|
78
|
+
// Return self reference, so as to cascade methods
|
79
|
+
},
|
80
|
+
|
81
|
+
field: function(){
|
82
|
+
// summary:
|
83
|
+
// Get the store field of this column
|
84
|
+
// description:
|
85
|
+
// If a column corresponds to a field in store, this method returns the field.
|
86
|
+
// It's possible for a column to have no store field related.
|
87
|
+
// returns:
|
88
|
+
// The store field of this column
|
89
|
+
},
|
90
|
+
|
91
|
+
getWidth: function(){
|
92
|
+
// summary:
|
93
|
+
// Get the width of this column
|
94
|
+
// returns:
|
95
|
+
// The CSS value of column width
|
96
|
+
}
|
97
|
+
});
|
98
|
+
|
99
|
+
Column.__ColumnDefinition = declare([], {
|
100
|
+
// summary:
|
101
|
+
// Define a column in the structure parameter of gridx.
|
102
|
+
|
103
|
+
// id: String
|
104
|
+
// Column ID, should be unique within grid.
|
105
|
+
id: '',
|
106
|
+
|
107
|
+
// name: String?
|
108
|
+
// Column name, displayed in header cell.
|
109
|
+
name: '',
|
110
|
+
|
111
|
+
// field: String?
|
112
|
+
// The corresponding field in store.
|
113
|
+
field: '',
|
114
|
+
|
115
|
+
// width: String?
|
116
|
+
width: '',
|
117
|
+
|
118
|
+
formatter: function(){
|
119
|
+
// summary:
|
120
|
+
// Format the store data, generate grid data.
|
121
|
+
},
|
122
|
+
|
123
|
+
decorator: function(){
|
124
|
+
// summary:
|
125
|
+
// Decorate cell data.
|
126
|
+
}
|
127
|
+
});
|
128
|
+
|
129
|
+
return Column;
|
130
|
+
=====*/
|
131
|
+
|
132
|
+
|
133
|
+
return declare([], {
|
134
|
+
constructor: function(grid, id){
|
135
|
+
this.grid = grid;
|
136
|
+
this.model = grid.model;
|
137
|
+
this.id = id;
|
138
|
+
},
|
139
|
+
|
140
|
+
index: function(){
|
141
|
+
var c = this.def();
|
142
|
+
return c ? c.index : -1;
|
143
|
+
},
|
144
|
+
|
145
|
+
def: function(){
|
146
|
+
return this.grid._columnsById[this.id];
|
147
|
+
},
|
148
|
+
|
149
|
+
cell: function(row, isId, parentId){
|
150
|
+
return this.grid.cell(row, this, isId, parentId);
|
151
|
+
},
|
152
|
+
|
153
|
+
cells: function(start, count, parentId){
|
154
|
+
var t = this,
|
155
|
+
g = t.grid,
|
156
|
+
cells = [],
|
157
|
+
total = g.rowCount(parentId),
|
158
|
+
i = start || 0,
|
159
|
+
end = count >= 0 ? start + count : total;
|
160
|
+
for(; i < end && i < total; ++i){
|
161
|
+
cells.push(g.cell(i, t, 0, parentId));
|
162
|
+
}
|
163
|
+
return cells;
|
164
|
+
},
|
165
|
+
|
166
|
+
name: function(){
|
167
|
+
return this.def().name || '';
|
168
|
+
},
|
169
|
+
|
170
|
+
setName: function(name){
|
171
|
+
this.def().name = name;
|
172
|
+
return this;
|
173
|
+
},
|
174
|
+
|
175
|
+
field: function(){
|
176
|
+
return this.def().field || null;
|
177
|
+
},
|
178
|
+
|
179
|
+
getWidth: function(){
|
180
|
+
return this.def().width;
|
181
|
+
}
|
182
|
+
});
|
183
|
+
});
|
@@ -0,0 +1,447 @@
|
|
1
|
+
define([
|
2
|
+
"require",
|
3
|
+
"dojo/_base/declare",
|
4
|
+
"dojo/_base/array",
|
5
|
+
"dojo/_base/lang",
|
6
|
+
"dojo/_base/Deferred",
|
7
|
+
"dojo/DeferredList",
|
8
|
+
"./model/Model",
|
9
|
+
"./Row",
|
10
|
+
"./Column",
|
11
|
+
"./Cell",
|
12
|
+
"./_Module"
|
13
|
+
], function(require, declare, array, lang, Deferred, DeferredList, Model, Row, Column, Cell, _Module){
|
14
|
+
|
15
|
+
/*=====
|
16
|
+
return declare([], {
|
17
|
+
// summary:
|
18
|
+
// This is the logical grid (also the base class of the grid widget),
|
19
|
+
// providing grid data model and defines a module/plugin framework
|
20
|
+
// so that the whole grid can be as flexible as possible while still convenient enough for
|
21
|
+
// web page developers.
|
22
|
+
|
23
|
+
setStore: function(store){
|
24
|
+
// summary:
|
25
|
+
// Change the store for grid.
|
26
|
+
// store: dojo.data.*|dojox.data.*|dojo.store.*
|
27
|
+
// The new data store
|
28
|
+
},
|
29
|
+
|
30
|
+
setColumns: function(columns){
|
31
|
+
// summary:
|
32
|
+
// Change all the column definitions for grid.
|
33
|
+
// columns: Array
|
34
|
+
// The new column structure
|
35
|
+
},
|
36
|
+
|
37
|
+
row: function(row, isId, parentId){
|
38
|
+
// summary:
|
39
|
+
// Get a row object by ID or index.
|
40
|
+
// For asyc store, if the data of this row is not in cache, then null will be returned.
|
41
|
+
// row: Integer|String
|
42
|
+
// Row index of row ID
|
43
|
+
// isId: Boolean?
|
44
|
+
// If the row parameter is a numeric ID, set this to true
|
45
|
+
// returns:
|
46
|
+
// If the params are valid and row data is in cache, return a row object, else return null.
|
47
|
+
},
|
48
|
+
|
49
|
+
column: function(column, isId){
|
50
|
+
// summary:
|
51
|
+
// Get a column object by ID or index
|
52
|
+
// column: Integer|String
|
53
|
+
// Column index or column ID
|
54
|
+
// isId: Boolean
|
55
|
+
// If the column parameter is a numeric ID, set this to true
|
56
|
+
// returns:
|
57
|
+
// If the params are valid return a column object, else return NULL
|
58
|
+
},
|
59
|
+
|
60
|
+
cell: function(row, column, isId, parentId){
|
61
|
+
// summary:
|
62
|
+
// Get a cell object
|
63
|
+
// row: gridx.core.Row|Integer|String
|
64
|
+
// Row index or row ID or a row object
|
65
|
+
// column: gridx.core.Column|Integer|String
|
66
|
+
// Column index or column ID or a column object
|
67
|
+
// isId: Boolean?
|
68
|
+
// If the row and coumn params are numeric IDs, set this to true
|
69
|
+
// returns:
|
70
|
+
// If the params are valid and the row is in cache return a cell object, else return null.
|
71
|
+
},
|
72
|
+
|
73
|
+
columnCount: function(){
|
74
|
+
// summary:
|
75
|
+
// Get the number of columns
|
76
|
+
// returns:
|
77
|
+
// The count of columns
|
78
|
+
},
|
79
|
+
|
80
|
+
rowCount: function(parentId){
|
81
|
+
// summary:
|
82
|
+
// Get the number of rows.
|
83
|
+
// description:
|
84
|
+
// For async store, the return value is valid only when the grid has fetched something from the store.
|
85
|
+
// parentId: String?
|
86
|
+
// If provided, return the child count of the given parent row.
|
87
|
+
// returns:
|
88
|
+
// The count of rows. -1 if the size info is not available (using server side store and never fetched any data)
|
89
|
+
},
|
90
|
+
|
91
|
+
columns: function(start, count){
|
92
|
+
// summary:
|
93
|
+
// Get a range of columns, from index 'start' to index 'start + count'.
|
94
|
+
// start: Integer?
|
95
|
+
// The index of the first column in the returned array.
|
96
|
+
// If omitted, defaults to 0, so grid.columns() gets all the columns.
|
97
|
+
// count: Integer?
|
98
|
+
// The number of columns to return.
|
99
|
+
// If omitted, all the columns starting from 'start' will be returned.
|
100
|
+
// returns:
|
101
|
+
// An array of column objects
|
102
|
+
},
|
103
|
+
|
104
|
+
rows: function(start, count, parentId){
|
105
|
+
// summary:
|
106
|
+
// Get a range of rows, from index 'start' to index 'start + count'.
|
107
|
+
// description:
|
108
|
+
// For async store, if some rows are not in cache, then there will be NULLs in the returned array.
|
109
|
+
// start: Integer?
|
110
|
+
// The index of the first row in the returned array.
|
111
|
+
// If omitted, defaults to 0, so grid.rows() gets all the rows.
|
112
|
+
// count: Integer?
|
113
|
+
// The number of rows to return.
|
114
|
+
// If omitted, all the rows starting from 'start' will be returned.
|
115
|
+
// returns:
|
116
|
+
// An array of row objects
|
117
|
+
},
|
118
|
+
|
119
|
+
onModulesLoaded: function(){
|
120
|
+
// summary:
|
121
|
+
// Fired when all grid modules are loaded. Can be used as a signal of grid creation complete.
|
122
|
+
// tags:
|
123
|
+
// callback
|
124
|
+
}
|
125
|
+
});
|
126
|
+
=====*/
|
127
|
+
|
128
|
+
var delegate = lang.delegate,
|
129
|
+
isFunc = lang.isFunction,
|
130
|
+
isString = lang.isString,
|
131
|
+
hitch = lang.hitch;
|
132
|
+
|
133
|
+
function getDepends(mod){
|
134
|
+
var p = mod.moduleClass.prototype;
|
135
|
+
return (p.forced || []).concat(p.optional || []);
|
136
|
+
}
|
137
|
+
|
138
|
+
function configColumns(columns){
|
139
|
+
var cs = {}, c, i, len;
|
140
|
+
if(lang.isArray(columns)){
|
141
|
+
for(i = 0, len = columns.length; i < len; ++i){
|
142
|
+
c = columns[i];
|
143
|
+
c.index = i;
|
144
|
+
c.id = c.id || String(i + 1);
|
145
|
+
cs[c.id] = c;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
return cs;
|
149
|
+
}
|
150
|
+
|
151
|
+
function mixinAPI(base, apiPath){
|
152
|
+
if(apiPath){
|
153
|
+
for(var path in apiPath){
|
154
|
+
var bp = base[path],
|
155
|
+
ap = apiPath[path];
|
156
|
+
if(bp && lang.isObject(bp) && !isFunc(bp)){
|
157
|
+
mixinAPI(bp, ap);
|
158
|
+
}else{
|
159
|
+
base[path] = ap;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
function normalizeModules(self){
|
166
|
+
var mods = [],
|
167
|
+
modules = self.modules,
|
168
|
+
len = modules.length;
|
169
|
+
for(var i = 0; i < len; ++i){
|
170
|
+
var m = modules[i];
|
171
|
+
if(isFunc(m) || isString(m)){
|
172
|
+
m = {
|
173
|
+
moduleClass: m
|
174
|
+
};
|
175
|
+
}
|
176
|
+
if(m){
|
177
|
+
var mc = m.moduleClass;
|
178
|
+
if(isString(mc)){
|
179
|
+
try{
|
180
|
+
mc = m.moduleClass = require(mc);
|
181
|
+
}catch(e){
|
182
|
+
console.error(e);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
if(isFunc(mc)){
|
186
|
+
mods.push(m);
|
187
|
+
continue;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
console.error("The " + (i + 1 - self.coreModules.length) +
|
191
|
+
"-th declared module can NOT be found, please require it before using it");
|
192
|
+
}
|
193
|
+
self.modules = mods;
|
194
|
+
}
|
195
|
+
|
196
|
+
function checkForced(self){
|
197
|
+
var registeredMods = _Module._modules,
|
198
|
+
modules = self.modules, i, j, k, p, deps, depName, err;
|
199
|
+
for(i = 0; i < modules.length; ++i){
|
200
|
+
p = modules[i].moduleClass.prototype;
|
201
|
+
deps = (p.forced || []).concat(p.required || []);
|
202
|
+
for(j = 0; j < deps.length; ++j){
|
203
|
+
depName = deps[j];
|
204
|
+
for(k = modules.length - 1; k >= 0; --k){
|
205
|
+
if(modules[k].moduleClass.prototype.name === depName){
|
206
|
+
break;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
if(k < 0){
|
210
|
+
if(registeredMods[depName]){
|
211
|
+
modules.push({
|
212
|
+
moduleClass: registeredMods[depName]
|
213
|
+
});
|
214
|
+
}else{
|
215
|
+
err = 1; //1 as true
|
216
|
+
console.error("Forced/Required dependent module '" + depName +
|
217
|
+
"' is NOT found for '" + p.name + "' module.");
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
if(err){
|
223
|
+
throw new Error("Some forced/required dependent modules are NOT found.");
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
function removeDuplicate(self){
|
228
|
+
var i = 0, m, mods = {}, modules = [];
|
229
|
+
for(; m = self.modules[i]; ++i){
|
230
|
+
mods[m.moduleClass.prototype.name] = m;
|
231
|
+
}
|
232
|
+
for(i in mods){
|
233
|
+
modules.push(mods[i]);
|
234
|
+
}
|
235
|
+
self.modules = modules;
|
236
|
+
}
|
237
|
+
|
238
|
+
function checkModelExtensions(self){
|
239
|
+
var modules = self.modules,
|
240
|
+
i, modExts;
|
241
|
+
for(i = modules.length - 1; i >= 0; --i){
|
242
|
+
modExts = modules[i].moduleClass.prototype.modelExtensions;
|
243
|
+
if(modExts){
|
244
|
+
[].push.apply(self.modelExtensions, modExts);
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
function arr(self, total, type, start, count, pid){
|
250
|
+
var i = start || 0, end = count >= 0 ? start + count : total, r = [];
|
251
|
+
for(; i < end && i < total; ++i){
|
252
|
+
r.push(self[type](i, 0, pid));
|
253
|
+
}
|
254
|
+
return r;
|
255
|
+
}
|
256
|
+
|
257
|
+
function mixin(self, component, name){
|
258
|
+
var m, a, mods = self._modules;
|
259
|
+
for(m in mods){
|
260
|
+
m = mods[m].mod;
|
261
|
+
a = m[name + 'Mixin'];
|
262
|
+
if(isFunc(a)){
|
263
|
+
a = a.apply(m);
|
264
|
+
}
|
265
|
+
lang.mixin(component, a || {});
|
266
|
+
}
|
267
|
+
return component;
|
268
|
+
}
|
269
|
+
|
270
|
+
function initMod(self, deferredStartup, key){
|
271
|
+
var mods = self._modules,
|
272
|
+
m = mods[key],
|
273
|
+
mod = m.mod,
|
274
|
+
d = mod.loaded;
|
275
|
+
if(!m.done){
|
276
|
+
m.done = 1;
|
277
|
+
new DeferredList(array.map(array.filter(m.deps, function(depModName){
|
278
|
+
return mods[depModName];
|
279
|
+
}), hitch(self, initMod, self, deferredStartup)), 0, 1).then(function(){
|
280
|
+
if(mod.load){
|
281
|
+
mod.load(m.args, deferredStartup);
|
282
|
+
}else if(d.fired < 0){
|
283
|
+
d.callback();
|
284
|
+
}
|
285
|
+
});
|
286
|
+
}
|
287
|
+
return d;
|
288
|
+
}
|
289
|
+
|
290
|
+
return declare([], {
|
291
|
+
setStore: function(store){
|
292
|
+
if(this.store != store){
|
293
|
+
this.store = store;
|
294
|
+
this.model.setStore(store);
|
295
|
+
}
|
296
|
+
},
|
297
|
+
|
298
|
+
setColumns: function(columns){
|
299
|
+
var t = this;
|
300
|
+
t.structure = columns;
|
301
|
+
//make a shalow copy of columns here so one structure can be used in different grids.
|
302
|
+
t._columns = array.map(columns, function(col){
|
303
|
+
return lang.mixin({}, col);
|
304
|
+
});
|
305
|
+
t._columnsById = configColumns(t._columns);
|
306
|
+
if(t.model){
|
307
|
+
t.model._cache.onSetColumns(t._columnsById);
|
308
|
+
}
|
309
|
+
},
|
310
|
+
|
311
|
+
row: function(row, isId, parentId){
|
312
|
+
var t = this;
|
313
|
+
if(typeof row == "number" && !isId){
|
314
|
+
row = t.model.indexToId(row, parentId);
|
315
|
+
}
|
316
|
+
if(t.model.byId(row)){
|
317
|
+
t._rowObj = t._rowObj || mixin(t, new Row(t), "row");
|
318
|
+
return delegate(t._rowObj, {
|
319
|
+
id: row
|
320
|
+
});
|
321
|
+
}
|
322
|
+
return null;
|
323
|
+
},
|
324
|
+
|
325
|
+
column: function(column, isId){
|
326
|
+
var t = this, c, a, obj = {};
|
327
|
+
if(typeof column == "number" && !isId){
|
328
|
+
c = t._columns[column];
|
329
|
+
column = c && c.id;
|
330
|
+
}
|
331
|
+
c = t._columnsById[column];
|
332
|
+
if(c){
|
333
|
+
t._colObj = t._colObj || mixin(t, new Column(t), "column");
|
334
|
+
for(a in c){
|
335
|
+
if(t._colObj[a] === undefined){
|
336
|
+
obj[a] = c[a];
|
337
|
+
}
|
338
|
+
}
|
339
|
+
return delegate(t._colObj, obj);
|
340
|
+
}
|
341
|
+
return null;
|
342
|
+
},
|
343
|
+
|
344
|
+
cell: function(row, column, isId, parentId){
|
345
|
+
var t = this, r = row instanceof Row ? row : t.row(row, isId, parentId);
|
346
|
+
if(r){
|
347
|
+
var c = column instanceof Column ? column : t.column(column, isId);
|
348
|
+
if(c){
|
349
|
+
t._cellObj = t._cellObj || mixin(t, new Cell(t), "cell");
|
350
|
+
return delegate(t._cellObj, {
|
351
|
+
row: r,
|
352
|
+
column: c
|
353
|
+
});
|
354
|
+
}
|
355
|
+
}
|
356
|
+
return null;
|
357
|
+
},
|
358
|
+
|
359
|
+
columnCount: function(){
|
360
|
+
return this._columns.length;
|
361
|
+
},
|
362
|
+
|
363
|
+
rowCount: function(parentId){
|
364
|
+
return this.model.size(parentId);
|
365
|
+
},
|
366
|
+
|
367
|
+
columns: function(start, count){
|
368
|
+
return arr(this, this._columns.length, 'column', start, count); //gridx.core.Column[]
|
369
|
+
},
|
370
|
+
|
371
|
+
rows: function(start, count, parentId){
|
372
|
+
return arr(this, this.rowCount(parentId), 'row', start, count, parentId); //gridx.core.Row[]
|
373
|
+
},
|
374
|
+
|
375
|
+
onModulesLoaded: function(){},
|
376
|
+
|
377
|
+
//Private-------------------------------------------------------------------------------------
|
378
|
+
_init: function(){
|
379
|
+
var t = this,
|
380
|
+
d = t._deferStartup = new Deferred();
|
381
|
+
t.modules = t.modules || [];
|
382
|
+
t.modelExtensions = t.modelExtensions || [];
|
383
|
+
t.setColumns(t.structure);
|
384
|
+
|
385
|
+
normalizeModules(t);
|
386
|
+
checkForced(t);
|
387
|
+
removeDuplicate(t);
|
388
|
+
checkModelExtensions(t);
|
389
|
+
//Create model before module creation, so that all modules can use the logic grid from very beginning.
|
390
|
+
t.model = new Model(t);
|
391
|
+
t.when = hitch(t.model, t.model.when);
|
392
|
+
t._create();
|
393
|
+
t._preload();
|
394
|
+
t._load(d).then(function(){
|
395
|
+
t.onModulesLoaded();
|
396
|
+
});
|
397
|
+
},
|
398
|
+
|
399
|
+
_uninit: function(){
|
400
|
+
var t = this, mods = t._modules, m;
|
401
|
+
for(m in mods){
|
402
|
+
mods[m].mod.destroy();
|
403
|
+
}
|
404
|
+
if(t.model){
|
405
|
+
t.model.destroy();
|
406
|
+
}
|
407
|
+
},
|
408
|
+
|
409
|
+
_create: function(){
|
410
|
+
var t = this,
|
411
|
+
i = 0, mod,
|
412
|
+
mods = t._modules = {};
|
413
|
+
for(; mod = t.modules[i]; ++i){
|
414
|
+
var m, cls = mod.moduleClass,
|
415
|
+
key = cls.prototype.name;
|
416
|
+
if(!mods[key]){
|
417
|
+
mods[key] = {
|
418
|
+
args: mod,
|
419
|
+
mod: m = new cls(t, mod),
|
420
|
+
deps: getDepends(mod)
|
421
|
+
};
|
422
|
+
if(m.getAPIPath){
|
423
|
+
mixinAPI(t, m.getAPIPath());
|
424
|
+
}
|
425
|
+
}
|
426
|
+
}
|
427
|
+
},
|
428
|
+
|
429
|
+
_preload: function(){
|
430
|
+
var m, mods = this._modules;
|
431
|
+
for(m in mods){
|
432
|
+
m = mods[m];
|
433
|
+
if(m.mod.preload){
|
434
|
+
m.mod.preload(m.args);
|
435
|
+
}
|
436
|
+
}
|
437
|
+
},
|
438
|
+
|
439
|
+
_load: function(deferredStartup){
|
440
|
+
var dl = [], m;
|
441
|
+
for(m in this._modules){
|
442
|
+
dl.push(initMod(this, deferredStartup, m));
|
443
|
+
}
|
444
|
+
return new DeferredList(dl, 0, 1);
|
445
|
+
}
|
446
|
+
});
|
447
|
+
});
|