Skip to content
This repository
Browse code

Merge branch 'master' of git://github.com/SitePen/dgrid into scrollin…

…g-large

Conflicts:
	OnDemandList.js
	test/complex_column.html
  • Loading branch information...
commit 4c77bea03fe857d7571a0ff9b12778b7651042d7 2 parents 664b591 + 5b53c9e
Kris Zyp kriszyp authored
4 OnDemandList.js
@@ -263,12 +263,12 @@ return declare([List, _StoreMixin], {
263 263 // the preload is below the line of sight
264 264 do{
265 265 preload = preload.previous;
266   - }while(preload && !preload.node.offsetParent); // skip past preloads that are not currently connected
  266 + }while(preload && !preload.node.offsetWidth); // skip past preloads that are not currently connected
267 267 }else if(visibleTop - mungeAmount - searchBuffer > (preloadTop + (preloadHeight = preloadNode.offsetHeight))){
268 268 // the preload is above the line of sight
269 269 do{
270 270 preload = preload.next;
271   - }while(preload && !preload.node.offsetParent);// skip past preloads that are not currently connected
  271 + }while(preload && !preload.node.offsetWidth);// skip past preloads that are not currently connected
272 272 }else{
273 273 // the preload node is visible, or close to visible, better show it
274 274 var offset = ((preloadNode.rowIndex ? visibleTop - requestBuffer : visibleBottom) - preloadTop) / grid.rowHeight;
2  extensions/ColumnResizer.js
@@ -115,7 +115,7 @@ return declare([], {
115 115 if(this.columnSets && this.columnSets.length){
116 116 var csi = this.columnSets.length;
117 117 while(csi--){
118   - assoc = dojo.mixin(assoc||{}, subRowAssoc(this.columnSets[csi]));
  118 + assoc = lang.mixin(assoc||{}, subRowAssoc(this.columnSets[csi]));
119 119 }
120 120 }else if(this.subRows && this.subRows.length > 1){
121 121 assoc = subRowAssoc(this.subRows);
25 test/Grid_headerless.html
@@ -50,25 +50,28 @@
50 50 width: 80px;
51 51 }
52 52
53   - #editorgrid {
  53 + #editgrid {
54 54 width: 90%;
55 55 }
56   - #editorgrid .field-date, #editorgrid .field-date2 {
  56 + #editgrid .field-date, #editgrid .field-date2 {
57 57 width: 16em;
58 58 }
59   - #editorgrid .field-integer {
  59 + #editgrid .field-integer {
60 60 width: 6em;
61 61 }
62   - #editorgrid .field-bool {
  62 + #editgrid .field-bool {
