This commit is contained in:
Liang Ding 2014-09-17 10:04:41 +08:00
parent f7cc9ac140
commit d19698a42e
5 changed files with 141 additions and 134 deletions

View File

@ -27,8 +27,10 @@
<ul> <ul>
<li>Ctrl+1焦点切换到文件树</li> <li>Ctrl+1焦点切换到文件树</li>
<li>Ctrl+4焦点切换到输出窗口</li> <li>Ctrl+4焦点切换到输出窗口</li>
<li>Ctrl+5焦点切换到搜索窗口</li>
<li>Ctrl+6焦点切换到通知窗口</li>
</ul> </ul>
<h2>运行</h2> <h2>运行</h2>
<ul> <ul>
<li>F6构建 & 运行</li> <li>F6构建 & 运行</li>

View File

@ -1,10 +1,10 @@
var editors = { var editors = {
data: [], data: [],
init: function() { init: function () {
editors._initAutocomplete(); editors._initAutocomplete();
editors.tabs = new Tabs({ editors.tabs = new Tabs({
id: ".edit-panel", id: ".edit-panel",
clickAfter: function(id) { clickAfter: function (id) {
// set tree node selected // set tree node selected
var node = tree.fileTree.getNodeByTId(id); var node = tree.fileTree.getNodeByTId(id);
tree.fileTree.selectNode(node); tree.fileTree.selectNode(node);
@ -19,7 +19,7 @@ var editors = {
wide.curEditor.focus(); wide.curEditor.focus();
}, },
removeAfter: function(id, nextId) { removeAfter: function (id, nextId) {
for (var i = 0, ii = editors.data.length; i < ii; i++) { for (var i = 0, ii = editors.data.length; i < ii; i++) {
if (editors.data[i].id === id) { if (editors.data[i].id === id) {
editors.data.splice(i, 1); editors.data.splice(i, 1);
@ -57,16 +57,16 @@ var editors = {
}); });
$(".edit-header .tabs").on("dblclick", "div", function() { $(".edit-header .tabs").on("dblclick", "div", function () {
editors.fullscreen(); editors.fullscreen();
}); });
}, },
fullscreen: function() { fullscreen: function () {
wide.curEditor.setOption("fullScreen", true); wide.curEditor.setOption("fullScreen", true);
wide.curEditor.focus(); wide.curEditor.focus();
}, },
_initAutocomplete: function() { _initAutocomplete: function () {
CodeMirror.registerHelper("hint", "go", function(editor) { CodeMirror.registerHelper("hint", "go", function (editor) {
var word = /[\w$]+/; var word = /[\w$]+/;
var cur = editor.getCursor(), curLine = editor.getLine(cur.line); var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
@ -78,13 +78,12 @@ var editors = {
while (start && word.test(curLine.charAt(start - 1))) { while (start && word.test(curLine.charAt(start - 1))) {
--start; --start;
} }
var request = { var request = newWideRequest();
path: $(".edit-header .current > span:eq(0)").attr("title"), request.path = $(".edit-header .current > span:eq(0)").attr("title");
code: editor.getValue(), request.code = editor.getValue();
cursorLine: cur.line, request.cursorLine = cur.line;
cursorCh: cur.ch request.cursorCh = cur.ch;
};
var autocompleteHints = []; var autocompleteHints = [];
@ -94,7 +93,7 @@ var editors = {
url: '/autocomplete', url: '/autocomplete',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
var autocompleteArray = data[1]; var autocompleteArray = data[1];
if (autocompleteArray) { if (autocompleteArray) {
@ -108,8 +107,8 @@ var editors = {
return {list: autocompleteHints, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)}; return {list: autocompleteHints, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
}); });
CodeMirror.commands.autocompleteAfterDot = function(cm) { CodeMirror.commands.autocompleteAfterDot = function (cm) {
setTimeout(function() { setTimeout(function () {
if (!cm.state.completionActive) { if (!cm.state.completionActive) {
cm.showHint({hint: CodeMirror.hint.go, completeSingle: false}); cm.showHint({hint: CodeMirror.hint.go, completeSingle: false});
} }
@ -118,35 +117,34 @@ var editors = {
return CodeMirror.Pass; return CodeMirror.Pass;
}; };
CodeMirror.commands.autocompleteAnyWord = function(cm) { CodeMirror.commands.autocompleteAnyWord = function (cm) {
cm.showHint({hint: CodeMirror.hint.auto}); cm.showHint({hint: CodeMirror.hint.auto});
}; };
CodeMirror.commands.gotoLine = function(cm) { CodeMirror.commands.gotoLine = function (cm) {
var line = prompt("Go To Line: ", "0"); var line = prompt("Go To Line: ", "0");
cm.setCursor(CodeMirror.Pos(line - 1, 0)); cm.setCursor(CodeMirror.Pos(line - 1, 0));
}; };
CodeMirror.commands.doNothing = function(cm) { CodeMirror.commands.doNothing = function (cm) {
}; };
CodeMirror.commands.jumpToDecl = function(cm) { CodeMirror.commands.jumpToDecl = function (cm) {
var cur = wide.curEditor.getCursor(); var cur = wide.curEditor.getCursor();
var request = { var request = newWideRequest();
path: $(".edit-header .current > span:eq(0)").attr("title"), request.path = $(".edit-header .current > span:eq(0)").attr("title");
code: wide.curEditor.getValue(), request.code = wide.curEditor.getValue();
cursorLine: cur.line, request.cursorLine = cur.line;
cursorCh: cur.ch request.cursorCh = cur.ch;
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/find/decl', url: '/find/decl',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (!data.succ) { if (!data.succ) {
return; return;
} }
@ -154,16 +152,15 @@ var editors = {
var cursorLine = data.cursorLine; var cursorLine = data.cursorLine;
var cursorCh = data.cursorCh; var cursorCh = data.cursorCh;
var request = { var request = newWideRequest();
path: data.path request.path = data.path;
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/file', url: '/file',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (!data.succ) { if (!data.succ) {
alert(data.msg); alert(data.msg);
@ -183,22 +180,21 @@ var editors = {
}); });
}; };
CodeMirror.commands.findUsages = function(cm) { CodeMirror.commands.findUsages = function (cm) {
var cur = wide.curEditor.getCursor(); var cur = wide.curEditor.getCursor();
var request = { var request = newWideRequest();
file: wide.curNode.path, request.file = wide.curNode.path;
code: wide.curEditor.getValue(), request.code = wide.curEditor.getValue();
cursorLine: cur.line, request.cursorLine = cur.line;
cursorCh: cur.ch request.cursorCh = cur.ch;
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/find/usages', url: '/find/usages',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
console.log(data); console.log(data);
if (!data.succ) { if (!data.succ) {
@ -211,7 +207,7 @@ var editors = {
}; };
}, },
// 新建一个编辑器 Tab如果已经存在 Tab 则切换到该 Tab. // 新建一个编辑器 Tab如果已经存在 Tab 则切换到该 Tab.
newEditor: function(data) { newEditor: function (data) {
$(".ico-fullscreen").show(); $(".ico-fullscreen").show();
var id = wide.curNode.tId; var id = wide.curNode.tId;
@ -256,12 +252,12 @@ var editors = {
extraKeys: { extraKeys: {
"Ctrl-\\": "autocompleteAnyWord", "Ctrl-\\": "autocompleteAnyWord",
".": "autocompleteAfterDot", ".": "autocompleteAfterDot",
"Esc": function(cm) { "Esc": function (cm) {
if (cm.getOption("fullScreen")) { if (cm.getOption("fullScreen")) {
cm.setOption("fullScreen", false); cm.setOption("fullScreen", false);
} }
}, },
"F11": function(cm) { "F11": function (cm) {
cm.setOption("fullScreen", !cm.getOption("fullScreen")); cm.setOption("fullScreen", !cm.getOption("fullScreen"));
}, },
"Ctrl-G": "gotoLine", "Ctrl-G": "gotoLine",
@ -269,16 +265,16 @@ var editors = {
"Ctrl-D": "doNothing", // 取消默认的 deleteLine "Ctrl-D": "doNothing", // 取消默认的 deleteLine
"Ctrl-B": "jumpToDecl", "Ctrl-B": "jumpToDecl",
"Ctrl-S": function () { "Ctrl-S": function () {
wide.saveFile(); wide.saveFile();
}, },
"Shift-Alt-F": function () { "Shift-Alt-F": function () {
wide.fmt(); wide.fmt();
}, },
"Alt-F7": "findUsages" "Alt-F7": "findUsages"
} }
}); });
editor.on('cursorActivity', function(cm) { editor.on('cursorActivity', function (cm) {
var cursor = cm.getCursor(); var cursor = cm.getCursor();
$("#footer-cursor").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |'); $("#footer-cursor").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');

View File

@ -1,6 +1,6 @@
var tree = { var tree = {
// 递归获取当前节点展开中的最后一个节点 // 递归获取当前节点展开中的最后一个节点
getCurrentNodeLastNode: function(node) { getCurrentNodeLastNode: function (node) {
var returnNode = node.children[node.children.length - 1]; var returnNode = node.children[node.children.length - 1];
if (returnNode.open) { if (returnNode.open) {
return tree.getCurrentNodeLastNode(returnNode); return tree.getCurrentNodeLastNode(returnNode);
@ -9,7 +9,7 @@ var tree = {
} }
}, },
// 按照树展现获取下一个节点 // 按照树展现获取下一个节点
getNextShowNode: function(node) { getNextShowNode: function (node) {
if (node.level !== 0) { if (node.level !== 0) {
if (node.getParentNode().getNextNode()) { if (node.getParentNode().getNextNode()) {
return node.getParentNode().getNextNode(); return node.getParentNode().getNextNode();
@ -20,7 +20,7 @@ var tree = {
return node.getNextNode(); return node.getNextNode();
} }
}, },
isBottomNode: function(node) { isBottomNode: function (node) {
if (node.open) { if (node.open) {
return false; return false;
} }
@ -39,7 +39,7 @@ var tree = {
} }
} }
}, },
getTIdByPath: function(path) { getTIdByPath: function (path) {
var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes()); var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes());
for (var i = 0, ii = nodes.length; i < ii; i++) { for (var i = 0, ii = nodes.length; i < ii; i++) {
if (nodes[i].path === path) { if (nodes[i].path === path) {
@ -50,7 +50,7 @@ var tree = {
return undefined; return undefined;
}, },
fileTree: undefined, fileTree: undefined,
_isParents: function(tId, parentTId) { _isParents: function (tId, parentTId) {
var node = tree.fileTree.getNodeByTId(tId); var node = tree.fileTree.getNodeByTId(tId);
if (!node || !node.parentTId) { if (!node || !node.parentTId) {
return false; return false;
@ -62,23 +62,23 @@ var tree = {
} }
} }
}, },
newFile: function() { newFile: function () {
$("#dirRMenu").hide(); $("#dirRMenu").hide();
var name = prompt("Name", ""); var name = prompt("Name", "");
if (!name) { if (!name) {
return false; return false;
} }
var request = { var request = newWideRequest();
path: wide.curNode.path + '\\' + name, request.path = wide.curNode.path + '\\' + name;
fileType: "f" request.fileType = "f";
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/file/new', url: '/file/new',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (!data.succ) { if (!data.succ) {
return false; return false;
} }
@ -126,23 +126,23 @@ var tree = {
} }
}); });
}, },
newDir: function() { newDir: function () {
$("#dirRMenu").hide(); $("#dirRMenu").hide();
var name = prompt("Name", ""); var name = prompt("Name", "");
if (!name) { if (!name) {
return false; return false;
} }
var request = { var request = newWideRequest();
path: wide.curNode.path + '\\' + name, request.path = wide.curNode.path + '\\' + name;
fileType: "d" request.fileType = "d";
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/file/new', url: '/file/new',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (!data.succ) { if (!data.succ) {
return false; return false;
} }
@ -154,22 +154,23 @@ var tree = {
} }
}); });
}, },
removeIt: function() { removeIt: function () {
$("#dirRMenu").hide(); $("#dirRMenu").hide();
$("#fileRMenu").hide(); $("#fileRMenu").hide();
if (!confirm("Remove it?")) { if (!confirm("Remove it?")) {
return; return;
} }
var request = {
path: wide.curNode.path var request = newWideRequest();
}; request.path = wide.curNode.path;
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/file/remove', url: '/file/remove',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (!data.succ) { if (!data.succ) {
return false; return false;
} }
@ -196,12 +197,15 @@ var tree = {
} }
}); });
}, },
init: function() { init: function () {
var request = newWideRequest();
$.ajax({ $.ajax({
type: 'GET', type: 'POST',
url: '/files', url: '/files',
data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (data.succ) { if (data.succ) {
var dirRMenu = $("#dirRMenu"); var dirRMenu = $("#dirRMenu");
var fileRMenu = $("#fileRMenu"); var fileRMenu = $("#fileRMenu");
@ -210,7 +214,7 @@ var tree = {
selectedMulti: false selectedMulti: false
}, },
callback: { callback: {
onRightClick: function(event, treeId, treeNode) { onRightClick: function (event, treeId, treeNode) {
if (treeNode) { if (treeNode) {
wide.curNode = treeNode; wide.curNode = treeNode;
if ("ico-ztree-dir " !== treeNode.iconSkin) { // 如果右击了文件 if ("ico-ztree-dir " !== treeNode.iconSkin) { // 如果右击了文件
@ -230,7 +234,7 @@ var tree = {
} }
} }
}, },
onClick: function(event, treeId, treeNode, clickFlag) { onClick: function (event, treeId, treeNode, clickFlag) {
tree._onClick(treeNode); tree._onClick(treeNode);
} }
} }
@ -240,7 +244,7 @@ var tree = {
} }
}); });
}, },
_onClick: function(treeNode) { _onClick: function (treeNode) {
if (wide.curNode) { if (wide.curNode) {
for (var i = 0, ii = editors.data.length; i < ii; i++) { for (var i = 0, ii = editors.data.length; i < ii; i++) {
// 该节点文件已经打开 // 该节点文件已经打开
@ -256,15 +260,15 @@ var tree = {
wide.curNode = treeNode; wide.curNode = treeNode;
if ("ico-ztree-dir " !== treeNode.iconSkin) { // 如果单击了文件 if ("ico-ztree-dir " !== treeNode.iconSkin) { // 如果单击了文件
var request = { var request = newWideRequest();
path: treeNode.path request.path = treeNode.path;
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/file', url: '/file',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (!data.succ) { if (!data.succ) {
alert(data.msg); alert(data.msg);

View File

@ -1,9 +1,9 @@
var outputWS = new WebSocket(config.channel.output + '/output/ws'); var outputWS = new WebSocket(config.channel.output + '/output/ws');
outputWS.onopen = function() { outputWS.onopen = function () {
console.log('[output onopen] connected'); console.log('[output onopen] connected');
}; };
outputWS.onmessage = function(e) { outputWS.onmessage = function (e) {
console.log('[output onmessage]' + e.data); console.log('[output onmessage]' + e.data);
var data = JSON.parse(e.data); var data = JSON.parse(e.data);
@ -12,19 +12,18 @@ outputWS.onmessage = function(e) {
} }
if ('run' === data.nextCmd) { if ('run' === data.nextCmd) {
var request = { var request = newWideRequest();
executable: data.executable request.executable = data.executable;
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/run', url: '/run',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
beforeSend: function(data) { beforeSend: function (data) {
$('#output').text(''); $('#output').text('');
}, },
success: function(data) { success: function (data) {
} }
}); });
@ -55,34 +54,34 @@ outputWS.onmessage = function(e) {
$('#output').text($('#output').text() + data.output); $('#output').text($('#output').text() + data.output);
} }
}; };
outputWS.onclose = function(e) { outputWS.onclose = function (e) {
console.log('[output onclose] disconnected (' + e.code + ')'); console.log('[output onclose] disconnected (' + e.code + ')');
delete outputWS; delete outputWS;
}; };
outputWS.onerror = function(e) { outputWS.onerror = function (e) {
console.log('[output onerror] ' + e); console.log('[output onerror] ' + e);
}; };
var wide = { var wide = {
curNode: undefined, curNode: undefined,
curEditor: undefined, curEditor: undefined,
_initLayout: function() { _initLayout: function () {
var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 2; var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 2;
$(".content, .ztree").height(mainH); $(".content, .ztree").height(mainH);
$(".edit-panel").height(mainH - $(".bottom-window-group").height()); $(".edit-panel").height(mainH - $(".bottom-window-group").height());
}, },
_initBottomWindowGroup: function() { _initBottomWindowGroup: function () {
new Tabs({ new Tabs({
id: ".bottom-window-group" id: ".bottom-window-group"
}); });
}, },
init: function() { init: function () {
this._initLayout(); this._initLayout();
this._initBottomWindowGroup(); this._initBottomWindowGroup();
$("body").bind("mousedown", function(event) { $("body").bind("mousedown", function (event) {
if (!(event.target.id === "dirRMenu" || $(event.target).closest("#dirRMenu").length > 0)) { if (!(event.target.id === "dirRMenu" || $(event.target).closest("#dirRMenu").length > 0)) {
$("#dirRMenu").hide(); $("#dirRMenu").hide();
} }
@ -99,38 +98,37 @@ var wide = {
}); });
}, },
saveFile: function() { saveFile: function () {
var request = { var request = newWideRequest();
file: $(".edit-header .current span:eq(0)").attr("title"), request.file = $(".edit-header .current span:eq(0)").attr("title");
code: wide.curEditor.getValue() request.code = wide.curEditor.getValue();
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/file/save', url: '/file/save',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
} }
}); });
}, },
saveAllFiles: function() { saveAllFiles: function () {
// TODO: save all files // TODO: save all files
}, },
closeFile: function() { closeFile: function () {
// TODO: close file // TODO: close file
}, },
closeAllFiles: function() { closeAllFiles: function () {
// TODO: close all files // TODO: close all files
}, },
exit: function() { exit: function () {
// TODO: exit // TODO: exit
}, },
// 构建 & 运行. // 构建 & 运行.
run: function() { run: function () {
var request = { var request = newWideRequest();
file: $(".edit-header .current span:eq(0)").attr("title"), request.file = $(".edit-header .current span:eq(0)").attr("title");
code: wide.curEditor.getValue() request.code = wide.curEditor.getValue();
};
// TODO: 修改 [构建&运行] 图标状态为不可用状态 // TODO: 修改 [构建&运行] 图标状态为不可用状态
@ -139,58 +137,55 @@ var wide = {
url: '/build', url: '/build',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
beforeSend: function(data) { beforeSend: function (data) {
$('#output').text(''); $('#output').text('');
}, },
success: function(data) { success: function (data) {
} }
}); });
}, },
goget: function() { goget: function () {
var request = { var request = newWideRequest();
file: $(".edit-header .current span:eq(0)").attr("title") request.file = $(".edit-header .current span:eq(0)").attr("title");
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/go/get', url: '/go/get',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
beforeSend: function(data) { beforeSend: function (data) {
$('#output').text(''); $('#output').text('');
}, },
success: function(data) { success: function (data) {
} }
}); });
}, },
goinstall: function() { goinstall: function () {
var request = { var request = newWideRequest();
file: $(".edit-header .current span:eq(0)").attr("title"), request.file = $(".edit-header .current span:eq(0)").attr("title");
code: wide.curEditor.getValue() request.code = wide.curEditor.getValue();
};
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/go/install', url: '/go/install',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
beforeSend: function(data) { beforeSend: function (data) {
$('#output').text(''); $('#output').text('');
}, },
success: function(data) { success: function (data) {
} }
}); });
}, },
fmt: function() { fmt: function () {
var path = $(".edit-header .current span:eq(0)").attr("title"); var path = $(".edit-header .current span:eq(0)").attr("title");
var mode = wide.curNode.mode; var mode = wide.curNode.mode;
var request = { var request = newWideRequest();
file: path, request.file = path;
code: wide.curEditor.getValue(), request.code = wide.curEditor.getValue();
cursorLine: wide.curEditor.getCursor().line, request.cursorLine = wide.curEditor.getCursor().line;
cursorCh: wide.curEditor.getCursor().ch request.cursorCh = wide.curEditor.getCursor().ch;
};
switch (mode) { switch (mode) {
case "text/x-go": case "text/x-go":
@ -199,7 +194,7 @@ var wide = {
url: '/go/fmt', url: '/go/fmt',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (data.succ) { if (data.succ) {
wide.curEditor.setValue(data.code); wide.curEditor.setValue(data.code);
} }
@ -213,7 +208,7 @@ var wide = {
url: '/html/fmt', url: '/html/fmt',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
if (data.succ) { if (data.succ) {
wide.curEditor.setValue(data.code); wide.curEditor.setValue(data.code);
} }
@ -240,7 +235,7 @@ var wide = {
} }
}; };
$(document).ready(function() { $(document).ready(function () {
wide.init(); wide.init();
tree.init(); tree.init();
menu.init(); menu.init();

View File

@ -172,7 +172,17 @@
output: {{.conf.OutputChannel}} output: {{.conf.OutputChannel}}
}, },
wideSessionId: {{.session.Id}} wideSessionId: {{.session.Id}}
};</script> };
// 发往 Wide 的所有 AJAX 请求需要使用该函数创建请求参数.
function newWideRequest() {
var ret = {
sid: config.wideSessionId
}
return ret;
}
</script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/reconnecting-websocket.js"></script> <script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/reconnecting-websocket.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/ztree/jquery.ztree.all-3.5.min.js"></script> <script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/ztree/jquery.ztree.all-3.5.min.js"></script>