Skip to content

Commit 2a5379a

Browse files
committed
openTutorial
1 parent 49c72f9 commit 2a5379a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -945,15 +945,16 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
945945
const isStudyCreation = false;
946946
this._startStudyById(studyId, openCB, null, isStudyCreation);
947947
});
948-
resourceDetails.addListener("openTemplate", e => {
949-
win.close();
950-
const templateData = e.getData();
951-
this._createStudyFromTemplate(templateData);
952-
});
953-
resourceDetails.addListener("openHypertool", e => {
954-
win.close();
955-
const templateData = e.getData();
956-
this._createStudyFromTemplate(templateData);
948+
[
949+
"openTemplate",
950+
"openTutorial",
951+
"openHypertool",
952+
].forEach(eventName => {
953+
resourceDetails.addListener(eventName, e => {
954+
win.close();
955+
const templateData = e.getData();
956+
this._createStudyFromTemplate(templateData);
957+
});
957958
});
958959
resourceDetails.addListener("openService", e => {
959960
win.close();

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
7979
events: {
8080
"pagesAdded": "qx.event.type.Event",
8181
"openTemplate": "qx.event.type.Data",
82+
"openTutorial": "qx.event.type.Data",
8283
"openHypertool": "qx.event.type.Data",
8384
"openService": "qx.event.type.Data",
8485
"updateStudy": "qx.event.type.Data",
@@ -250,6 +251,9 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
250251
case "template":
251252
this.fireDataEvent("openTemplate", this.__resourceData);
252253
break;
254+
case "tutorial":
255+
this.fireDataEvent("openTutorial", this.__resourceData);
256+
break;
253257
case "hypertool":
254258
this.fireDataEvent("openHypertool", this.__resourceData);
255259
break;

0 commit comments

Comments
 (0)