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,649 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/kernel",
|
3
|
+
"dojo/_base/declare",
|
4
|
+
"dijit/registry",
|
5
|
+
"dojo/_base/lang",
|
6
|
+
"dojo/_base/array",
|
7
|
+
"dojo/_base/event",
|
8
|
+
"dojo/dom-construct",
|
9
|
+
"dojo/dom-attr",
|
10
|
+
"dojo/dom-class",
|
11
|
+
"dojo/string",
|
12
|
+
"dojo/parser",
|
13
|
+
"dojo/query",
|
14
|
+
"../../core/_Module",
|
15
|
+
"dojo/text!../../templates/FilterBar.html",
|
16
|
+
"dojo/i18n",
|
17
|
+
"../Filter",
|
18
|
+
"./FilterDialog",
|
19
|
+
"./FilterConfirmDialog",
|
20
|
+
"./FilterTooltip",
|
21
|
+
"dijit/_BidiSupport",
|
22
|
+
"dijit/TooltipDialog",
|
23
|
+
"dijit/popup",
|
24
|
+
"dijit/form/Button",
|
25
|
+
"dojo/i18n!../../nls/FilterBar"
|
26
|
+
], function(kernel, declare, registry, lang, array, event, dom, domAttr, css, string, parser, query, _Module, template, i18n, Filter, FilterDialog, FilterConfirmDialog, FilterTooltip, _BidiSupport){
|
27
|
+
|
28
|
+
/*=====
|
29
|
+
var FilterBar = declare(_Module, {
|
30
|
+
// summary:
|
31
|
+
// Filter bar module.
|
32
|
+
// description:
|
33
|
+
// Show a filter bar on top of grid header. Clicking the filter bar will show a filter dialog to config conditions.
|
34
|
+
// This module depends on "filter" module.
|
35
|
+
|
36
|
+
// filterData: Object
|
37
|
+
// Set the initial filter rules. Format is:
|
38
|
+
// | {
|
39
|
+
// | type: "all",
|
40
|
+
// | conditions: [
|
41
|
+
// | {}
|
42
|
+
// | ]
|
43
|
+
// | }
|
44
|
+
filterData: null,
|
45
|
+
|
46
|
+
// closeButton: Boolean
|
47
|
+
// TRUE to show a small button on the filter bar for the user to close/hide the filter bar.
|
48
|
+
closeButton: true,
|
49
|
+
|
50
|
+
// defineFilterButton: Boolean
|
51
|
+
// FALSE to hide the define filter button on the left side (right side for RTL) of the filter bar.
|
52
|
+
defineFilterButton: true,
|
53
|
+
|
54
|
+
// tooltipDelay: Number
|
55
|
+
// Time in mili-seconds of the delay to show the Filter Status Tooltip when mouse is hovering on the filter bar.
|
56
|
+
tooltipDelay: 300,
|
57
|
+
|
58
|
+
// maxRuleCount: Integer
|
59
|
+
// Maximum rule count that can be applied in the Filter Definition Dialog.
|
60
|
+
// If <= 0 or not number, then infinite rules are supported.
|
61
|
+
maxRuleCount: 0,
|
62
|
+
|
63
|
+
// ruleCountToConfirmClearFilter: Integer | Infinity | null
|
64
|
+
// If the filter rule count is larger than or equal to this value, then a confirm dialog will show when clearing filter.
|
65
|
+
// If set to less than 1 or null, then always show the confirm dialog.
|
66
|
+
// If set to Infinity, then never show the confirm dialog.
|
67
|
+
// Default value is 2.
|
68
|
+
ruleCountToConfirmClearFilter: 2,
|
69
|
+
|
70
|
+
// itemsName: String
|
71
|
+
// The general name of the items listed in the grid.
|
72
|
+
// If not provided, then search the language bundle.
|
73
|
+
itemsName: '',
|
74
|
+
|
75
|
+
// condition:
|
76
|
+
// Name of all supported conditions.
|
77
|
+
// Hard coded here or dynamicly generated is up to the implementer. Anyway, users should be able to get this info.
|
78
|
+
conditions: {},
|
79
|
+
|
80
|
+
applyFilter: function(filterData){
|
81
|
+
// summary:
|
82
|
+
// Apply the filter data.
|
83
|
+
},
|
84
|
+
|
85
|
+
refresh: function(){
|
86
|
+
// summary:
|
87
|
+
// Re-draw the filter bar if necessary with the current attributes.
|
88
|
+
// example:
|
89
|
+
// | grid.filterBar.closeButton = true;
|
90
|
+
// | grid.filterBar.refresh();
|
91
|
+
},
|
92
|
+
|
93
|
+
isVisible: function(){
|
94
|
+
// summary:
|
95
|
+
// Whether the filter bar is visible.
|
96
|
+
},
|
97
|
+
|
98
|
+
show: function(){
|
99
|
+
// summary:
|
100
|
+
// Show the filter bar. (May add animation later)
|
101
|
+
},
|
102
|
+
|
103
|
+
hide: function(){
|
104
|
+
// summary:
|
105
|
+
// Hide the filter bar. (May add animation later)
|
106
|
+
},
|
107
|
+
|
108
|
+
onShow: function(){
|
109
|
+
},
|
110
|
+
|
111
|
+
onHide: function(){
|
112
|
+
},
|
113
|
+
|
114
|
+
showFilterDialog: function(){
|
115
|
+
// summary:
|
116
|
+
// Show the filter define dialog.
|
117
|
+
}
|
118
|
+
});
|
119
|
+
|
120
|
+
FilterBar.__DataTypeArgs = declare([], {
|
121
|
+
useRawData: true,
|
122
|
+
converter: function(v){
|
123
|
+
}
|
124
|
+
});
|
125
|
+
|
126
|
+
FilterBar.__FilterArgs = declare([], {
|
127
|
+
trueLabel: '',
|
128
|
+
falseLabel: '',
|
129
|
+
valueDijitArgs: {}
|
130
|
+
});
|
131
|
+
|
132
|
+
FilterBar.__ColumnDefinition = declare([], {
|
133
|
+
// filterable: Boolean
|
134
|
+
// If FALSE, then this column should not occur in the Filter Definition Dialog for future rules.
|
135
|
+
// But this does not influence existing filter rules. Default to be TRUE.
|
136
|
+
filterable: true,
|
137
|
+
|
138
|
+
// disabledConditions: String[]
|
139
|
+
// If provided, all the listed conditions will not occur in the Filter Definition Dialog for future rules.
|
140
|
+
// But this does not influence existing filter rules. Default to be an empty array.
|
141
|
+
disabledConditions: [],
|
142
|
+
|
143
|
+
// dataType: String
|
144
|
+
// Specify the data type of this column. Should be one of "string", "number", "date", "time", "boolean" and "enum".
|
145
|
+
// Case insensitive. Data type decides which conditions to use in the Filter Definition Dialog.
|
146
|
+
dataType: 'date',
|
147
|
+
|
148
|
+
//TODOC?
|
149
|
+
//storeDatePattern: '',
|
150
|
+
|
151
|
+
//TODOC?
|
152
|
+
//dateParsePattern: 'yyyy/MM/dd HH:mm:ss',
|
153
|
+
|
154
|
+
// filterArgs: __FilterArgs
|
155
|
+
//
|
156
|
+
filterArgs: null,
|
157
|
+
|
158
|
+
// dataTypeArgs: __DataTypeArgs
|
159
|
+
// Passing any other special config options for this column. For example, if the column is of type 'date', but the data
|
160
|
+
// in store is of string type, then a 'converter' function is needed here:
|
161
|
+
// dataTypeArgs: {
|
162
|
+
// useRawData: true,
|
163
|
+
// converter: function(v){
|
164
|
+
// return dojo.date.locale.parse(v, {...});
|
165
|
+
// }
|
166
|
+
// }
|
167
|
+
dataTypeArgs: {}
|
168
|
+
});
|
169
|
+
|
170
|
+
return FilterBar;
|
171
|
+
=====*/
|
172
|
+
|
173
|
+
return declare(_Module, {
|
174
|
+
name: 'filterBar',
|
175
|
+
forced: ['filter'],
|
176
|
+
preload: function(){
|
177
|
+
var rules = this.arg('filterData');
|
178
|
+
if(rules){
|
179
|
+
this.grid.filter.setFilter(this._createFilterExpr(rules), 1);
|
180
|
+
}
|
181
|
+
},
|
182
|
+
//Public-----------------------------------------------------------
|
183
|
+
closeButton: true,
|
184
|
+
|
185
|
+
defineFilterButton: true,
|
186
|
+
|
187
|
+
tooltipDelay: 300,
|
188
|
+
|
189
|
+
maxRuleCount: 0,
|
190
|
+
|
191
|
+
ruleCountToConfirmClearFilter: 2,
|
192
|
+
|
193
|
+
conditions: {
|
194
|
+
string: ['contain', 'equal', 'startWith', 'endWith', 'notEqual','notContain', 'notStartWith', 'notEndWith', 'isEmpty'],
|
195
|
+
number: ['equal','greater','less','greaterEqual','lessEqual','notEqual','isEmpty'],
|
196
|
+
date: ['equal','before','after','range','isEmpty'],
|
197
|
+
time: ['equal','before','after','range','isEmpty'],
|
198
|
+
'enum': ['equal', 'notEqual', 'isEmpty'],
|
199
|
+
'boolean': ['equal','isEmpty']
|
200
|
+
},
|
201
|
+
|
202
|
+
load: function(args, startup){
|
203
|
+
//Add before and after expression for filter.
|
204
|
+
var F = Filter;
|
205
|
+
F.before = F.lessEqual;
|
206
|
+
F.after = F.greaterEqual;
|
207
|
+
this._nls = i18n.getLocalization('gridx', 'FilterBar', this.grid.lang);
|
208
|
+
this.domNode = dom.create('div', {
|
209
|
+
innerHTML: string.substitute(template, this._nls),
|
210
|
+
'class': 'gridxFilterBar'
|
211
|
+
});
|
212
|
+
parser.parse(this.domNode);
|
213
|
+
css.toggle(this.domNode, 'gridxFilterBarHideCloseBtn', !this.arg('closeButton'));
|
214
|
+
this.grid.vLayout.register(this, 'domNode', 'headerNode', -1);
|
215
|
+
this._initWidgets();
|
216
|
+
this._initFocus();
|
217
|
+
this.refresh();
|
218
|
+
this.connect(this.domNode, 'onclick', 'onDomClick');
|
219
|
+
this.connect(this.domNode, 'onmouseover', 'onDomMouseOver');
|
220
|
+
this.connect(this.domNode, 'onmousemove', 'onDomMouseMove');
|
221
|
+
this.connect(this.domNode, 'onmouseout', 'onDomMouseOut');
|
222
|
+
this.loaded.callback();
|
223
|
+
},
|
224
|
+
onDomClick: function(e){
|
225
|
+
if(!e.target || !e.target.tagName){return;}
|
226
|
+
if(domAttr.get(e.target, 'action') === 'clear'){
|
227
|
+
this.clearFilter();
|
228
|
+
}else if(css.contains(e.target, 'gridxFilterBarCloseBtn') || css.contains(e.target,'gridxFilterBarCloseBtnText')){
|
229
|
+
this.hide();
|
230
|
+
}else{
|
231
|
+
this.showFilterDialog();
|
232
|
+
}
|
233
|
+
},
|
234
|
+
onDomMouseMove: function(e){
|
235
|
+
if(e && e.target && (domAttr.get(e.target, 'action') === 'clear'
|
236
|
+
|| this.btnFilter === dijit.getEnclosingWidget(e.target))){return;}
|
237
|
+
this._showTooltip(e);
|
238
|
+
},
|
239
|
+
onDomMouseOver: function(e){},
|
240
|
+
onDomMouseOut: function(e){
|
241
|
+
//Make sure to not hide tooltip when mouse moves to tooltip itself.
|
242
|
+
window.setTimeout(lang.hitch(this, '_hideTooltip'), 10);
|
243
|
+
},
|
244
|
+
|
245
|
+
_createFilterExpr: function(filterData){
|
246
|
+
var F = Filter, exps = [];
|
247
|
+
array.forEach(filterData.conditions, function(data){
|
248
|
+
var type = 'string';
|
249
|
+
if(data.colId){
|
250
|
+
type = this.grid.column(data.colId).dataType();
|
251
|
+
exps.push(this._getFilterExpression(data.condition, data, type, data.colId));
|
252
|
+
}else{
|
253
|
+
//any column
|
254
|
+
var arr = [];
|
255
|
+
array.forEach(this.grid.columns(), function(col){
|
256
|
+
if(!col.isFilterable()){return;}
|
257
|
+
arr.push(this._getFilterExpression(data.condition, data, type, col.id));
|
258
|
+
}, this);
|
259
|
+
exps.push(F.or.apply(F, arr));
|
260
|
+
}
|
261
|
+
}, this);
|
262
|
+
return (filterData.type === 'all' ? F.and : F.or).apply(F, exps);
|
263
|
+
},
|
264
|
+
|
265
|
+
applyFilter: function(filterData){
|
266
|
+
var _this = this;
|
267
|
+
var filter = this._createFilterExpr(filterData);
|
268
|
+
this.filterData = filterData;
|
269
|
+
this.grid.filter.setFilter(filter);
|
270
|
+
this.model.when({}).then(function(){
|
271
|
+
_this._currentSize = _this.model.size();
|
272
|
+
_this._totalSize = _this.model._cache.size();
|
273
|
+
_this._buildFilterState();
|
274
|
+
});
|
275
|
+
},
|
276
|
+
|
277
|
+
confirmToExecute: function(callback, scope){
|
278
|
+
var max = this.arg('ruleCountToConfirmClearFilter');
|
279
|
+
if(this.filterData && (this.filterData.conditions.length >= max || max <= 0)){
|
280
|
+
if(!this._cfmDlg){
|
281
|
+
this._cfmDlg = new FilterConfirmDialog({
|
282
|
+
title: this._nls.clearFilterDialogTitle,
|
283
|
+
_nls: this._nls
|
284
|
+
});
|
285
|
+
}
|
286
|
+
this._cfmDlg.execute = lang.hitch(scope, callback);
|
287
|
+
this._cfmDlg.show();
|
288
|
+
}else{
|
289
|
+
callback.apply(scope);
|
290
|
+
}
|
291
|
+
},
|
292
|
+
|
293
|
+
clearFilter: function(noConfirm){
|
294
|
+
if(!noConfirm){
|
295
|
+
this.confirmToExecute(lang.hitch(this, 'clearFilter', true), this);
|
296
|
+
}else{
|
297
|
+
this.filterData = null;
|
298
|
+
this.grid.filter.setFilter();
|
299
|
+
this._buildFilterState();
|
300
|
+
}
|
301
|
+
},
|
302
|
+
|
303
|
+
columnMixin: {
|
304
|
+
isFilterable: function(){
|
305
|
+
// summary:
|
306
|
+
// Check if this column is filterable.
|
307
|
+
// return: Boolean
|
308
|
+
return this.grid._columnsById[this.id].filterable !== false;
|
309
|
+
},
|
310
|
+
|
311
|
+
setFilterable: function(filterable){
|
312
|
+
// summary:
|
313
|
+
// Set filterable for this column.
|
314
|
+
// filterable: Boolean
|
315
|
+
// TRUE for filterable, FALSE for not.
|
316
|
+
// return:
|
317
|
+
// column object itself
|
318
|
+
this.grid.filterBar._setFilterable(this.id, filterable);
|
319
|
+
return this;
|
320
|
+
},
|
321
|
+
|
322
|
+
dataType: function(){
|
323
|
+
// summary:
|
324
|
+
// Get the data type of this column. Always lowercase.
|
325
|
+
// return: String
|
326
|
+
return (this.grid._columnsById[this.id].dataType || 'string').toLowerCase();
|
327
|
+
},
|
328
|
+
|
329
|
+
filterConditions: function(){
|
330
|
+
// summary:
|
331
|
+
// Get the available conditions for this column.
|
332
|
+
return this.grid.filterBar._getColumnConditions(this.id);
|
333
|
+
}
|
334
|
+
},
|
335
|
+
|
336
|
+
refresh: function(){
|
337
|
+
this.btnClose.style.display = this.closeButton ? '': 'none';
|
338
|
+
this.btnFilter.domNode.style.display = this.arg('defineFilterButton') ? '': 'none';
|
339
|
+
var _this = this;
|
340
|
+
this.model.when({}).then(function(){
|
341
|
+
_this._currentSize = _this.model.size();
|
342
|
+
_this._totalSize = _this.model._cache.size();
|
343
|
+
_this._buildFilterState();
|
344
|
+
});
|
345
|
+
},
|
346
|
+
isVisible: function(){
|
347
|
+
return this.domNode.style.display != 'none';
|
348
|
+
},
|
349
|
+
show: function(){
|
350
|
+
this.domNode.style.display = 'block';
|
351
|
+
this.grid.vLayout.reLayout();
|
352
|
+
this.onShow();
|
353
|
+
},
|
354
|
+
|
355
|
+
hide: function(){
|
356
|
+
this.domNode.style.display = 'none';
|
357
|
+
this.grid.vLayout.reLayout();
|
358
|
+
this._hideTooltip();
|
359
|
+
this.onHide();
|
360
|
+
},
|
361
|
+
onShow: function(){},
|
362
|
+
onHide: function(){},
|
363
|
+
showFilterDialog: function(){
|
364
|
+
var dlg = this._filterDialog;
|
365
|
+
if(!dlg){
|
366
|
+
this._filterDialog = dlg = new FilterDialog({
|
367
|
+
title: this._nls.filterDefDialogTitle,
|
368
|
+
grid: this.grid
|
369
|
+
});
|
370
|
+
}
|
371
|
+
if(dlg.open){return;}
|
372
|
+
//Fix #7345: If there exists filterData, it should be set after dlg is shown;
|
373
|
+
//If there is no filterData, dlg.setData have to be called before dlg.show(),
|
374
|
+
//otherwise, the dlg will not show any condition boxes.
|
375
|
+
//TODO: Need more investigation on this to make the logic more reasonable!
|
376
|
+
if(!this.filterData){
|
377
|
+
dlg.setData(this.filterData);
|
378
|
+
}
|
379
|
+
dlg.show();
|
380
|
+
if(this.filterData){
|
381
|
+
dlg.setData(this.filterData);
|
382
|
+
}
|
383
|
+
},
|
384
|
+
|
385
|
+
uninitialize: function(){
|
386
|
+
this._filterDialog && this._filterDialog.destroyRecursive();
|
387
|
+
this.inherited(arguments);
|
388
|
+
dom.destroy(this.domNode);
|
389
|
+
},
|
390
|
+
|
391
|
+
//Private---------------------------------------------------------------
|
392
|
+
_getColumnConditions: function(colId){
|
393
|
+
// summary:
|
394
|
+
// Get the available conditions for a specific column.
|
395
|
+
// Excluded condtions is defined by col.disabledConditions
|
396
|
+
// tag:
|
397
|
+
// private
|
398
|
+
// colId: String|Number
|
399
|
+
// The ID of a column.
|
400
|
+
// return: String[]
|
401
|
+
// An array of condition names.
|
402
|
+
|
403
|
+
var disabled, type;
|
404
|
+
if(!colId){
|
405
|
+
//any column
|
406
|
+
disabled = [];
|
407
|
+
type = 'string';
|
408
|
+
}else{
|
409
|
+
disabled = this.grid._columnsById[colId].disabledConditions || [];
|
410
|
+
type = (this.grid._columnsById[colId].dataType || 'string').toLowerCase();
|
411
|
+
}
|
412
|
+
|
413
|
+
var ret = this.conditions[type], hash = {};
|
414
|
+
if(!ret){ret = this.conditions['string'];}
|
415
|
+
array.forEach(disabled, function(name){hash[name] = true;});
|
416
|
+
ret = array.filter(ret, function(name){return !hash[name];});
|
417
|
+
return ret;
|
418
|
+
},
|
419
|
+
|
420
|
+
_setFilterable: function(colId, filterable){
|
421
|
+
var col = this.grid._columnsById[colId];
|
422
|
+
if(!col){return;}
|
423
|
+
if(col.filterable == !!filterable){return;}
|
424
|
+
col.filterable = !!filterable;
|
425
|
+
if(this.filterData){
|
426
|
+
var d = this.filterData, len = d.conditions.length;
|
427
|
+
d.conditions = array.filter(d.conditions, function(c){
|
428
|
+
return c.colId != colId;
|
429
|
+
});
|
430
|
+
if(len != d.conditions.length){
|
431
|
+
this.applyFilter(d);
|
432
|
+
}
|
433
|
+
if(this._filterDialog.open){
|
434
|
+
this._filterDialog.setData(d);
|
435
|
+
}
|
436
|
+
}
|
437
|
+
},
|
438
|
+
_initWidgets: function(){
|
439
|
+
this.btnFilter = registry.byNode(query('.dijitButton', this.domNode)[0]);
|
440
|
+
this.btnClose = query('.gridxFilterBarCloseBtn', this.domNode)[0];
|
441
|
+
this.statusNode = query('.gridxFilterBarStatus', this.domNode)[0].firstChild;
|
442
|
+
domAttr.remove(this.btnFilter.focusNode, 'aria-labelledby');
|
443
|
+
},
|
444
|
+
|
445
|
+
_buildFilterState: function(){
|
446
|
+
// summary:
|
447
|
+
// Build the tooltip dialog to show all applied filters.
|
448
|
+
if(!this.filterData || !this.filterData.conditions.length){
|
449
|
+
this.statusNode.innerHTML = this.arg('noFilterMessage', this._nls.filterBarMsgNoFilterTemplate);
|
450
|
+
return;
|
451
|
+
}
|
452
|
+
this.statusNode.innerHTML = string.substitute(this.arg('hasFilterMessage', this._nls.filterBarMsgHasFilterTemplate),
|
453
|
+
[this._currentSize, this._totalSize, this._nls.defaultItemsName]) +
|
454
|
+
' <a href="javascript:void(0);" action="clear" title="' + this._nls.filterBarClearButton + '">'
|
455
|
+
+ this._nls.filterBarClearButton + '</a>';
|
456
|
+
this._buildTooltip();
|
457
|
+
},
|
458
|
+
_buildTooltip: function(){
|
459
|
+
if(!this._tooltip){
|
460
|
+
this._tooltip = new FilterTooltip({grid: this.grid});
|
461
|
+
}
|
462
|
+
this._tooltip.buildContent();
|
463
|
+
},
|
464
|
+
_showTooltip: function(evt, delayed){
|
465
|
+
this._hideTooltip();
|
466
|
+
if(!this.filterData ||
|
467
|
+
!this.filterData.conditions ||
|
468
|
+
!this.filterData.conditions.length){return;}
|
469
|
+
if(!delayed){
|
470
|
+
this._pointTooltipDelay = window.setTimeout(lang.hitch(this, '_showTooltip',
|
471
|
+
evt, true),this.arg('tooltipDelay'));
|
472
|
+
return;
|
473
|
+
}
|
474
|
+
this._tooltip.show(evt);
|
475
|
+
},
|
476
|
+
_hideTooltip: function(){
|
477
|
+
var dlg = this._tooltip;
|
478
|
+
if(!dlg){return;}
|
479
|
+
if(dlg.isMouseOn){return;}
|
480
|
+
if(this._pointTooltipDelay){
|
481
|
+
window.clearTimeout(this._pointTooltipDelay);
|
482
|
+
this._pointTooltipDelay = null;
|
483
|
+
}
|
484
|
+
dlg.hide();
|
485
|
+
},
|
486
|
+
_getRuleString: function(condition, value, type){
|
487
|
+
var valueString, type;
|
488
|
+
if(condition == 'isEmpty'){
|
489
|
+
valueString = '';
|
490
|
+
}else if(/^date|^time/i.test(type)){
|
491
|
+
var f = this._formatDate;
|
492
|
+
if(/^time/i.test(type)){f = this._formatTime;}
|
493
|
+
|
494
|
+
if(condition === 'range'){
|
495
|
+
var tpl = this.arg('rangeTemplate', this._nls.rangeTemplate);
|
496
|
+
valueString = string.substitute(tpl, [f(value.start), f(value.end)]);
|
497
|
+
}else{
|
498
|
+
valueString = f(value);
|
499
|
+
}
|
500
|
+
}else{
|
501
|
+
valueString = value;
|
502
|
+
}
|
503
|
+
if(this.grid.textDir){
|
504
|
+
var resolvedTextDir = this.grid.textDir;
|
505
|
+
if(resolvedTextDir == "auto"){
|
506
|
+
resolvedTextDir = _BidiSupport.prototype._checkContextual(valueString);
|
507
|
+
}
|
508
|
+
valueString = '<span dir="' + resolvedTextDir + '">' + valueString + '</span>';
|
509
|
+
}
|
510
|
+
return '<span style="font-style:italic">' + this._getConditionDisplayName(condition) + '</span> ' + valueString;
|
511
|
+
},
|
512
|
+
_getConditionDisplayName: function(c){
|
513
|
+
var k = c.charAt(0).toUpperCase() + c.substring(1);
|
514
|
+
return this.arg('condition' + k, this._nls['condition' + k]);
|
515
|
+
},
|
516
|
+
_getConditionOptions: function(colId){
|
517
|
+
var cache = this._conditionOptions = this._conditionOptions || {};
|
518
|
+
if(!cache[colId]){
|
519
|
+
var arr = [];
|
520
|
+
array.forEach(this._getColumnConditions(colId), function(s){
|
521
|
+
var k = s.charAt(0).toUpperCase() + s.substring(1);
|
522
|
+
arr.push({
|
523
|
+
label: this.arg('condition' + k, this._nls['condition' + k]),
|
524
|
+
value: s
|
525
|
+
});
|
526
|
+
}, this);
|
527
|
+
cache[colId] = arr;
|
528
|
+
}
|
529
|
+
return cache[colId];
|
530
|
+
},
|
531
|
+
|
532
|
+
_getFilterExpression: function(condition, data, type, colId){
|
533
|
+
//get filter expression by condition,data, column and type
|
534
|
+
var F = Filter;
|
535
|
+
var dc = this.grid._columnsById[colId].dateParser || this._stringToDate;
|
536
|
+
var tc = this.grid._columnsById[colId].timeParser || this._stringToTime;
|
537
|
+
var converter = {date: dc, time: tc};
|
538
|
+
var c = data.condition, exp, isNot = false, type = c == 'isEmpty' ? 'string' : type; //isEmpty always treat type as string
|
539
|
+
if(c === 'range'){
|
540
|
+
var startValue = F.value(data.value.start, type),
|
541
|
+
endValue = F.value(data.value.end, type),
|
542
|
+
columnValue = F.column(colId, type, converter[type]);
|
543
|
+
exp = F.and(F.greaterEqual(columnValue, startValue), F.lessEqual(columnValue, endValue));
|
544
|
+
}else{
|
545
|
+
if(/^not/.test(c)){
|
546
|
+
isNot = true;
|
547
|
+
c = c.replace(/^not/g, '');
|
548
|
+
c = c.charAt(0).toLowerCase() + c.substring(1);
|
549
|
+
}
|
550
|
+
exp = F[c](F.column(colId, type, converter[type]), c == 'isEmpty' ? null : F.value(data.value, type));
|
551
|
+
if(isNot){exp = F.not(exp);}
|
552
|
+
}
|
553
|
+
return exp;
|
554
|
+
},
|
555
|
+
_stringToDate: function(s, pattern){
|
556
|
+
pattern = pattern || /(\d{4})\/(\d\d?)\/(\d\d?)/;
|
557
|
+
pattern.test(s);
|
558
|
+
var d = new Date();
|
559
|
+
d.setFullYear(parseInt(RegExp.$1));
|
560
|
+
d.setMonth(parseInt(RegExp.$2)-1);
|
561
|
+
return d;
|
562
|
+
},
|
563
|
+
_stringToTime: function(s, pattern){
|
564
|
+
pattern = pattern || /(\d\d?):(\d\d?):(\d\d?)/;
|
565
|
+
pattern.test(s);
|
566
|
+
var d = new Date();
|
567
|
+
d.setHours(parseInt(RegExp.$1));
|
568
|
+
d.setMinutes(parseInt(RegExp.$2));
|
569
|
+
d.setSeconds(parseInt(RegExp.$3));
|
570
|
+
return d;
|
571
|
+
},
|
572
|
+
_formatDate: function(date){
|
573
|
+
//this may be customized by grid layout definition
|
574
|
+
var m = date.getMonth() + 1, d = date.getDate();
|
575
|
+
return m + '/' + d + '/' + date.getFullYear();
|
576
|
+
},
|
577
|
+
_formatTime: function(time){
|
578
|
+
//this may be customized by grid layout definition
|
579
|
+
var h = time.getHours(), m = time.getMinutes();
|
580
|
+
if(h < 10){h = '0' + h;}
|
581
|
+
if(m < 10){m = '0' + m;}
|
582
|
+
return h + ':' + m + ':00';
|
583
|
+
},
|
584
|
+
|
585
|
+
_initFocus: function(){
|
586
|
+
var focus = this.grid.focus;
|
587
|
+
if(focus){
|
588
|
+
focus.registerArea({
|
589
|
+
name: 'filterbar_btn',
|
590
|
+
priority: -1,
|
591
|
+
focusNode: this.btnFilter.domNode,
|
592
|
+
doFocus: this._doFocusBtnFilter,
|
593
|
+
scope: this
|
594
|
+
});
|
595
|
+
|
596
|
+
focus.registerArea({
|
597
|
+
name: 'filterbar_clear',
|
598
|
+
priority: -0.9,
|
599
|
+
focusNode: this.domNode,
|
600
|
+
doFocus: this._doFocusClearLink,
|
601
|
+
scope: this
|
602
|
+
});
|
603
|
+
|
604
|
+
focus.registerArea({
|
605
|
+
name: 'filterbar_close',
|
606
|
+
priority: -0.8,
|
607
|
+
focusNode: this.btnClose,
|
608
|
+
doFocus: this._doFocusBtnClose,
|
609
|
+
scope: this
|
610
|
+
});
|
611
|
+
}
|
612
|
+
},
|
613
|
+
_doFocusBtnFilter: function(evt){
|
614
|
+
this.btnFilter.focus();
|
615
|
+
if(evt){event.stop(evt);}
|
616
|
+
return true;
|
617
|
+
},
|
618
|
+
_doFocusClearLink: function(evt){
|
619
|
+
this.btnFilter.focus();
|
620
|
+
var link = query('a[action="clear"]')[0];
|
621
|
+
if(link){
|
622
|
+
link.focus();
|
623
|
+
if(evt){event.stop(evt);}
|
624
|
+
return true;
|
625
|
+
}
|
626
|
+
return false;
|
627
|
+
},
|
628
|
+
_doFocusBtnClose: function(evt){
|
629
|
+
this.btnClose.focus();
|
630
|
+
if(evt){event.stop(evt);}
|
631
|
+
return true;
|
632
|
+
},
|
633
|
+
|
634
|
+
_doBlur: function(){
|
635
|
+
return true;
|
636
|
+
},
|
637
|
+
destroy: function(){
|
638
|
+
this._filterDialog && this._filterDialog.destroy();
|
639
|
+
this._cfmDlg && this._cfmDlg.destroy();
|
640
|
+
this.btnFilter.destroy();
|
641
|
+
if(this._tooltip){
|
642
|
+
this._tooltip.destroy();
|
643
|
+
}
|
644
|
+
dom.destroy(this.domNode);
|
645
|
+
this.inherited(arguments);
|
646
|
+
}
|
647
|
+
|
648
|
+
});
|
649
|
+
});
|
@@ -0,0 +1,33 @@
|
|
1
|
+
define([
|
2
|
+
"dojo/_base/declare",
|
3
|
+
"dojo/string",
|
4
|
+
"dijit/Dialog",
|
5
|
+
"dojo/text!../../templates/FilterConfirmDialog.html"
|
6
|
+
], function(declare, string, Dialog, template){
|
7
|
+
|
8
|
+
/*=====
|
9
|
+
return declare([], {
|
10
|
+
});
|
11
|
+
=====*/
|
12
|
+
|
13
|
+
return declare(Dialog, {
|
14
|
+
cssClass: 'gridxFilterConfirmDialog',
|
15
|
+
autofocus: false,
|
16
|
+
postCreate: function(){
|
17
|
+
this.inherited(arguments);
|
18
|
+
this.set('content', string.substitute(template, this._nls));
|
19
|
+
var arr = dijit.findWidgets(this.domNode);
|
20
|
+
this.btnClear = arr[0];
|
21
|
+
this.btnCancel = arr[1];
|
22
|
+
this.connect(this.btnCancel, 'onClick', 'hide');
|
23
|
+
this.connect(this.btnClear, 'onClick', 'onExecute');
|
24
|
+
this.connect(this, 'show', function(){
|
25
|
+
this.btnCancel.focus();
|
26
|
+
});
|
27
|
+
},
|
28
|
+
onExecute: function(){
|
29
|
+
this.execute();
|
30
|
+
},
|
31
|
+
execute: function(){}
|
32
|
+
});
|
33
|
+
});
|