From bc80988b2345d1e2ccfa64f0db6d025536d627ad Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 20 Jan 2025 13:55:02 +0100 Subject: [PATCH 1/4] setIdToWidget --- .../client/source/class/osparc/dashboard/ResourceDetails.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js b/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js index 76e9f628829b..83587f0dbe08 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js @@ -239,6 +239,7 @@ qx.Class.define("osparc.dashboard.ResourceDetails", { }); hBox.add(versionLabel); const versionsBox = new osparc.ui.toolbar.SelectBox(); + osparc.utils.Utils.setIdToWidget(versionsBox, "serviceSelectBox"); hBox.add(versionsBox); From 1097712b9623be1a949371ac60fa1b6acdc1a52f Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 20 Jan 2025 13:58:13 +0100 Subject: [PATCH 2/4] serviceVersionItem_ --- .../static-webserver/client/source/class/osparc/service/Utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/static-webserver/client/source/class/osparc/service/Utils.js b/services/static-webserver/client/source/class/osparc/service/Utils.js index d8243573f49a..48639568506a 100644 --- a/services/static-webserver/client/source/class/osparc/service/Utils.js +++ b/services/static-webserver/client/source/class/osparc/service/Utils.js @@ -207,6 +207,7 @@ qx.Class.define("osparc.service.Utils", { versionToListItem: function(key, version) { const versionDisplay = this.getVersionDisplay(key, version); const listItem = new qx.ui.form.ListItem(versionDisplay); + osparc.utils.Utils.setIdToWidget(listItem, "serviceVersionItem_" + versionDisplay); listItem.version = version; return listItem; }, From d23200b5f7f77506b1ed90446b5a52bb091362f1 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 20 Jan 2025 14:20:36 +0100 Subject: [PATCH 3/4] reuse --- .../client/source/class/osparc/info/ServiceUtils.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js b/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js index f8e87fa4ee37..3944e488890e 100644 --- a/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js +++ b/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js @@ -86,12 +86,7 @@ qx.Class.define("osparc.info.ServiceUtils", { * @param serviceData {Object} Serialized Service Object */ createContact: function(serviceData) { - const contact = new qx.ui.basic.Label(); - contact.set({ - value: osparc.store.Support.mailToText(serviceData["contact"], (serviceData["name"] + ":" + serviceData["version"])), - selectable: true, - rich: true - }); + const contact = osparc.store.Support.getMailToLabel(serviceData["contact"], serviceData["name"] + ":" + serviceData["version"]); return contact; }, From 4b01bd0c648b64a5b26e13099686c758f471e51b Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 20 Jan 2025 14:29:53 +0100 Subject: [PATCH 4/4] make support email easier to be selected --- .../client/source/class/osparc/ErrorPage.js | 1 + .../source/class/osparc/product/AboutProduct.js | 2 +- .../source/class/osparc/product/quickStart/Utils.js | 1 + .../client/source/class/osparc/store/Support.js | 11 ++++++----- .../client/source/class/osparc/ui/window/Dialog.js | 2 +- .../client/source/class/osparc/utils/Utils.js | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/ErrorPage.js b/services/static-webserver/client/source/class/osparc/ErrorPage.js index e139991a0a05..126990836662 100644 --- a/services/static-webserver/client/source/class/osparc/ErrorPage.js +++ b/services/static-webserver/client/source/class/osparc/ErrorPage.js @@ -214,6 +214,7 @@ qx.Class.define("osparc.ErrorPage", { const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail(); const giveEmailFeedbackWindow = new osparc.ui.window.Dialog("Support", null, qx.locale.Manager.tr("Please send us an email to:")); const mailto = osparc.store.Support.getMailToLabel(supportEmail, "Access error"); + mailto.setTextAlign("center"); giveEmailFeedbackWindow.addWidget(mailto); giveEmailFeedbackWindow.open(); }, diff --git a/services/static-webserver/client/source/class/osparc/product/AboutProduct.js b/services/static-webserver/client/source/class/osparc/product/AboutProduct.js index c0760d010821..507c8c9ae7c1 100644 --- a/services/static-webserver/client/source/class/osparc/product/AboutProduct.js +++ b/services/static-webserver/client/source/class/osparc/product/AboutProduct.js @@ -162,7 +162,7 @@ qx.Class.define("osparc.product.AboutProduct", { __getMailTo: function() { const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail(); const productName = osparc.store.StaticInfo.getInstance().getDisplayName(); - return osparc.store.Support.mailToText(supportEmail, "Support " + productName, false); + return osparc.store.Support.mailToLink(supportEmail, "Support " + productName, false); }, __addCopyright: function() { diff --git a/services/static-webserver/client/source/class/osparc/product/quickStart/Utils.js b/services/static-webserver/client/source/class/osparc/product/quickStart/Utils.js index 57c17b784dd3..2af3ce668689 100644 --- a/services/static-webserver/client/source/class/osparc/product/quickStart/Utils.js +++ b/services/static-webserver/client/source/class/osparc/product/quickStart/Utils.js @@ -66,6 +66,7 @@ qx.Class.define("osparc.product.quickStart.Utils", { const label = new qx.ui.basic.Label().set({ rich: true, wrap: true, + selectable: true, font: "text-14" }); if (text) { diff --git a/services/static-webserver/client/source/class/osparc/store/Support.js b/services/static-webserver/client/source/class/osparc/store/Support.js index 1352ef2eac90..65e5174929d5 100644 --- a/services/static-webserver/client/source/class/osparc/store/Support.js +++ b/services/static-webserver/client/source/class/osparc/store/Support.js @@ -132,9 +132,9 @@ qx.Class.define("osparc.store.Support", { }); }, - mailToText: function(email, subject, centered = true) { + mailToLink: function(email, subject, centered = true) { const color = qx.theme.manager.Color.getInstance().resolve("text"); - let textLink = `${email}  `; + let textLink = `${email}`; if (centered) { textLink = `
${textLink}
` } @@ -142,11 +142,11 @@ qx.Class.define("osparc.store.Support", { }, getMailToLabel: function(email, subject) { - const mailto = new qx.ui.basic.Label(this.mailToText(email, subject)).set({ - alignX: "center", + const mailto = new qx.ui.basic.Label(this.mailToLink(email, subject, false)).set({ font: "text-14", + allowGrowX: true, // let it grow to make it easier to select selectable: true, - rich: true + rich: true, }); return mailto; }, @@ -155,6 +155,7 @@ qx.Class.define("osparc.store.Support", { const productName = osparc.product.Utils.getProductName(); const giveEmailFeedbackWindow = new osparc.ui.window.Dialog("Feedback", null, qx.locale.Manager.tr("Please send us an email to:")); const mailto = this.getMailToLabel(email, productName + " feedback"); + mailto.setTextAlign("center"); giveEmailFeedbackWindow.addWidget(mailto); giveEmailFeedbackWindow.open(); }, diff --git a/services/static-webserver/client/source/class/osparc/ui/window/Dialog.js b/services/static-webserver/client/source/class/osparc/ui/window/Dialog.js index 0436c2763662..1b2f7b8c6bd0 100644 --- a/services/static-webserver/client/source/class/osparc/ui/window/Dialog.js +++ b/services/static-webserver/client/source/class/osparc/ui/window/Dialog.js @@ -81,7 +81,7 @@ qx.Class.define("osparc.ui.window.Dialog", { }); this.__extraWidgetsLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(15)).set({ - paddingTop: 15 + paddingTop: 10 }); this.__extraWidgetsLayout.exclude(); this.add(this.__extraWidgetsLayout, { diff --git a/services/static-webserver/client/source/class/osparc/utils/Utils.js b/services/static-webserver/client/source/class/osparc/utils/Utils.js index 233198affb8a..6dcdffa2692d 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Utils.js +++ b/services/static-webserver/client/source/class/osparc/utils/Utils.js @@ -591,7 +591,7 @@ qx.Class.define("osparc.utils.Utils", { const manuals = osparc.store.Support.getManuals(); const manualLink = (manuals && manuals.length) ? manuals[0].url : ""; const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail(); - const mailto = osparc.store.Support.mailToText(supportEmail, "Request Account " + productName); + const mailto = osparc.store.Support.mailToLink(supportEmail, "Request Account " + productName); let msg = ""; msg += qx.locale.Manager.tr("To use all "); msg += this.createHTMLLink(productName + " features", manualLink);