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
1 changed files with 2 additions and 2 deletions

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];