diff --git a/src/main/resources/static/javascript/panel-script.js b/src/main/resources/static/javascript/panel-script.js index 7296594..33def26 100644 --- a/src/main/resources/static/javascript/panel-script.js +++ b/src/main/resources/static/javascript/panel-script.js @@ -1,7 +1,3 @@ -var editor = ace.edit("script_editor"); -editor.setTheme("ace/theme/github"); -editor.session.setMode("ace/mode/lua"); - function str_toHex(s) { // utf8 to latin1 var s = unescape(encodeURIComponent(s)); diff --git a/src/main/resources/static/javascript/script-editor.js b/src/main/resources/static/javascript/script-editor.js new file mode 100644 index 0000000..6210c47 --- /dev/null +++ b/src/main/resources/static/javascript/script-editor.js @@ -0,0 +1,7 @@ +var editor = ace.edit("script_editor"); +editor.setTheme("ace/theme/github"); +editor.session.setMode("ace/mode/lua"); + +// set script body +// editor.setValue(jobj.scriptBody); + diff --git a/src/main/resources/templates/script-editor.html b/src/main/resources/templates/script-editor.html index 6dbb6a2..7312e3d 100644 --- a/src/main/resources/templates/script-editor.html +++ b/src/main/resources/templates/script-editor.html @@ -5,10 +5,14 @@ - - - - + +
+
+ + + + +
\ No newline at end of file