wide/view/index.html

284 lines
17 KiB
HTML
Raw Normal View History

2014-08-18 17:45:43 +04:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
2014-09-17 05:41:22 +04:00
<title>{{.i18n.wide}}</title>
2014-09-16 19:58:52 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/codemirror.css">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/hint/show-hint.css">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/lint/lint.css">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/foldgutter.css">
2014-10-21 12:48:45 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/theme/wide.css">
2014-08-18 17:45:43 +04:00
2014-09-16 19:58:52 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/ztree/zTreeStyle.css">
2014-08-18 17:45:43 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/dialog.css?{{.conf.StaticResourceVersion}}">
2014-09-16 19:58:52 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/base.css?{{.conf.StaticResourceVersion}}">
2014-10-10 12:04:59 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/wide.css?{{.conf.StaticResourceVersion}}">
2014-09-16 19:58:52 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/side.css?{{.conf.StaticResourceVersion}}">
2014-10-19 14:41:01 +04:00
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/start.css?{{.conf.StaticResourceVersion}}">
2014-10-12 18:00:26 +04:00
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
2014-08-18 17:45:43 +04:00
</head>
<body>
2014-09-10 18:43:34 +04:00
<!-- 主菜单 -->
2014-09-02 18:57:30 +04:00
<div class="menu fn-clear">
2014-09-10 14:08:35 +04:00
<ul class="fn-cleaer">
<li>
<span>{{.i18n.file}}</span>
<div class="frame">
<ul>
2014-10-13 13:01:44 +04:00
<li class="save-all disabled" onclick="wide.saveAllFiles()">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.save_all_files}}</span>
2014-09-10 14:08:35 +04:00
</li>
2014-10-13 13:01:44 +04:00
<li class="close-all disabled" onclick="wide.closeAllFiles()">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.close_all_files}}</span>
2014-09-10 18:43:34 +04:00
</li>
2014-09-11 15:33:07 +04:00
<li class="hr"></li>
2014-09-11 16:09:14 +04:00
<li onclick="wide.exit()">
<span>{{.i18n.exit}}</span>
2014-09-10 14:08:35 +04:00
</li>
</ul>
</div>
</li>
<li>
<span>{{.i18n.run}}</span>
<div class="frame">
<ul>
2014-10-13 13:01:44 +04:00
<li class="run disabled" onclick="wide.run()">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.build_n_run}}</span>
2014-09-10 14:08:35 +04:00
</li>
2014-09-11 15:33:07 +04:00
<li class="hr"></li>
2014-10-13 13:01:44 +04:00
<li class="go-get disabled" onclick="wide.goget()">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.goget}}</span>
2014-09-10 14:08:35 +04:00
</li>
2014-10-13 13:01:44 +04:00
<li class="go-install disabled" onclick="wide.goinstall()">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.goinstall}}</span>
2014-09-10 18:43:34 +04:00
</li>
2014-09-10 14:08:35 +04:00
</ul>
</div>
</li>
2014-09-24 07:00:33 +04:00
<!--
2014-09-10 14:08:35 +04:00
<li>
<span>{{.i18n.debug}}</span>
<div class="frame">
<ul>
<li>
2014-09-10 18:43:34 +04:00
<span>{{.i18n.debug}}</span>
2014-09-10 14:08:35 +04:00
</li>
</ul>
</div>
</li>
2014-09-24 07:00:33 +04:00
-->
2014-09-10 14:08:35 +04:00
<li>
2014-09-10 18:43:34 +04:00
<span>{{.i18n.help}}</span>
<div class="frame">
<ul>
2014-09-19 15:21:13 +04:00
<li onclick="window.open('https://www.gitbook.io/book/88250/wide-user-guide')">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.wide_doc}}</span>
2014-09-11 15:33:07 +04:00
</li>
2014-09-12 09:42:43 +04:00
<li onclick="window.open('https://github.com/b3log/wide/issues/new')">
{{.i18n.report_issues}}
2014-09-10 18:43:34 +04:00
</li>
2014-09-11 15:33:07 +04:00
<li class="hr"></li>
2014-10-20 13:32:06 +04:00
<li onclick="editors.openStartPage()">
<span>{{.i18n.start_page}}</span>
2014-09-11 15:33:07 +04:00
</li>
2014-10-20 18:27:19 +04:00
<li onclick="wide.openAbout()">
2014-09-11 16:09:14 +04:00
<span>{{.i18n.about}}</span>
2014-09-10 18:43:34 +04:00
</li>
</ul>
</div>
2014-09-10 14:08:35 +04:00
</li>
</ul>
2014-09-02 14:09:01 +04:00
</div>
2014-08-18 17:45:43 +04:00
<div class="content">
2014-08-29 13:24:08 +04:00
<div class="side">
2014-09-25 11:56:26 +04:00
<span title="{{.i18n.min}}" class="font-ico ico-min"></span>
2014-09-25 07:04:17 +04:00
<div class="tabs">
<div class="current" data-index="filreTree">
<span title="{{.i18n.file}}">{{.i18n.file}}</span>
2014-09-02 14:09:01 +04:00
</div>
2014-09-25 11:56:26 +04:00
</div>
2014-09-25 07:04:17 +04:00
<div class="tabs-panel">
<div data-index="filreTree">
<ul id="files" tabindex="-1" class="ztree"></ul>
<!-- 目录右键菜单 -->
<div id="dirRMenu" class="frame">
<ul>
<li onclick="tree.newFile();">{{.i18n.create_file}}</li>
<li onclick="tree.newDir();">{{.i18n.create_dir}}</li>
<li onclick="tree.removeIt();">{{.i18n.delete}}</li>
</ul>
</div>
2014-08-18 17:45:43 +04:00
2014-09-25 07:04:17 +04:00
<!-- 文件右键菜单 -->
<div id="fileRMenu" class="frame">
<ul>
<li onclick="tree.removeIt();">{{.i18n.delete}}</li>
</ul>
</div>
2014-09-02 14:09:01 +04:00
</div>
</div>
2014-08-18 17:45:43 +04:00
</div>
2014-09-24 12:25:26 +04:00
<div class="edit-panel">
2014-09-25 11:56:26 +04:00
<div class="toolbars fn-none">
<span onclick="wide.run()" class="font-ico ico-buildrun" title="{{.i18n.build_n_run}}"></span>
<span onclick="wide.saveFile()" title="{{.i18n.save}}" class="font-ico ico-save"></span>
<span onclick="wide.fmt(editors.getCurrentPath(), wide.curEditor)" class="ico-format font-ico" title="{{.i18n.format}}"></span>
2014-09-26 11:39:13 +04:00
<span class="font-ico ico-max" onclick="windows.maxEditor()" title="{{.i18n.max_editor}}"></span>
2014-09-02 14:09:01 +04:00
</div>
2014-09-25 11:56:26 +04:00
<div class="tabs"></div>
2014-09-24 12:25:26 +04:00
<div class="tabs-panel"></div>
</div>
2014-08-29 13:24:08 +04:00
2014-09-24 12:25:26 +04:00
<div class="bottom-window-group">
2014-09-25 11:56:26 +04:00
<span title="{{.i18n.min}}" class="font-ico ico-min"></span>
2014-09-24 12:25:26 +04:00
<div class="tabs">
<div class="current" data-index="output">
2014-09-25 07:04:17 +04:00
<span title="{{.i18n.output}}">{{.i18n.output}}</span>
2014-09-24 12:25:26 +04:00
</div>
<div data-index="search">
2014-09-25 07:04:17 +04:00
<span title="{{.i18n.search}}">{{.i18n.search}}</span>
2014-09-24 12:25:26 +04:00
</div>
<div data-index="notification">
2014-09-25 07:04:17 +04:00
<span title="{{.i18n.notification}}">{{.i18n.notification}}</span>
2014-09-24 12:25:26 +04:00
</div>
</div>
<div class="tabs-panel">
<div data-index="output"><textarea class="output"></textarea></div>
2014-09-24 12:25:26 +04:00
<div class="fn-none" data-index="search">
2014-10-12 08:15:51 +04:00
<div tabindex="-1" class="search">
<div class="tabs fn-none">
2014-10-12 18:00:26 +04:00
<div class="current" data-index="first">
<span class="first"></span><span class="ico-close font-ico"></span>
2014-10-12 08:15:51 +04:00
</div>
</div>
<div class="tabs-panel">
2014-10-12 18:00:26 +04:00
<div data-index="first"></div>
2014-10-12 08:15:51 +04:00
</div>
</div>
2014-09-03 13:23:42 +04:00
</div>
2014-09-24 12:25:26 +04:00
<div class="fn-none" data-index="notification">
<div tabindex="-1" class="notification"><table cellpadding="0" cellspacing="0"></table></div>
2014-09-03 13:23:42 +04:00
</div>
2014-08-29 13:24:08 +04:00
</div>
2014-08-18 17:45:43 +04:00
</div>
</div>
2014-09-25 11:56:26 +04:00
<div class="footer fn-clear">
2014-09-26 11:39:13 +04:00
<div class="fn-left">
<span title="{{.i18n.restore_side}}" class="font-ico ico-restore fn-none"></span>
<span title="{{.i18n.resotre_bottom}}" class="font-ico ico-restore fn-none"></span>
</div>
<div class="fn-right">
<span class="cursor"></span>
<span class="notification-count" title="{{.i18n.unread_notification}}">{{.i18n.notification}}!</span>
</div>
2014-08-18 17:45:43 +04:00
</div>
2014-10-09 17:55:09 +04:00
<div id="dialogRemoveConfirm" class="fn-none">
{{.i18n.isDelete}} <b></b>?
</div>
2014-10-09 17:55:09 +04:00
<div id="dialogAlert" class="fn-none"></div>
<div id="dialogNewFilePrompt" class="dialog-prompt fn-none">
<input/>
</div>
2014-10-09 17:55:09 +04:00
<div id="dialogNewDirPrompt" class="dialog-prompt fn-none">
<input/>
</div>
2014-10-09 17:55:09 +04:00
<div id="dialogGoLinePrompt" class="dialog-prompt fn-none">
2014-10-12 09:40:07 +04:00
<input/>
</div>
<div id="dialogSearchForm" class="dialog-form fn-none">
<input placeholder="{{.i18n.keyword}}" />
<input placeholder="{{.i18n.file_format}}" />
</div>
<script>
2014-09-11 16:09:14 +04:00
var config = {
2014-10-13 10:40:55 +04:00
"pathSeparator": {{.pathSeparator}},
"latestSessionContent": {{.latestSessionContent}},
2014-09-24 12:25:26 +04:00
"label": {
2014-09-26 11:39:13 +04:00
"restore_editor": "{{.i18n.restore_editor}}",
"max_editor": "{{.i18n.max_editor}}",
"delete": "{{.i18n.delete}}",
2014-09-24 12:25:26 +04:00
"cancel": "{{.i18n.cancel}}",
"goto_line": "{{.i18n.goto_line}}",
"goto": "{{.i18n.goto}}",
"create": "{{.i18n.create}}",
"create_file": "{{.i18n.create_file}}",
"create_dir": "{{.i18n.create_dir}}",
"tip": "{{.i18n.tip}}",
"confirm": "{{.i18n.confirm}}",
"build_n_run": "{{.i18n.build_n_run}}",
2014-10-12 18:00:26 +04:00
"stop": "{{.i18n.stop}}",
"usages": "{{.i18n.usages}}",
"search_text": "{{.i18n.search_text}}",
2014-10-17 10:47:29 +04:00
"search": "{{.i18n.search}}",
2014-10-21 10:47:07 +04:00
"initialise": "{{.i18n.initialise}}",
"confirm_save": "{{.i18n.confirm_save}}"
2014-09-24 12:25:26 +04:00
},
"channel": {
"editor": '{{.conf.EditorChannel}}',
"shell": '{{.conf.ShellChannel}}',
"output": '{{.conf.OutputChannel}}',
"session": '{{.conf.SessionChannel}}'
},
"wideSessionId": '{{.session.Id}}'
2014-09-17 06:04:41 +04:00
};
// 发往 Wide 的所有 AJAX 请求需要使用该函数创建请求参数.
2014-09-19 20:56:32 +04:00
function newWideRequest() {
var ret = {
2014-09-17 06:04:41 +04:00
sid: config.wideSessionId
2014-09-19 20:56:32 +04:00
}
return ret;
}
2014-09-17 06:04:41 +04:00
</script>
2014-09-16 19:58:52 +04:00
<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/ztree/jquery.ztree.all-3.5.min.js"></script>
2014-08-18 17:45:43 +04:00
2014-09-16 19:58:52 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/codemirror.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/lint/lint.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/lint/json-lint.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/selection/active-line.js"></script>
2014-10-09 13:14:15 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/overwrite/codemirror-4.5/addon/hint/show-hint.js"></script>
2014-09-16 19:58:52 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/hint/anyword-hint.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/rulers.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/closebrackets.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/matchbrackets.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/closetag.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/searchcursor.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/match-highlighter.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/foldcode.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/foldgutter.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/brace-fold.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/xml-fold.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/markdown-fold.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/addon/fold/comment-fold.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/go/go.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/xml/xml.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/htmlmixed/htmlmixed.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/markdown/markdown.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/css/css.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/shell/shell.js"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/mode/sql/sql.js"></script>
2014-09-25 05:46:24 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/lint/json-lint.js?{{.conf.StaticResourceVersion}}"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/lint/go-lint.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-25 07:04:17 +04:00
2014-09-16 19:58:52 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/tabs.js?{{.conf.StaticResourceVersion}}"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/dialog.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-25 05:46:24 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/editors.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-16 19:58:52 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/notification.js?{{.conf.StaticResourceVersion}}"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/tree.js?{{.conf.StaticResourceVersion}}"></script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/wide.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-19 20:56:32 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/session.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-16 19:58:52 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/menu.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-26 11:39:13 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/windows.js?{{.conf.StaticResourceVersion}}"></script>
2014-09-16 19:58:52 +04:00
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/hotkeys.js?{{.conf.StaticResourceVersion}}"></script>
2014-08-18 17:45:43 +04:00
</body>
</html>