63 63 width: 6em;
64 64 }
65 65 </style>
66 66 <script type="text/javascript" src="../../dojo/dojo.js"
67 67 data-dojo-config="async: true"></script>
68 68 <script type="text/javascript">
69   - require(["dojo/on", "dgrid/List", "dgrid/OnDemandGrid", "dgrid/tree", "dgrid/editor", "dgrid/Selection", "dgrid/Keyboard", "dojo/_base/declare", "dijit/form/DateTextBox", "dijit/form/HorizontalSlider", "dijit/form/NumberSpinner", "dgrid/test/data/base", "dojo/domReady!"],
  69 + require(["dojo/on", "dgrid/List", "dgrid/OnDemandGrid", "dgrid/tree", "dgrid/editor", "dgrid/Selection", "dgrid/Keyboard", "dojo/_base/declare", "dijit/form/DateTextBox", "dijit/form/HorizontalSlider", "dijit/form/NumberSpinner", "dgrid/test/data/base", "dojo/domReady!"],
70 70 function(on, List, Grid, tree, editor, Selection, Keyboard, declare, DateTextBox, Slider, NumberSpinner, testStore){
71   - window.grid = declare([Grid, Selection, Keyboard])({
  71 +
  72 + var StandardGrid = declare([Grid, Selection, Keyboard]);
  73 +
  74 + window.grid = new StandardGrid({
72 75 store: testStore,
73 76 columns: { // you can declare columns as an object hash (key translates to field)
74 77 col1: editor({label: 'Column 1 column 1 column 1'}, "text", "dblclick"),
@@ -80,7 +83,7 @@
80 83 showHeader: false
81 84 }, "grid");
82 85
83   - window.scrollgrid = declare([Grid, Selection, Keyboard])({
  86 + window.scrollgrid = new StandardGrid({
84 87 store: testStore,
85 88 columns: { // same as previous, repeated to keep objects/plugins unique
86 89 col1: editor({label: 'Column 1 column 1 column 1'}, "text", "dblclick"),
@@ -92,7 +95,7 @@
92 95 showHeader: false
93 96 }, "scrollgrid");
94 97
95   - window.tree = declare([Grid, Selection, Keyboard])({
  98 + window.tree = new StandardGrid({
96 99 store: testCountryStore,
97 100 query: {type: "continent"},
98 101 selectionMode: "single",
@@ -106,7 +109,7 @@
106 109 showHeader: false
107 110 }, "tree");
108 111
109   - window.editorgrid = new (declare([Grid, Selection, Keyboard]))({
  112 + window.editGrid = new StandardGrid({
110 113 store: testTypesStore,
111 114 columns: [ // columns specified as array, with field in each item
112 115 editor({label: 'A Date', field: 'date'}, DateTextBox),
@@ -121,7 +124,7 @@
121 124 ],
122 125 selectionMode: "single",
123 126 showHeader: false
124   - }, "editorgrid");
  127 + }, "editgrid");
125 128 });
126 129 </script>
127 130 </head>
@@ -136,6 +139,6 @@
136 139 <p>(for testing that nodes occupy correct widths - pay attention to hover/selection style)</p>
137 140 <div id="scrollgrid"></div>
138 141 <h2>Editor Grid</h2>
139   - <div id="editorgrid"></div>
  142 + <div id="editgrid"></div><br>
140 143 </body>
141 144 </html>
15 test/OnDemand.html
@@ -123,36 +123,35 @@
123 123 col6: 'G',
124 124 col7: 'B'
125 125 };
126   - window.grid = declare([Grid])({
  126 + var StandardGrid = declare([Grid, Selection, Keyboard]);
  127 + window.grid = new StandardGrid({
127 128 store: testStore,
128 129 columns: columns,
129 130 sort: "col3", // initially sort by col3 ascending
130 131 noDataMessage: "Nobody here but us chickens!"
131 132 }, "grid");
132 133
133   - window.grid2 = declare([Grid, Selection, Keyboard])({
  134 + window.grid2 = new StandardGrid({
134 135 store: testTypesStore,
135 136 columns: columns2,
136 137 selectionMode: "single"
137 138 },"grid2");
138 139
139   - window.grid3 = declare([Grid, Keyboard])({
  140 + window.grid3 = new StandardGrid({
140 141 store: testTypesStore,
141 142 columns: columns3
142 143 }, "grid3");
143 144
144   - window.gridAddDel = declare([Grid, Keyboard, Selection])({
  145 + window.gridAddDel = new StandardGrid({
145 146 store: smallColorStore,
146   - columns: lang.clone(columns4),
147   - selectionMode: "multiple"
  147 + columns: lang.clone(columns4)
148 148 }, "gridAddDel");
149 149
150 150 // also throw in a List connected to the same store
151 151 // (so additions/deletions should show up in both)
152   - window.listAddDel = declare([List, Keyboard, Selection])({
  152 + window.listAddDel = new (declare([List, Keyboard, Selection]))({
153 153 store: smallColorStore,
154 154 columns: lang.clone(columns4),
155   - selectionMode: "multiple",
156 155 renderRow: function(object, options){
157 156 // need to define renderRow to accommodate store items
158 157 return domConstruct.create("div", {
6 test/OnDemand_promises.html
@@ -12,11 +12,11 @@
12 12 </head>
13 13 <body class="claro">
14 14 <p>This test page tests two types of stores that return promises from their
15   - query methods: the dojo.store.DataStore wrapper for dojo.data stores,
16   - and an instance of dojo.store.Memory with a promise returned from query.</p>
  15 + query methods: the dojo/store/DataStore wrapper for dojo/data stores,
  16 + and an instance of dojo/store/Memory with a promise returned from query.</p>
17 17 <h2>Grid w/ ItemFileWriteStore via DataStore</h2>
18 18 <div id="grid"></div>
19   - <h2>Grid w/ dojo.store w/ async query results</h2>
  19 + <h2>Grid w/ dojo/store w/ async query results</h2>
20 20 <div id="grid2"></div>
21 21 <script src="../../dojo/dojo.js" data-dojo-config="async:true"></script>
22 22 <script>
16 test/Selection.html
@@ -37,8 +37,10 @@
37 37 console.log("selection: " + json.stringify(event.grid.selection, null, " "));
38 38 }
39 39 );
40   -
41   - gridRowNavigation = declare([Grid, Selection, Keyboard])({
  40 + var SelectionGrid = declare([Grid, Selection, Keyboard]);
  41 + var CellSelectionGrid = declare([Grid, CellSelection, Keyboard]);
  42 +
  43 + gridRowNavigation = new SelectionGrid({
42 44 store: testStore,
43 45 cellNavigation: false,
44 46 columns: {
@@ -56,21 +58,21 @@
56 58 col3: 'Column 3',
57 59 col4: 'Column 4'
58 60 };
59   - gridCellNavigation = declare([Grid, CellSelection, Keyboard])({
  61 + gridCellNavigation = new CellSelectionGrid({
60 62 store: testStore,
61 63 columns: lang.clone(columns2)
62 64 }, "grid-cell-navigation");
63   - gridCellNavigationSingle = declare([Grid, CellSelection, Keyboard])({
  65 + gridCellNavigationSingle = new CellSelectionGrid({
64 66 store: testStore,
65 67 columns: lang.clone(columns2),
66 68 selectionMode: "single"
67 69 }, "grid-cell-navigation-single");
68   - gridCellNavigationMultiple = declare([Grid, CellSelection, Keyboard])({
  70 + gridCellNavigationMultiple = new CellSelectionGrid({
69 71 store: testStore,
70 72 columns: lang.clone(columns2),
71 73 selectionMode: "multiple"
72 74 }, "grid-cell-navigation-multiple");
73   - gridCellNavigationNone = declare([Grid, CellSelection, Keyboard])({
  75 + gridCellNavigationNone = new CellSelectionGrid({
74 76 store: testStore,
75 77 columns: lang.clone(columns2),
76 78 selectionMode: "none",
@@ -78,7 +80,7 @@
78 80 }, "grid-cell-navigation-none");
79 81
80 82 // cell navigation + row selection
81   - gridMixed = dojo.declare([Grid, Selection, Keyboard])({
  83 + gridMixed = new SelectionGrid({
82 84 store: testStore,
83 85 columns: { // same as columns in very first grid
84 86 col1: 'Column 1',
10 test/common_cases.html
@@ -67,6 +67,8 @@
67 67 require(["dojo/on", "dgrid/List", "dgrid/OnDemandGrid", "dgrid/tree", "dgrid/editor", "dgrid/Selection", "dgrid/Keyboard", "dgrid/test/data/base", "dojo/_base/declare", "dojo/_base/array", "dojo/domReady!"],
68 68 function(on, List, Grid, tree, editor, Selection, Keyboard, testStore, declare, arrayUtil){
69 69 console.log("loaded in " + (new Date().getTime() - start));
  70 +
  71 + var StandardGrid = declare([Grid, Selection, Keyboard]);
70 72
71 73 function getColumns(){
72 74 return { // you can declare columns as an object hash (key translates to field)
@@ -77,17 +79,17 @@
77 79 col5: editor({label: 'Column 5'}, "text", "dblclick")
78 80 };
79 81 }
80   - window.grid = declare([Grid, Selection, Keyboard])({
  82 + window.grid = new StandardGrid({
81 83 store: testStore,
82 84 columns: getColumns()
83 85 }, "grid");
84 86
85   - window.scrollgrid = declare([Grid, Selection, Keyboard])({
  87 + window.scrollgrid = new StandardGrid({
86 88 store: testStore,
87 89 columns: getColumns()
88 90 }, "scrollgrid");
89 91
90   - window.tree = declare([Grid, Selection, Keyboard])({
  92 + window.tree = new StandardGrid({
91 93 tabIndex: 2,
92 94 store: testCountryStore,
93 95 query: {type: "continent"},
@@ -100,7 +102,7 @@
100 102 timezone: 'Timezone'
101 103 }
102 104 }, "tree");
103   - window.list = declare([List, Selection, Keyboard])({
  105 + window.list = new (declare([List, Selection, Keyboard]))({
104 106 tabIndex: 1
105 107 }, "list");
106 108 list.renderArray(arrayUtil.map(testCountryStore.data, function(country){
20 test/complex_column.html
@@ -105,18 +105,20 @@
105 105 ]];
106 106
107 107 function byId(id){ return document.getElementById(id); }
108   -
109   - window.gridNoColumnSets = declare([Grid, Selection, Keyboard])({
  108 +
  109 + var ComplexGrid = declare([Grid, ColumnSet, Selection, Keyboard]);
  110 +
  111 + window.gridNoColumnSets = new (declare([Grid, Selection, Keyboard]))({
110 112 store: DeferredWrapper(testStore),
111 113 subRows: subRows1
112 114 }, "gridNoColumnSets");
113 115
114   - window.gridSingleRow = declare([Grid, ColumnSet, Selection, Keyboard])({
  116 + window.gridSingleRow = new ComplexGrid({
115 117 store: DeferredWrapper(testStore),
116 118 columnSets: columnSetsSingleRow
117 119 }, "gridSingleRow");
118 120
119   - window.grid = declare([Grid, ColumnSet, Selection, Keyboard])({
  121 + window.grid = new ComplexGrid({
120 122 store: DeferredWrapper(testStore),
121 123 columnSets: columnSets1
122 124 }, "grid");
@@ -138,13 +140,15 @@
138 140 on(byId("btnColumnSets3"), "click", function(){
139 141 grid.set("columnSets", columnSets3);
140 142 });
141   -
  143 +
  144 + var HtmlGrid = declare([Grid, GridFromHtml, Selection, Keyboard]);
  145 +
142 146 //NOTE: Grid == OnDemandGrid, GridFromHtml == ver w/ ColumnSet support
143   - window.gridFromHtml = declare([Grid, GridFromHtml, Selection, Keyboard])({
  147 + window.gridFromHtml = new HtmlGrid({
144 148 store: DeferredWrapper(testStore)
145 149 }, "gridFromHtml");
146   - window.gridFromHtml2 = declare([Grid, GridFromHtml, Selection, Keyboard])({
147   - store: DeferredWrapper(testStore)
  150 + window.gridFromHtml2 = new HtmlGrid({
  151 + store: testStore
148 152 }, "gridFromHtml2");
149 153
150 154 // test declarative instantiation (need a global for parser)
4 test/extensions/ColumnHider.html
@@ -52,7 +52,7 @@
52 52 col5: "Column 5"
53 53 };
54 54
55   - window.grid = declare([Grid, Selection, ColumnHider])({
  55 + window.grid = new (declare([Grid, Selection, ColumnHider]))({
56 56 store: testStore,
57 57 columns: columns1
58 58 }, "grid");
@@ -62,7 +62,7 @@
62 62 (evt.hidden ? "hidden" : "shown"));
63 63 });
64 64
65   - window.gridresize = declare([Grid, Selection, ColumnHider, ColumnResizer])({
  65 + window.gridresize = new (declare([Grid, Selection, ColumnHider, ColumnResizer]))({
66 66 store: testStore,
67 67 columns: lang.clone(columns)
68 68 }, "gridresize");
4 test/extensions/ColumnReorder.html
@@ -55,12 +55,12 @@
55 55 require(["dgrid/Grid", "dgrid/extensions/ColumnReorder", "dgrid/extensions/ColumnResizer",
56 56 "dojo/_base/declare", "dojo/domReady!"],
57 57 function(Grid, ColumnReorder, ColumnResizer, declare){
58   - window.grid = declare([Grid, ColumnReorder])({
  58 + window.grid = new (declare([Grid, ColumnReorder]))({
59 59 columns: columns1
60 60 }, "grid");
61 61 grid.renderArray(data);
62 62
63   - window.grid2 = declare([Grid, ColumnReorder, ColumnResizer])({
  63 + window.grid2 = new (declare([Grid, ColumnReorder, ColumnResizer]))({
64 64 columns: {
65 65 order: { label: "step", reorderable: false },
66 66 name: {},
6 test/extensions/ColumnResizer.html
@@ -65,12 +65,12 @@
65 65 col1: 'Col1',
66 66 col5: 'Column 5'
67 67 };
68   -
69   - window.grid = declare([Grid, Selection, ColumnResizer])({
  68 + var ResizeGrid = declare([Grid, Selection, ColumnResizer]);
  69 + window.grid = new ResizeGrid({
70 70 store: testStore,
71 71 columns: columns1
72 72 }, "grid");
73   - window.gridWide = declare([Grid, Selection, ColumnResizer])({
  73 + window.gridWide = new ResizeGrid({
74 74 store: testStore,
75 75 columns: lang.clone(columns)
76 76 }, "gridWide");
4 test/extensions/ColumnResizer_complex.html
@@ -37,7 +37,7 @@
37 37 <script type="text/javascript">
38 38 require(["dgrid/OnDemandGrid", "dgrid/GridWithColumnSetsFromHtml", "dgrid/ColumnSet", "dgrid/Selection", "dgrid/Keyboard", "dgrid/extensions/ColumnResizer", "dojo/_base/declare", "dgrid/test/data/base", "dojo/domReady!"],
39 39 function(Grid, GridFromHtml, ColumnSet, Selection, Keyboard, ColumnResizer, declare, testStore){
40   - window.grid = declare([Grid, ColumnSet, Selection, Keyboard, ColumnResizer])({
  40 + window.grid = new (declare([Grid, ColumnSet, Selection, Keyboard, ColumnResizer]))({
41 41 store: testStore,
42 42 columnSets: [
43 43 [
@@ -50,7 +50,7 @@
50 50 [{label: 'Column 5', field: 'col5'}]]]
51 51 }, "grid");
52 52 // same structure as above, without being split into ColumnSets
53   - window.gridNoColumnSets = declare([Grid, Selection, Keyboard, ColumnResizer])({
  53 + window.gridNoColumnSets = new (declare([Grid, Selection, Keyboard, ColumnResizer]))({
54 54 store: testStore,
55 55 subRows: [[
56 56 {label: 'Column 1', field: 'col1'},
2  test/mobile_grid.html
@@ -17,7 +17,7 @@
17 17 <script type="text/javascript">
18 18 require(["dojo/on", "dgrid/OnDemandGrid", "dgrid/extensions/ColumnResizer", "dojo/_base/declare", "dgrid/test/data/base", "dojo/domReady!"],
19 19 function(on, Grid, ColumnResizer, declare, testStore){
20   - window.grid = declare([Grid, ColumnResizer])({
  20 + window.grid = new (declare([Grid, ColumnResizer]))({
21 21 store: testStore,
22 22 columns: { // you can declare columns as an object hash (key translates to field)
23 23 col1: "Status",
12 test/rtl.html
@@ -56,12 +56,14 @@
56 56 {label: 'Column 4', field: 'col4'},
57 57 {label: 'Column 5', field: 'col5'}
58 58 ];
59   - window.grid = new (declare([Grid, Selection, Keyboard]))({
  59 + var StandardGrid = declare([Grid, Selection, Keyboard]);
  60 +
  61 + window.grid = new StandardGrid({
60 62 store: testStore,
61 63 columns: lang.clone(columns)
62 64 }, "grid");
63 65
64   - window.scrollgrid = declare([Grid, Selection, Keyboard])({
  66 + window.scrollgrid = new StandardGrid({
65 67 store: testStore,
66 68 columns: lang.clone(columns)
67 69 }, "scrollgrid");
@@ -74,7 +76,7 @@
74 76 {label:'Timezone', field:'timezone'}
75 77 ];
76 78
77   - window.tree = declare([Grid, Keyboard, Selection])({
  79 + window.tree = new StandardGrid({
78 80 store: testCountryStore,
79 81 query: {type: "continent"},
80 82 columns: columnsTree
@@ -88,7 +90,7 @@
88 90 col5: editor({label: 'Column 5'}, "text", "dblclick")
89 91 };
90 92
91   - window.headerless = declare([Grid, Selection, Keyboard])({
  93 + window.headerless = new StandardGrid({
92 94 store: testStore,
93 95 columns: columnsHeaderless,
94 96 showHeader: false
@@ -137,7 +139,7 @@
137 139 editor({label: "FilteringSelect Store", field: "state2", editorArgs: {store: stateStore, maxHeight: 150, style: "width:120px;"}}, FilteringSelect)
138 140 ];
139 141
140   - window.moreeditors = new (declare([Grid, Selection, Keyboard]))({
  142 + window.moreeditors = new StandardGrid({
141 143 store: testTypesStore,
142 144 columns: columnsEditor,
143 145 selectionMode: "none"
21 test/selector.html
@@ -39,6 +39,12 @@
39 39 col2: {label: 'Column 2', sortable: false},
40 40 col3: {label: 'Column 3'}
41 41 };
  42 + var columnsRadio = {
  43 + col1: selector({ label: 'Radio', disabled: function(object){ return object.col3 == "read"; } }, "radio"),
  44 + id: "ID",
  45 + col2: {label: 'Column 2', sortable: false},
  46 + col3: {label: 'Column 3'}
  47 + };
42 48
43 49 on(document.body, "dgrid-select,dgrid-deselect",
44 50 function(event){
@@ -48,26 +54,23 @@
48 54 console.log("selection: ", json.stringify(event.grid.selection, null, " "));
49 55 }
50 56 );
  57 +
  58 + var SelectionGrid = declare([Grid, Selection, Keyboard]);
51 59
52   - window.grid = dojo.declare([Grid, Selection, Keyboard])({
  60 + window.grid = new SelectionGrid({
53 61 store: testStore,
54 62 selectionMode: "none",
55 63 columns: columns,
56 64 allowSelectAll: true
57 65 }, "grid");
58   - window.grid2 = dojo.declare([Grid, Selection, Keyboard])({
  66 + window.grid2 = new SelectionGrid({
59 67 store: testStore,
60 68 selectionMode: "none",
61 69 columns: columns2,
62 70 allowSelectAll: false
63 71 }, "grid2");
64   - var columnsRadio = {
65   - col1: selector({ label: 'Radio', disabled: function(object){ return object.col3 == "read"; } }, "radio"),
66   - id: "ID",
67   - col2: {label: 'Column 2', sortable: false},
68   - col3: {label: 'Column 3'}
69   - };
70   - window.gridRadio = declare([Grid, Selection, Keyboard])({
  72 +
  73 + window.gridRadio = new SelectionGrid({
71 74 store: testStore,
72 75 selectionMode: "none",
73 76 columns: columnsRadio
14 test/tree.html
@@ -41,8 +41,10 @@
41 41 // returns "&nbsp;" for blank content, to prevent cell collapsing
42 42 return value === undefined || value === "" ? "&nbsp;" : value;
43 43 }
  44 +
  45 + var StandardGrid = declare([Grid, Keyboard, Selection]);
44 46
45   - var treeGrid = window.treeGrid = declare([Grid, Keyboard, Selection])({
  47 + var treeGrid = window.treeGrid = new StandardGrid({
46 48 store: testCountryStore,
47 49 query: {type: "continent"},
48 50 columns: [
@@ -84,7 +86,7 @@
84 86 testCountryStore.put(item);
85 87 });
86 88
87   - window.treeSelector = declare([Grid, Keyboard, Selection])({
  89 + window.treeSelector = new StandardGrid({
88 90 store: testCountryStore,
89 91 query: {type: "continent"},
90 92 selectionMode: "none",
@@ -98,11 +100,9 @@
98 100 ]
99 101 }, "treeSelector");
100 102
101   - window.treeSubRows = declare([Grid, Keyboard, Selection])({
  103 + window.treeSubRows = new StandardGrid({
102 104 store: testCountryStore,
103 105 query: {type: "continent"},
104   - selectionMode: "none",
105   - allowSelectAll: true,
106 106 subRows: [[
107 107 tree({label:"Name", field:"name", sortable: false}),
108 108 {label:"Type", field:"type", sortable: false}
@@ -112,11 +112,9 @@
112 112 ]]
113 113 }, "treeSubRows");
114 114
115   - window.treeColumnSets = declare([Grid, Keyboard, Selection, ColumnSet])({
  115 + window.treeColumnSets = new (declare([Grid, Keyboard, Selection, ColumnSet]))({
116 116 store: testCountryStore,
117 117 query: {type: "continent"},
118   - selectionMode: "none",
119   - allowSelectAll: true,
120 118 columnSets: [[
121 119 [ tree({label:"Name", field:"name", sortable: false}) ],
122 120 [ {label:"Type", field:"type", sortable: false} ]
16 test/widths.html
@@ -75,30 +75,34 @@
75 75 col5: editor({label: 'Column 5'}, "text", "dblclick")
76 76 };
77 77 }
  78 +
  79 + var StandardGrid = declare([Grid, Selection, Keyboard]);
78 80
79   - window.grid = declare([Grid, Selection, Keyboard])({
  81 + window.grid = new StandardGrid({
80 82 store: testStore,
81 83 columns: getColumns()
82 84 }, "grid");
83 85
84   - window.scrollgrid = declare([Grid, Selection, Keyboard])({
  86 + window.scrollgrid = new StandardGrid({
85 87 store: testStore,
86 88 columns: getColumns()
87 89 }, "scrollgrid");
88 90
89   - window.headerlessgrid = declare([Grid, Selection, Keyboard])({
  91 + window.headerlessgrid = new StandardGrid({
90 92 store: testStore,
91 93 columns: getColumns(),
92 94 showHeader: false
93 95 }, "headerlessgrid");
  96 +
  97 + var StandardList = declare([List, Selection, Keyboard]);
94 98
95   - window.list = declare([List, Selection, Keyboard])({}, "list");
  99 + window.list = new StandardList({}, "list");
96 100 list.renderArray(countries);
97 101
98   - window.widelist = declare([List, Selection, Keyboard])({}, "widelist");
  102 + window.widelist = new StandardList({}, "widelist");
99 103 widelist.renderArray(countries);
100 104
101   - window.narrowlist = declare([List, Selection, Keyboard])({}, "narrowlist");
  105 + window.narrowlist = new StandardList({}, "narrowlist");
102 106 narrowlist.renderArray(longCountries);
103 107 });
104 108 </script>

0 comments on commit 4c77bea

Please sign in to comment.
Something went wrong with that request. Please try again.