1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #1941 from node-red-hitachi/master-batch

Prevent invalid value for batch node property
This commit is contained in:
Nick O'Leary 2018-10-23 10:47:48 +01:00 committed by GitHub
commit 19b6cba398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,9 +100,9 @@
defaults: { defaults: {
name: {value:""}, name: {value:""},
mode: {value:"count"}, mode: {value:"count"},
count: {value:10}, count: {value:10,validate:function(v) { return RED.validators.number(v) && (v >= 1); }},
overlap: {value:0}, overlap: {value:0,validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
interval: {value:10}, interval: {value:10,validate:function(v) { return RED.validators.number(v) && (v >= 1); }},
allowEmptySequence: {value:false}, allowEmptySequence: {value:false},
topics: {value:[{topic:""}]} topics: {value:[{topic:""}]}
}, },
@ -149,12 +149,9 @@
removable: true removable: true
}); });
$("#node-input-count").spinner({ $("#node-input-count").spinner({min:1});
}); $("#node-input-overlap").spinner({min:0});
$("#node-input-overlap").spinner({ $("#node-input-interval").spinner({min:1});
});
$("#node-input-interval").spinner({
});
$("#node-input-mode").change(function(e) { $("#node-input-mode").change(function(e) {
var val = $(this).val(); var val = $(this).val();
$(".node-row-msg-count").toggle(val==="count"); $(".node-row-msg-count").toggle(val==="count");