-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathGridCommon.js
52 lines (51 loc) · 1.44 KB
/
GridCommon.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
define([
'dojo/_base/declare',
'./Grid',
'./core/model/cache/Sync',
'./modules/CellWidget',
'./modules/Edit',
'./modules/ColumnResizer',
'./modules/SingleSort',
'./modules/TouchScroll',
'./modules/extendedSelect/Row',
'./modules/Filter',
'./modules/move/Row',
'./modules/move/Column',
'./modules/ColumnLock'
], function(declare, Grid, Cache,
CellWidget, Edit, ColumnResizer,
SingleSort, TouchScroll,
SelectRow, Filter, MoveRow,
MoveColumn, ColumnLock){
return declare(Grid, {
// summary:
// This is a common configuration for grid with synchronous store
// (client side store such as dojo/store/Memory).
// Several useful modules are included by default so that users without special
// requirements can directly use.
// Note:
// 1. cacheClass is no need to be provided.
// gridx/core/model/cache/Sync will be used by default.
// 2. The exact modules used here might change without notification across Gridx versions.
// 3. The default modules will be loaded here no matter you use them or not. So if code size
// is critical to your project, please use base class gridx/Grid instead.
// example:
// | var grid = new GridCommon({
// | store: store,
// | structure: structure
// | });
cacheClass: Cache,
coreModules: Grid.prototype.coreModules.concat([
CellWidget,
Edit,
ColumnResizer,
SingleSort,
TouchScroll,
SelectRow,
Filter,
MoveRow,
MoveColumn,
ColumnLock
])
});
});