Commit 69b44ad2 authored by Vanessa's avatar Vanessa

D,文章页面不能评论,首页无法使用 archivesDate,赶紧滴

parent 1a2bbdf9
...@@ -3060,9 +3060,9 @@ admin.pluginList = { ...@@ -3060,9 +3060,9 @@ admin.pluginList = {
datas[i].expendRow += "</a> "; datas[i].expendRow += "</a> ";
if(datas[i].setting!="{}"){ if(datas[i].setting!="{}"){
datas[i].expendRow +="<a href='javascript:void(0)' onclick=\"admin.pluginList.toSetting('"+datas[i].oId+"')\"> "+Label.settingLabel+" </a> "; datas[i].expendRow +="<a href='javascript:void(0)' onclick=\"admin.pluginList.toSetting('"+datas[i].oId+"')\"> "+Label.settingLabel+" </a> ";
}
} }
}
that.tablePagination.updateTablePagination(result.plugins, pageNum, result.pagination); that.tablePagination.updateTablePagination(result.plugins, pageNum, result.pagination);
...@@ -3085,27 +3085,17 @@ admin.pluginList = { ...@@ -3085,27 +3085,17 @@ admin.pluginList = {
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){ success: function(result, textStatus){
$("#tipMsg").text(result.msg); $("#tipMsg").text(result.msg);
$("#PluginSetting").html(result);
$("#PluginSetting").dialog({
width: 700,
height: 400,
"modal": true,
"hideFooter": true
});
=======
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git
$("#pluginSetting").html(result); $("#pluginSetting").html(result);
$("#pluginSetting").dialog("open"); $("#pluginSetting").dialog("open");
$("#loadMsg").text("");
======= }
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git });
$( },
},
changeStatus: function (pluginId, status) { changeStatus: function (pluginId, status) {
$("#loadMsg").text(Label.loadingLabel);
if (status === "ENABLED") { if (status === "ENABLED") {
status = "DISABLED"; status = "DISABLED";
} else { } else {
...@@ -3134,13 +3124,11 @@ admin.pluginList = { ...@@ -3134,13 +3124,11 @@ admin.pluginList = {
} }
}); });
} }
}; };
/* /*
* 注册到 admin 进行管理 * 注册到 admin 进行管理
*/ */
admin.register["plugin-list"] = { admin.register["plugin-list"] = {
"obj": admin.pluginList, "obj": admin.pluginList,
"init": admin.pluginList.init, "init": admin.pluginList.init,
......
...@@ -99,9 +99,9 @@ admin.pluginList = { ...@@ -99,9 +99,9 @@ admin.pluginList = {
datas[i].expendRow += "</a> "; datas[i].expendRow += "</a> ";
if(datas[i].setting!="{}"){ if(datas[i].setting!="{}"){
datas[i].expendRow +="<a href='javascript:void(0)' onclick=\"admin.pluginList.toSetting('"+datas[i].oId+"')\"> "+Label.settingLabel+" </a> "; datas[i].expendRow +="<a href='javascript:void(0)' onclick=\"admin.pluginList.toSetting('"+datas[i].oId+"')\"> "+Label.settingLabel+" </a> ";
}
} }
}
that.tablePagination.updateTablePagination(result.plugins, pageNum, result.pagination); that.tablePagination.updateTablePagination(result.plugins, pageNum, result.pagination);
...@@ -124,27 +124,17 @@ admin.pluginList = { ...@@ -124,27 +124,17 @@ admin.pluginList = {
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){ success: function(result, textStatus){
$("#tipMsg").text(result.msg); $("#tipMsg").text(result.msg);
$("#PluginSetting").html(result);
$("#PluginSetting").dialog({
width: 700,
height: 400,
"modal": true,
"hideFooter": true
});
=======
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git
$("#pluginSetting").html(result); $("#pluginSetting").html(result);
$("#pluginSetting").dialog("open"); $("#pluginSetting").dialog("open");
$("#loadMsg").text("");
======= }
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git });
$( },
},
changeStatus: function (pluginId, status) { changeStatus: function (pluginId, status) {
$("#loadMsg").text(Label.loadingLabel);
if (status === "ENABLED") { if (status === "ENABLED") {
status = "DISABLED"; status = "DISABLED";
} else { } else {
...@@ -173,13 +163,11 @@ admin.pluginList = { ...@@ -173,13 +163,11 @@ admin.pluginList = {
} }
}); });
} }
}; };
/* /*
* 注册到 admin 进行管理 * 注册到 admin 进行管理
*/ */
admin.register["plugin-list"] = { admin.register["plugin-list"] = {
"obj": admin.pluginList, "obj": admin.pluginList,
"init": admin.pluginList.init, "init": admin.pluginList.init,
......
...@@ -58,6 +58,7 @@ a:hover { ...@@ -58,6 +58,7 @@ a:hover {
img { img {
max-width: 100%; max-width: 100%;
border: 0;
vertical-align: middle; vertical-align: middle;
} }
...@@ -231,6 +232,7 @@ img { ...@@ -231,6 +232,7 @@ img {
margin-bottom: 30px; margin-bottom: 30px;
padding: 15px; padding: 15px;
word-wrap: break-word; word-wrap: break-word;
position: relative;
} }
.module > h3 { .module > h3 {
...@@ -410,6 +412,7 @@ a:hover > .ico-pre { ...@@ -410,6 +412,7 @@ a:hover > .ico-pre {
color: #444; color: #444;
padding: 19px; padding: 19px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
white-space: nowrap;
} }
.header li a.current { .header li a.current {
...@@ -432,6 +435,17 @@ a:hover > .ico-pre { ...@@ -432,6 +435,17 @@ a:hover > .ico-pre {
margin-top: 11px; margin-top: 11px;
} }
.articles > div.fn-clear {
position: relative;
margin-bottom: 20px;
}
.articles > div.fn-clear > h2 {
margin: 0;
text-align: center;
height: 28px;
}
.articles > .vertical { .articles > .vertical {
background-color: #9EB5C6; background-color: #9EB5C6;
border-radius: 20em 20em 20em 20em; border-radius: 20em 20em 20em 20em;
...@@ -444,19 +458,20 @@ a:hover > .ico-pre { ...@@ -444,19 +458,20 @@ a:hover > .ico-pre {
width: 6px width: 6px
} }
.articles > article { .articles article {
width: 50%; width: 50%;
} }
.articles > article.l > div.module { .articles article.l > div.module {
margin-right: 30px; margin-right: 30px;
left: 0;
} }
.articles > article.r { .articles article.r {
left: 50%; left: 50%;
} }
.articles > article.r > div { .articles article.r > div {
margin-left: 30px; margin-left: 30px;
position: relative; position: relative;
} }
...@@ -467,7 +482,7 @@ a:hover > .ico-pre { ...@@ -467,7 +482,7 @@ a:hover > .ico-pre {
border-radius: 20em 20em 20em 20em; border-radius: 20em 20em 20em 20em;
height: 6px; height: 6px;
position: absolute; position: absolute;
right: -6px; right: -37px;
top: 22px; top: 22px;
width: 6px; width: 6px;
} }
...@@ -480,7 +495,7 @@ a:hover > .ico-pre { ...@@ -480,7 +495,7 @@ a:hover > .ico-pre {
.articles .arrow { .articles .arrow {
height: 15px; height: 15px;
position: absolute; position: absolute;
right: 22px; right: -9px;
top: 21px; top: 21px;
width: 9px; width: 9px;
} }
...@@ -491,20 +506,12 @@ a:hover > .ico-pre { ...@@ -491,20 +506,12 @@ a:hover > .ico-pre {
right: inherit right: inherit
} }
.article {
position: relative;
}
time.article-time { time.article-time {
top: -8px; top: -8px;
left: 50%; left: 50%;
position: absolute; position: absolute;
} }
.article time.article-time {
top: -40px;
}
time.article-time > span { time.article-time > span {
background-color: #FFFFFF; background-color: #FFFFFF;
border: 1px solid #A8A9A9; border: 1px solid #A8A9A9;
...@@ -553,6 +560,16 @@ article .article-title a { ...@@ -553,6 +560,16 @@ article .article-title a {
height: 19px; height: 19px;
width: 26px; width: 26px;
} }
.article-archive {
background-color: #60829F;
border-radius: 20em 20em 20em 20em;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.6);
color: #FFFFFF;
font-size: 80%;
font-weight: normal;
padding: 5px 20px;
}
/* end article list */ /* end article list */
/* start dynamic */ /* start dynamic */
...@@ -667,5 +684,6 @@ article .article-title a { ...@@ -667,5 +684,6 @@ article .article-title a {
top: 61px; top: 61px;
z-index: 1; z-index: 1;
text-align: center; text-align: center;
white-space: nowrap;
} }
/* end others */ /* end others */
\ No newline at end of file
<!--[if lt IE 9]>
<script type="text/javascript">
(function () {
var element = ['time', 'article'];
for (var i = 0; i < element.length; i++) {
document.createElement(element[i]);
}
})();
</script>
<![endif]-->
<div class="header"> <div class="header">
<div class="container fn-clear"> <div class="container fn-clear">
<div class="left"> <div class="left">
......
...@@ -10,10 +10,74 @@ ...@@ -10,10 +10,74 @@
<body> <body>
${topBarReplacement} ${topBarReplacement}
<#include "header.ftl"> <#include "header.ftl">
<div class="nav-abs"> <div class="wrapper">
<span>201201</span> <div class="articles container">
<div class="vertical"></div>
<#list ["17:02", "17:01"] as date>
<div class="fn-clear">
<h2>
<span class="article-archive">${date}</span>
</h2>
<#list articles as article>
<#if article.articleCreateDate?string("HH:mm") == date>
<article>
<div class="module">
<div class="dot"></div>
<div class="arrow"></div>
<time class="article-time">
<span>
${article.articleCreateDate?string("yy-MM-dd HH:mm")}
</span>
</time>
<h3 class="article-title">
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
</h3>
<p>
${article.articleAbstract}
</p>
<span class="ico-tags ico" title="${tagLabel}">
<#list article.articleTags?split(",") as articleTag><a rel="category tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">${articleTag}</a><#if articleTag_has_next>,</#if></#list>
</span>
<span class="ico-author ico" title="${authorLabel}">
<a rel="author" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</span>
<span class="ico-comment ico" title="${commentLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#if article.articleCommentCount == 0>
${noCommentLabel}
<#else>
${article.articleCommentCount}
</#if>
</a>
</span>
<span class="ico-view ico" title="${viewLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}">
${article.articleViewCount}
</a>
</span>
</div>
</article>
<#if paginationCurrentPageNum != paginationPageCount && 0 != paginationPageCount && !article_has_next>
<div class="article-more" onclick="timeline.getNextPage(this, '${date}')" data-page="${paginationCurrentPageNum}">${moreLabel}</div>
</#if>
</#if>
</#list>
</div>
</#list>
</div>
</div> </div>
<#include "article-list.ftl">
<#include "footer.ftl"> <#include "footer.ftl">
</body> </body>
</html> </html>
...@@ -25,7 +25,7 @@ var timeline = { ...@@ -25,7 +25,7 @@ var timeline = {
_COLHB: 20, _COLHB: 20,
_initArticleList: function () { _initArticleList: function () {
var $articles = $(".articles"); var $articles = $(".articles");
if ($articles.length === 0) { if ($articles.length === 0 || $(".articles > .fn-clear").length > 0) {
return; return;
} }
...@@ -57,6 +57,40 @@ var timeline = { ...@@ -57,6 +57,40 @@ var timeline = {
$(window).resize(); $(window).resize();
}, },
_initIndexList: function () {
var $archives = $(".articles > .fn-clear");
if ($archives.length === 0) {
return;
}
$(window).resize(function () {
$archives.each(function () {
var colH = [timeline._COLHA + 60, timeline._COLHB * 4];
$(this).find("article").each(function () {
var $it = $(this),
isLeft = colH[1] > colH[0],
top = isLeft ? colH[0] : colH[1];
$it.css({
"top": top + "px",
"position": "absolute"
});
if (isLeft) {
$it.addClass("l");
} else {
$it.addClass("r");
}
colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true));
});
$(this).height(colH[0] > colH[1] ? colH[0] : colH[1]);
});
});
$(window).resize();
},
_setNavCurrent: function () { _setNavCurrent: function () {
$(".header li a").each(function () { $(".header li a").each(function () {
if($(this).attr("href") === location.href.split("#")[0]) { if($(this).attr("href") === location.href.split("#")[0]) {
...@@ -75,6 +109,7 @@ var timeline = { ...@@ -75,6 +109,7 @@ var timeline = {
$(".ico-top").hide(); $(".ico-top").hide();
} }
}); });
timeline._initIndexList();
timeline._initArticleList(); timeline._initArticleList();
timeline._setNavCurrent(); timeline._setNavCurrent();
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment