diff options
author | Chinthakayala,Sheshashailavas(sc2914) <sc2914@att.com> | 2018-06-27 16:11:44 +0000 |
---|---|---|
committer | Chinthakayala,Sheshashailavas(sc2914) <sc2914@att.com> | 2018-06-27 16:25:31 +0000 |
commit | 8f6a6c445eaeb7356e1db9d10d10b7d3fa42f27e (patch) | |
tree | bf1e5c83c357fbd4a0158cac6d41bd936e949a80 /dgbuilder/nodes/dge/dgemain/comment.html | |
parent | e14a02086c9119532f9153c78346d5c1d6789ca9 (diff) |
removed dependency on built-editor.min.js
and added ability to test DG from dgbuilder
and fixed the break node on XML generation
and added ability to download
formatted DG XML and DG JSON
Issue-ID: SDNC-353
Change-Id: I799de5de2c4f61e9b56dbe996d8ac3e3b28061f7
Signed-off-by: Chinthakayala,Sheshashailavas(sc2914) <sc2914@att.com>
Diffstat (limited to 'dgbuilder/nodes/dge/dgemain/comment.html')
-rw-r--r-- | dgbuilder/nodes/dge/dgemain/comment.html | 64 |
1 files changed, 63 insertions, 1 deletions
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 @@ <div class="form-row"> <label for="node-input-info" style="width: 100% !important;"><i class="fa fa-comments"></i> More</label> <input type="hidden" id="node-input-info" autofocus="autofocus"> + <div class="form-row node-text-editor-row"> <div style="height: 250px;" class="node-text-editor" id="node-input-info-editor" ></div> <input type="hidden" id="node-input-comments"> </div> @@ -51,6 +52,52 @@ 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("<span style='color:blue;'><b>View Comments</b></span>"); + } + } + function functionDialogResize() { + var rows = $("#dialog-form>div:not(.node-text-editor-row)"); + var height = $("#dialog-form").height(); + for (var i=0;i<rows.size();i++) { + height -= $(rows[i]).outerHeight(true); + } + var editorRow = $("#dialog-form>div.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; } }); |