This commit is contained in:
Liang Ding 2014-10-22 17:48:26 +08:00
commit 961e70a6a1
4 changed files with 106 additions and 80 deletions

View File

@ -3,7 +3,8 @@
<head>
<meta charset="UTF-8">
<title>
{{.i18n.wide}}
{{.i18n.wide}}
</title>
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/js/lib/codemirror-4.5/codemirror.css">
@ -25,20 +26,23 @@
<ul class="fn-cleaer">
<li>
<span>
{{.i18n.file}}
{{.i18n.file}}
</span>
<div class="frame">
<ul>
<li class="save-all disabled" onclick="wide.saveAllFiles()">
<span>
{{.i18n.save_all_files}}
{{.i18n.save_all_files}}
</span>
</li>
<li class="close-all disabled" onclick="wide.closeAllFiles()">
<span>
{{.i18n.close_all_files}}
{{.i18n.close_all_files}}
</span>
</li>
@ -46,7 +50,8 @@
</li>
<li onclick="wide.exit()">
<span>
{{.i18n.exit}}
{{.i18n.exit}}
</span>
</li>
@ -55,14 +60,16 @@
</li>
<li>
<span>
{{.i18n.run}}
{{.i18n.run}}
</span>
<div class="frame">
<ul>
<li class="run disabled" onclick="wide.run()">
<span>
{{.i18n.build_n_run}}
{{.i18n.build_n_run}}
</span>
</li>
@ -70,13 +77,15 @@
</li>
<li class="go-get disabled" onclick="wide.goget()">
<span>
{{.i18n.goget}}
{{.i18n.goget}}
</span>
</li>
<li class="go-install disabled" onclick="wide.goinstall()">
<span>
{{.i18n.goinstall}}
{{.i18n.goinstall}}
</span>
</li>
@ -97,19 +106,22 @@
-->
<li>
<span>
{{.i18n.help}}
{{.i18n.help}}
</span>
<div class="frame">
<ul>
<li onclick="window.open('https://www.gitbook.io/book/88250/wide-user-guide')">
<span>
{{.i18n.wide_doc}}
{{.i18n.wide_doc}}
</span>
</li>
<li onclick="window.open('https://github.com/b3log/wide/issues/new')">
{{.i18n.report_issues}}
{{.i18n.report_issues}}
</li>
@ -117,13 +129,15 @@
</li>
<li onclick="editors.openStartPage()">
<span>
{{.i18n.start_page}}
{{.i18n.start_page}}
</span>
</li>
<li onclick="wide.openAbout()">
<span>
{{.i18n.about}}
{{.i18n.about}}
</span>
</li>
@ -139,7 +153,8 @@
<div class="tabs">
<div class="current" data-index="filreTree">
<span title="{{.i18n.file}}">
{{.i18n.file}}
{{.i18n.file}}
</span>
</div>
@ -152,15 +167,18 @@
<div id="dirRMenu" class="frame">
<ul>
<li onclick="tree.newFile();">
{{.i18n.create_file}}
{{.i18n.create_file}}
</li>
<li onclick="tree.newDir();">
{{.i18n.create_dir}}
{{.i18n.create_dir}}
</li>
<li onclick="tree.removeIt();">
{{.i18n.delete}}
{{.i18n.delete}}
</li>
</ul>
@ -169,7 +187,8 @@
<div id="fileRMenu" class="frame">
<ul>
<li onclick="tree.removeIt();">
{{.i18n.delete}}
{{.i18n.delete}}
</li>
</ul>
@ -199,19 +218,22 @@
<div class="tabs">
<div class="current" data-index="output">
<span title="{{.i18n.output}}">
{{.i18n.output}}
{{.i18n.output}}
</span>
</div>
<div data-index="search">
<span title="{{.i18n.search}}">
{{.i18n.search}}
{{.i18n.search}}
</span>
</div>
<div data-index="notification">
<span title="{{.i18n.notification}}">
{{.i18n.notification}}
{{.i18n.notification}}
</span>
</div>
@ -257,17 +279,20 @@
<span class="cursor">
</span>
<span class="notification-count" title="{{.i18n.unread_notification}}">
{{.i18n.notification}}!
{{.i18n.notification}}!
</span>
</div>
</div>
<div id="dialogRemoveConfirm" class="fn-none">
{{.i18n.isDelete}}
{{.i18n.isDelete}}
<b>
</b>
?
?
</div>
@ -287,44 +312,45 @@
<input placeholder="{{.i18n.file_format}}" />
</div>
<script>
var config = {
"pathSeparator": {{.pathSeparator}},
"latestSessionContent": {{.latestSessionContent}},
"label": {
"restore_editor": "{{.i18n.restore_editor}}",
"max_editor": "{{.i18n.max_editor}}",
"delete": "{{.i18n.delete}}",
"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}}",
"stop": "{{.i18n.stop}}",
"usages": "{{.i18n.usages}}",
"search_text": "{{.i18n.search_text}}",
"search": "{{.i18n.search}}",
"initialise": "{{.i18n.initialise}}",
"confirm_save": "{{.i18n.confirm_save}}"
},
"channel": {
"editor": '{{.conf.EditorChannel}}',
"shell": '{{.conf.ShellChannel}}',
"output": '{{.conf.OutputChannel}}',
"session": '{{.conf.SessionChannel}}'
},
"wideSessionId": '{{.session.Id}}'
};
// 发往 Wide 的所有 AJAX 请求需要使用该函数创建请求参数.
function newWideRequest() {
var ret = {
sid: config.wideSessionId
}
return ret;
}
var config = {
"pathSeparator": {{.pathSeparator}},
"latestSessionContent": {{.latestSessionContent}},
"label": {
"restore_editor": "{{.i18n.restore_editor}}",
"max_editor": "{{.i18n.max_editor}}",
"delete": "{{.i18n.delete}}",
"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}}",
"stop": "{{.i18n.stop}}",
"usages": "{{.i18n.usages}}",
"search_text": "{{.i18n.search_text}}",
"search": "{{.i18n.search}}",
"initialise": "{{.i18n.initialise}}",
"confirm_save": "{{.i18n.confirm_save}}"
},
"channel": {
"editor": '{{.conf.EditorChannel}}',
"shell": '{{.conf.ShellChannel}}',
"output": '{{.conf.OutputChannel}}',
"session": '{{.conf.SessionChannel}}'
},
"wideSessionId": '{{.session.Id}}'
};
// 发往 Wide 的所有 AJAX 请求需要使用该函数创建请求参数.
function newWideRequest() {
var ret = {
sid: config.wideSessionId
}
return ret;
}

