Merge branch 'master' of https://github.com/b3log/wide
This commit is contained in:
commit
6964a25432
|
@ -10,16 +10,20 @@
|
|||
"MaxProcs": 4,
|
||||
"RuntimeMode": "dev",
|
||||
"Pwd": "{pwd}",
|
||||
"Workspace": "{pwd}/data/workspace",
|
||||
"Users": [
|
||||
{
|
||||
"Name": "admin",
|
||||
"Password": "admin",
|
||||
"Workspace": "{pwd}/data/user_workspaces/admin",
|
||||
"LatestSessionContent": {
|
||||
"FileTree": [],
|
||||
"Files": [],
|
||||
"CurrentFile": ""
|
||||
"FileTree": [
|
||||
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest",
|
||||
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\hello"
|
||||
],
|
||||
"Files": [
|
||||
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\hello\\main.go"
|
||||
],
|
||||
"CurrentFile": "E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\hello\\main.go"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -53,5 +53,7 @@
|
|||
"ver": "版本",
|
||||
"dev_team": "开发团队",
|
||||
"donate": "捐赠",
|
||||
"confirm_save": "请确认所有文件已保存"
|
||||
"confirm_save": "请确认所有文件已保存",
|
||||
"workspace": "工作空间",
|
||||
"project_address": "项目地址"
|
||||
}
|
||||
|
|
|
@ -1,9 +1,32 @@
|
|||
#startPage {
|
||||
font-size: 15px;
|
||||
padding: 50px 70px;
|
||||
line-height: 28px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#startPage .details {
|
||||
width: 40%;
|
||||
float: left;
|
||||
border-right: 1px solid #DDD;
|
||||
margin-right: 10%;
|
||||
}
|
||||
|
||||
#startPage .news {
|
||||
width: 60%;
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#startPage a {
|
||||
color: #4183c4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#startPage a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#startPage .date {
|
||||
color: #bbb;
|
||||
font-size: 13px;
|
||||
}
|
|
@ -224,6 +224,10 @@
|
|||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.CodeMirror-focused .cm-matchhighlight {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom;
|
||||
|
|
|
@ -79,6 +79,27 @@ var editors = {
|
|||
this.openStartPage()
|
||||
},
|
||||
openStartPage: function () {
|
||||
var dateFormat = function (time, fmt) {
|
||||
var date = new Date(time);
|
||||
var dateObj = {
|
||||
"M+": date.getMonth() + 1, //月份
|
||||
"d+": date.getDate(), //日
|
||||
"h+": date.getHours(), //小时
|
||||
"m+": date.getMinutes(), //分
|
||||
"s+": date.getSeconds(), //秒
|
||||
"q+": Math.floor((date.getMonth() + 3) / 3), //季度
|
||||
"S": date.getMilliseconds() //毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt))
|
||||
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in dateObj)
|
||||
if (new RegExp("(" + k + ")").test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1)
|
||||
? (dateObj[k]) : (("00" + dateObj[k]).substr(("" + dateObj[k]).length)));
|
||||
}
|
||||
return fmt;
|
||||
};
|
||||
|
||||
editors.tabs.add({
|
||||
id: "startPage",
|
||||
title: '<span title="' + config.label.initialise + '">' + config.label.initialise + '</span>',
|
||||
|
@ -90,9 +111,6 @@ var editors = {
|
|||
type: "GET",
|
||||
dataType: "jsonp",
|
||||
jsonp: "callback",
|
||||
error: function () {
|
||||
$("#startPage").html("Loading B3log Announcement failed :-(");
|
||||
},
|
||||
success: function (data, textStatus) {
|
||||
var articles = data.articles;
|
||||
if (0 === articles.length) {
|
||||
|
@ -108,15 +126,15 @@ var editors = {
|
|||
var listHTML = "<ul>";
|
||||
for (var i = 0; i < length; i++) {
|
||||
var article = articles[i];
|
||||
var articleLiHtml = "<li>"
|
||||
+ "<a target='_blank' href='http://symphony.b3log.org" + article.articlePermalink + "'>"
|
||||
+ article.articleTitle + "</a> <span class='date'>" + new Date(article.articleCreateTime);
|
||||
listHTML += "<li>"
|
||||
+ "<a target='_blank' href='http://symphony.b3log.org"
|
||||
+ article.articlePermalink + "'>"
|
||||
+ article.articleTitle + "</a> <span class='date'>"
|
||||
+ dateFormat(article.articleCreateTime, 'yyyy-MM-dd hh:mm');
|
||||
+"</span></li>"
|
||||
listHTML += articleLiHtml;
|
||||
}
|
||||
listHTML += "</ul>";
|
||||
|
||||
$("#startPage .news").html(listHTML);
|
||||
$("#startPage .news").html(listHTML + "</ul>");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -367,6 +367,7 @@ var wide = {
|
|||
|
||||
this._initBottomWindowGroup();
|
||||
|
||||
// 点击隐藏弹出层
|
||||
$("body").bind("mousedown", function (event) {
|
||||
if (!(event.target.id === "dirRMenu" || $(event.target).closest("#dirRMenu").length > 0)) {
|
||||
$("#dirRMenu").hide();
|
||||
|
@ -383,11 +384,17 @@ var wide = {
|
|||
}
|
||||
});
|
||||
|
||||
// 刷新提示
|
||||
window.onbeforeunload = function () {
|
||||
if (editors.data.length > 0) {
|
||||
return config.label.confirm_save;
|
||||
}
|
||||
};
|
||||
|
||||
// 禁止鼠标右键菜单
|
||||
document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
|
||||
this._initDialog();
|
||||
|
||||
|
|
|
@ -4,22 +4,29 @@
|
|||
{{.i18n.username}} {{.username}}
|
||||
</li>
|
||||
<li>
|
||||
{{.i18n.user_guide}} http://88250.gitbooks.io/wide-user-guide
|
||||
{{.i18n.workspace}} {{.username}}
|
||||
</li>
|
||||
<li>
|
||||
{{.i18n.dev_guide}} http://88250.gitbooks.io/wide-user-guide
|
||||
{{.i18n.user_guide}}
|
||||
<a href="http://88250.gitbooks.io/wide-user-guide" target="_blank">88250.gitbooks.io/wide-user-guide</a>
|
||||
</li>
|
||||
<li>
|
||||
Wide
|
||||
{{.i18n.ver}} {{.ver}}
|
||||
{{.i18n.dev_team}}
|
||||
{{.i18n.dev_guide}}
|
||||
<a href="http://88250.gitbooks.io/wide-dev-guide" target="_blank">88250.gitbooks.io/wide-dev-guide</a>
|
||||
</li>
|
||||
<li>
|
||||
{{.i18n.donate}} http://b3log.org/donate.html
|
||||
Wide <br/>
|
||||
{{.i18n.ver}} {{.ver}}<br/>
|
||||
{{.i18n.dev_team}} B3log<br/>
|
||||
{{.i18n.project_address}}
|
||||
<a href="https://github.com/b3log/wide" target="_blank">github.com/b3log/wide</a>
|
||||
</li>
|
||||
<li>
|
||||
{{.i18n.donate}}
|
||||
<a href="http://b3log.org/donate.html" target="_blank">b3log.org/donate.html</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="news">
|
||||
aaa
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue