Skip to content

Commit e0b9ae4

Browse files
committed
Merge branch 'fix/empty-icon' of github.com:odeimaiz/osparc-simcore into enh/tag-handling
2 parents b2ab1eb + 4cdea96 commit e0b9ae4

File tree

7 files changed

+10
-19
lines changed

7 files changed

+10
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
489489
lastChangeDate: resourceData.lastChangeDate ? new Date(resourceData.lastChangeDate) : null,
490490
trashedAt: resourceData.trashedAt ? new Date(resourceData.trashedAt) : null,
491491
trashedBy: resourceData.trashedBy || null,
492-
icon: ["study", "template"].includes(resourceData.resourceType) ? osparc.study.Utils.guessIcon(resourceData) : null,
492+
icon: ["study", "template"].includes(resourceData.resourceType) ? osparc.study.Utils.guessIcon(resourceData) : osparc.dashboard.CardBase.PRODUCT_ICON,
493493
thumbnail: resourceData.thumbnail || this.self().PRODUCT_THUMBNAIL,
494494
state: resourceData.state ? resourceData.state : {},
495495
classifiers: resourceData.classifiers && resourceData.classifiers ? resourceData.classifiers : [],

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
4444
ITEM_WIDTH: 190,
4545
ITEM_HEIGHT: 220,
4646
PADDING: 10,
47+
TITLE_PADDING: 6,
4748
SPACING_IN: 5,
4849
SPACING: 15,
4950
ICON_SIZE: 32,
@@ -202,8 +203,8 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
202203
control = new qx.ui.basic.Label().set({
203204
textColor: "contrasted-text-light",
204205
font: "text-14",
205-
padding: this.self().PADDING,
206-
maxWidth: this.self().ITEM_WIDTH - 2*this.self().PADDING,
206+
padding: this.self().TITLE_PADDING,
207+
maxWidth: this.self().ITEM_WIDTH,
207208
maxHeight: this.self().TITLE_MAX_HEIGHT,
208209
});
209210
layout = this.getChildControl("header");
@@ -368,14 +369,6 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
368369
thumbnailLayout.recheckSize();
369370
},
370371

371-
replaceIcon: function(newIcon) {
372-
const plusIcon = this.getChildControl("icon");
373-
plusIcon.exclude();
374-
375-
const bodyLayout = this.getChildControl("body");
376-
bodyLayout.add(newIcon, {flex: 1});
377-
},
378-
379372
/**
380373
* Event handler for the pointer over event.
381374
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
9393
break;
9494
case "menu-button":
9595
this.getChildControl("title").set({
96-
maxWidth: osparc.dashboard.GridButtonBase.ITEM_WIDTH - osparc.dashboard.GridButtonBase.ICON_SIZE - this.self().MENU_BTN_DIMENSIONS - 6,
97-
padding: 4,
96+
maxWidth: osparc.dashboard.GridButtonBase.ITEM_WIDTH - osparc.dashboard.GridButtonBase.ICON_SIZE - this.self().MENU_BTN_DIMENSIONS,
9897
});
9998
control = new qx.ui.form.MenuButton().set({
10099
appearance: "form-button-outlined",

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ qx.Class.define("osparc.dashboard.GridButtonLoadMore", {
3939

4040
members: {
4141
_applyFetching: function(value) {
42-
this.setIcon(osparc.dashboard.CardBase.LOADING_ICON);
42+
this.setThumbnail(osparc.dashboard.CardBase.LOADING_ICON);
4343
if (value) {
44-
this.getChildControl("icon").getChildControl("image").getContentElement()
44+
this.getChildControl("thumbnail").getChildControl("image").getContentElement()
4545
.addClass("rotate");
4646
} else {
47-
this.getChildControl("icon").getChildControl("image").getContentElement()
47+
this.getChildControl("thumbnail").getChildControl("image").getContentElement()
4848
.removeClass("rotate");
4949
}
5050
this.setEnabled(!value);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ qx.Class.define("osparc.dashboard.GridButtonPlaceholder", {
105105
title.setValue(titleText);
106106
}
107107
if (icon) {
108-
this.setIcon(icon);
108+
this.setThumbnail(icon);
109109
}
110110

111111
const stateLabel = this.getChildControl("state-label");

services/static-webserver/client/source/class/osparc/desktop/preferences/Preferences.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ qx.Class.define("osparc.desktop.preferences.Preferences", {
6666
openTags: function() {
6767
if (this.__tagsPage) {
6868
this._openPage(this.__tagsPage);
69-
return true;
7069
}
7170
},
7271
}

services/static-webserver/client/source/class/osparc/desktop/preferences/PreferencesWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ qx.Class.define("osparc.desktop.preferences.PreferencesWindow", {
4848
__preferences: null,
4949

5050
openTags: function() {
51-
return this.__preferences.openTags();
51+
this.__preferences.openTags();
5252
}
5353
}
5454
});

0 commit comments

Comments
 (0)