View File

@ -267,6 +267,16 @@ var wide = {
});
}
});
$("#dialogAbout").load('/about', function () {
$("#dialogAbout").dialog({
"modal": true,
"height": 460,
"width": 860,
"title": config.label.about,
"hideFooter": true
});
});
},
_initLayout: function () {
var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 1,
@ -678,7 +688,7 @@ var wide = {
}
},
openAbout: function () {
$("#dialogAbout").dialog("open");
}
};

View File

@ -1,14 +1 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{.i18n.wide}} - {{.i18n.about}}</title>
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/about.css?{{.conf.StaticResourceVersion}}">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body>
about
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/jquery-2.1.1.min.js"></script>
</body>
</html>
about

View File

@ -16,6 +16,7 @@
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/side.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/start.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.StaticServer}}/static/css/about.css?{{.conf.StaticResourceVersion}}">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
@ -189,6 +190,7 @@
{{.i18n.isDelete}} <b></b>?
</div>
<div id="dialogAlert" class="fn-none"></div>
<div id="dialogAbout" class="fn-none"></div>
<div id="dialogNewFilePrompt" class="dialog-prompt fn-none">
<input/>
</div>
@ -225,7 +227,8 @@
"search": "{{.i18n.search}}",
"start_page": "{{.i18n.start_page}}",
"confirm_save": "{{.i18n.confirm_save}}",
"community": "{{.i18n.community}}"
"community": "{{.i18n.community}}",
"about": "{{.i18n.about}}"
},
"channel": {
"editor": '{{.conf.EditorChannel}}',