gridx-rails 1.2.1 → 1.3.0.pre.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +9 -9
- data/app/assets/images/gridx/resources/images/headershadow.png +0 -0
- data/app/assets/images/gridx/resources/images/rowback.png +0 -0
- data/app/assets/images/gridx/resources/images/sprite.png +0 -0
- data/app/assets/javascripts/gridx/Grid.js +20 -3
- data/app/assets/javascripts/gridx/allModules.js +18 -4
- data/app/assets/javascripts/gridx/core/Core.js +36 -6
- data/app/assets/javascripts/gridx/core/model/Model.js +6 -5
- data/app/assets/javascripts/gridx/core/model/cache/Async.js +9 -7
- data/app/assets/javascripts/gridx/core/model/cache/Sync.js +414 -12
- data/app/assets/javascripts/gridx/core/model/extensions/Mark.js +14 -20
- data/app/assets/javascripts/gridx/core/model/extensions/Modify.js +3 -10
- data/app/assets/javascripts/gridx/modules/AutoPagedBody.js +100 -0
- data/app/assets/javascripts/gridx/modules/AutoScroll.js +92 -23
- data/app/assets/javascripts/gridx/modules/Bar.js +14 -1
- data/app/assets/javascripts/gridx/modules/Body.js +64 -29
- data/app/assets/javascripts/gridx/modules/CellWidget.js +5 -2
- data/app/assets/javascripts/gridx/modules/ColumnLock.js +1 -2
- data/app/assets/javascripts/gridx/modules/ColumnWidth.js +4 -1
- data/app/assets/javascripts/gridx/modules/Dod.js +216 -12
- data/app/assets/javascripts/gridx/modules/Edit.js +143 -68
- data/app/assets/javascripts/gridx/modules/ExpandableColumn.js +292 -0
- data/app/assets/javascripts/gridx/modules/Filter.js +14 -0
- data/app/assets/javascripts/gridx/modules/Focus.js +9 -3
- data/app/assets/javascripts/gridx/modules/Header.js +22 -12
- data/app/assets/javascripts/gridx/modules/HeaderRegions.js +23 -8
- data/app/assets/javascripts/gridx/modules/IndirectSelect.js +6 -7
- data/app/assets/javascripts/gridx/modules/IndirectSelectColumn.js +1 -1
- data/app/assets/javascripts/gridx/modules/Layer.js +358 -0
- data/app/assets/javascripts/gridx/modules/NestedSort.js +8 -10
- data/app/assets/javascripts/gridx/modules/PagedBody.js +22 -323
- data/app/assets/javascripts/gridx/modules/Puller.js +113 -0
- data/app/assets/javascripts/gridx/modules/RowHeader.js +7 -6
- data/app/assets/javascripts/gridx/modules/RowLock.js +49 -19
- data/app/assets/javascripts/gridx/modules/SlantedHeader.js +46 -0
- data/app/assets/javascripts/gridx/modules/Sort.js +417 -0
- data/app/assets/javascripts/gridx/modules/StructureSwitch.js +143 -0
- data/app/assets/javascripts/gridx/modules/SummaryBar.js +6 -1
- data/app/assets/javascripts/gridx/modules/TouchVScroller.js +36 -13
- data/app/assets/javascripts/gridx/modules/Tree.js +6 -8
- data/app/assets/javascripts/gridx/modules/VScroller.js +1 -1
- data/app/assets/javascripts/gridx/modules/View.js +25 -18
- data/app/assets/javascripts/gridx/modules/VirtualVScroller.js +23 -11
- data/app/assets/javascripts/gridx/modules/_PagedBodyMixin.js +351 -0
- data/app/assets/javascripts/gridx/modules/dnd/Avatar.js +1 -1
- data/app/assets/javascripts/gridx/modules/dnd/_Dnd.js +1 -0
- data/app/assets/javascripts/gridx/modules/extendedSelect/Row.js +8 -5
- data/app/assets/javascripts/gridx/modules/filter/FilterBar.js +24 -17
- data/app/assets/javascripts/gridx/modules/filter/FilterConfirmDialog.js +3 -1
- data/app/assets/javascripts/gridx/modules/filter/FilterDialog.js +2 -2
- data/app/assets/javascripts/gridx/modules/filter/FilterPane.js +4 -5
- data/app/assets/javascripts/gridx/modules/filter/FilterTooltip.js +1 -1
- data/app/assets/javascripts/gridx/modules/filter/QuickFilter.js +32 -9
- data/app/assets/javascripts/gridx/modules/pagination/_PaginationBarBase.js +4 -1
- data/app/assets/javascripts/gridx/modules/select/Row.js +8 -4
- data/app/assets/javascripts/gridx/nls/ar/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/bg/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/ca/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/cs/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/da/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/de/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/el/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/es/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/fi/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/fr/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/{FilterBar.js → gridx.js} +80 -4
- data/app/assets/javascripts/gridx/nls/he/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/hr/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/hu/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/it/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/ja/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/kk/{FilterBar.js → gridx.js} +76 -5
- data/app/assets/javascripts/gridx/nls/ko/{FilterBar.js → gridx.js} +81 -5
- data/app/assets/javascripts/gridx/nls/nb/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/nl/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/pl/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/pt/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/pt-pt/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/ro/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/ru/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/sk/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/sl/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/sv/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/th/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/tr/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/uk/{FilterBar.js → gridx.js} +71 -5
- data/app/assets/javascripts/gridx/nls/zh/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/zh-tw/{FilterBar.js → gridx.js} +77 -5
- data/app/assets/javascripts/gridx/nls/zz-ZZ/gridx.js +173 -0
- data/app/assets/javascripts/gridx/support/DropDownPager.js +3 -5
- data/app/assets/javascripts/gridx/support/DropDownSizer.js +3 -5
- data/app/assets/javascripts/gridx/support/GotoPagePane.js +3 -5
- data/app/assets/javascripts/gridx/support/QuickFilter.js +3 -5
- data/app/assets/javascripts/gridx/support/Summary.js +32 -10
- data/app/assets/javascripts/gridx/support/_LinkPageBase.js +3 -5
- data/app/assets/javascripts/gridx/support/query.js +47 -0
- data/app/assets/javascripts/gridx/templates/FilterBar.html +1 -1
- data/app/assets/javascripts/gridx/templates/QuickFilter.html +3 -3
- data/app/assets/stylesheets/gridx/resources/Gridx.css +1 -10
- data/app/assets/stylesheets/gridx/resources/claro/Gridx.css +1 -16
- data/app/assets/stylesheets/gridx/resources/slantedHeader.css +90 -0
- data/lib/gridx-rails/version.rb +1 -1
- data/lib/tasks/gridx-rails_tasks.rake +1 -1
- data/test/dummy/log/test.log +5 -0
- metadata +52 -260
- 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/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/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/javascripts/gridx/core/model/cache/_Cache.js +0 -403
- data/app/assets/javascripts/gridx/core/util.js +0 -13
- data/app/assets/javascripts/gridx/modules/Printer.js +0 -49
- data/app/assets/javascripts/gridx/modules/TitleBar.js +0 -51
- data/app/assets/javascripts/gridx/modules/barPlugins/DropDownPager.js +0 -16
- data/app/assets/javascripts/gridx/modules/barPlugins/DropDownSizer.js +0 -16
- data/app/assets/javascripts/gridx/modules/barPlugins/GotoPageButton.js +0 -16
- data/app/assets/javascripts/gridx/modules/barPlugins/LinkPager.js +0 -16
- data/app/assets/javascripts/gridx/modules/barPlugins/LinkSizer.js +0 -16
- data/app/assets/javascripts/gridx/modules/barPlugins/Summary.js +0 -16
- data/app/assets/javascripts/gridx/modules/exporter/CSV.js +0 -43
- data/app/assets/javascripts/gridx/modules/exporter/Exporter.js +0 -34
- data/app/assets/javascripts/gridx/modules/exporter/Table.js +0 -42
- data/app/assets/javascripts/gridx/modules/filter/Filter.js +0 -16
- data/app/assets/javascripts/gridx/modules/pagination/Pagination.js +0 -16
- data/app/assets/javascripts/gridx/nls/Body.js +0 -47
- data/app/assets/javascripts/gridx/nls/NestedSort.js +0 -45
- data/app/assets/javascripts/gridx/nls/PaginationBar.js +0 -68
- data/app/assets/javascripts/gridx/nls/QuickFilter.js +0 -40
- data/app/assets/javascripts/gridx/nls/SummaryBar.js +0 -38
- data/app/assets/javascripts/gridx/nls/ar/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/ar/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/ar/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/ar/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/ar/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/bg/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/bg/NestedSort.js +0 -12
- data/app/assets/javascripts/gridx/nls/bg/PaginationBar.js +0 -28
- data/app/assets/javascripts/gridx/nls/bg/QuickFilter.js +0 -8
- data/app/assets/javascripts/gridx/nls/bg/SummaryBar.js +0 -6
- data/app/assets/javascripts/gridx/nls/ca/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/ca/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/ca/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/ca/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/ca/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/cs/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/cs/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/cs/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/cs/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/cs/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/da/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/da/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/da/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/da/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/da/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/de/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/de/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/de/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/de/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/de/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/el/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/el/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/el/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/el/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/el/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/es/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/es/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/es/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/es/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/es/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/fi/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/fi/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/fi/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/fi/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/fi/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/fr/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/fr/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/fr/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/fr/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/fr/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/he/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/he/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/he/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/he/QuickFilter.js +0 -6
- data/app/assets/javascripts/gridx/nls/he/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/hr/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/hr/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/hr/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/hr/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/hr/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/hu/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/hu/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/hu/PaginationBar.js +0 -33
- data/app/assets/javascripts/gridx/nls/hu/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/hu/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/it/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/it/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/it/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/it/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/it/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/ja/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/ja/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/ja/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/ja/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/ja/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/kk/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/kk/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/kk/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/kk/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/kk/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/ko/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/ko/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/ko/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/ko/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/ko/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/nb/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/nb/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/nb/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/nb/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/nb/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/nl/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/nl/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/nl/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/nl/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/nl/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/pl/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/pl/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/pl/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/pl/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/pl/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/pt/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/pt/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/pt/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/pt/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/pt/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/pt-br/Body.js +0 -6
- data/app/assets/javascripts/gridx/nls/pt-br/FilterBar.js +0 -89
- data/app/assets/javascripts/gridx/nls/pt-br/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/pt-br/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/pt-br/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/pt-br/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/pt-pt/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/pt-pt/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/pt-pt/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/pt-pt/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/pt-pt/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/ro/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/ro/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/ro/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/ro/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/ro/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/ru/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/ru/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/ru/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/ru/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/ru/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/sk/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/sk/NestedSort.js +0 -13
- data/app/assets/javascripts/gridx/nls/sk/PaginationBar.js +0 -30
- data/app/assets/javascripts/gridx/nls/sk/QuickFilter.js +0 -9
- data/app/assets/javascripts/gridx/nls/sk/SummaryBar.js +0 -7
- data/app/assets/javascripts/gridx/nls/sl/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/sl/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/sl/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/sl/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/sl/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/sv/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/sv/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/sv/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/sv/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/sv/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/th/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/th/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/th/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/th/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/th/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/tr/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/tr/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/tr/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/tr/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/tr/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/uk/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/uk/NestedSort.js +0 -12
- data/app/assets/javascripts/gridx/nls/uk/PaginationBar.js +0 -28
- data/app/assets/javascripts/gridx/nls/uk/QuickFilter.js +0 -8
- data/app/assets/javascripts/gridx/nls/uk/SummaryBar.js +0 -6
- data/app/assets/javascripts/gridx/nls/zh/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/zh/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/zh/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/zh/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/zh/SummaryBar.js +0 -5
- data/app/assets/javascripts/gridx/nls/zh-tw/Body.js +0 -11
- data/app/assets/javascripts/gridx/nls/zh-tw/NestedSort.js +0 -11
- data/app/assets/javascripts/gridx/nls/zh-tw/PaginationBar.js +0 -34
- data/app/assets/javascripts/gridx/nls/zh-tw/QuickFilter.js +0 -7
- data/app/assets/javascripts/gridx/nls/zh-tw/SummaryBar.js +0 -5
- data/app/assets/stylesheets/gridx/resources/Dod.css +0 -39
- data/app/assets/stylesheets/gridx/resources/Gridx_rtl.css +0 -5
- data/app/assets/stylesheets/gridx/resources/Tree.css +0 -46
- data/app/assets/stylesheets/gridx/resources/Tree_rtl.css +0 -4
- data/app/assets/stylesheets/gridx/resources/bar.css +0 -24
- data/app/assets/stylesheets/gridx/resources/basic.css +0 -482
- data/app/assets/stylesheets/gridx/resources/basic_rtl.css +0 -37
- data/app/assets/stylesheets/gridx/resources/claro/Gridx_rtl.css +0 -7
- data/app/assets/stylesheets/gridx/resources/claro/basic.css +0 -109
- data/app/assets/stylesheets/gridx/resources/claro/basic_rtl.css +0 -21
- data/app/assets/stylesheets/gridx/resources/claro/filter.css +0 -47
- data/app/assets/stylesheets/gridx/resources/claro/lock.css +0 -19
- data/app/assets/stylesheets/gridx/resources/claro/pagination.css +0 -33
- data/app/assets/stylesheets/gridx/resources/claro/select.css +0 -20
- data/app/assets/stylesheets/gridx/resources/dnd.css +0 -108
- data/app/assets/stylesheets/gridx/resources/filter.css +0 -321
- data/app/assets/stylesheets/gridx/resources/filter_rtl.css +0 -38
- data/app/assets/stylesheets/gridx/resources/lock.css +0 -20
- data/app/assets/stylesheets/gridx/resources/pagination.css +0 -142
- data/app/assets/stylesheets/gridx/resources/pagination_rtl.css +0 -54
- data/app/assets/stylesheets/gridx/resources/select.css +0 -39
- data/app/assets/stylesheets/gridx/resources/sort.css +0 -154
- data/app/assets/stylesheets/gridx/resources/sort_rtl.css +0 -51
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
define([
|
|
2
2
|
"dojo/_base/kernel",
|
|
3
3
|
"dojo/_base/Deferred",
|
|
4
|
-
"dojo/_base/sniff",
|
|
5
4
|
"dojo/_base/declare",
|
|
6
5
|
"dojo/query",
|
|
7
6
|
"dojo/dom-class",
|
|
8
7
|
"./VScroller",
|
|
9
8
|
"dojox/mobile/scrollable"
|
|
10
|
-
], function(kernel, Deferred,
|
|
9
|
+
], function(kernel, Deferred, declare, query, domClass, VScroller, Scrollable){
|
|
11
10
|
kernel.experimental('gridx/modules/TouchVScroller');
|
|
12
11
|
|
|
13
12
|
/*=====
|
|
@@ -22,18 +21,17 @@ define([
|
|
|
22
21
|
|
|
23
22
|
return declare(VScroller, {
|
|
24
23
|
constructor: function(){
|
|
25
|
-
if(
|
|
24
|
+
if(this.grid.touch){
|
|
26
25
|
domClass.add(this.grid.domNode, 'gridxTouchVScroller');
|
|
27
26
|
this.domNode.style.width = '';
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
29
|
|
|
31
30
|
scrollToRow: function(rowVisualIndex, toTop){
|
|
32
|
-
if(
|
|
31
|
+
if(this.grid.touch){
|
|
33
32
|
var d = new Deferred(),
|
|
34
33
|
rowNode = query('[visualindex="' + rowVisualIndex + '"]', this.grid.bodyNode)[0];
|
|
35
34
|
if(rowNode){
|
|
36
|
-
console.log('scroll into view: ' + rowNode.getAttribute('rowid'));
|
|
37
35
|
this._scrollable.scrollIntoView(rowNode, toTop);
|
|
38
36
|
}
|
|
39
37
|
d.callback();
|
|
@@ -43,7 +41,7 @@ define([
|
|
|
43
41
|
},
|
|
44
42
|
|
|
45
43
|
scroll: function(top){
|
|
46
|
-
if(
|
|
44
|
+
if(this.grid.touch){
|
|
47
45
|
this._scrollable.scrollTo({ y: top });
|
|
48
46
|
}else{
|
|
49
47
|
this.inherited(arguments);
|
|
@@ -51,7 +49,7 @@ define([
|
|
|
51
49
|
},
|
|
52
50
|
|
|
53
51
|
position: function(){
|
|
54
|
-
if(
|
|
52
|
+
if(this.grid.touch){
|
|
55
53
|
return this._scrollable.getPos().y;
|
|
56
54
|
}else{
|
|
57
55
|
return this.inherited(arguments);
|
|
@@ -59,25 +57,36 @@ define([
|
|
|
59
57
|
},
|
|
60
58
|
|
|
61
59
|
_init: function(){
|
|
62
|
-
if(
|
|
60
|
+
if(this.grid.touch){
|
|
63
61
|
var t = this,
|
|
64
62
|
g = t.grid,
|
|
65
63
|
view = g.view,
|
|
66
64
|
h = g.header.innerNode,
|
|
67
65
|
mainNode = g.mainNode,
|
|
68
66
|
bodyNode = g.bodyNode,
|
|
69
|
-
headerTable = h.firstChild,
|
|
70
67
|
scrollable = t._scrollable = new Scrollable();
|
|
71
|
-
h.style.height =
|
|
68
|
+
h.style.height = h.firstChild.offsetHeight + 'px';
|
|
72
69
|
scrollable.init({
|
|
73
70
|
domNode: mainNode,
|
|
74
71
|
containerNode: bodyNode,
|
|
75
72
|
scrollDir: g.hScrollerNode.style.display == 'none' ? 'v' : 'vh',
|
|
76
73
|
noResize: true
|
|
77
74
|
});
|
|
75
|
+
function getLayerParent(){
|
|
76
|
+
var layerParent = g.layer && g.layer._wrapper1.firstChild;
|
|
77
|
+
return layerParent && layerParent.firstChild;
|
|
78
|
+
}
|
|
78
79
|
t.aspect(scrollable, 'scrollTo', function(to){
|
|
79
80
|
if(typeof to.x == "number"){
|
|
80
|
-
|
|
81
|
+
var translateStr = scrollable.makeTranslateStr({x: to.x});
|
|
82
|
+
h.firstChild.style.webkitTransform = translateStr;
|
|
83
|
+
h.firstChild.style.transform = translateStr;
|
|
84
|
+
|
|
85
|
+
var layerParent = getLayerParent();
|
|
86
|
+
if(layerParent){
|
|
87
|
+
layerParent.style.webkitTransform = translateStr;
|
|
88
|
+
layerParent.style.transform = translateStr;
|
|
89
|
+
}
|
|
81
90
|
}
|
|
82
91
|
});
|
|
83
92
|
t.aspect(scrollable, 'slideTo', function(to, duration, easing){
|
|
@@ -85,10 +94,24 @@ define([
|
|
|
85
94
|
x: scrollable.getPos().x
|
|
86
95
|
}, {
|
|
87
96
|
x: to.x
|
|
88
|
-
}, duration, easing,
|
|
97
|
+
}, duration, easing, h.firstChild, 2); //2 means it's a containerNode
|
|
98
|
+
|
|
99
|
+
var layerParent = getLayerParent();
|
|
100
|
+
if(layerParent){
|
|
101
|
+
scrollable._runSlideAnimation({
|
|
102
|
+
x: scrollable.getPos().x
|
|
103
|
+
}, {
|
|
104
|
+
x: to.x
|
|
105
|
+
}, duration, easing, layerParent, 2); //2 means it's a containerNode
|
|
106
|
+
}
|
|
89
107
|
});
|
|
90
108
|
t.aspect(scrollable, 'stopAnimation', function(){
|
|
91
|
-
domClass.remove(
|
|
109
|
+
domClass.remove(h.firstChild, 'mblScrollableScrollTo2');
|
|
110
|
+
|
|
111
|
+
var layerParent = getLayerParent();
|
|
112
|
+
if(layerParent){
|
|
113
|
+
domClass.remove(layerParent, 'mblScrollableScrollTo2');
|
|
114
|
+
}
|
|
92
115
|
});
|
|
93
116
|
t.aspect(g.hScroller, 'refresh', function(){
|
|
94
117
|
scrollable._h = bodyNode.scrollWidth > mainNode.clientWidth;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
define([
|
|
2
|
-
"dojo/_base/kernel",
|
|
3
2
|
"dojo/_base/declare",
|
|
4
3
|
"dojo/_base/array",
|
|
5
4
|
"dojo/dom-class",
|
|
@@ -12,8 +11,7 @@ define([
|
|
|
12
11
|
"../core/_Module"
|
|
13
12
|
// "dojo/NodeList-dom",
|
|
14
13
|
// "dojo/NodeList-traverse"
|
|
15
|
-
], function(
|
|
16
|
-
kernel.experimental('gridx/modules/Tree');
|
|
14
|
+
], function(declare, array, domClass, domGeometry, lang, Deferred, DeferredList, query, keys, _Module){
|
|
17
15
|
|
|
18
16
|
/*=====
|
|
19
17
|
Row.canExpand = function(){
|
|
@@ -360,7 +358,7 @@ define([
|
|
|
360
358
|
},
|
|
361
359
|
|
|
362
360
|
isExpanded: function(id){
|
|
363
|
-
return !!this.grid.view._openInfo[id];
|
|
361
|
+
return this.model.isId(id) && !!this.grid.view._openInfo[id];
|
|
364
362
|
},
|
|
365
363
|
|
|
366
364
|
isPaddingCell: function(rowId, colId){
|
|
@@ -381,7 +379,7 @@ define([
|
|
|
381
379
|
expand: function(id, skipUpdateBody){
|
|
382
380
|
var d = new Deferred(),
|
|
383
381
|
t = this;
|
|
384
|
-
if(
|
|
382
|
+
if(!t.isExpanded(id) && t.canExpand(id)){
|
|
385
383
|
t._beginLoading(id);
|
|
386
384
|
t.grid.view.logicExpand(id).then(function(){
|
|
387
385
|
Deferred.when(t._updateBody(id, skipUpdateBody, true), function(){
|
|
@@ -399,7 +397,7 @@ define([
|
|
|
399
397
|
collapse: function(id, skipUpdateBody){
|
|
400
398
|
var d = new Deferred(),
|
|
401
399
|
t = this;
|
|
402
|
-
if(
|
|
400
|
+
if(t.isExpanded(id)){
|
|
403
401
|
t.grid.view.logicCollapse(id);
|
|
404
402
|
Deferred.when(t._updateBody(id, skipUpdateBody), function(){
|
|
405
403
|
d.callback();
|
|
@@ -555,7 +553,7 @@ define([
|
|
|
555
553
|
var rowNode = this.grid.body.getRowNode({rowId: id}),
|
|
556
554
|
isOpen = this.isExpanded(id);
|
|
557
555
|
if(rowNode){
|
|
558
|
-
var nls = this.grid.
|
|
556
|
+
var nls = this.grid.nls;
|
|
559
557
|
query('.gridxTreeExpandoCell', rowNode).
|
|
560
558
|
removeClass('gridxTreeExpandoLoading').
|
|
561
559
|
toggleClass('gridxTreeExpandoCellOpen', isOpen).
|
|
@@ -595,7 +593,7 @@ define([
|
|
|
595
593
|
expanded = this.isExpanded();
|
|
596
594
|
rowNode.setAttribute('aria-expanded', expanded);
|
|
597
595
|
//This is only to make JAWS readk
|
|
598
|
-
var nls = this.grid.
|
|
596
|
+
var nls = this.grid.nls;
|
|
599
597
|
query('.gridxTreeExpandoCell', rowNode).closest('.gridxCell').
|
|
600
598
|
attr('aria-expanded', String(expanded)).
|
|
601
599
|
attr('aria-label', expanded ? nls.treeExpanded : nls.treeCollapsed);
|
|
@@ -206,25 +206,31 @@ define([
|
|
|
206
206
|
args.visualIndex = t._getVisualIndex(args.parentId, args.rowIndex);
|
|
207
207
|
}else if(typeof args.visualIndex == 'number' && args.visualIndex >= 0){
|
|
208
208
|
//Given visual index, get row index and parent id.
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
var layerId = m.layerId();
|
|
210
|
+
if(m.isId(layerId)){
|
|
211
|
+
args.rowIndex = args.visualIndex;
|
|
212
|
+
args.parentId = layerId;
|
|
213
|
+
}else{
|
|
214
|
+
var rootOpenned = t._openInfo[''].openned,
|
|
215
|
+
vi = t.rootStart + args.visualIndex;
|
|
216
|
+
for(var i = 0; i < rootOpenned.length; ++i){
|
|
217
|
+
var root = t._openInfo[rootOpenned[i]];
|
|
218
|
+
if(m.idToIndex(root.id) < t.rootStart){
|
|
219
|
+
vi += root.count;
|
|
220
|
+
}else{
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
217
223
|
}
|
|
224
|
+
var info = {
|
|
225
|
+
parentId: '',
|
|
226
|
+
preCount: 0
|
|
227
|
+
};
|
|
228
|
+
while(!info.found){
|
|
229
|
+
info = t._getChild(vi, info);
|
|
230
|
+
}
|
|
231
|
+
args.rowIndex = info.rowIndex;
|
|
232
|
+
args.parentId = info.parentId;
|
|
218
233
|
}
|
|
219
|
-
var info = {
|
|
220
|
-
parentId: '',
|
|
221
|
-
preCount: 0
|
|
222
|
-
};
|
|
223
|
-
while(!info.found){
|
|
224
|
-
info = t._getChild(vi, info);
|
|
225
|
-
}
|
|
226
|
-
args.rowIndex = info.rowIndex;
|
|
227
|
-
args.parentId = info.parentId;
|
|
228
234
|
}else{
|
|
229
235
|
//Nothing we can do here...
|
|
230
236
|
return args;
|
|
@@ -528,7 +534,8 @@ define([
|
|
|
528
534
|
info.count -= count;
|
|
529
535
|
info = openInfo[info.parentId];
|
|
530
536
|
}
|
|
531
|
-
|
|
537
|
+
//sometimes number typed ID can be accidentally changed to string type.
|
|
538
|
+
if(String(parentId) == String(model.layerId()) && rowIndex >= t.rootStart && rowIndex < t.rootStart + t.rootCount){
|
|
532
539
|
t.rootCount--;
|
|
533
540
|
}
|
|
534
541
|
var rootIndex = model.idToIndex(model.rootId(rowId));
|
|
@@ -5,7 +5,8 @@ define([
|
|
|
5
5
|
"dojo/_base/sniff",
|
|
6
6
|
"dojo/_base/event",
|
|
7
7
|
"dojo/_base/Deferred",
|
|
8
|
-
"dojo/query",
|
|
8
|
+
// "dojo/query",
|
|
9
|
+
'gridx/support/query',
|
|
9
10
|
"dojo/keys",
|
|
10
11
|
"./VScroller",
|
|
11
12
|
"../core/_Module"
|
|
@@ -101,10 +102,7 @@ define([
|
|
|
101
102
|
focus.focusArea('body', 1); //1 as true
|
|
102
103
|
}
|
|
103
104
|
t.lazy = t._lazy;
|
|
104
|
-
|
|
105
|
-
setTimeout(function(){
|
|
106
|
-
defer.callback(success);
|
|
107
|
-
}, 5);
|
|
105
|
+
defer.callback(success);
|
|
108
106
|
}
|
|
109
107
|
};
|
|
110
108
|
if(node){
|
|
@@ -199,7 +197,7 @@ define([
|
|
|
199
197
|
a = dn.scrollTop,
|
|
200
198
|
deltaT = a - (t._lastScrollTop || 0),
|
|
201
199
|
neighborhood = 2;
|
|
202
|
-
|
|
200
|
+
|
|
203
201
|
if(forced || deltaT){
|
|
204
202
|
t._lastScrollTop = a;
|
|
205
203
|
|
|
@@ -211,7 +209,7 @@ define([
|
|
|
211
209
|
visualEnd = visualStart + view.visualCount,
|
|
212
210
|
bn = t.grid.bodyNode,
|
|
213
211
|
firstRow = bn.firstChild,
|
|
214
|
-
firstRowTop = firstRow && firstRow.
|
|
212
|
+
firstRowTop = firstRow && firstRow.clientTop - deltaT,
|
|
215
213
|
lastRow = bn.lastChild,
|
|
216
214
|
lastRowBtm = lastRow && lastRow.offsetTop - deltaT + lastRow.offsetHeight,
|
|
217
215
|
bnTop = bn.scrollTop,
|
|
@@ -222,7 +220,8 @@ define([
|
|
|
222
220
|
nearTop = a <= neighborhood,
|
|
223
221
|
nearBottom = Math.abs(a - scrollRange) <= neighborhood,
|
|
224
222
|
start, end, pos, d;
|
|
225
|
-
|
|
223
|
+
//In IE7 offsetTop will be -1 when grid is hidden
|
|
224
|
+
if((bnTop == bnBtm && !bnBtm) || (lastRow && lastRow.offsetTop < 0)){
|
|
226
225
|
//The grid is not correctly shown, so we just ignore.
|
|
227
226
|
return;
|
|
228
227
|
}
|
|
@@ -238,6 +237,17 @@ define([
|
|
|
238
237
|
d = Math.ceil((bnBtm - lastRowBtm) * ratio / h) + buffSize;
|
|
239
238
|
end = nearBottom && a ? visualEnd : Math.min(start + d, visualEnd);
|
|
240
239
|
pos = "bottom";
|
|
240
|
+
|
|
241
|
+
if(deltaT === 0 && start == visualEnd){
|
|
242
|
+
//If the last row in the grid has very big height and then change
|
|
243
|
+
//to normal or very small height, need to add rows to the front.
|
|
244
|
+
//this usually appear in DOD, especially GridInGrid mode
|
|
245
|
+
|
|
246
|
+
end = body.renderStart;
|
|
247
|
+
d = Math.ceil((firstRowTop - bnTop) * ratio / h) + buffSize;
|
|
248
|
+
start = nearTop ? visualStart : Math.max(end - d, visualStart);
|
|
249
|
+
pos = "top";
|
|
250
|
+
}
|
|
241
251
|
}else if(!firstRow || firstRowTop > bnBtm || !lastRow || lastRowBtm < bnTop){
|
|
242
252
|
//Replace all
|
|
243
253
|
if(a <= scrollRange / 2){
|
|
@@ -317,7 +327,7 @@ define([
|
|
|
317
327
|
t._doScroll(0, 1);
|
|
318
328
|
//If some scrollToRow requests are pending, resume them.
|
|
319
329
|
array.forEach(t._scrolls, function(d){
|
|
320
|
-
if(d.scrollContext){
|
|
330
|
+
if(d && d.scrollContext){
|
|
321
331
|
//delete scrollContext to avoid firing multiple times.
|
|
322
332
|
var scrollContext = d.scrollContext;
|
|
323
333
|
delete d.scrollContext;
|
|
@@ -351,11 +361,13 @@ define([
|
|
|
351
361
|
}
|
|
352
362
|
var dn = t.domNode,
|
|
353
363
|
//remember the scroll bar position
|
|
354
|
-
oldScrollTop = dn.scrollTop
|
|
364
|
+
oldScrollTop = dn.scrollTop,
|
|
365
|
+
isBottom = oldScrollTop >= dn.scrollHeight - dn.offsetHeight;
|
|
355
366
|
t.stubNode.style.height = h + 'px';
|
|
356
367
|
//Update last scrolltop, to avoid firing _doVirtualScroll with incorrect delta.
|
|
357
368
|
if(t._lastScrollTop){
|
|
358
|
-
|
|
369
|
+
//If we were at bottom, should keep us at bottom after height change.
|
|
370
|
+
dn.scrollTop = isBottom ? dn.scrollHeight : oldScrollTop;
|
|
359
371
|
t._lastScrollTop = dn.scrollTop;
|
|
360
372
|
}
|
|
361
373
|
},
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"dojo/_base/declare",
|
|
3
|
+
"dojo/_base/lang",
|
|
4
|
+
"dojo/query",
|
|
5
|
+
"dojo/_base/array",
|
|
6
|
+
"dojo/dom-construct",
|
|
7
|
+
"dojo/dom-geometry",
|
|
8
|
+
"dojo/dom-class",
|
|
9
|
+
"dojo/_base/Deferred",
|
|
10
|
+
"dojo/_base/sniff",
|
|
11
|
+
"dijit/a11y"
|
|
12
|
+
], function(declare, lang, query, array, domConstruct, domGeo, domClass, Deferred, has, a11y){
|
|
13
|
+
|
|
14
|
+
/*=====
|
|
15
|
+
return declare([], {
|
|
16
|
+
// summary:
|
|
17
|
+
// description:
|
|
18
|
+
|
|
19
|
+
// pageSize: Integer
|
|
20
|
+
// The row count in one page. Default to the pageSize of grid cache. If using cache has no pageSize, default to 20.
|
|
21
|
+
// Users can directly set grid parameter pageSize to set both the cache pageSize and the body pageSize.
|
|
22
|
+
// If using bodyPageSize, it'll be different from the cache page size, but that's also okay.
|
|
23
|
+
pageSize: 20,
|
|
24
|
+
});
|
|
25
|
+
=====*/
|
|
26
|
+
|
|
27
|
+
return declare([], {
|
|
28
|
+
preload: function(){
|
|
29
|
+
var t = this,
|
|
30
|
+
g = t.grid,
|
|
31
|
+
view = g.view;
|
|
32
|
+
view.paging = 1;
|
|
33
|
+
view.rootStart = 0;
|
|
34
|
+
t._autoPageSize = t.arg('pageSize') == 'auto' || g.pageSize == 'auto';
|
|
35
|
+
t.pageSize = t.pageSize || t.model._cache.pageSize || 20;
|
|
36
|
+
view.rootCount = t.pageSize;
|
|
37
|
+
domClass.remove(t.domNode, 'gridxBodyRowHoverEffect');
|
|
38
|
+
t.connect(t.domNode, 'onscroll', function(e){
|
|
39
|
+
g.hScrollerNode.scrollLeft = t.domNode.scrollLeft;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
if(t.arg('createBottom')){
|
|
43
|
+
t._bottomNode = domConstruct.create('div', {
|
|
44
|
+
'class': 'gridxBodyBottom'
|
|
45
|
+
});
|
|
46
|
+
t.createBottom(t._bottomNode);
|
|
47
|
+
t.connect(t._bottomNode, 'onmouseover', function(){
|
|
48
|
+
query('> .gridxRowOver', t.domNode).removeClass('gridxRowOver');
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if(t.arg('createTop')){
|
|
52
|
+
t._topNode = domConstruct.create('div', {
|
|
53
|
+
'class': 'gridxBodyTop'
|
|
54
|
+
});
|
|
55
|
+
t.createTop(t._topNode);
|
|
56
|
+
t.connect(t._topNode, 'onmouseover', function(){
|
|
57
|
+
query('> .gridxRowOver', t.domNode).removeClass('gridxRowOver');
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
t._initFocus();
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
_initFocus: function(){
|
|
64
|
+
var t = this,
|
|
65
|
+
focus = t.grid.focus,
|
|
66
|
+
doFocus = function(node, evt, step){
|
|
67
|
+
if(node.parentNode){
|
|
68
|
+
focus.stopEvent(evt);
|
|
69
|
+
var elems = a11y._getTabNavigable(node),
|
|
70
|
+
n = elems[step < 0 ? 'last' : 'first'];
|
|
71
|
+
if(n){
|
|
72
|
+
n.focus();
|
|
73
|
+
}
|
|
74
|
+
return !!n;
|
|
75
|
+
}else{
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
doBlur = function(node, evt, step){
|
|
80
|
+
if(node.parentNode){
|
|
81
|
+
var elems = a11y._getTabNavigable(node);
|
|
82
|
+
return evt ? evt.target == (step < 0 ? elems.first : elems.last) : true;
|
|
83
|
+
}else{
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
t.inherited(arguments);
|
|
88
|
+
if(t._topNode){
|
|
89
|
+
focus.registerArea({
|
|
90
|
+
name: 'bodyTop',
|
|
91
|
+
priority: 0.9999,
|
|
92
|
+
focusNode: t._topNode,
|
|
93
|
+
scope: t,
|
|
94
|
+
doFocus: lang.partial(doFocus, t._topNode),
|
|
95
|
+
doBlur: lang.partial(doBlur, t._topNode)
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
if(t._bottomNode){
|
|
99
|
+
focus.registerArea({
|
|
100
|
+
name: 'bodyBottom',
|
|
101
|
+
priority: 1.0001,
|
|
102
|
+
focusNode: t._bottomNode,
|
|
103
|
+
scope: t,
|
|
104
|
+
doFocus: lang.partial(doFocus, t._bottomNode),
|
|
105
|
+
doBlur: lang.partial(doBlur, t._bottomNode)
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
load: function(args, startup){
|
|
111
|
+
var t = this,
|
|
112
|
+
view = t.grid.view;
|
|
113
|
+
if(view._err){
|
|
114
|
+
t._loadFail(view._err);
|
|
115
|
+
}
|
|
116
|
+
startup.then(function(){
|
|
117
|
+
if(t._autoPageSize){
|
|
118
|
+
var rowCount = parseInt(t.grid.mainNode.offsetHeight / t.arg('defaultRowHeight', 24) * 1.5, 10);
|
|
119
|
+
t.pageSize = rowCount;
|
|
120
|
+
view.updateRootRange(0, rowCount);
|
|
121
|
+
}
|
|
122
|
+
t.loaded.callback();
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
refresh: function(start){
|
|
127
|
+
var t = this,
|
|
128
|
+
loadingNode = t.grid.loadingNode,
|
|
129
|
+
d = new Deferred();
|
|
130
|
+
delete t._err;
|
|
131
|
+
domClass.add(loadingNode, 'gridxLoading');
|
|
132
|
+
t.grid.view.updateVisualCount().then(function(){
|
|
133
|
+
try{
|
|
134
|
+
t.renderStart = 0;
|
|
135
|
+
var rc = t.renderCount = t.grid.view.visualCount;
|
|
136
|
+
if(typeof start == 'number' && start >= 0){
|
|
137
|
+
var count = rc - start,
|
|
138
|
+
n = query('> [visualindex="' + start + '"]', t.domNode)[0],
|
|
139
|
+
uncachedRows = [],
|
|
140
|
+
renderedRows = [];
|
|
141
|
+
if(n){
|
|
142
|
+
var rows = t._buildRows(start, count, uncachedRows, renderedRows);
|
|
143
|
+
if(rows){
|
|
144
|
+
domConstruct.place(rows, n, 'before');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
while(n && (!t._bottomNode || n !== t._bottomNode)){
|
|
148
|
+
var tmp = n.nextSibling,
|
|
149
|
+
vidx = parseInt(n.getAttribute('visualindex'), 10),
|
|
150
|
+
id = n.getAttribute('rowid');
|
|
151
|
+
domConstruct.destroy(n);
|
|
152
|
+
if(vidx >= start + count){
|
|
153
|
+
t.onUnrender(id);
|
|
154
|
+
}
|
|
155
|
+
n = tmp;
|
|
156
|
+
}
|
|
157
|
+
array.forEach(renderedRows, t.onAfterRow, t);
|
|
158
|
+
Deferred.when(t._buildUncachedRows(uncachedRows), function(){
|
|
159
|
+
t.onRender(start, count);
|
|
160
|
+
domClass.remove(loadingNode, 'gridxLoading');
|
|
161
|
+
d.callback();
|
|
162
|
+
});
|
|
163
|
+
}else{
|
|
164
|
+
t.renderRows(0, rc, 0, 1);
|
|
165
|
+
domClass.remove(loadingNode, 'gridxLoading');
|
|
166
|
+
d.callback();
|
|
167
|
+
}
|
|
168
|
+
}catch(e){
|
|
169
|
+
t._loadFail(e);
|
|
170
|
+
domClass.remove(loadingNode, 'gridxLoading');
|
|
171
|
+
d.errback(e);
|
|
172
|
+
}
|
|
173
|
+
}, function(e){
|
|
174
|
+
t._loadFail(e);
|
|
175
|
+
domClass.remove(loadingNode, 'gridxLoading');
|
|
176
|
+
d.errback(e);
|
|
177
|
+
});
|
|
178
|
+
return d;
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
renderRows: function(start, count, position){
|
|
182
|
+
var t = this,
|
|
183
|
+
g = t.grid,
|
|
184
|
+
uncachedRows = [],
|
|
185
|
+
renderedRows = [],
|
|
186
|
+
n = t.domNode,
|
|
187
|
+
en = g.emptyNode;
|
|
188
|
+
if(t._err){
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if(count > 0){
|
|
192
|
+
en.innerHTML = t.arg('loadingInfo', g.nls.loadingInfo);
|
|
193
|
+
en.style.zIndex = '';
|
|
194
|
+
var str = t._buildRows(start, count, uncachedRows, renderedRows);
|
|
195
|
+
t.renderStart = start;
|
|
196
|
+
t.renderCount = count;
|
|
197
|
+
n.scrollTop = 0;
|
|
198
|
+
if(has('ie')){
|
|
199
|
+
//In IE, setting innerHTML will completely destroy the node,
|
|
200
|
+
//But CellWidget still need it.
|
|
201
|
+
while(n.childNodes.length){
|
|
202
|
+
n.removeChild(n.firstChild);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
n.innerHTML = str;
|
|
206
|
+
if(t._topNode && g.view.rootStart > 0){
|
|
207
|
+
if(str){
|
|
208
|
+
n.insertBefore(t._topNode, n.firstChild);
|
|
209
|
+
}else{
|
|
210
|
+
n.appendChild(t._topNode);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if(t._bottomNode && g.view.rootStart + g.view.rootCount < g.model.size()){
|
|
214
|
+
n.appendChild(t._bottomNode);
|
|
215
|
+
}
|
|
216
|
+
n.scrollLeft = g.hScrollerNode.scrollLeft;
|
|
217
|
+
if(!str){
|
|
218
|
+
en.style.zIndex = 1;
|
|
219
|
+
}else{
|
|
220
|
+
en.innerHTML = '';
|
|
221
|
+
}
|
|
222
|
+
if(!t._skipUnrender){
|
|
223
|
+
t.onUnrender();
|
|
224
|
+
}
|
|
225
|
+
array.forEach(renderedRows, t.onAfterRow, t);
|
|
226
|
+
Deferred.when(t._buildUncachedRows(uncachedRows), function(){
|
|
227
|
+
t.onRender(start, count);
|
|
228
|
+
});
|
|
229
|
+
}else if(!{top: 1, bottom: 1}[position]){
|
|
230
|
+
n.scrollTop = 0;
|
|
231
|
+
if(has('ie')){
|
|
232
|
+
//In IE, setting innerHTML will completely destroy the node,
|
|
233
|
+
//But CellWidget still need it.
|
|
234
|
+
while(n.childNodes.length){
|
|
235
|
+
n.removeChild(n.firstChild);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
n.innerHTML = '';
|
|
239
|
+
if(!t._skipUnrender){
|
|
240
|
+
t.onUnrender();
|
|
241
|
+
}
|
|
242
|
+
if(!t.model.size()){
|
|
243
|
+
en.innerHTML = t.arg('emptyInfo', g.nls.emptyInfo);
|
|
244
|
+
en.style.zIndex = 1;
|
|
245
|
+
t.onEmpty();
|
|
246
|
+
t.model.free();
|
|
247
|
+
}else{
|
|
248
|
+
n.appendChild(t._bottomNode);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
onRender: function(/*start, count*/){
|
|
254
|
+
//FIX #8746
|
|
255
|
+
var t = this;
|
|
256
|
+
var bn = t.domNode;
|
|
257
|
+
query('.gridxBodyFirstRow', bn).removeClass('gridxBodyFirstRow');
|
|
258
|
+
if(t._topNode){
|
|
259
|
+
var firstRow = t._topNode.nextSibling;
|
|
260
|
+
if(firstRow && firstRow != t._bottomNode){
|
|
261
|
+
domClass.add(firstRow, 'gridxBodyFirstRow');
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
query('.gridxBodyLastRow', bn).removeClass('gridxBodyLastRow');
|
|
265
|
+
if(t._bottomNode){
|
|
266
|
+
var lastRow = t._bottomNode.previousSibling;
|
|
267
|
+
if(lastRow && lastRow != t._topNode){
|
|
268
|
+
domClass.add(lastRow, 'gridxBodyLastRow');
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
_load: function(isPost){
|
|
274
|
+
var t = this,
|
|
275
|
+
g = t.grid,
|
|
276
|
+
m = t.model,
|
|
277
|
+
view = g.view,
|
|
278
|
+
pageSize = t.arg('pageSize'),
|
|
279
|
+
btnNode = isPost ? t._bottomNode : t._topNode,
|
|
280
|
+
start = view.rootStart,
|
|
281
|
+
count = view.rootCount,
|
|
282
|
+
newRootStart = isPost ? start : start < pageSize ? 0 : start - pageSize,
|
|
283
|
+
newRootCount = isPost ? count + pageSize : start + count - newRootStart,
|
|
284
|
+
finish = function(renderStart, renderCount){
|
|
285
|
+
t._busy(isPost);
|
|
286
|
+
t._onLoadFinish(!isPost, renderStart, renderCount, function(){
|
|
287
|
+
t.onRender(renderStart, renderCount);
|
|
288
|
+
if(g.indirectSelect){
|
|
289
|
+
//FIXME: this breaks encapsulation!
|
|
290
|
+
g.indirectSelect._onSelectionChange();
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
t._busy(isPost, 1);
|
|
295
|
+
m.when({
|
|
296
|
+
start: isPost ? start + count : newRootStart,
|
|
297
|
+
count: isPost ? pageSize : start - newRootStart
|
|
298
|
+
}, function(){
|
|
299
|
+
var totalCount = m.size();
|
|
300
|
+
if(isPost && newRootStart + newRootCount > totalCount){
|
|
301
|
+
newRootCount = totalCount - newRootStart;
|
|
302
|
+
}
|
|
303
|
+
view.updateRootRange(newRootStart, newRootCount).then(function(){
|
|
304
|
+
var renderStart = isPost ? t.renderCount : 0,
|
|
305
|
+
renderCount = view.visualCount - t.renderCount;
|
|
306
|
+
t.renderStart = 0;
|
|
307
|
+
t.renderCount = view.visualCount;
|
|
308
|
+
if(renderCount){
|
|
309
|
+
var toFetch = [];
|
|
310
|
+
for(var i = 0; i < renderCount; ++i){
|
|
311
|
+
var rowInfo = view.getRowInfo({visualIndex: renderStart + i});
|
|
312
|
+
if(!m.isId(rowInfo.id)){
|
|
313
|
+
toFetch.push({
|
|
314
|
+
parentId: rowInfo.parentId,
|
|
315
|
+
start: rowInfo.rowIndex,
|
|
316
|
+
count: 1
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
m.when(toFetch, function(){
|
|
321
|
+
var renderedRows = [],
|
|
322
|
+
scrollHeight = g.bodyNode.scrollHeight;
|
|
323
|
+
str = t._buildRows(renderStart, renderCount, [], renderedRows);
|
|
324
|
+
if(btnNode){
|
|
325
|
+
domConstruct.place(str, btnNode, isPost ? 'before' : 'after');
|
|
326
|
+
}else{
|
|
327
|
+
domConstruct.place(str, t.domNode, isPost ? 'last' : 'first');
|
|
328
|
+
}
|
|
329
|
+
if(!isPost){
|
|
330
|
+
g.bodyNode.scrollTop += g.bodyNode.scrollHeight - scrollHeight;
|
|
331
|
+
}
|
|
332
|
+
if(isPost && btnNode && btnNode.parentNode ? view.rootStart + view.rootCount >= totalCount : view.rootStart === 0){
|
|
333
|
+
t.domNode.removeChild(btnNode);
|
|
334
|
+
}
|
|
335
|
+
array.forEach(renderedRows, t.onAfterRow, t);
|
|
336
|
+
finish(renderStart, renderCount);
|
|
337
|
+
});
|
|
338
|
+
}else{
|
|
339
|
+
if(isPost && btnNode && btnNode.parentNode && view.rootStart + view.rootCount >= totalCount){
|
|
340
|
+
t.domNode.removeChild(btnNode);
|
|
341
|
+
}
|
|
342
|
+
if(!isPost){
|
|
343
|
+
query('.gridxBodyFirstRow').removeClass('gridxBodyFirstRow');
|
|
344
|
+
}
|
|
345
|
+
finish(renderStart, renderCount);
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
});
|