Skip to content

Commit ce98393

Browse files
committed
__nextPressed
1 parent 51eb6b5 commit ce98393

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

services/static-webserver/client/source/class/osparc/support/CallTopicSelector.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ qx.Class.define("osparc.support.CallTopicSelector", {
103103
marginTop: 10,
104104
appearance: "strong-button",
105105
});
106+
control.addListener("execute", () => this.__nextPressed());
106107
this._add(control);
107108
break;
108109
}
@@ -135,5 +136,27 @@ qx.Class.define("osparc.support.CallTopicSelector", {
135136
this.getChildControl("intro-label");
136137
this.getChildControl("next-button");
137138
},
139+
140+
__nextPressed: function() {
141+
const topicData = {};
142+
if (this.getChildControl("generic-intro-button").getValue()) {
143+
topicData["topic"] = "specific-topic";
144+
} else if (this.getChildControl("specific-topic-button").getValue()) {
145+
topicData["topic"] = "specific-topic";
146+
const selectBox = this.getChildControl("specific-topic-select-box");
147+
const selectedItem = selectBox.getSelection()[0];
148+
topicData["extraInfo"] = selectedItem ? selectedItem.getLabel() : "";
149+
} else if (this.getChildControl("help-with-project-button").getValue()) {
150+
topicData["topic"] = "help-with-project";
151+
if (this.getChildControl("share-project-checkbox").getValue()) {
152+
topicData["extraInfo"] = "share-project";
153+
}
154+
} else if (this.getChildControl("specific-topic-button").getValue()) {
155+
topicData["topic"] = "specific-topic";
156+
topicData["extraInfo"] = this.getChildControl("specific-topic-textfield").getValue();
157+
}
158+
159+
this.fireDataEvent("callTopicSelected", topicData);
160+
},
138161
}
139162
});

0 commit comments

Comments
 (0)