Skip to content

Commit c1c652e

Browse files
committed
cleanup
1 parent 68ddddd commit c1c652e

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ qx.Class.define("osparc.dashboard.Dashboard", {
224224
},
225225

226226
__createTemplateBrowser: function() {
227-
const templateType = osparc.utils.DisabledPlugins.isHypertoolsEnabled() ? osparc.data.model.StudyUI.STANDARD_TYPE : null;
228-
const templatesView = this.__templateBrowser = new osparc.dashboard.TemplateBrowser(templateType);
227+
const templatesView = this.__templateBrowser = new osparc.dashboard.TemplateBrowser();
229228
return templatesView;
230229
},
231230

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
qx.Class.define("osparc.dashboard.TemplateBrowser", {
1919
extend: osparc.dashboard.ResourceBrowserBase,
2020

21-
construct: function(templateType) {
21+
construct: function(templateType = null) {
2222
this._resourceType = "template";
23-
this.__templateType = templateType || null;
23+
this.__templateType = templateType;
2424

2525
this.base(arguments);
2626
},
@@ -100,13 +100,8 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
100100

101101
__setResourcesToList: function(templatesList) {
102102
templatesList.forEach(template => template["resourceType"] = "template");
103-
if (this.__templateType === "tutorial") {
104-
this._resourcesList = templatesList.filter(template => [null, "tutorial"].includes(osparc.study.Utils.extractTemplateType(template)));
105-
} else {
106-
this._resourcesList = templatesList.filter(template => osparc.study.Utils.extractTemplateType(template) === this.__templateType);
107-
}
103+
this._resourcesList = templatesList.filter(template => osparc.study.Utils.extractTemplateType(template) === this.__templateType);
108104
this.fireDataEvent("showTab", Boolean(this._resourcesList.length));
109-
110105
this._reloadCards();
111106
},
112107

services/static-webserver/client/source/class/osparc/data/model/StudyUI.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,14 @@ qx.Class.define("osparc.data.model.StudyUI", {
8383
},
8484

8585
templateType: {
86-
check: [null, "tutorial", "hypertool"],
86+
check: [null, "hypertool"],
8787
init: null,
8888
nullable: true,
8989
event: "changeTemplateType",
9090
},
9191
},
9292

9393
statics: {
94-
STANDARD_TYPE: "tutorial",
9594
HYPERTOOL_TYPE: "hypertool",
9695
},
9796

0 commit comments

Comments
 (0)