Skip to content

Commit e939b45

Browse files
committed
aesthetics
1 parent eae72f2 commit e939b45

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ qx.Class.define("osparc.dashboard.GroupedCardContainer", {
2323

2424
this._setLayout(new qx.ui.layout.VBox());
2525

26-
const showAllButton = this.__showAllButton = new qx.ui.form.Button().set({
26+
const showAllButton = this.__expandButton = new qx.ui.form.Button().set({
2727
margin: 10,
2828
marginBottom: 5
2929
});
@@ -70,7 +70,7 @@ qx.Class.define("osparc.dashboard.GroupedCardContainer", {
7070
},
7171

7272
members: {
73-
__showAllButton: null,
73+
__expandButton: null,
7474
__contentContainer: null,
7575

7676
_createChildControlImpl: function(id) {
@@ -116,7 +116,7 @@ qx.Class.define("osparc.dashboard.GroupedCardContainer", {
116116
__createContentContainer: function() {
117117
let contentContainer = null;
118118
const expanded = this.isExpanded();
119-
const showAllBtn = this.__showAllButton;
119+
const showAllBtn = this.__expandButton;
120120
if (expanded) {
121121
contentContainer = new osparc.dashboard.CardContainer();
122122
showAllBtn.show();
@@ -174,6 +174,10 @@ qx.Class.define("osparc.dashboard.GroupedCardContainer", {
174174
return this.__contentContainer;
175175
},
176176

177+
getExpandButton: function() {
178+
return this.__expandButton;
179+
},
180+
177181
// overridden
178182
add: function(child, idx) {
179183
if (osparc.dashboard.CardContainer.isValidCard(child)) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
379379
groupByMenu.add(groupByFeatured);
380380
groupOptions.add(groupByFeatured);
381381
groupByFeatured.execute();
382-
groupByButton.exclude();
382+
groupByButton.exclude(); // don't let users change the grouping
383383
}
384384

385385
const groupByShared = new qx.ui.menu.RadioButton(this.tr("Shared with"));

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,10 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
561561
cards.push(card);
562562

563563
this.__moveNoGroupToLast();
564+
this.__groupedContainersList.forEach(groupedContainer => {
565+
groupedContainer.setExpanded(true);
566+
groupedContainer.getExpandButton().exclude();
567+
});
564568
},
565569

566570
__resourceToCards: function(resourceData) {

0 commit comments

Comments
 (0)