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

actually set valid to be false in function so .toString will work...

This commit is contained in:
dceejay 2015-05-07 22:02:46 +01:00
parent fe1ce21114
commit 052302b3e7

View File

@ -98,7 +98,7 @@
height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom")));
$(".node-text-editor").css("height",height+"px"); $(".node-text-editor").css("height",height+"px");
that.editor.resize(); that.editor.resize();
}; }
$( "#dialog" ).on("dialogresize", functionDialogResize); $( "#dialog" ).on("dialogresize", functionDialogResize);
$( "#dialog" ).one("dialogopen", function(ev) { $( "#dialog" ).one("dialogopen", function(ev) {
var size = $( "#dialog" ).dialog('option','sizeCache-function'); var size = $( "#dialog" ).dialog('option','sizeCache-function');
@ -118,7 +118,7 @@
mode: 'ace/mode/javascript', mode: 'ace/mode/javascript',
value: $("#node-input-func").val() value: $("#node-input-func").val()
}); });
RED.library.create({ RED.library.create({
url:"functions", // where to get the data from url:"functions", // where to get the data from
type:"function", // the type of object the library is for type:"function", // the type of object the library is for
@ -134,8 +134,8 @@
for (var k=0; k < annot.length; k++) { for (var k=0; k < annot.length; k++) {
//console.log(annot[k].type,":",annot[k].text, "on line", annot[k].row); //console.log(annot[k].type,":",annot[k].text, "on line", annot[k].row);
if (annot[k].type === "error") { if (annot[k].type === "error") {
$("#node-input-valid").val(null); $("#node-input-valid").val(false);
delete this.valid; this.valid = false;
} }
} }
$("#node-input-func").val(this.editor.getValue()); $("#node-input-func").val(this.editor.getValue());