@@ -134,17 +134,20 @@
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
- vertical-align: top;
+ vertical-align: baseline;
width: 100px;
}
- .inject-time-days input {
- width: auto;
- }
+ .inject-time-days input {
+ width: auto;
+ vertical-align: baseline;
+ }
.inject-time-times {
width: 90px;
}
#inject-time-time {
width: 75px;
+ margin-left: 8px;
+ margin-bottom: 8px;
}
.inject-time-count {
width: 40px !important;
@@ -275,6 +278,10 @@ If you want every 20 minutes from now - use the "interval" option.
}
});
+ $("#node-input-once").change(function() {
+ $("#node-input-onceDelay").attr('disabled', !$("#node-input-once").prop('checked'));
+ })
+
$(".inject-time-times").each(function() {
for (var i=0; i<24; i++) {
var l = (i<10?"0":"")+i+":00";
@@ -303,35 +310,6 @@ If you want every 20 minutes from now - use the "interval" option.
min:1
});
- $.widget( "ui.injecttimespinner", $.ui.spinner, {
- options: {
- // seconds
- step: 60 * 1000,
- // hours
- page: 60
- },
- _parse: function( value ) {
- if ( typeof value === "string" ) {
- // already a timestamp
- if ( Number( value ) == value ) {
- return Number( value );
- }
- var p = value.split(":");
- var offset = new Date().getTimezoneOffset();
- return ((Number(p[0])*60)+Number(p[1])+offset)*60*1000;
- }
- return value;
- },
- _format: function( value ) {
- var d = new Date(value);
- var h = d.getHours();
- var m = d.getMinutes();
- return ((h < 10)?"0":"")+h+":"+((m < 10)?"0":"")+m;
- }
- });
-
- $("#inject-time-time").injecttimespinner();
-
var repeattype = "none";
if (this.repeat != "" && this.repeat != 0) {
repeattype = "interval";
@@ -501,8 +479,13 @@ If you want every 20 minutes from now - use the "interval" option.
days = days.join(",");
}
var parts = time.split(":");
- repeat = "";
- crontab = parts[1]+" "+parts[0]+" * * "+days;
+ if (parts.length === 2) {
+ repeat = "";
+ parts[1] = ("00" + (parseInt(parts[1]) % 60)).substr(-2);
+ parts[0] = ("00" + (parseInt(parts[0]) % 24)).substr(-2);
+ crontab = parts[1]+" "+parts[0]+" * * "+days;
+ }
+ else { crontab = ""; }
}
}