diff --git a/editor/js/ui/typedInput.js b/editor/js/ui/typedInput.js index 3be1c3de1..720cc80e0 100644 --- a/editor/js/ui/typedInput.js +++ b/editor/js/ui/typedInput.js @@ -22,7 +22,8 @@ num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]}, json: {value:"json",label:"JSON",icon:"red/images/typedInput/json.png", validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}}, - re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"} + re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"}, + date: {value:"date",label:"timestamp",hasValue:false} }; var nlsd = false; diff --git a/nodes/core/core/20-inject.html b/nodes/core/core/20-inject.html index 5fb5187e7..98ffd6d5c 100644 --- a/nodes/core/core/20-inject.html +++ b/nodes/core/core/20-inject.html @@ -242,7 +242,7 @@ $("#node-input-payload").typedInput({ default: 'str', typeField: $("#node-input-payloadType"), - types:['flow','global','str','num','bool','json',{value:"date",label:this._("inject.timestamp"),hasValue:false}] + types:['flow','global','str','num','bool','json','date'] }); $("#inject-time-type-select").change(function() { diff --git a/nodes/core/core/20-inject.js b/nodes/core/core/20-inject.js index 1e1744dbb..2b55203f4 100644 --- a/nodes/core/core/20-inject.js +++ b/nodes/core/core/20-inject.js @@ -46,7 +46,7 @@ module.exports = function(RED) { } if (this.once) { - setTimeout( function(){ node.emit("input",{}); }, 100); + setTimeout( function() { node.emit("input",{}); }, 100 ); } this.on("input",function(msg) { diff --git a/nodes/core/core/80-function.js b/nodes/core/core/80-function.js index 9ddcbdbe1..5eb96b1bf 100644 --- a/nodes/core/core/80-function.js +++ b/nodes/core/core/80-function.js @@ -206,10 +206,10 @@ module.exports = function(RED) { } }); this.on("close", function() { - while(node.outstandingTimers.length > 0) { + while (node.outstandingTimers.length > 0) { clearTimeout(node.outstandingTimers.pop()) } - while(node.outstandingIntervals.length > 0) { + while (node.outstandingIntervals.length > 0) { clearInterval(node.outstandingIntervals.pop()) } }) diff --git a/nodes/core/logic/15-change.html b/nodes/core/logic/15-change.html index 5b53e2027..07495fffa 100644 --- a/nodes/core/logic/15-change.html +++ b/nodes/core/logic/15-change.html @@ -17,14 +17,14 @@