Skip to content

Commit 2c92f02

Browse files
authored
🐛 [Frontend] Fix TIP's New Plans (#7552)
1 parent 6fdbb54 commit 2c92f02

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ qx.Class.define("osparc.dashboard.NewStudies", {
4343
}
4444
return templates.find(t => t.name === newButtonInfo.expectedTemplateLabel);
4545
});
46-
this.fireEvent("templatesLoaded");
4746
},
4847

4948
properties: {
@@ -56,7 +55,6 @@ qx.Class.define("osparc.dashboard.NewStudies", {
5655
},
5756

5857
events: {
59-
"templatesLoaded": "qx.event.type.Event",
6058
"newStudyClicked": "qx.event.type.Data",
6159
},
6260

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -978,23 +978,21 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
978978
const templates = osparc.store.Templates.getInstance().getTemplates();
979979
if (templates) {
980980
const newStudies = new osparc.dashboard.NewStudies(newStudiesConfig);
981-
newStudies.addListener("templatesLoaded", () => {
982-
newStudies.setGroupBy("category");
983-
const winTitle = this.tr("New Plan");
984-
const win = osparc.ui.window.Window.popUpInWindow(newStudies, winTitle, osparc.dashboard.NewStudies.WIDTH+40, 300).set({
985-
clickAwayClose: false,
986-
resizable: true
987-
});
988-
newStudies.addListener("newStudyClicked", e => {
989-
win.close();
990-
const templateInfo = e.getData();
991-
const templateData = templates.find(t => t.name === templateInfo.expectedTemplateLabel);
992-
if (templateData) {
993-
this.__newPlanBtnClicked(templateData, templateInfo.newStudyLabel);
994-
}
995-
});
996-
osparc.utils.Utils.setIdToWidget(win, "newStudiesWindow");
981+
newStudies.setGroupBy("category");
982+
const winTitle = this.tr("New Plan");
983+
const win = osparc.ui.window.Window.popUpInWindow(newStudies, winTitle, osparc.dashboard.NewStudies.WIDTH+40, 300).set({
984+
clickAwayClose: false,
985+
resizable: true
986+
});
987+
newStudies.addListener("newStudyClicked", e => {
988+
win.close();
989+
const templateInfo = e.getData();
990+
const templateData = templates.find(t => t.name === templateInfo.expectedTemplateLabel);
991+
if (templateData) {
992+
this.__newPlanBtnClicked(templateData, templateInfo.newStudyLabel);
993+
}
997994
});
995+
osparc.utils.Utils.setIdToWidget(win, "newStudiesWindow");
998996
}
999997
});
1000998
}

services/static-webserver/client/source/class/osparc/utils/Utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ qx.Class.define("osparc.utils.Utils", {
9595
if (control && control.getContentElement()) {
9696
control.getContentElement().setAttribute("autocomplete", "off");
9797
control.getContentElement().setAttribute("type", "search");
98-
control.getContentElement().setAttribute("name", "osparc-nope1234");
98+
control.getContentElement().setAttribute("name", "osparcdontautomplete");
99+
control.getContentElement().setAttribute("id", "osparcdontautomplete");
99100
}
100101
},
101102

0 commit comments

Comments
 (0)