diff --git a/nodes/core/io/10-mqtt.html b/nodes/core/io/10-mqtt.html
index 45dc0793a..3bcb6284e 100644
--- a/nodes/core/io/10-mqtt.html
+++ b/nodes/core/io/10-mqtt.html
@@ -215,9 +215,9 @@
@@ -339,10 +339,6 @@
compatmode: { value: true},
keepalive: {value:60,validate:RED.validators.number()},
cleansession: {value: true},
- willTopic: {value:""},
- willQos: {value:"0"},
- willRetain: {value:false},
- willPayload: {value:""},
birthTopic: {value:""},
birthQos: {value:"0"},
birthRetain: {value:false},
@@ -350,7 +346,11 @@
closeTopic: {value:""},
closeQos: {value:"0"},
closeRetain: {value:false},
- closePayload: {value:""}
+ closePayload: {value:""},
+ willTopic: {value:""},
+ willQos: {value:"0"},
+ willRetain: {value:false},
+ willPayload: {value:""}
},
credentials: {
user: {type:"text"},
@@ -409,14 +409,15 @@
});
toggleSection(isExpanded);
}
+
// show first section if none are set so the user gets the idea
var showBirthSection = this.birthTopic !== ""
|| this.willTopic === ""
&& this.birthTopic === ""
&& this.closeTopic == "";
setUpSection('#mqtt-broker-section-birth', showBirthSection);
- setUpSection('#mqtt-broker-section-will', this.willTopic !== "");
setUpSection('#mqtt-broker-section-close', this.closeTopic !== "");
+ setUpSection('#mqtt-broker-section-will', this.willTopic !== "");
setTimeout(function() { tabs.resize(); },0);
if (typeof this.cleansession === 'undefined') {
@@ -435,10 +436,6 @@
this.keepalive = 15;
$("#node-config-input-keepalive").val(this.keepalive);
}
- if (typeof this.willQos === 'undefined') {
- this.willQos = "0";
- $("#node-config-input-willQos").val("0");
- }
if (typeof this.birthQos === 'undefined') {
this.birthQos = "0";
$("#node-config-input-birthQos").val("0");
@@ -447,6 +444,10 @@
this.willQos = "0";
$("#node-config-input-willQos").val("0");
}
+ if (typeof this.willQos === 'undefined') {
+ this.willQos = "0";
+ $("#node-config-input-willQos").val("0");
+ }
function updateTLSOptions() {
if ($("#node-config-input-usetls").is(':checked')) {