From 0dfceab947641c8f70ca35be87c8fb2578d672d8 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 17 Apr 2025 18:42:27 +0200 Subject: [PATCH] fix start --- .../class/osparc/dashboard/NewStudies.js | 2 -- .../class/osparc/dashboard/StudyBrowser.js | 30 +++++++++---------- .../client/source/class/osparc/utils/Utils.js | 3 +- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js b/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js index 48a8c4a8016f..0161fce39f7f 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js @@ -43,7 +43,6 @@ qx.Class.define("osparc.dashboard.NewStudies", { } return templates.find(t => t.name === newButtonInfo.expectedTemplateLabel); }); - this.fireEvent("templatesLoaded"); }, properties: { @@ -56,7 +55,6 @@ qx.Class.define("osparc.dashboard.NewStudies", { }, events: { - "templatesLoaded": "qx.event.type.Event", "newStudyClicked": "qx.event.type.Data", }, diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index 5996f308c0d0..2529be781cb4 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -978,23 +978,21 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { const templates = osparc.store.Templates.getInstance().getTemplates(); if (templates) { const newStudies = new osparc.dashboard.NewStudies(newStudiesConfig); - newStudies.addListener("templatesLoaded", () => { - newStudies.setGroupBy("category"); - const winTitle = this.tr("New Plan"); - const win = osparc.ui.window.Window.popUpInWindow(newStudies, winTitle, osparc.dashboard.NewStudies.WIDTH+40, 300).set({ - clickAwayClose: false, - resizable: true - }); - newStudies.addListener("newStudyClicked", e => { - win.close(); - const templateInfo = e.getData(); - const templateData = templates.find(t => t.name === templateInfo.expectedTemplateLabel); - if (templateData) { - this.__newPlanBtnClicked(templateData, templateInfo.newStudyLabel); - } - }); - osparc.utils.Utils.setIdToWidget(win, "newStudiesWindow"); + newStudies.setGroupBy("category"); + const winTitle = this.tr("New Plan"); + const win = osparc.ui.window.Window.popUpInWindow(newStudies, winTitle, osparc.dashboard.NewStudies.WIDTH+40, 300).set({ + clickAwayClose: false, + resizable: true + }); + newStudies.addListener("newStudyClicked", e => { + win.close(); + const templateInfo = e.getData(); + const templateData = templates.find(t => t.name === templateInfo.expectedTemplateLabel); + if (templateData) { + this.__newPlanBtnClicked(templateData, templateInfo.newStudyLabel); + } }); + osparc.utils.Utils.setIdToWidget(win, "newStudiesWindow"); } }); } 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 a1fa80f0b36b..ef1247a8843d 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Utils.js +++ b/services/static-webserver/client/source/class/osparc/utils/Utils.js @@ -95,7 +95,8 @@ qx.Class.define("osparc.utils.Utils", { if (control && control.getContentElement()) { control.getContentElement().setAttribute("autocomplete", "off"); control.getContentElement().setAttribute("type", "search"); - control.getContentElement().setAttribute("name", "osparc-nope1234"); + control.getContentElement().setAttribute("name", "osparcdontautomplete"); + control.getContentElement().setAttribute("id", "osparcdontautomplete"); } },