Univention Bugzilla – Attachment 9216 Details for
Bug 45261
UMC Grid looses checkmarks when re-ordering components
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
45261.patch (text/plain), 1.92 KB, created by
Johannes Keiser
on 2017-09-18 14:19:16 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Johannes Keiser
Created:
2017-09-18 14:19:16 CEST
Size:
1.92 KB
patch
obsolete
>diff --git a/management/univention-web/js/widgets/Grid.js b/management/univention-web/js/widgets/Grid.js >index 1ec9534..b4be6a6 100644 >--- a/management/univention-web/js/widgets/Grid.js >+++ b/management/univention-web/js/widgets/Grid.js >@@ -73,6 +73,28 @@ define([ > // For legacy dojox grid compability > // e.g. formaters that expect to be working with a dojox grid > return item; >+ }, >+ >+ getSelectedIDs: function() { >+ // summary: >+ // Return the currently selected items. >+ // returns: >+ // An array of id strings (as specified by moduleStore.idProperty). >+ return array.filter(Object.keys(this.selection), function(id) { >+ return this.selection[id]; >+ }, this); >+ }, >+ >+ selectIDs: function(ids) { >+ array.forEach(ids, lang.hitch(this, function(id) { >+ this.select(id); >+ })); >+ }, >+ >+ _setSort: function() { >+ var selectedIDs = this.getSelectedIDs(); >+ this.inherited(arguments); >+ this.selectIDs(selectedIDs); > } > }); > >@@ -449,6 +471,7 @@ define([ > console.warn("unknown grid view selected"); > return; > } >+ var selectedIDs = this.getSelectedIDs(); > this._grid.renderRow = this._views[newView].renderRow; > var allBaseClasses = array.map(Object.keys(this._views), function(view) { > return this._views[view].baseClass; >@@ -456,6 +479,7 @@ define([ > domClass.replace(this.domNode, this._views[newView].baseClass, allBaseClasses); > this._grid.refresh(); > this._grid.resize(); >+ this._grid.selectIDs(selectedIDs); > this.activeViewMode = newView; > }, > >@@ -1027,13 +1051,7 @@ define([ > }, > > getSelectedIDs: function() { >- // summary: >- // Return the currently selected items. >- // returns: >- // An array of id strings (as specified by moduleStore.idProperty). >- return array.filter(Object.keys(this._grid.selection), function(id) { >- return this._grid.selection[id]; >- }, this); >+ return this._grid.getSelectedIDs(); > }, > > getRowValues: function(row) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45261
: 9216