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

Inject: fail to show correct edit view for fixed time (fixes #34)

This commit is contained in:
Nicholas O'Leary 2013-10-03 15:16:37 +01:00
parent d36cc4fb4c
commit deddd077dc

View File

@ -202,7 +202,7 @@
},
oneditprepare: function() {
var repeattype = "none";
if (Number(this.repeat) != 0) {
if (parseInt(this.repeat) != 0) {
repeattype = "interval";
$("#inject-time-interval-units option").filter(function() {return $(this).val() == "s";}).attr('selected',true);
$("#inject-time-interval-count").val(this.repeat);
@ -210,7 +210,7 @@
} else if (this.crontab) {
var cronparts = this.crontab.split(" ");
var days = cronparts[4];
if (Number(cronparts[0]) && Number(cronparts[1])) {
if (!isNaN(cronparts[0]) && !isNaN(cronparts[1])) {
repeattype = "time";
// Fixed time
var time = cronparts[1]+":"+cronparts[0];