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,300 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/kernel",
|
3
|
+
'dojo/_base/declare',
|
4
|
+
'dojo/_base/lang',
|
5
|
+
'dojo/_base/array',
|
6
|
+
'dojo/dom-construct',
|
7
|
+
'dojo/aspect',
|
8
|
+
'dojo/string',
|
9
|
+
'dojo/dom-class',
|
10
|
+
'dojox/mobile/_StoreMixin',
|
11
|
+
'dojox/mobile/Pane',
|
12
|
+
'dojox/mobile/ScrollablePane',
|
13
|
+
'dojo/i18n!./nls/common',
|
14
|
+
"dojo/_base/Deferred",
|
15
|
+
"dojo/has"
|
16
|
+
], function(kernel, declare, lang, array, dom, aspect, string, css, _StoreMixin, Pane, ScrollablePane, i18n, Deferred, has){
|
17
|
+
// module:
|
18
|
+
// gridx/mobile/Grid
|
19
|
+
// summary:
|
20
|
+
// A mobile grid that has fixed header, footer and a scrollable body.
|
21
|
+
|
22
|
+
kernel.experimental('gridx/mobile/Grid');
|
23
|
+
|
24
|
+
return declare('gridx.mobile.Grid', [Pane, _StoreMixin], {
|
25
|
+
// summary:
|
26
|
+
// A mobile grid that has fixed header, footer and a scrollable body.
|
27
|
+
|
28
|
+
// autoHeight: boolean
|
29
|
+
// If true, it's must be a children of dojox.mobile.View
|
30
|
+
// and it occupies the rest height of the screen. If false it could be in any container
|
31
|
+
// using a specified height.
|
32
|
+
autoHeight: true,
|
33
|
+
|
34
|
+
// showHeader: boolean
|
35
|
+
// Whether to show the grid header
|
36
|
+
showHeader: false,
|
37
|
+
|
38
|
+
// vScroller: boolean
|
39
|
+
// Whether to show the virtical scroller
|
40
|
+
vScroller: true,
|
41
|
+
|
42
|
+
// hScroller: boolean
|
43
|
+
// Whether to show the horizontal scroller
|
44
|
+
hScroller: false,
|
45
|
+
|
46
|
+
// columns: array
|
47
|
+
// Column definition to show the grid from store
|
48
|
+
columns: null,
|
49
|
+
|
50
|
+
setColumns: function(columns){
|
51
|
+
// summary:
|
52
|
+
// Set columns to show for the grid.
|
53
|
+
// Maybe improve performance by adding/removing some columns instead of re-rendering.
|
54
|
+
this.columns = columns;
|
55
|
+
this.refresh();
|
56
|
+
},
|
57
|
+
|
58
|
+
buildGrid: function(){
|
59
|
+
// summary:
|
60
|
+
// Build the whole grid
|
61
|
+
if(this.columns)this._buildHeader();
|
62
|
+
if(this.store)this._buildBody();
|
63
|
+
this.resize();
|
64
|
+
},
|
65
|
+
|
66
|
+
_buildHeader: function(){
|
67
|
+
// summary:
|
68
|
+
// Build the grid header when showHeader is true.
|
69
|
+
if(!this.showHeader){
|
70
|
+
this.headerNode.style.display = 'none';
|
71
|
+
return;
|
72
|
+
}else{
|
73
|
+
this.headerNode.style.display = 'block';
|
74
|
+
}
|
75
|
+
|
76
|
+
var arr = ['<div class="mobileGridxHeaderRow"><table><tr>'];
|
77
|
+
var _this = this;
|
78
|
+
array.forEach(this.columns, function(col){
|
79
|
+
var textDir = col.textDir || _this.textDir;
|
80
|
+
arr.push(
|
81
|
+
'<th class="mobileGridxHeaderCell ', col.cssClass || ''
|
82
|
+
,col.align ? ' align-' + col.align : ''
|
83
|
+
,col.width? '" style="width:' + col.width + ';"' : ''
|
84
|
+
,'>'
|
85
|
+
,(has("dojo-bidi") && textDir) ? _this._enforceTextDirWithUcc(col.title, textDir) : col.title
|
86
|
+
,'</th>'
|
87
|
+
);
|
88
|
+
});
|
89
|
+
arr.push('</tr></table></div>');
|
90
|
+
this.headerNode.innerHTML = arr.join('');
|
91
|
+
},
|
92
|
+
|
93
|
+
_buildBody: function(items){
|
94
|
+
// summary:
|
95
|
+
// Build the grid body
|
96
|
+
console.log('building body');
|
97
|
+
if(items && items.length){
|
98
|
+
var arr = [];
|
99
|
+
array.forEach(items, function(item, i){
|
100
|
+
arr.push(this._createRow(item, i%2 == 1));
|
101
|
+
}, this);
|
102
|
+
this.bodyPane.containerNode.innerHTML = arr.join('');
|
103
|
+
}else{
|
104
|
+
this.bodyPane.containerNode.innerHTML = '<div class="mobileGridxNoDataNode">' + i18n.noDataMsg + '</div>';
|
105
|
+
}
|
106
|
+
},
|
107
|
+
|
108
|
+
_createRow: function(item){
|
109
|
+
// summary:
|
110
|
+
// Create a grid row by object store item.
|
111
|
+
var rowId = this.store.getIdentity(item);
|
112
|
+
var arr = ['<div class="mobileGridxRow"',
|
113
|
+
rowId ? ' rowId="' + rowId + '"' : '',
|
114
|
+
'><table><tr>'];
|
115
|
+
array.forEach(this.columns, function(col){
|
116
|
+
var value = this._getCellContent(col, item);
|
117
|
+
var textDir = col.textDir || this.textDir;
|
118
|
+
if(has("dojo-bidi") && textDir){
|
119
|
+
value = this._enforceTextDirWithUcc(value, textDir);
|
120
|
+
}
|
121
|
+
arr.push(
|
122
|
+
'<td class="mobileGridxCell '
|
123
|
+
,((col.cssClass || col.align) ? ((col.cssClass || '') + (col.align ? ' align-' + col.align : '')) : '')
|
124
|
+
,'"'
|
125
|
+
,(col.width? ' style="width:' + col.width + ';"' : '')
|
126
|
+
,'>', value, '</td>'
|
127
|
+
);
|
128
|
+
}, this);
|
129
|
+
arr.push('</tr></table></div>');
|
130
|
+
return arr.join('');
|
131
|
+
},
|
132
|
+
|
133
|
+
_getCellContent: function(col, item){
|
134
|
+
// summary:
|
135
|
+
// Get a cell content by the column definition.
|
136
|
+
// * Currently only support string content, will add support for widget in future.
|
137
|
+
var f = col.formatter;
|
138
|
+
if(col.template){
|
139
|
+
return string.substitute(col.template, item);
|
140
|
+
}else{
|
141
|
+
return f ? f(item, col) : item[col.field];
|
142
|
+
}
|
143
|
+
},
|
144
|
+
|
145
|
+
buildRendering: function(){
|
146
|
+
// summary:
|
147
|
+
// Build the grid dom structure.
|
148
|
+
this.inherited(arguments);
|
149
|
+
css.add(this.domNode, 'mobileGridx');
|
150
|
+
this.domNode.innerHTML = '<div class="mobileGridxHeader"></div><div class="mobileGridxBody"></div><div class="mobileGridxFooter"></div>';
|
151
|
+
this.headerNode = this.domNode.childNodes[0];
|
152
|
+
this.bodyNode = this.domNode.childNodes[1];
|
153
|
+
this.footerNode = this.domNode.childNodes[2];
|
154
|
+
this.containerNode = this.bodyNode;
|
155
|
+
var scrollDir = (this.vScroller ? 'v' : '') + (this.hScroller ? 'h' : '');
|
156
|
+
if(!scrollDir)scrollDir = 'v';
|
157
|
+
this.bodyPane = new ScrollablePane({
|
158
|
+
scrollDir: scrollDir,
|
159
|
+
scrollType: 1
|
160
|
+
}, this.bodyNode);
|
161
|
+
this.bodyPane._useTopLeft = false;
|
162
|
+
|
163
|
+
if(this.showHeader){
|
164
|
+
var h = this.headerNode;
|
165
|
+
this.connect(this.bodyPane, 'scrollTo', function(to){
|
166
|
+
if((typeof to.x) != "number")return;
|
167
|
+
h.firstChild.style.webkitTransform = this.bodyPane.makeTranslateStr({x:to.x});
|
168
|
+
});
|
169
|
+
|
170
|
+
this.connect(this.bodyPane, 'slideTo', function(to, duration, easing){
|
171
|
+
this.bodyPane._runSlideAnimation({x:this.bodyPane.getPos().x}, {x:to.x}
|
172
|
+
, duration, easing, h.firstChild, 2); //2 means it's a containerNode
|
173
|
+
});
|
174
|
+
|
175
|
+
this.connect(this.bodyPane, 'stopAnimation', function(){
|
176
|
+
css.remove(h.firstChild, 'mblScrollableScrollTo2');
|
177
|
+
});
|
178
|
+
}
|
179
|
+
},
|
180
|
+
|
181
|
+
resize: function(){
|
182
|
+
// summary:
|
183
|
+
// Calculate the height of grid body according to the autoHeight property.
|
184
|
+
this.inherited(arguments);
|
185
|
+
var h = this.domNode.offsetHeight;
|
186
|
+
if(this.autoHeight){
|
187
|
+
//if auto height, grid occupies the rest height of the screen.
|
188
|
+
this.domNode.style.height = 'auto';
|
189
|
+
var n = this.domNode, p = n.parentNode;
|
190
|
+
h = this.bodyPane.getScreenSize().h;
|
191
|
+
array.forEach(p.childNodes, function(node){
|
192
|
+
if(node == n)return;
|
193
|
+
h -= (node.offsetHeight || 0);
|
194
|
+
});
|
195
|
+
}
|
196
|
+
h = h - this.headerNode.offsetHeight - this.footerNode.offsetHeight;
|
197
|
+
this.bodyNode.style.height = h + 'px';
|
198
|
+
},
|
199
|
+
|
200
|
+
startup: function(){
|
201
|
+
//summary:
|
202
|
+
// Start up the body pane, and fetch data from store.
|
203
|
+
|
204
|
+
this.bodyPane.startup();
|
205
|
+
this.inherited(arguments);
|
206
|
+
this.refresh();
|
207
|
+
this.resize();
|
208
|
+
},
|
209
|
+
|
210
|
+
|
211
|
+
onComplete: function(items){
|
212
|
+
// summary:
|
213
|
+
// An handler that is called after the fetch completes.
|
214
|
+
this._buildBody(items);
|
215
|
+
},
|
216
|
+
|
217
|
+
onError: function(errorData){
|
218
|
+
// summary:
|
219
|
+
// An error handler.
|
220
|
+
console.log('error: ', errorData);
|
221
|
+
},
|
222
|
+
|
223
|
+
onUpdate: function(item, insertedInto){
|
224
|
+
// summary:
|
225
|
+
// Adds a new item or updates an existing item.
|
226
|
+
dom.place(this._createRow(item), this.bodyNode.firstChild, insertedInto);
|
227
|
+
},
|
228
|
+
|
229
|
+
onDelete: function(item, removedFrom){
|
230
|
+
// summary:
|
231
|
+
// Deletes an existing item.
|
232
|
+
dom.destroy(this.bodyNode.firstChild.childNodes[removedFrom]);
|
233
|
+
},
|
234
|
+
|
235
|
+
|
236
|
+
PDF: '\u202C',
|
237
|
+
LRE: '\u202A',
|
238
|
+
RLE: '\u202B',
|
239
|
+
_enforceTextDirWithUcc: function(text, textDir){
|
240
|
+
// summary:
|
241
|
+
// Wraps by UCC (Unicode control characters) option's text according to this.textDir
|
242
|
+
// text:
|
243
|
+
// The text to be wrapped.
|
244
|
+
// textDir:
|
245
|
+
// Text direction.
|
246
|
+
|
247
|
+
textDir = (this._checkContextual && text && textDir === "auto") ? this._checkContextual(text.replace(/<[^>]*>/g,"")) : textDir;
|
248
|
+
return ((textDir === "rtl") ? this.RLE : this.LRE) + text + this.PDF;
|
249
|
+
},
|
250
|
+
_setTextDirAttr: function(textDir){
|
251
|
+
if(this.textDir != textDir){
|
252
|
+
this.textDir = textDir;
|
253
|
+
this.refresh();
|
254
|
+
}
|
255
|
+
},
|
256
|
+
// refresh: function(){
|
257
|
+
// //summary:
|
258
|
+
// // Firstly refresh header, then fetch data from store.
|
259
|
+
// // Body will be refreshed after store query completes.
|
260
|
+
//
|
261
|
+
// this._buildHeader();
|
262
|
+
// return this.inherited(arguments);
|
263
|
+
// },
|
264
|
+
|
265
|
+
///////////////////
|
266
|
+
//////////////////////////////////////////////
|
267
|
+
//Over-write from dojox/mobile/_StoreMixin.js , which doesn't support updating events
|
268
|
+
//TODO: will remove this if it's fixed in _StoreMixin
|
269
|
+
refresh: function(){
|
270
|
+
// summary:
|
271
|
+
// Fetches the data and generates the list items.
|
272
|
+
|
273
|
+
this._buildHeader();
|
274
|
+
if(!this.store){ return null; }
|
275
|
+
var _this = this;
|
276
|
+
var promise = this.store.query(this.query, this.queryOptions);
|
277
|
+
Deferred.when(promise, function(results){
|
278
|
+
if(results.items){
|
279
|
+
results = results.items; // looks like dojo/data style items array
|
280
|
+
}
|
281
|
+
if(promise.observe){
|
282
|
+
promise.observe(function(object, removedFrom, insertedInto){
|
283
|
+
if(removedFrom > -1){ // existing object removed
|
284
|
+
_this.onDelete(object, removedFrom);
|
285
|
+
}
|
286
|
+
if(insertedInto > -1){ // new or updated object inserted
|
287
|
+
_this.onUpdate(object, insertedInto);
|
288
|
+
}
|
289
|
+
}, true);
|
290
|
+
}
|
291
|
+
_this.onComplete(results);
|
292
|
+
}, function(error){
|
293
|
+
_this.onError(error);
|
294
|
+
});
|
295
|
+
this.resize();
|
296
|
+
return promise;
|
297
|
+
}
|
298
|
+
});
|
299
|
+
|
300
|
+
});
|
@@ -0,0 +1,88 @@
|
|
1
|
+
define([
|
2
|
+
'dojo/_base/declare',
|
3
|
+
'dojo/_base/lang',
|
4
|
+
'dojo/_base/array',
|
5
|
+
'dojo/dom-construct',
|
6
|
+
'dojo/dom-class',
|
7
|
+
'dojo/query',
|
8
|
+
'dojo/Deferred',
|
9
|
+
'dojo/i18n!./nls/LazyLoad'
|
10
|
+
], function(declare, lang, array, dom, css, query, Deferred, i18n){
|
11
|
+
return declare(null, {
|
12
|
+
pageSize: 20,
|
13
|
+
lastId: null, //used to store last id value for query, so that server side knows the state of grid
|
14
|
+
_buildBody: function(items){
|
15
|
+
this.inherited(arguments);
|
16
|
+
var wrapper = dom.create('div', {
|
17
|
+
className: 'mobileGridxLoadMoreWrapper'
|
18
|
+
}, this.bodyPane.containerNode, 'last');
|
19
|
+
this._buttonLoadMore = dom.create('button', {
|
20
|
+
innerHTML: i18n.loadMore,
|
21
|
+
className: 'mobileGridxLoadMoreButton mblButton'
|
22
|
+
}, wrapper, 'last');
|
23
|
+
this.connect(this._buttonLoadMore, 'onclick', 'loadMore');
|
24
|
+
if(items && items.length < this.pageSize){
|
25
|
+
this._buttonLoadMore.style.display = 'none';
|
26
|
+
}
|
27
|
+
if(items && items.length){
|
28
|
+
this.lastId = items[items.length - 1][this.store.idProperty];
|
29
|
+
}
|
30
|
+
},
|
31
|
+
|
32
|
+
loadMore: function(){
|
33
|
+
// summary:
|
34
|
+
// Called when touch load more button.
|
35
|
+
// It loads data from server side and create extra rows at the bottom.
|
36
|
+
// If need to provide custom query information, use aspect.before(grid, 'loadMore')
|
37
|
+
|
38
|
+
this._makeButtonBusy();
|
39
|
+
var q = lang.mixin({
|
40
|
+
'lastId': this.lastId,
|
41
|
+
count: this.pageSize
|
42
|
+
}, this.query);
|
43
|
+
|
44
|
+
var self = this;
|
45
|
+
this.store.query(q, this.queryOptions).then(
|
46
|
+
lang.hitch(this, '_loadMoreComplete'),
|
47
|
+
lang.hitch(this, 'onError')
|
48
|
+
);
|
49
|
+
},
|
50
|
+
|
51
|
+
_loadMoreComplete: function(results){
|
52
|
+
//summary:
|
53
|
+
// Called after the store completes the query
|
54
|
+
|
55
|
+
var items = results.items || results;
|
56
|
+
//add new rows at the bottom
|
57
|
+
if(items && items.length){
|
58
|
+
var rows = query('>.mobileGridxRow', this.bodyPane.containerNode);
|
59
|
+
var arr = [];
|
60
|
+
array.forEach(items, function(item){
|
61
|
+
arr.push(this._createRow(item));
|
62
|
+
}, this);
|
63
|
+
dom.place(arr.join(''), this._buttonLoadMore.parentNode, 'before');
|
64
|
+
this.lastId = items[items.length - 1][this.store.idProperty];
|
65
|
+
}
|
66
|
+
this._cancelButtonBusy();
|
67
|
+
if(results.noMore){
|
68
|
+
//if no more data, results should have a property 'noMore' with truthy value
|
69
|
+
this._buttonLoadMore.style.display = 'none';
|
70
|
+
}
|
71
|
+
},
|
72
|
+
onError: function(){
|
73
|
+
this.inherited(arguments);
|
74
|
+
this._cancelButtonBusy();
|
75
|
+
},
|
76
|
+
|
77
|
+
_makeButtonBusy: function(){
|
78
|
+
var btn = this._buttonLoadMore;
|
79
|
+
btn.innerHTML = '<img src="' + this._blankGif +'" class="mobileGridxLoadingIcon"/> ' + i18n.loading;
|
80
|
+
btn.disabled = true;
|
81
|
+
},
|
82
|
+
_cancelButtonBusy: function(){
|
83
|
+
var btn = this._buttonLoadMore;
|
84
|
+
btn.innerHTML = i18n.loadMore;
|
85
|
+
btn.disabled = false;
|
86
|
+
}
|
87
|
+
});
|
88
|
+
});
|
@@ -0,0 +1,117 @@
|
|
1
|
+
define([
|
2
|
+
'dojo/_base/declare',
|
3
|
+
'dojo/_base/lang',
|
4
|
+
'dojo/_base/array',
|
5
|
+
'dojo/aspect',
|
6
|
+
'dojo/dom-construct',
|
7
|
+
'dojo/dom-class',
|
8
|
+
'dojo/query',
|
9
|
+
'dojo/i18n!./nls/PullRefresh'
|
10
|
+
], function(declare, lang, array, aspect, dom, css, query, i18n){
|
11
|
+
return declare(null, {
|
12
|
+
readyToRefresh: false,
|
13
|
+
state: 'normal',
|
14
|
+
triggerHeight: 50,
|
15
|
+
|
16
|
+
// lastId:
|
17
|
+
// used to store last id value for query, so that server side knows the state of grid
|
18
|
+
lastId: null,
|
19
|
+
|
20
|
+
buildRendering: function(){
|
21
|
+
// summary:
|
22
|
+
// Add pull refresh related ui elements, and connect events to them.
|
23
|
+
|
24
|
+
this.inherited(arguments);
|
25
|
+
var self = this;
|
26
|
+
aspect.before(this.bodyPane, 'slideTo', function(to, duration, easing){
|
27
|
+
if((typeof to.y) != "number")return;
|
28
|
+
if(to.y == 0 && self.state != 'normal'){
|
29
|
+
to.y = self.triggerHeight;
|
30
|
+
if(self.state == 'ready'){
|
31
|
+
self.loadNew();
|
32
|
+
self._setPullRefreshState('loading');
|
33
|
+
}
|
34
|
+
}
|
35
|
+
});
|
36
|
+
this.connect(this.bodyPane, 'scrollTo', function(to){
|
37
|
+
if((typeof to.y) != "number")return;
|
38
|
+
var wrapper = self.pullRefreshWrapper;
|
39
|
+
if(to.y == 0){
|
40
|
+
if(self.state == 'ready'){}
|
41
|
+
}else if(to.y > self.triggerHeight){
|
42
|
+
if(self.state == 'normal'){
|
43
|
+
self._setPullRefreshState('ready');
|
44
|
+
}
|
45
|
+
}else{
|
46
|
+
if(self.state == 'ready'){
|
47
|
+
self._setPullRefreshState('normal');
|
48
|
+
}
|
49
|
+
}
|
50
|
+
});
|
51
|
+
},
|
52
|
+
loadNew: function(){
|
53
|
+
// summary:
|
54
|
+
// Called when pull refresh triggers.
|
55
|
+
// It loads data from server side and create extra rows at the top.
|
56
|
+
|
57
|
+
var q = lang.mixin({
|
58
|
+
'lastId': this.lastId
|
59
|
+
}, this.query);
|
60
|
+
this.store.query(q, this.queryOptions).then(
|
61
|
+
lang.hitch(this, '_loadNewComplete'),
|
62
|
+
lang.hitch(this, 'onError')
|
63
|
+
);
|
64
|
+
},
|
65
|
+
_loadNewComplete: function(results){
|
66
|
+
// summary:
|
67
|
+
// Called after store finishes fetching data from server side.
|
68
|
+
|
69
|
+
var items = results.items || results, arr = [];
|
70
|
+
if(items.length){
|
71
|
+
var rows = query('>.mobileGridxRow', this.bodyPane.containerNode);
|
72
|
+
this.lastId = items[0][this.store.idProperty];
|
73
|
+
array.forEach(items, function(item){
|
74
|
+
arr.push(this._createRow(item));
|
75
|
+
}, this);
|
76
|
+
dom.place(arr.join(''), this.pullRefreshWrapper, 'after');
|
77
|
+
}
|
78
|
+
this._setPullRefreshState('normal');
|
79
|
+
this.bodyPane.slideTo({y:0});
|
80
|
+
},
|
81
|
+
_setPullRefreshState: function(state){
|
82
|
+
// summary:
|
83
|
+
// Set state of the grid
|
84
|
+
// state:
|
85
|
+
// normal|ready|loading
|
86
|
+
var wrapper = this.pullRefreshWrapper, labelNode = wrapper.lastChild;
|
87
|
+
css.remove(wrapper, 'releaseToRefresh');
|
88
|
+
css.remove(wrapper, 'inLoading');
|
89
|
+
this.state = state;
|
90
|
+
switch(state){
|
91
|
+
case 'normal':
|
92
|
+
labelNode.innerHTML = i18n.pullToRefresh;
|
93
|
+
break;
|
94
|
+
case 'ready':
|
95
|
+
labelNode.innerHTML = i18n.releaseToRefresh;
|
96
|
+
css.add(wrapper, 'releaseToRefresh');
|
97
|
+
break;
|
98
|
+
case 'loading':
|
99
|
+
labelNode.innerHTML = i18n.waitForLoading;
|
100
|
+
css.add(wrapper, 'inLoading');
|
101
|
+
break;
|
102
|
+
default:
|
103
|
+
break;
|
104
|
+
}
|
105
|
+
},
|
106
|
+
|
107
|
+
_buildBody: function(){
|
108
|
+
this.inherited(arguments);
|
109
|
+
|
110
|
+
//Add an extra node for pull refresh UI
|
111
|
+
this.pullRefreshWrapper = dom.create('div', {
|
112
|
+
className: 'mobileGridxPullRefreshWrapper'
|
113
|
+
}, this.bodyPane.containerNode, 'first');
|
114
|
+
this.pullRefreshWrapper.innerHTML = '<img src="'+this._blankGif+'"/><span class="mobileGridxPullRefreshLabel">' + i18n.pullToRefresh + '</span>';
|
115
|
+
}
|
116
|
+
});
|
117
|
+
});
|
@@ -0,0 +1,66 @@
|
|
1
|
+
define([
|
2
|
+
'dojo/_base/declare',
|
3
|
+
'dojo/_base/array'
|
4
|
+
], function(declare, array){
|
5
|
+
return declare(null, {
|
6
|
+
// summary:
|
7
|
+
// Provide sort api for the grid
|
8
|
+
// and provide a single UI in the header like traditional grid sorting.
|
9
|
+
sort: function(args){
|
10
|
+
// summary:
|
11
|
+
// Sort the grid by args which in store sorting format.
|
12
|
+
if(args && (args.length || args.attribute)){
|
13
|
+
this.queryOptions.sort = args.length ? args : [args];
|
14
|
+
}else{
|
15
|
+
this.queryOptions.sort = null;
|
16
|
+
}
|
17
|
+
this.refresh();
|
18
|
+
this.updateSortIndicators();
|
19
|
+
},
|
20
|
+
|
21
|
+
_buildHeader: function(){
|
22
|
+
// summary:
|
23
|
+
// Add click to sort capability for header, only for single sort.
|
24
|
+
this.inherited(arguments);
|
25
|
+
if(this._headerClickHandler){return;}
|
26
|
+
this._headerClickHandler = this.connect(this.headerNode, 'onclick', function(evt){
|
27
|
+
var cell = evt.target;
|
28
|
+
if(!/th/i.test(cell.tagName))return;
|
29
|
+
if(!this.queryOptions){this.queryOptions = {};}
|
30
|
+
var col = this.columns[cell.cellIndex], sort = this.queryOptions.sort;
|
31
|
+
|
32
|
+
//Initial sort may be a array or null..
|
33
|
+
if(sort){sort = sort.length ? sort[0] : sort;}
|
34
|
+
else{sort = {};}
|
35
|
+
|
36
|
+
if(sort.attribute != col.field){
|
37
|
+
sort = {attribute: col.field, descending: false};
|
38
|
+
}else{
|
39
|
+
if(sort.descending)sort.attribute = null;
|
40
|
+
else if(!sort.descending)sort.descending = true;
|
41
|
+
}
|
42
|
+
this.sort(sort);
|
43
|
+
}, this);
|
44
|
+
},
|
45
|
+
|
46
|
+
updateSortIndicators: function(){
|
47
|
+
// summary:
|
48
|
+
// Update the sorting indicators. Maybe override to provide other sorting UI.
|
49
|
+
// Only support single sort now
|
50
|
+
|
51
|
+
var cols = this.columns, sort = this.queryOptions.sort,
|
52
|
+
ht = this.headerNode.firstChild.firstChild;//header table
|
53
|
+
if(sort)sort = sort.length ? sort[0] : sort;
|
54
|
+
else sort = {};
|
55
|
+
|
56
|
+
array.forEach(ht.rows[0].cells, function(cell, i){
|
57
|
+
var txt = cell.innerHTML.replace(/ *[↑↓]$/g, '');
|
58
|
+
var col = cols[cell.cellIndex];
|
59
|
+
if(col.field == sort.attribute){
|
60
|
+
txt += sort.descending ? ' ↓' : ' ↑';
|
61
|
+
}
|
62
|
+
cell.innerHTML = txt;
|
63
|
+
});
|
64
|
+
}
|
65
|
+
});
|
66
|
+
});
|
@@ -0,0 +1,38 @@
|
|
1
|
+
define({root:
|
2
|
+
({
|
3
|
+
loading: 'Loading...',
|
4
|
+
loadMore: 'Load More'
|
5
|
+
}),
|
6
|
+
"ar": true,
|
7
|
+
"bg": true,
|
8
|
+
"ca": true,
|
9
|
+
"cs": true,
|
10
|
+
"da": true,
|
11
|
+
"de": true,
|
12
|
+
"el": true,
|
13
|
+
"es": true,
|
14
|
+
"fi": true,
|
15
|
+
"fr": true,
|
16
|
+
"he": true,
|
17
|
+
"hr": true,
|
18
|
+
"hu": true,
|
19
|
+
"it": true,
|
20
|
+
"ja": true,
|
21
|
+
"kk": true,
|
22
|
+
"ko": true,
|
23
|
+
"nb": true,
|
24
|
+
"nl": true,
|
25
|
+
"pl": true,
|
26
|
+
"pt": true,
|
27
|
+
"pt-pt": true,
|
28
|
+
"ro": true,
|
29
|
+
"ru": true,
|
30
|
+
"sk": true,
|
31
|
+
"sl": true,
|
32
|
+
"sv": true,
|
33
|
+
"th": true,
|
34
|
+
"tr": true,
|
35
|
+
"uk": true,
|
36
|
+
"zh": true,
|
37
|
+
"zh-tw": true
|
38
|
+
});
|
@@ -0,0 +1,39 @@
|
|
1
|
+
define({root:
|
2
|
+
({
|
3
|
+
pullToRefresh: 'Pull to refresh',
|
4
|
+
releaseToRefresh: 'Release to refresh',
|
5
|
+
waitForLoading: 'Wait for loading...'
|
6
|
+
}),
|
7
|
+
"ar": true,
|
8
|
+
"bg": true,
|
9
|
+
"ca": true,
|
10
|
+
"cs": true,
|
11
|
+
"da": true,
|
12
|
+
"de": true,
|
13
|
+
"el": true,
|
14
|
+
"es": true,
|
15
|
+
"fi": true,
|
16
|
+
"fr": true,
|
17
|
+
"he": true,
|
18
|
+
"hr": true,
|
19
|
+
"hu": true,
|
20
|
+
"it": true,
|
21
|
+
"ja": true,
|
22
|
+
"kk": true,
|
23
|
+
"ko": true,
|
24
|
+
"nb": true,
|
25
|
+
"nl": true,
|
26
|
+
"pl": true,
|
27
|
+
"pt": true,
|
28
|
+
"pt-pt": true,
|
29
|
+
"ro": true,
|
30
|
+
"ru": true,
|
31
|
+
"sk": true,
|
32
|
+
"sl": true,
|
33
|
+
"sv": true,
|
34
|
+
"th": true,
|
35
|
+
"tr": true,
|
36
|
+
"uk": true,
|
37
|
+
"zh": true,
|
38
|
+
"zh-tw": true
|
39
|
+
});
|