Merge branch 'master' of https://github.com/b3log/wide
This commit is contained in:
commit
6964a25432
|
@ -10,16 +10,20 @@
|
||||||
"MaxProcs": 4,
|
"MaxProcs": 4,
|
||||||
"RuntimeMode": "dev",
|
"RuntimeMode": "dev",
|
||||||
"Pwd": "{pwd}",
|
"Pwd": "{pwd}",
|
||||||
"Workspace": "{pwd}/data/workspace",
|
|
||||||
"Users": [
|
"Users": [
|
||||||
{
|
{
|
||||||
"Name": "admin",
|
"Name": "admin",
|
||||||
"Password": "admin",
|
"Password": "admin",
|
||||||
"Workspace": "{pwd}/data/user_workspaces/admin",
|
"Workspace": "{pwd}/data/user_workspaces/admin",
|
||||||
"LatestSessionContent": {
|
"LatestSessionContent": {
|
||||||
"FileTree": [],
|
"FileTree": [
|
||||||
"Files": [],
|
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest",
|
||||||
"CurrentFile": ""
|
"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": "版本",
|
"ver": "版本",
|
||||||
"dev_team": "开发团队",
|
"dev_team": "开发团队",
|
||||||
"donate": "捐赠",
|
"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 {
|
#startPage .details {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
float: left;
|
float: left;
|
||||||
|
border-right: 1px solid #DDD;
|
||||||
|
margin-right: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#startPage .news {
|
#startPage .news {
|
||||||
width: 60%;
|
width: 50%;
|
||||||
float: left;
|
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;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.CodeMirror {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
.CodeMirror-focused .cm-matchhighlight {
|
.CodeMirror-focused .cm-matchhighlight {
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||||
background-position: bottom;
|
background-position: bottom;
|
||||||
|
|
|
@ -79,6 +79,27 @@ var editors = {
|
||||||
this.openStartPage()
|
this.openStartPage()
|
||||||
},
|
},
|
||||||
openStartPage: function () {
|
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({
|
editors.tabs.add({
|
||||||
id: "startPage",
|
id: "startPage",
|
||||||
title: '<span title="' + config.label.initialise + '">' + config.label.initialise + '</span>',
|
title: '<span title="' + config.label.initialise + '">' + config.label.initialise + '</span>',
|
||||||
|
@ -90,9 +111,6 @@ var editors = {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: "jsonp",
|
dataType: "jsonp",
|
||||||
jsonp: "callback",
|
jsonp: "callback",
|
||||||
error: function () {
|
|
||||||
$("#startPage").html("Loading B3log Announcement failed :-(");
|
|
||||||
},
|
|
||||||
success: function (data, textStatus) {
|
success: function (data, textStatus) {
|
||||||
var articles = data.articles;
|
var articles = data.articles;
|
||||||
if (0 === articles.length) {
|
if (0 === articles.length) {
|
||||||
|
@ -108,15 +126,15 @@ var editors = {
|
||||||
var listHTML = "<ul>";
|
var listHTML = "<ul>";
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
var article = articles[i];
|
var article = articles[i];
|
||||||
var articleLiHtml = "<li>"
|
listHTML += "<li>"
|
||||||
+ "<a target='_blank' href='http://symphony.b3log.org" + article.articlePermalink + "'>"
|
+ "<a target='_blank' href='http://symphony.b3log.org"
|
||||||
+ article.articleTitle + "</a> <span class='date'>" + new Date(article.articleCreateTime);
|
+ article.articlePermalink + "'>"
|
||||||
|
+ article.articleTitle + "</a> <span class='date'>"
|
||||||
|
+ dateFormat(article.articleCreateTime, 'yyyy-MM-dd hh:mm');
|
||||||
+"</span></li>"
|
+"</span></li>"
|
||||||
listHTML += articleLiHtml;
|
|
||||||
}
|
}
|
||||||
listHTML += "</ul>";
|
|
||||||
|
|
||||||
$("#startPage .news").html(listHTML);
|
$("#startPage .news").html(listHTML + "</ul>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,6 +367,7 @@ var wide = {
|
||||||
|
|
||||||
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();
|
||||||
|
@ -383,12 +384,18 @@ var wide = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 刷新提示
|
||||||
window.onbeforeunload = function () {
|
window.onbeforeunload = function () {
|
||||||
if (editors.data.length > 0) {
|
if (editors.data.length > 0) {
|
||||||
return config.label.confirm_save;
|
return config.label.confirm_save;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 禁止鼠标右键菜单
|
||||||
|
document.oncontextmenu = function () {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
this._initDialog();
|
this._initDialog();
|
||||||
|
|
||||||
this._initLayout();
|
this._initLayout();
|
||||||
|
|
|
@ -4,22 +4,29 @@
|
||||||
{{.i18n.username}} {{.username}}
|
{{.i18n.username}} {{.username}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{{.i18n.user_guide}} http://88250.gitbooks.io/wide-user-guide
|
{{.i18n.workspace}} {{.username}}
|
||||||
</li>
|
</li>
|
||||||
<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>
|
||||||
<li>
|
<li>
|
||||||
Wide
|
{{.i18n.dev_guide}}
|
||||||
{{.i18n.ver}} {{.ver}}
|
<a href="http://88250.gitbooks.io/wide-dev-guide" target="_blank">88250.gitbooks.io/wide-dev-guide</a>
|
||||||
{{.i18n.dev_team}}
|
|
||||||
</li>
|
</li>
|
||||||
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="news">
|
<div class="news">
|
||||||
aaa
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue