gridx-rails 1.2.1 → 1.3.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -17,6 +17,10 @@ define([
|
|
17
17
|
// This module controls the TAB sequence of all the UI modules.
|
18
18
|
// But this module is (or at least can be) a non-UI module, because it does not handle the actual focus job.
|
19
19
|
|
20
|
+
// enabled: Boolean
|
21
|
+
// Whether keyboar support is enabled for gridx. Default to true on desktop, false on touch device.
|
22
|
+
enabled: true,
|
23
|
+
|
20
24
|
registerArea: function(area){
|
21
25
|
// summary:
|
22
26
|
// Register a new focus area, so this area will be included in the TAB sequence.
|
@@ -164,8 +168,6 @@ define([
|
|
164
168
|
return declare(_Module, {
|
165
169
|
name: 'focus',
|
166
170
|
|
167
|
-
enabled: !has('ios') && !has('android'),
|
168
|
-
|
169
171
|
constructor: function(){
|
170
172
|
var t = this,
|
171
173
|
g = t.grid;
|
@@ -180,6 +182,7 @@ define([
|
|
180
182
|
t._onFocus(evt);
|
181
183
|
}
|
182
184
|
};
|
185
|
+
t.arg('enabled', !g.touch);
|
183
186
|
t.batchConnect(
|
184
187
|
[g.domNode, 'onkeydown', '_onTabDown'],
|
185
188
|
[g.domNode, 'onfocus', '_focus'],
|
@@ -207,6 +210,9 @@ define([
|
|
207
210
|
},
|
208
211
|
|
209
212
|
//Public----------------------------------------------------------
|
213
|
+
|
214
|
+
//enabled: true,
|
215
|
+
|
210
216
|
registerArea: function(/* __FocusArea */ area){
|
211
217
|
if(area && area.name && typeof area.priority == 'number'){
|
212
218
|
var t = this,
|
@@ -244,7 +250,7 @@ define([
|
|
244
250
|
|
245
251
|
focusArea: function(/* String */ areaName, forced){
|
246
252
|
var t = this, area = t._areas[areaName];
|
247
|
-
if(area){
|
253
|
+
if(area && t.arg('enabled')){
|
248
254
|
var curArea = t._areas[t.currentArea()];
|
249
255
|
if(curArea && curArea.name === areaName){
|
250
256
|
if(forced){
|
@@ -217,23 +217,33 @@ define([
|
|
217
217
|
scope: t,
|
218
218
|
doFocus: t._doFocus,
|
219
219
|
doBlur: t._blurNode,
|
220
|
-
onBlur: t._blurNode
|
221
|
-
connects: [
|
222
|
-
t.connect(g, 'onHeaderCellKeyDown', '_onKeyDown'),
|
223
|
-
t.connect(g, 'onHeaderCellMouseDown', function(evt){
|
224
|
-
t._focusNode(t.getHeaderNode(evt.columnId));
|
225
|
-
})
|
226
|
-
]
|
220
|
+
onBlur: t._blurNode
|
227
221
|
});
|
222
|
+
if(g.touch){
|
223
|
+
t.aspect(g, 'onHeaderCellTouchStart', function(evt){
|
224
|
+
domClass.add(evt.headerCellNode, t._focusClass);
|
225
|
+
});
|
226
|
+
t.aspect(g, 'onHeaderCellTouchEnd', function(evt){
|
227
|
+
domClass.remove(evt.headerCellNode, t._focusClass);
|
228
|
+
});
|
229
|
+
}else{
|
230
|
+
t.aspect(g, 'onHeaderCellKeyDown', '_onKeyDown');
|
231
|
+
t.aspect(g, 'onHeaderCellMouseDown', function(evt){
|
232
|
+
t._focusNode(t.getHeaderNode(evt.columnId));
|
233
|
+
});
|
234
|
+
}
|
228
235
|
}
|
229
236
|
},
|
230
237
|
|
231
238
|
_doFocus: function(evt, step){
|
232
|
-
var t = this
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
239
|
+
var t = this;
|
240
|
+
if(!t.hidden){
|
241
|
+
var n = t._focusHeaderId && t.getHeaderNode(t._focusHeaderId),
|
242
|
+
r = t._focusNode(n || query('.gridxCell', t.domNode)[0]);
|
243
|
+
t.grid.focus.stopEvent(r && evt);
|
244
|
+
return r;
|
245
|
+
}
|
246
|
+
return false;
|
237
247
|
},
|
238
248
|
|
239
249
|
_focusNode: function(node){
|
@@ -57,10 +57,11 @@ declare(_Module, {
|
|
57
57
|
t.loaded.callback();
|
58
58
|
},
|
59
59
|
|
60
|
-
add: function(creater, priority, skipRefresh){
|
60
|
+
add: function(creater, priority, skipRefresh, skipFocus){
|
61
61
|
this._regions.push({
|
62
62
|
c: creater,
|
63
63
|
p: priority || 0,
|
64
|
+
f: !skipFocus,
|
64
65
|
n: {}
|
65
66
|
});
|
66
67
|
if(!skipRefresh){
|
@@ -83,27 +84,41 @@ declare(_Module, {
|
|
83
84
|
return b.p - a.p;
|
84
85
|
});
|
85
86
|
query('.gridxCell', g.header.domNode).forEach(function(node){
|
87
|
+
domClass.remove(node, 'gridxCellRegion');
|
86
88
|
var colId = node.getAttribute('colid'),
|
87
89
|
col = g.column(colId, 1),
|
88
|
-
|
89
|
-
regionNodes.push(nameNode);
|
90
|
-
nameNode.setAttribute('tabindex', -1);
|
91
|
-
t._regionCnnts.push(t.connect(nameNode, 'onblur', '_onRegionBlur'));
|
90
|
+
tmpArr = [];
|
92
91
|
array.forEach(regions, function(region){
|
93
92
|
var regionNode = region.n[colId];
|
94
93
|
if(!regionNode){
|
95
94
|
regionNode = region.n[colId] = region.c(col);
|
96
95
|
if(regionNode){
|
97
|
-
regionNode.setAttribute('tabindex', -1);
|
98
96
|
domClass.add(regionNode, 'gridxHeaderRegion');
|
99
|
-
|
97
|
+
if(region.f){
|
98
|
+
domClass.add(regionNode, 'gridxHeaderRegionFocusable');
|
99
|
+
regionNode.setAttribute('tabindex', -1);
|
100
|
+
t.connect(regionNode, 'onblur', '_onRegionBlur');
|
101
|
+
}
|
100
102
|
}
|
101
103
|
}
|
102
104
|
if(regionNode){
|
103
105
|
domConstruct.place(regionNode, node, 'first');
|
104
|
-
|
106
|
+
if(region.f){
|
107
|
+
tmpArr.push(regionNode);
|
108
|
+
}
|
105
109
|
}
|
106
110
|
});
|
111
|
+
if(tmpArr.length){
|
112
|
+
var nameNode = query('.gridxSortNode', node)[0];
|
113
|
+
regionNodes.push(nameNode);
|
114
|
+
nameNode.setAttribute('tabindex', -1);
|
115
|
+
t._regionCnnts.push(t.connect(nameNode, 'onblur', '_onRegionBlur'));
|
116
|
+
}else{
|
117
|
+
regionNodes.push(node);
|
118
|
+
domClass.add(node, 'gridxCellRegion');
|
119
|
+
t._regionCnnts.push(t.connect(node, 'onblur', '_onRegionBlur'));
|
120
|
+
}
|
121
|
+
regionNodes.push.apply(regionNodes, tmpArr);
|
107
122
|
});
|
108
123
|
if(!regionNodes[t._curRegionIdx]){
|
109
124
|
t._curRegionIdx = 0;
|
@@ -8,10 +8,8 @@ define([
|
|
8
8
|
"dojo/_base/Deferred",
|
9
9
|
"dojo/keys",
|
10
10
|
"../core/_Module",
|
11
|
-
"dojo/i18n",
|
12
|
-
"dojo/i18n!../nls/Body",
|
13
11
|
"./RowHeader"
|
14
|
-
], function(declare, array, event, query, lang, domClass, Deferred, keys, _Module
|
12
|
+
], function(declare, array, event, query, lang, domClass, Deferred, keys, _Module){
|
15
13
|
|
16
14
|
/*=====
|
17
15
|
return declare(_Module, {
|
@@ -44,7 +42,6 @@ define([
|
|
44
42
|
focus = g.focus,
|
45
43
|
sr = g.select.row,
|
46
44
|
rowHeader = g.rowHeader;
|
47
|
-
t._nls = i18n.getLocalization('gridx', 'Body', g.lang);
|
48
45
|
rowHeader.cellProvider = lang.hitch(t, t._createSelector);
|
49
46
|
t.batchConnect(
|
50
47
|
[sr,'onHighlightChange', '_onHighlightChange' ],
|
@@ -112,7 +109,7 @@ define([
|
|
112
109
|
|
113
110
|
_createSelectAllBox: function(){
|
114
111
|
var allSelected = this._allSelected[this._getPageId()];
|
115
|
-
this.grid.rowHeader.headerCellNode.setAttribute('aria-label', allSelected ? this.
|
112
|
+
this.grid.rowHeader.headerCellNode.setAttribute('aria-label', allSelected ? this.grid.nls.indirectDeselectAll : this.grid.nls.indirectSelectAll);
|
116
113
|
return this._createCheckBox(allSelected);
|
117
114
|
},
|
118
115
|
|
@@ -216,7 +213,7 @@ define([
|
|
216
213
|
domClass.toggle(node, t._getDijitClass() + 'Checked', allSelected);
|
217
214
|
node.setAttribute('aria-checked', allSelected ? 'true' : 'false');
|
218
215
|
t.grid.rowHeader.headerCellNode.setAttribute('aria-label',
|
219
|
-
allSelected ?
|
216
|
+
allSelected ? g.nls.indirectDeselectAll : g.nls.indirectSelectAll);
|
220
217
|
}
|
221
218
|
});
|
222
219
|
}
|
@@ -228,7 +225,9 @@ define([
|
|
228
225
|
rowHeader = g.rowHeader,
|
229
226
|
headerCellNode = rowHeader.headerCellNode,
|
230
227
|
focus = function(evt){
|
231
|
-
g.
|
228
|
+
if(g.header.hidden){
|
229
|
+
return false;
|
230
|
+
}
|
232
231
|
domClass.add(headerCellNode, 'gridxHeaderCellFocus');
|
233
232
|
headerCellNode.focus();
|
234
233
|
return true;
|
@@ -0,0 +1,358 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/kernel",
|
3
|
+
"dojo/_base/declare",
|
4
|
+
"dojo/_base/lang",
|
5
|
+
"dojo/dom-class",
|
6
|
+
"dojo/dom-geometry",
|
7
|
+
"dojo/query",
|
8
|
+
"dojo/keys",
|
9
|
+
"../core/_Module"
|
10
|
+
], function(kernel, declare, lang, domClass, domGeometry, query, keys, _Module){
|
11
|
+
kernel.experimental('gridx/modules/Layer');
|
12
|
+
|
13
|
+
/*=====
|
14
|
+
var Layer = declare(_Module, {
|
15
|
+
// summary:
|
16
|
+
// module name: Layer.
|
17
|
+
// A drill-down version of tree grid.
|
18
|
+
// description:
|
19
|
+
// Add a drill-down button to every row that has children.
|
20
|
+
// Once clicked this button, child level rows slides in and current level rows slides out,
|
21
|
+
// while the parent row slides up and gets locked.
|
22
|
+
// Clicking anywhere in the locked parent row will reverse the above process so as to go back to the parent level.
|
23
|
+
// Especially suitable for mobile tree grid.
|
24
|
+
|
25
|
+
// buttonColumnWidth: String
|
26
|
+
// Width of the drill-down column. Same format as column width in column definition.
|
27
|
+
buttonColumnWidth: '20px',
|
28
|
+
|
29
|
+
// buttonColumnArgs: Object
|
30
|
+
// The drill-down column can be customized by providing extra column definition parameters here.
|
31
|
+
buttonColumnArgs: null,
|
32
|
+
|
33
|
+
down: function(id){
|
34
|
+
// summary:
|
35
|
+
// Drill down one level on the row with the given ID.
|
36
|
+
// Only works if the given row exists in current layer.
|
37
|
+
// id: String
|
38
|
+
// A parent row ID.
|
39
|
+
},
|
40
|
+
|
41
|
+
up: function(){
|
42
|
+
// summary:
|
43
|
+
// Drill up one level, i.e.: go to the parent layer.
|
44
|
+
},
|
45
|
+
|
46
|
+
onFinish: function(args){
|
47
|
+
// summary:
|
48
|
+
// Fired when a layer operation (down or up) is done.
|
49
|
+
// args: __LayerOperationArgs
|
50
|
+
// Some args indicating whether it is drilling down or up, and on which row.
|
51
|
+
}
|
52
|
+
});
|
53
|
+
|
54
|
+
Layer.__LayerOperationArgs = declare([], {
|
55
|
+
// summary:
|
56
|
+
// Some context info for layer operations.
|
57
|
+
|
58
|
+
// isDown: Boolean
|
59
|
+
// If true, the operation is drilling down, otherwise, it is drilling up.
|
60
|
+
isDown: true,
|
61
|
+
|
62
|
+
// rowId: String
|
63
|
+
// Only available when isDown is true. Indicating on which row it is drilling down.
|
64
|
+
rowId: ''
|
65
|
+
});
|
66
|
+
|
67
|
+
return Layer;
|
68
|
+
=====*/
|
69
|
+
|
70
|
+
var transitionDuration = 700;
|
71
|
+
|
72
|
+
function moveNodes(bn, tmpBn){
|
73
|
+
while(bn.childNodes.length){
|
74
|
+
tmpBn.appendChild(bn.firstChild);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
var nextLevelButtonColumnId = '__nextLevelButton__';
|
79
|
+
|
80
|
+
return declare(_Module, {
|
81
|
+
name: "layer",
|
82
|
+
|
83
|
+
buttonColumnWidth: '20px',
|
84
|
+
|
85
|
+
constructor: function(){
|
86
|
+
var t = this,
|
87
|
+
g = t.grid,
|
88
|
+
n = t._tmpBodyNode = document.createElement('div'),
|
89
|
+
cn = t._contextNode = document.createElement('div'),
|
90
|
+
wrapper1 = t._wrapper1 = document.createElement('div'),
|
91
|
+
wrapper2 = t._wrapper2 = document.createElement('div');
|
92
|
+
n.setAttribute('class', 'gridxBody');
|
93
|
+
cn.setAttribute('class', 'gridxLayerContext');
|
94
|
+
wrapper1.setAttribute('class', 'gridxLayerWrapper');
|
95
|
+
wrapper2.setAttribute('class', 'gridxLayerWrapper');
|
96
|
+
t._parentStack = [];
|
97
|
+
t.connect(cn, 'onmousedown', 'up');
|
98
|
+
function updateColumnWidth(node){
|
99
|
+
var columnId = node.getAttribute('colid');
|
100
|
+
var headerNode = g.header.getHeaderNode(columnId);
|
101
|
+
node.style.width = headerNode.style.width;
|
102
|
+
node.style.minWidth = headerNode.style.minWidth;
|
103
|
+
node.style.maxWidth = headerNode.style.maxWidth;
|
104
|
+
}
|
105
|
+
t.aspect(g.columnWidth, 'onUpdate', function(){
|
106
|
+
query('.gridxCell', wrapper1).forEach(updateColumnWidth);
|
107
|
+
query('.gridxCell', wrapper2).forEach(updateColumnWidth);
|
108
|
+
if(cn.firstChild){
|
109
|
+
cn.style.height = cn.firstChild.offsetHeight + 'px';
|
110
|
+
}
|
111
|
+
});
|
112
|
+
|
113
|
+
var w = t.arg('buttonColumnWidth');
|
114
|
+
var col = t._col = lang.mixin({
|
115
|
+
id: nextLevelButtonColumnId,
|
116
|
+
headerStyle: 'text-align:center;',
|
117
|
+
style: function(cell){
|
118
|
+
return 'text-align:center;' + (cell.model.hasChildren(cell.row.id) ? 'cursor:pointer;' : '');
|
119
|
+
},
|
120
|
+
rowSelectable: false,
|
121
|
+
sortable: false,
|
122
|
+
filterable: false,
|
123
|
+
editable: false,
|
124
|
+
padding: false,
|
125
|
+
ignore: true,
|
126
|
+
declaredWidth: w,
|
127
|
+
width: w,
|
128
|
+
decorator: function(data, rowId){
|
129
|
+
if(t.model.hasChildren(rowId)){
|
130
|
+
return '<div class="gridxLayerHasChildren"></div>';
|
131
|
+
}
|
132
|
+
return '';
|
133
|
+
}
|
134
|
+
}, t.arg('buttonColumnArgs') || {});
|
135
|
+
t._onSetColumns();
|
136
|
+
t.aspect(g, 'setColumns', '_onSetColumns');
|
137
|
+
|
138
|
+
t.aspect(g, g.touch ? 'onCellTouchStart' : 'onCellMouseDown', function(e){
|
139
|
+
if(e.columnId == nextLevelButtonColumnId && e.cellNode.childNodes.length){
|
140
|
+
g.focus.focusArea('header');
|
141
|
+
setTimeout(function(){
|
142
|
+
t.down(e.rowId);
|
143
|
+
}, 0);
|
144
|
+
}
|
145
|
+
});
|
146
|
+
},
|
147
|
+
|
148
|
+
preload: function(){
|
149
|
+
this.grid.vLayout.register(this, '_contextNode', 'headerNode', 10);
|
150
|
+
},
|
151
|
+
|
152
|
+
onReady: function(){},
|
153
|
+
onFinish: function(){},
|
154
|
+
|
155
|
+
down: function(id){
|
156
|
+
var t = this,
|
157
|
+
m = t.model;
|
158
|
+
if(!t._lock && m.hasChildren(id) && String(m.parentId(id)) === String(m.layerId())){
|
159
|
+
t._lock = 1;
|
160
|
+
var g = t.grid,
|
161
|
+
bn = g.bodyNode,
|
162
|
+
w = bn.offsetWidth,
|
163
|
+
tmpBn = t._tmpBodyNode,
|
164
|
+
wrapper1 = t._wrapper1,
|
165
|
+
wrapper2 = t._wrapper2,
|
166
|
+
parentRowNode = g.body.getRowNode({ rowId: id }),
|
167
|
+
pos = domGeometry.position(parentRowNode),
|
168
|
+
refPos = domGeometry.position(t._contextNode),
|
169
|
+
cloneParent = parentRowNode.cloneNode(true);
|
170
|
+
|
171
|
+
domClass.add(parentRowNode, 'gridxLayerLoading');
|
172
|
+
|
173
|
+
wrapper2.appendChild(cloneParent);
|
174
|
+
t._parentStack.push(cloneParent);
|
175
|
+
cloneParent._pos = g.vScroller.position();
|
176
|
+
moveNodes(bn, tmpBn);
|
177
|
+
|
178
|
+
bn.style.left = w + 'px';
|
179
|
+
bn.style.zIndex = 1;
|
180
|
+
tmpBn.style.left = 0;
|
181
|
+
tmpBn.style.zIndex = 0;
|
182
|
+
wrapper2.style.top = (pos.y - refPos.y) + 'px';
|
183
|
+
wrapper2.style.zIndex = -1;
|
184
|
+
g.vScrollerNode.style.zIndex = 9999;
|
185
|
+
|
186
|
+
m.setLayer(id);
|
187
|
+
t._refresh(function(){
|
188
|
+
domClass.remove(parentRowNode, 'gridxLayerLoading');
|
189
|
+
wrapper2.style.zIndex = 9999;
|
190
|
+
g.vScroller.scroll(0);
|
191
|
+
domClass.add(wrapper1, 'gridxLayerHSlide');
|
192
|
+
domClass.add(wrapper2, 'gridxLayerVSlide');
|
193
|
+
bn.style.left = 0;
|
194
|
+
tmpBn.style.left = -w + 'px';
|
195
|
+
wrapper1.style.left = -w + 'px';
|
196
|
+
wrapper2.style.top = 0;
|
197
|
+
}, {
|
198
|
+
isDown: true,
|
199
|
+
rowId: id,
|
200
|
+
parentRowNode: cloneParent
|
201
|
+
});
|
202
|
+
}
|
203
|
+
},
|
204
|
+
|
205
|
+
up: function(){
|
206
|
+
var t = this,
|
207
|
+
m = t.model;
|
208
|
+
if(!t._lock && m.isId(m.layerId())){
|
209
|
+
t._lock = 1;
|
210
|
+
var g = t.grid,
|
211
|
+
bn = g.bodyNode,
|
212
|
+
tmpBn = t._tmpBodyNode,
|
213
|
+
w = bn.offsetWidth,
|
214
|
+
wrapper1 = t._wrapper1,
|
215
|
+
wrapper2 = t._wrapper2,
|
216
|
+
parentRowNode = t._parentStack[t._parentStack.length - 2],
|
217
|
+
currentParentRowNode = t._parentStack.pop();
|
218
|
+
parentId = currentParentRowNode.getAttribute('rowid');
|
219
|
+
|
220
|
+
if(parentRowNode){
|
221
|
+
wrapper2.appendChild(parentRowNode);
|
222
|
+
}
|
223
|
+
moveNodes(bn, tmpBn);
|
224
|
+
|
225
|
+
bn.style.left = -w + 'px';
|
226
|
+
bn.style.zIndex = 0;
|
227
|
+
tmpBn.style.left = 0;
|
228
|
+
tmpBn.style.zIndex = 1;
|
229
|
+
wrapper1.style.top = 0;
|
230
|
+
wrapper1.style.zIndex = 2;
|
231
|
+
wrapper2.style.left = -w + 'px';
|
232
|
+
g.vScrollerNode.style.zIndex = 9999;
|
233
|
+
|
234
|
+
m.layerUp();
|
235
|
+
t._refresh(function(){
|
236
|
+
if(currentParentRowNode){
|
237
|
+
g.vScroller.scroll(currentParentRowNode._pos);
|
238
|
+
var pos = domGeometry.position(g.body.getRowNode({
|
239
|
+
rowId: parentId
|
240
|
+
}));
|
241
|
+
var refPos = domGeometry.position(t._contextNode);
|
242
|
+
}
|
243
|
+
domClass.add(wrapper1, 'gridxLayerVSlide');
|
244
|
+
domClass.add(wrapper2, 'gridxLayerHSlide');
|
245
|
+
bn.style.left = 0;
|
246
|
+
tmpBn.style.left = w + 'px';
|
247
|
+
if(currentParentRowNode){
|
248
|
+
wrapper1.style.top = (pos.y - refPos.y) + 'px';
|
249
|
+
}
|
250
|
+
wrapper2.style.left = 0;
|
251
|
+
}, {
|
252
|
+
parentRowNode: currentParentRowNode
|
253
|
+
});
|
254
|
+
}
|
255
|
+
},
|
256
|
+
|
257
|
+
//Private--------------------------------------------------------------------
|
258
|
+
_onSetColumns: function(){
|
259
|
+
var g = this.grid,
|
260
|
+
col = this._col;
|
261
|
+
g._columns.push(col);
|
262
|
+
g._columnsById[col.id] = col;
|
263
|
+
},
|
264
|
+
|
265
|
+
_onTransitionEnd: function(){
|
266
|
+
var t = this,
|
267
|
+
m = t.model,
|
268
|
+
g = t.grid,
|
269
|
+
mainNode = g.mainNode,
|
270
|
+
bn = g.bodyNode,
|
271
|
+
tmpBn = t._tmpBodyNode,
|
272
|
+
w = bn.offsetWidth,
|
273
|
+
contextNode = t._contextNode,
|
274
|
+
wrapper1 = t._wrapper1,
|
275
|
+
wrapper2 = t._wrapper2;
|
276
|
+
if(t._lock){
|
277
|
+
mainNode.removeChild(tmpBn);
|
278
|
+
mainNode.removeChild(wrapper1);
|
279
|
+
contextNode.appendChild(wrapper2);
|
280
|
+
contextNode.style.height = wrapper2.offsetHeight + 'px';
|
281
|
+
domClass.remove(tmpBn, 'gridxSlideRefresh');
|
282
|
+
domClass.remove(bn, 'gridxSlideRefresh');
|
283
|
+
domClass.remove(wrapper1, 'gridxLayerHSlide gridxLayerVSlide');
|
284
|
+
domClass.remove(wrapper2, 'gridxLayerHSlide gridxLayerVSlide');
|
285
|
+
wrapper1.innerHTML = '';
|
286
|
+
|
287
|
+
var tmp = t._wrapper1;
|
288
|
+
t._wrapper1 = t._wrapper2;
|
289
|
+
t._wrapper2 = tmp;
|
290
|
+
|
291
|
+
wrapper1.style.left = 0;
|
292
|
+
wrapper1.style.zIndex = '';
|
293
|
+
wrapper1.style.top = 0;
|
294
|
+
wrapper2.style.left = 0;
|
295
|
+
wrapper2.style.zIndex = '';
|
296
|
+
wrapper2.style.top = 0;
|
297
|
+
bn.style.paddingTop = 0;
|
298
|
+
bn.style.zIndex = '';
|
299
|
+
tmpBn.style.paddingTop = 0;
|
300
|
+
tmpBn.style.zIndex = '';
|
301
|
+
g.vScrollerNode.style.zIndex = '';
|
302
|
+
|
303
|
+
g.vLayout.reLayout();
|
304
|
+
for(var i = 0; i < tmpBn.childNodes.length; ++i){
|
305
|
+
var rowId = tmpBn.childNodes[i].getAttribute('rowid');
|
306
|
+
if(m.isId(rowId)){
|
307
|
+
g.body.onUnrender(rowId);
|
308
|
+
}
|
309
|
+
}
|
310
|
+
tmpBn.innerHTML = '';
|
311
|
+
g.body._skipUnrender = 0;
|
312
|
+
t._lock = 0;
|
313
|
+
}
|
314
|
+
},
|
315
|
+
|
316
|
+
_refresh: function(callback, args){
|
317
|
+
var t = this,
|
318
|
+
g = t.grid,
|
319
|
+
bn = g.bodyNode,
|
320
|
+
tmpBn = t._tmpBodyNode,
|
321
|
+
frag = document.createDocumentFragment();
|
322
|
+
frag.appendChild(tmpBn);
|
323
|
+
frag.appendChild(t._wrapper1);
|
324
|
+
frag.appendChild(t._wrapper2);
|
325
|
+
g.mainNode.appendChild(frag);
|
326
|
+
tmpBn.style.paddingTop = t._wrapper1.offsetHeight + 'px';
|
327
|
+
bn.style.paddingTop = t._wrapper2.offsetHeight + 'px';
|
328
|
+
t._contextNode.style.height = 0;
|
329
|
+
//temparary disable paging
|
330
|
+
t._paging = g.view.paging;
|
331
|
+
g.view.paging = 0;
|
332
|
+
g.vLayout.reLayout();
|
333
|
+
if(args.isDown){
|
334
|
+
query('.gridxLayerHasChildren', args.parentRowNode).
|
335
|
+
removeClass('gridxLayerHasChildren').
|
336
|
+
addClass('gridxLayerLevelUp');
|
337
|
+
}else if(args.parentRowNode){
|
338
|
+
query('.gridxLayerLevelUp', args.parentRowNode).
|
339
|
+
removeClass('gridxLayerLevelUp').
|
340
|
+
addClass('gridxLayerHasChildren');
|
341
|
+
}
|
342
|
+
t.onReady(args);
|
343
|
+
g.body._skipUnrender = 1;
|
344
|
+
g.body.refresh().then(function(){
|
345
|
+
g.view.paging = t._paging;
|
346
|
+
setTimeout(function(){
|
347
|
+
domClass.add(bn, 'gridxSlideRefresh');
|
348
|
+
domClass.add(tmpBn, 'gridxSlideRefresh');
|
349
|
+
callback();
|
350
|
+
setTimeout(function(){
|
351
|
+
t._onTransitionEnd();
|
352
|
+
t.onFinish(args);
|
353
|
+
}, transitionDuration);
|
354
|
+
}, 10);
|
355
|
+
});
|
356
|
+
}
|
357
|
+
});
|
358
|
+
});
|
@@ -10,10 +10,8 @@ define([
|
|
10
10
|
"dojo/keys",
|
11
11
|
"../core/_Module",
|
12
12
|
"../core/model/extensions/Sort",
|
13
|
-
"dojo/i18n",
|
14
|
-
"dojo/i18n!../nls/NestedSort",
|
15
13
|
"./HeaderRegions"
|
16
|
-
], function(declare, array, lang, event, query, string, domClass, domConstruct, keys, _Module, Sort
|
14
|
+
], function(declare, array, lang, event, query, string, domClass, domConstruct, keys, _Module, Sort){
|
17
15
|
|
18
16
|
/*=====
|
19
17
|
return declare(_Module, {
|
@@ -70,7 +68,6 @@ define([
|
|
70
68
|
preload: function(args){
|
71
69
|
var t = this,
|
72
70
|
g = t.grid;
|
73
|
-
t._nls = i18n.getLocalization('gridx', 'NestedSort', g.lang);
|
74
71
|
t._sortData = t.arg('initialOrder', []);
|
75
72
|
if(g.persist){
|
76
73
|
var d = g.persist.registerAndLoad('sort', function(){
|
@@ -137,14 +134,15 @@ define([
|
|
137
134
|
|
138
135
|
//Private---------------------------------------------------------------------------
|
139
136
|
_createBtn: function(isSingle, col){
|
140
|
-
var t = this
|
137
|
+
var t = this,
|
138
|
+
nls = t.grid.nls;
|
141
139
|
if(t.isSortable(col.id)){
|
142
140
|
var btn = domConstruct.create('div', {
|
143
141
|
'class': 'gridxSortBtn gridxSortBtn' + (isSingle ? 'Single' : 'Nested'),
|
144
142
|
tabIndex: -1,
|
145
143
|
title: isSingle ?
|
146
|
-
|
147
|
-
|
144
|
+
nls.singleSort + ' - ' + nls.ascending :
|
145
|
+
nls.nestedSort + ' - ' + nls.ascending,
|
148
146
|
innerHTML: isSingle ?
|
149
147
|
a11yText.dojoxGridAscendingTip + ' ' :
|
150
148
|
t._sortData.length + 1 + a11yText.dojoxGridAscendingTip
|
@@ -206,8 +204,8 @@ define([
|
|
206
204
|
|
207
205
|
_updateUI: function(){
|
208
206
|
var t = this,
|
209
|
-
nls = t._nls,
|
210
207
|
g = t.grid,
|
208
|
+
nls = g.nls,
|
211
209
|
dn = g.domNode,
|
212
210
|
sortData = array.filter(t._sortData, function(s){
|
213
211
|
return g._columnsById[s.colId];
|
@@ -274,8 +272,8 @@ define([
|
|
274
272
|
orderState = data.descending ? 'descending' : 'ascending';
|
275
273
|
orderAction = data.descending ? 'none' : 'descending';
|
276
274
|
}
|
277
|
-
var a11ySingleLabel = string.substitute(this.
|
278
|
-
a11yNestedLabel = string.substitute(this.
|
275
|
+
var a11ySingleLabel = string.substitute(this.grid.nls.waiSingleSortLabel, [columnInfo, orderState, orderAction]),
|
276
|
+
a11yNestedLabel = string.substitute(this.grid.nls.waiNestedSortLabel, [columnInfo, orderState, orderAction]);
|
279
277
|
query('.gridxSortBtnSingle', cell)[0].setAttribute("aria-label", a11ySingleLabel);
|
280
278
|
query('.gridxSortBtnNested', cell)[0].setAttribute("aria-label", a11yNestedLabel);
|
281
279
|
}
|