Extending the Debug-Window
Posted: Tue Feb 13, 2018 2:54 pm
Hello,
here is a small snippet to extend the functionality of the debug-window.
Greetings ... Peter
here is a small snippet to extend the functionality of the debug-window.
Code: Select all
Procedure ExtendDebugWindow()
! if ($(".spiderwindow-clearbutton").length==1) return;
Protected CSS.s
Protected DebugWindowContent.s
Protected FF
CSS = ".spiderwindow-clearbutton { background-color : #E0E0E0; text-align:center; line-height: 22px; border: 1px solid #ececec; position: absolute; top: 2px; right: 36px; height: 22px; width: 30px; } " + #CRLF$ +
".spiderwindow-clearbutton:hover { background-color : #A8A8A8; } " + #CRLF$ +
".spiderwindow-downloadbutton { background-color : #E0E0E0; text-align:center; line-height: 22px; border: 1px solid #ececec; position: absolute; top: 2px; right: 68px; height: 22px; width: 30px; } " + #CRLF$ +
".spiderwindow-downloadbutton:hover { background-color : #A8A8A8; } " + #CRLF$
! $("<style>" + v_css + "</style>").appendTo("head");
! var clearButton = $("<div title='Clear DebugWindow' class='spiderwindow-clearbutton dijitEditorIcon dijitEditorIconNewPage'></div>");
! var downloadButton = $("<div title='Download DebugWindow-Content' class='spiderwindow-downloadbutton dijitEditorIcon dijitEditorIconSave'></div>");
! var closeButton = $(".spiderwindow-closebutton")
! closeButton.before(clearButton);
! clearButton.before(downloadButton);
! clearButton.on("click", function() { $(".spiderwindow").find("textarea").val(""); });
! downloadButton.on("click", function() {
! v_debugwindowcontent = $(".spiderwindow").find("textarea").val();
FF = CreateFile(#PB_Any, "DebugWindowContent.txt", #Null)
If FF
WriteString(FF, DebugWindowContent)
ExportFile(FF, "text/plain")
CloseFile(FF)
EndIf
! });
EndProcedure
ExtendDebugWindow()