Skip to content

Commit a3acf1e

Browse files
committed
reuse code
1 parent cb7bf5c commit a3acf1e

File tree

5 files changed

+12
-27
lines changed

5 files changed

+12
-27
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ qx.Class.define("osparc.desktop.preferences.pages.ConfirmationsPage", {
3939
members: {
4040
__createConfirmationsSettings: function() {
4141
// layout
42-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Ask for confirmation for the following actions:"));
42+
const label = new qx.ui.basic.Label(this.tr("Ask for confirmation for the following actions:")).set({
43+
font: "text-13",
44+
});
4345
this._add(label);
4446

4547
this._add(new qx.ui.core.Spacer(null, 10));

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ qx.Class.define("osparc.desktop.preferences.pages.TagsPage", {
2121
const msg = this.tr("\
2222
Tags help you organize the ") + studiesLabel + this.tr(" in the Dashboard by categorizing topics, making it easier to search and filter. \
2323
Once the tags are created, they can be assigned to the ") + studyLabel + this.tr(" via 'More options...' on the ") + studyLabel + this.tr(" cards.");
24-
const intro = osparc.ui.window.TabbedView.createHelpLabel(msg);
24+
const intro = new qx.ui.basic.Label(msg).set({
25+
font: "text-13",
26+
});
2527
this._add(intro);
2628

2729
this.__renderLayout();

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ qx.Class.define("osparc.desktop.preferences.pages.TokensPage", {
4343

4444
__createAPIKeysSection: function() {
4545
// layout
46-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("API Keys"));
47-
48-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr(
49-
"List API keys associated to your account."
50-
));
51-
box.add(label);
46+
const box = new osparc.widget.SectionBox(this.tr("API Keys"));
47+
box.addHelper(this.tr("List API keys associated to your account."));
5248

5349
const apiKeysList = this.__apiKeysList = new qx.ui.container.Composite(new qx.ui.layout.VBox(8));
5450
box.add(apiKeysList);
@@ -173,10 +169,8 @@ qx.Class.define("osparc.desktop.preferences.pages.TokensPage", {
173169

174170
__createTokensSection: function() {
175171
// layout
176-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("API Tokens for External Services"));
177-
178-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Provide the API tokens needed to access external services."));
179-
box.add(label);
172+
const box = new osparc.widget.SectionBox(this.tr("API Tokens for External Services"));
173+
box.addHelper(this.tr("Provide the API tokens needed to access external services."));
180174

181175
const validTokensGB = this.__validTokensGB = osparc.ui.window.TabbedView.createSectionBox(this.tr("Current Tokens"));
182176
box.add(validTokensGB);

services/static-webserver/client/source/class/osparc/tester/Statics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ qx.Class.define("osparc.tester.Statics", {
2323
let control;
2424
switch (id) {
2525
case "statics-container":
26-
control = osparc.ui.window.TabbedView.createSectionBox(this.tr("Statics"));
26+
control = new osparc.widget.SectionBox(this.tr("Statics"));
2727
this._add(control, {
2828
flex: 1
2929
});
@@ -44,7 +44,7 @@ qx.Class.define("osparc.tester.Statics", {
4444
break;
4545
}
4646
case "local-storage-container":
47-
control = osparc.ui.window.TabbedView.createSectionBox(this.tr("Local Storage"));
47+
control = new osparc.widget.SectionBox(this.tr("Local Storage"));
4848
this._add(control);
4949
break;
5050
case "local-storage-content": {

services/static-webserver/client/source/class/osparc/ui/window/TabbedView.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ qx.Class.define("osparc.ui.window.TabbedView", {
4747
box.setLayout(new qx.ui.layout.VBox(10));
4848
return box;
4949
},
50-
51-
/**
52-
* Common layout for tooltip label
53-
*/
54-
createHelpLabel: function(message=null, font="text-13") {
55-
const label = new qx.ui.basic.Label().set({
56-
value: message,
57-
alignX: "left",
58-
rich: true,
59-
font: font
60-
});
61-
return label;
62-
}
6350
},
6451

6552
members: {

0 commit comments

Comments
 (0)