Skip to content

Commit 145a8ca

Browse files
committed
curateOrderBy
1 parent b8e5a52 commit 145a8ca

File tree

1 file changed

+12
-6
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+12
-6
lines changed

services/static-webserver/client/source/class/osparc/store/Folders.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ qx.Class.define("osparc.store.Folders", {
3131
"folderMoved": "qx.event.type.Data",
3232
},
3333

34+
statics: {
35+
curateOrderBy: function(orderBy) {
36+
const curatedOrderBy = osparc.utils.Utils.deepCloneObject(orderBy);
37+
if (curatedOrderBy.field !== "name") {
38+
// only "modified_at" and "name" supported
39+
curatedOrderBy.field = "modified_at";
40+
}
41+
return curatedOrderBy;
42+
},
43+
},
44+
3445
members: {
3546
foldersCached: null,
3647

@@ -48,12 +59,7 @@ qx.Class.define("osparc.store.Folders", {
4859
});
4960
}
5061

51-
const curatedOrderBy = osparc.utils.Utils.deepCloneObject(orderBy);
52-
if (curatedOrderBy.field !== "name") {
53-
// only "modified_at" and "name" supported
54-
curatedOrderBy.field = "modified_at";
55-
}
56-
62+
const curatedOrderBy = this.self().curateOrderBy(orderBy);
5763
const params = {
5864
url: {
5965
workspaceId,

0 commit comments

Comments
 (0)