|
73 |
// For legacy dojox grid compability |
73 |
// For legacy dojox grid compability |
74 |
// e.g. formaters that expect to be working with a dojox grid |
74 |
// e.g. formaters that expect to be working with a dojox grid |
75 |
return item; |
75 |
return item; |
|
|
76 |
}, |
77 |
|
78 |
getSelectedIDs: function() { |
79 |
// summary: |
80 |
// Return the currently selected items. |
81 |
// returns: |
82 |
// An array of id strings (as specified by moduleStore.idProperty). |
83 |
return array.filter(Object.keys(this.selection), function(id) { |
84 |
return this.selection[id]; |
85 |
}, this); |
86 |
}, |
87 |
|
88 |
selectIDs: function(ids) { |
89 |
array.forEach(ids, lang.hitch(this, function(id) { |
90 |
this.select(id); |
91 |
})); |
92 |
}, |
93 |
|
94 |
_setSort: function() { |
95 |
var selectedIDs = this.getSelectedIDs(); |
96 |
this.inherited(arguments); |
97 |
this.selectIDs(selectedIDs); |
76 |
} |
98 |
} |
77 |
}); |
99 |
}); |
78 |
|
100 |
|
|
449 |
console.warn("unknown grid view selected"); |
471 |
console.warn("unknown grid view selected"); |
450 |
return; |
472 |
return; |
451 |
} |
473 |
} |
|
|
474 |
var selectedIDs = this.getSelectedIDs(); |
452 |
this._grid.renderRow = this._views[newView].renderRow; |
475 |
this._grid.renderRow = this._views[newView].renderRow; |
453 |
var allBaseClasses = array.map(Object.keys(this._views), function(view) { |
476 |
var allBaseClasses = array.map(Object.keys(this._views), function(view) { |
454 |
return this._views[view].baseClass; |
477 |
return this._views[view].baseClass; |
|
456 |
domClass.replace(this.domNode, this._views[newView].baseClass, allBaseClasses); |
479 |
domClass.replace(this.domNode, this._views[newView].baseClass, allBaseClasses); |
457 |
this._grid.refresh(); |
480 |
this._grid.refresh(); |
458 |
this._grid.resize(); |
481 |
this._grid.resize(); |
|
|
482 |
this._grid.selectIDs(selectedIDs); |
459 |
this.activeViewMode = newView; |
483 |
this.activeViewMode = newView; |
460 |
}, |
484 |
}, |
461 |
|
485 |
|
|
1027 |
}, |
1051 |
}, |
1028 |
|
1052 |
|
1029 |
getSelectedIDs: function() { |
1053 |
getSelectedIDs: function() { |
1030 |
// summary: |
1054 |
return this._grid.getSelectedIDs(); |
1031 |
// Return the currently selected items. |
|
|
1032 |
// returns: |
1033 |
// An array of id strings (as specified by moduleStore.idProperty). |
1034 |
return array.filter(Object.keys(this._grid.selection), function(id) { |
1035 |
return this._grid.selection[id]; |
1036 |
}, this); |
1037 |
}, |
1055 |
}, |
1038 |
|
1056 |
|
1039 |
getRowValues: function(row) { |
1057 |
getRowValues: function(row) { |