mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -251,7 +251,7 @@
|
||||
|
||||
$("#inject-time-type-select").change(function() {
|
||||
$("#node-input-crontab").val('');
|
||||
var id = $("#inject-time-type-select option:selected").val();
|
||||
var id = $("#inject-time-type-select").val();
|
||||
$(".inject-time-row").hide();
|
||||
$("#inject-time-row-"+id).show();
|
||||
if ((id == "none") || (id == "interval")) {
|
||||
@@ -271,8 +271,8 @@
|
||||
});
|
||||
$("<option></option>").val(24).text("00:00").appendTo("#inject-time-interval-time-end");
|
||||
$("#inject-time-interval-time-start").change(function() {
|
||||
var start = Number($("#inject-time-interval-time-start option:selected").val());
|
||||
var end = Number($("#inject-time-interval-time-end option:selected").val());
|
||||
var start = Number($("#inject-time-interval-time-start").val());
|
||||
var end = Number($("#inject-time-interval-time-end").val());
|
||||
$("#inject-time-interval-time-end option").remove();
|
||||
for (var i=start+1;i<25;i++) {
|
||||
var l = (i<10?"0":"")+i+":00";
|
||||
@@ -291,10 +291,6 @@
|
||||
min:1
|
||||
});
|
||||
|
||||
$("#inject-time-interval-units").change(function() {
|
||||
var units = $("#inject-time-interval-units option:selected").val();
|
||||
});
|
||||
|
||||
$.widget( "ui.injecttimespinner", $.ui.spinner, {
|
||||
options: {
|
||||
// seconds
|
||||
@@ -342,7 +338,7 @@
|
||||
// Fixed time
|
||||
var time = cronparts[1]+":"+cronparts[0];
|
||||
$("#inject-time-time").val(time);
|
||||
$("#inject-time-type-select option").filter(function() {return $(this).val() == "s";}).attr('selected',true);
|
||||
$("#inject-time-type-select").val("s");
|
||||
if (days == "*") {
|
||||
$("#inject-time-time-days input[type=checkbox]").prop("checked",true);
|
||||
} else {
|
||||
@@ -397,16 +393,16 @@
|
||||
end = Number(endparts[1])+1;
|
||||
}
|
||||
}
|
||||
$("#inject-time-interval-time-end option").filter(function() {return $(this).val() == end;}).attr('selected',true);
|
||||
$("#inject-time-interval-time-start option").filter(function() {return $(this).val() == start;}).attr('selected',true);
|
||||
$("#inject-time-interval-time-end").val(end);
|
||||
$("#inject-time-interval-time-start").val(start);
|
||||
|
||||
}
|
||||
} else {
|
||||
$("#inject-time-type-select option").filter(function() {return $(this).val() == "none";}).attr('selected',true);
|
||||
$("#inject-time-type-select").val("none");
|
||||
}
|
||||
|
||||
$(".inject-time-row").hide();
|
||||
$("#inject-time-type-select option").filter(function() {return $(this).val() == repeattype;}).attr('selected',true);
|
||||
$("#inject-time-type-select").val(repeattype);
|
||||
$("#inject-time-row-"+repeattype).show();
|
||||
|
||||
$("#node-input-payload").typedInput('type',this.payloadType);
|
||||
@@ -418,12 +414,12 @@
|
||||
oneditsave: function() {
|
||||
var repeat = "";
|
||||
var crontab = "";
|
||||
var type = $("#inject-time-type-select option:selected").val();
|
||||
var type = $("#inject-time-type-select").val();
|
||||
if (type == "none") {
|
||||
// nothing
|
||||
} else if (type == "interval") {
|
||||
var count = $("#inject-time-interval-count").val();
|
||||
var units = $("#inject-time-interval-units option:selected").val();
|
||||
var units = $("#inject-time-interval-units").val();
|
||||
if (units == "s") {
|
||||
repeat = count;
|
||||
} else {
|
||||
@@ -438,8 +434,8 @@
|
||||
} else if (type == "interval-time") {
|
||||
repeat = "";
|
||||
var count = $("#inject-time-interval-time-units").val();
|
||||
var startTime = Number($("#inject-time-interval-time-start option:selected").val());
|
||||
var endTime = Number($("#inject-time-interval-time-end option:selected").val());
|
||||
var startTime = Number($("#inject-time-interval-time-start").val());
|
||||
var endTime = Number($("#inject-time-interval-time-end").val());
|
||||
var days = $('#inject-time-interval-time-days input[type=checkbox]:checked').map(function(_, el) {
|
||||
return $(el).val()
|
||||
}).get();
|
||||
|
@@ -242,7 +242,7 @@
|
||||
|
||||
|
||||
$("#node-input-scope-select").change(function(e) {
|
||||
var scope = $(this).children("option:selected").val();
|
||||
var scope = $(this).val();
|
||||
if (scope === "target") {
|
||||
createNodeList();
|
||||
$(".node-input-target-row").show();
|
||||
@@ -259,7 +259,7 @@
|
||||
$("#node-input-scope-select").change();
|
||||
},
|
||||
oneditsave: function() {
|
||||
var scope = $("#node-input-scope-select").children("option:selected").val();
|
||||
var scope = $("#node-input-scope-select").val();
|
||||
if (scope === 'all') {
|
||||
this.scope = null;
|
||||
} else {
|
||||
|
@@ -231,7 +231,7 @@
|
||||
})
|
||||
|
||||
$("#node-input-scope-select").change(function(e) {
|
||||
var scope = $(this).children("option:selected").val();
|
||||
var scope = $(this).val();
|
||||
if (scope === "target") {
|
||||
createNodeList();
|
||||
$(".node-input-target-row").show();
|
||||
@@ -248,7 +248,7 @@
|
||||
$("#node-input-scope-select").change();
|
||||
},
|
||||
oneditsave: function() {
|
||||
var scope = $("#node-input-scope-select").children("option:selected").val();
|
||||
var scope = $("#node-input-scope-select").val();
|
||||
if (scope === 'all') {
|
||||
this.scope = null;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user