Skip to content

Commit 6ed9027

Browse files
committed
[skip ci] aesthetics
1 parent ef75db4 commit 6ed9027

File tree

1 file changed

+10
-10
lines changed
  • services/static-webserver/client/source/class/osparc/dashboard

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
4141
},
4242

4343
statics: {
44-
createMenuButton: function(label, icon, description) {
44+
createMenuButton: function(icon, label, description) {
4545
const menuButton = new qx.ui.menu.Button().set({
46-
label,
4746
icon: icon || null,
47+
label,
4848
font: "text-16",
4949
allowGrowX: true,
5050
});
@@ -56,7 +56,7 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
5656
});
5757
if (description) {
5858
const infoHint = new osparc.ui.hint.InfoHint(description).set({
59-
source: osparc.ui.hint.InfoHint.INFO_ICON + "/18",
59+
source: osparc.ui.hint.InfoHint.INFO_ICON + "/16",
6060
alignY: "middle",
6161
});
6262
// where the shortcut is supposed to go
@@ -66,9 +66,9 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
6666
return menuButton;
6767
},
6868

69-
createHeader: function(label, icon, description) {
69+
createHeader: function(icon, label, description) {
7070
const headerLabel = `--- ${label} ---`;
71-
return this.createMenuButton(headerLabel, icon, description).set({
71+
return this.createMenuButton(icon, headerLabel, description).set({
7272
anonymous: true,
7373
cursor: "default",
7474
font: "text-16",
@@ -84,28 +84,28 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
8484
switch (id) {
8585
case "new-folder":
8686
control = this.self().createMenuButton(
87+
osparc.dashboard.CardBase.NEW_ICON + "16",
8788
this.tr("New Folder"),
88-
osparc.dashboard.CardBase.NEW_ICON + "16"
8989
);
9090
osparc.utils.Utils.setIdToWidget(control, "newFolderButton");
9191
control.addListener("tap", () => this.__createNewFolder());
9292
this.add(control);
9393
break;
9494
case "templates-entry":
9595
control = this.self().createMenuButton(
96+
"@FontAwesome5Solid/copy/18",
9697
osparc.product.Utils.getTemplateAlias({
9798
firstUpperCase: true,
9899
plural: true
99100
}),
100-
"@FontAwesome5Solid/copy/18"
101101
);
102102
control.addListener("tap", () => this.fireDataEvent("changeTab", "templatesTab"));
103103
this.add(control);
104104
break;
105105
case "services-entry":
106106
control = this.self().createMenuButton(
107+
"@FontAwesome5Solid/cogs/18",
107108
this.tr("Services"),
108-
"@FontAwesome5Solid/cogs/18"
109109
);
110110
control.addListener("tap", () => this.fireDataEvent("changeTab", "servicesTab"));
111111
this.add(control);
@@ -166,15 +166,15 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
166166

167167
__addCategories: function(categories) {
168168
categories.forEach(category => {
169-
const categoryHeader = this.self().createHeader(category["title"], null, category["description"]);
169+
const categoryHeader = this.self().createHeader(null, category["title"], category["description"]);
170170
categoryHeader["categoryId"] = category["id"];
171171
this.__categoryHeaders.push(categoryHeader);
172172
this.add(categoryHeader);
173173
});
174174
},
175175

176176
__createFromResourceButton: function(resourceData) {
177-
const menuButton = this.self().createMenuButton(resourceData.title);
177+
const menuButton = this.self().createMenuButton(resourceData.icon, resourceData.title, resourceData.description);
178178
osparc.utils.Utils.setIdToWidget(menuButton, resourceData.idToWidget);
179179
return menuButton;
180180
},

0 commit comments

Comments
 (0)