Skip to content

Commit 35ee7cd

Browse files
committed
foldersContainer visibility
1 parent f1af430 commit 35ee7cd

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

services/static-webserver/client/source/class/osparc/dashboard/ResourceContainerManager.js

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
3838
this._add(workspacesContainer);
3939

4040
const foldersContainer = this.__foldersContainer = new osparc.dashboard.CardContainer();
41+
this.__foldersContainer.exclude();
4142
this._add(foldersContainer);
4243
}
4344

@@ -295,26 +296,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
295296
this.__groupedContainersList = [];
296297
},
297298

298-
__addFoldersContainer: function() {
299-
// add foldersContainer dynamically
300-
[
301-
"addChildWidget",
302-
"removeChildWidget"
303-
].forEach(ev => {
304-
this.__foldersContainer.addListener(ev, () => {
305-
const children = this.__foldersContainer.getChildren();
306-
if (children.length && !children.includes(this.__foldersContainer)) {
307-
this._addAt(this.__foldersContainer, 0);
308-
return;
309-
}
310-
if (children.length === 0 && children.includes(this.__foldersContainer)) {
311-
this._remove(this.__foldersContainer);
312-
return;
313-
}
314-
})
315-
});
316-
},
317-
318299
__rebuildLayout: function(resourceType) {
319300
this.__cleanAll();
320301
if (this.getGroupBy()) {
@@ -427,6 +408,7 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
427408
reloadFolders: function() {
428409
if (this.__foldersContainer) {
429410
this.__foldersContainer.removeAll();
411+
this.__foldersContainer.exclude();
430412
}
431413
let folderCards = [];
432414
this.__foldersList.forEach(folderData => folderCards.push(this.__folderToCard(folderData)));
@@ -435,11 +417,13 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
435417

436418
addNewFolderCard: function(newFolderCard) {
437419
this.__foldersContainer.addAt(newFolderCard, 0);
420+
this.__foldersContainer.show();
438421
},
439422

440423
__folderToCard: function(folderData) {
441424
const card = this.__createFolderCard(folderData);
442425
this.__foldersContainer.add(card);
426+
this.__foldersContainer.show();
443427
return card;
444428
},
445429

0 commit comments

Comments
 (0)