remove experiment field a

This commit is contained in:
Mario Pesch 2021-05-17 17:03:42 +02:00
parent 531db63b85
commit da65e23d3f
2 changed files with 4 additions and 10 deletions

View File

@ -17,11 +17,8 @@ Blockly.Blocks["sensebox_phyphox_init"] = {
Blockly.Blocks["sensebox_phyphox_experiment"] = { Blockly.Blocks["sensebox_phyphox_experiment"] = {
init: function () { init: function () {
this.setColour(getColour().phyphox); this.setColour(getColour().phyphox);
this.appendDummyInput() this.appendDummyInput().appendField(
.appendField(Blockly.Msg.sensebox_phyphox_createExperiment) Blockly.Msg.sensebox_phyphox_createExperiment
.appendField(
new Blockly.FieldTextInput("Experiment Name"),
"exeperimentname"
); );
this.appendDummyInput() this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_experimentTitle) .appendField(Blockly.Msg.sensebox_phyphox_experimentTitle)

View File

@ -13,10 +13,7 @@ Blockly.Arduino.sensebox_phyphox_init = function () {
}; };
Blockly.Arduino.sensebox_phyphox_experiment = function () { Blockly.Arduino.sensebox_phyphox_experiment = function () {
var experimentname = this.getFieldValue("exeperimentname").replace( var experimentname = "experiment";
/\s+/g,
""
);
var title = this.getFieldValue("title").replace(/[^a-zA-Z0-9]/g, ""); var title = this.getFieldValue("title").replace(/[^a-zA-Z0-9]/g, "");
var description = this.getFieldValue("description"); var description = this.getFieldValue("description");
var branch = Blockly.Arduino.statementToCode(this, "view"); var branch = Blockly.Arduino.statementToCode(this, "view");