Skip to content

Commit 0ff6b24

Browse files
committed
Open ->New
1 parent 9de1fb8 commit 0ff6b24

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
9595
return isLogged;
9696
},
9797

98-
startStudyById: function(studyId, openCB, cancelCB, showStudyOptions = false) {
98+
startStudyById: function(studyId, openCB, cancelCB, isStudyCreation = false) {
9999
if (!osparc.dashboard.ResourceBrowserBase.checkLoggedIn()) {
100100
return;
101101
}
@@ -117,12 +117,15 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
117117
osparc.data.Resources.fetch("studies", "getWallet", params)
118118
.then(wallet => {
119119
if (
120-
showStudyOptions ||
120+
isStudyCreation ||
121121
wallet === null ||
122122
osparc.desktop.credits.Utils.getWallet(wallet["walletId"]) === null
123123
) {
124124
// pop up study options if the study was just created or if it has no wallet assigned or user has no access to it
125125
const resourceSelector = new osparc.study.StudyOptions(studyId);
126+
if (isStudyCreation) {
127+
resourceSelector.getChildControl("open-button").setLabel(this.tr("New"));
128+
}
126129
const win = osparc.study.StudyOptions.popUpInWindow(resourceSelector);
127130
win.moveItUp();
128131
resourceSelector.addListener("startStudy", () => {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
144144
// they will be patched once the study is created
145145
studyOptions.setPatchStudy(false);
146146
studyOptions.setStudyData(templateData);
147+
studyOptions.getChildControl("open-button").setLabel(this.tr("New"));
147148
const win = osparc.study.StudyOptions.popUpInWindow(studyOptions);
148149
win.moveItUp();
149150
const cancelStudyOptions = () => {

0 commit comments

Comments
 (0)