X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=dgbuilder%2Fnodes%2Fdge%2Fdgemain%2Fcomment.html;h=f6da4616102d9fdc11740db30fe37f0814a91d37;hb=53cb68740aa0cff8102f68c245f3db1289a92e01;hp=c34d14c9135d7b0290bd48bfcc52015929d88304;hpb=6741df81b766bb1dc271c214b923b18f52c20892;p=ccsdk%2Fdistribution.git diff --git a/dgbuilder/nodes/dge/dgemain/comment.html b/dgbuilder/nodes/dge/dgemain/comment.html index c34d14c9..f6da4616 100644 --- a/dgbuilder/nodes/dge/dgemain/comment.html +++ b/dgbuilder/nodes/dge/dgemain/comment.html @@ -22,6 +22,7 @@
+
@@ -50,6 +51,52 @@ labelStyle: function() { return this.name?"node_label_italic":""; }, + oneditprepare: function() { + var that = this; + $( "#node-input-outputs" ).spinner({ + min:1 + }); + var comments = $( "#node-input-comments").val(); + if(comments != null){ + comments = comments.trim(); + if(comments != ''){ + $("#node-input-btnComments").html("View Comments"); + } + } + function functionDialogResize() { + var rows = $("#dialog-form>div:not(.node-text-editor-row)"); + var height = $("#dialog-form").height(); + for (var i=0;idiv.node-text-editor-row"); + height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); + $(".node-text-editor").css("height",height+"px"); + that.editor.resize(); + }; + $( "#dialog" ).on("dialogresize", functionDialogResize); + $( "#dialog" ).one("dialogopen", function(ev) { + var size = $( "#dialog" ).dialog('option','sizeCache-function'); + if (size) { + $("#dialog").dialog('option','width',size.width); + $("#dialog").dialog('option','height',size.height); + functionDialogResize(); + } + }); + $( "#dialog" ).one("dialogclose", function(ev,ui) { + var height = $( "#dialog" ).dialog('option','height'); + $( "#dialog" ).off("dialogresize",functionDialogResize); + }); + this.editor = RED.editor.createEditor({ + id: 'node-input-info-editor', + mode: 'ace/mode/markdown', + fontSize: "15pt" + }); + console.dir(this.editor); + this.editor.setValue($("#node-input-info").val(),-1); + this.editor.focus(); + }, +/* oneditprepare: function() { $( "#node-input-outputs" ).spinner({ min:1 @@ -88,9 +135,24 @@ }); $("#node-input-name").focus(); }); + this.editor = RED.editor.createEditor({ + id: 'node-input-info-editor', + mode: 'ace/mode/markdown', + options: { + showLineNumbers : false, + enableBasicAutocompletion : true, + enableSnippets:true, + fontSize: "14px" + } + }); + console.dir(this.editor); + this.editor.setValue($("#node-input-info").val(),-1); + this.editor.focus(); + }, + */ oneditsave: function() { - $("#node-input-info").val(this.editor.getText()); + $("#node-input-info").val(this.editor.getValue()); delete this.editor; } });