Commit cd57b9f9 authored by mainlove's avatar mainlove

Merge branch '0.5.6' of https://github.com/b3log/b3log-solo.git into

0.5.6

Conflicts:
	war/src/main/webapp/js/admin/latkeAdmin.js
	war/src/main/webapp/js/admin/latkeAdmin.min.js
	war/src/main/webapp/js/admin/pluginList.js
parents 11339723 f8d331be
......@@ -3086,6 +3086,7 @@ admin.pluginList = {
success: function(result, textStatus){
$("#tipMsg").text(result.msg);
<<<<<<< HEAD
$("#PluginSetting").html(result);
$("#PluginSetting").dialog({
......@@ -3095,15 +3096,25 @@ admin.pluginList = {
"hideFooter": true
});
=======
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git
$("#pluginSetting").html(result);
$("#pluginSetting").dialog("open");
<<<<<<< HEAD
=======
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git
$("#loadMsg").text("");
}
});
},
<<<<<<< HEAD
=======
>>>>>>> branch '0.5.6' of https://github.com/b3log/b3log-solo.git
changeStatus: function (pluginId, status) {
if (status === "ENABLED") {
status = "DISABLED";
......@@ -3846,4 +3857,4 @@ admin.register["about"] = {
"refresh": function () {
$("#loadMsg").text("");
}
}
\ No newline at end of file
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -137,12 +137,13 @@ admin.pluginList = {
$("#pluginSetting").html(result);
$("#pluginSetting").dialog("open");
$("#loadMsg").text("");
}
});
},
changeStatus: function (pluginId, status) {
if (status === "ENABLED") {
status = "DISABLED";
......
......@@ -2,7 +2,7 @@
<div class="articles container">
<div class="vertical"></div>
<#list articles as article>
<article<#if !article_has_next> class="last"</#if>>
<article>
<div class="module">
<div class="dot"></div>
<div class="arrow"></div>
......@@ -36,15 +36,13 @@
<a rel="author" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</span>
<span class="ico-comment ico" title="${commentLabel}">
<#if article.articleCommentCount == 0>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#if article.articleCommentCount == 0>
${noCommentLabel}
</a>
<#else>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#else>
${article.articleCommentCount}
</#if>
</a>
</#if>
</span>
<span class="ico-view ico" title="${viewLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}">
......@@ -54,8 +52,8 @@
</div>
</article>
</#list>
<#if paginationCurrentPageNum != paginationPageCount && 0 != paginationPageCount>
<div class="article-more" onclick="timeline.getNextPage(this)" data-page="${paginationCurrentPageNum}">${moreLabel}</div>
</#if>
</div>
<#if paginationCurrentPageNum != paginationPageCount && 0 != paginationPageCount>
<div class="article-next ft-gray" onclick="getNextPage()" data-page="${paginationCurrentPageNum}">${moreLabel}</div>
</#if>
</div>
\ No newline at end of file
......@@ -54,15 +54,14 @@
<a rel="author" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</span>
<span class="ico-comment ico" title="${commentLabel}">
<#if article.articleCommentCount == 0>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#if article.articleCommentCount == 0>
${noCommentLabel}
</a>
<#else>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#else>
${article.articleCommentCount}
</#if>
</a>
</#if>
</span>
<span class="ico-view ico" title="${viewLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}">
......
......@@ -11,7 +11,7 @@
${topBarReplacement}
<#include "header.ftl">
<h2 class="nav-abs">
<img width="90" title="${authorName}" src="${authorThumbnailURL}"/>
<img style="border-radius: 45px;" width="90" title="${authorName}" src="${authorThumbnailURL}"/>
<br/>
${authorName}
</h2>
......
......@@ -518,6 +518,11 @@ article .article-title {
margin: 0;
}
article .article-title > sup {
color: #6599C6;
font-size: 70%;
}
article .article-title a {
color: #000;
text-decoration: none;
......@@ -532,6 +537,22 @@ article .article-title a {
.ico > a:hover {
color: #000;
}
.article-more {
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-weight: bold;
left: 50%;
margin-left: -36px;
padding: 5px 20px;
position: absolute;
top: 100%;
cursor: pointer;
height: 19px;
width: 26px;
}
/* end article list */
/* start dynamic */
......@@ -640,7 +661,6 @@ article .article-title a {
border-radius: 5px 5px 5px 5px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(255, 255, 255, 0.6);
color: #CCCCCC;
cursor: pointer;
padding: 5px 10px;
position: absolute;
right: 30px;
......
......@@ -64,15 +64,13 @@
${article.articleTitle}
</a>
<span class="ico ico-comment right" title="${commentLabel}">
<#if article.articleCommentCount == 0>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#if article.articleCommentCount == 0>
${noCommentLabel}
</a>
<#else>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
<#else>
${article.articleCommentCount}
</#if>
</a>
</#if>
</span>
</li>
</#list>
......
......@@ -33,12 +33,15 @@
"tagLabel": "${tagLabel}",
"viewLabel": "${viewLabel}",
"commentLabel": "${commentLabel}",
"noCommentLabel": "${noCommentLabel}",
"topArticleLabel": "${topArticleLabel}",
"authorLabel": "${authorLabel}",
"updatedLabel": "${updatedLabel}",
"contentLabel": "${contentLabel}",
"abstractLabel": "${abstractLabel}",
"clearAllCacheLabel": "${clearAllCacheLabel}",
"clearCacheLabel": "${clearCacheLabel}",
"moreLabel": "${moreLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}",
......
......@@ -10,6 +10,9 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="nav-abs">
<span>201201</span>
</div>
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
......
......@@ -81,6 +81,91 @@ var timeline = {
translate: function () {
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
},
getNextPage: function (it, archives) {
var $more = $(it),
currentPage = $more.data("page") + 1,
path = "/articles/";
if(location.pathname.indexOf("tags") === 1) {
var pathnames = location.pathname.split("/tags/");
path = "/articles/tags/" + pathnames[1].split("/")[0] + "/";
} else if (location.pathname.indexOf("authors") === 1) {
var pathnames = location.pathname.split("/authors/");
path = "/articles/authors/" + pathnames[1].split("/")[0] + "/";
} else if (archives) {
path = "/articles/archives/" + archives + "/";
}
$.ajax({
url: latkeConfig.servePath + path + currentPage,
type: "GET",
beforeSend: function () {
$more.css("background",
"url(" + latkeConfig.staticServePath
+ "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("");
},
success: function(result, textStatus){
if (!result.sc) {
return;
}
var articlesHTML = "",
pagination = result.rslts.pagination;
// append articles
for (var i = 0; i < result.rslts.articles.length; i++) {
var article = result.rslts.articles[i];
articlesHTML += '<article><div class="module"><div class="dot"></div>'
+ '<div class="arrow"></div><time class="article-time"><span>'
+ Util.toDate(article.articleCreateTime, 'yy-MM-dd HH:mm')
+ '</span></time><h2 class="article-title"><a rel="bookmark" href="'
+ latkeConfig.servePath + article.articlePermalink + '">'
+article.articleTitle + '</a>';
if (article.hasUpdated) {
articlesHTML += '<sup>' + Label.updatedLabel + '</sup>';
}
if (article.articlePutTop) {
articlesHTML += '<sup>' + Label.topArticleLabel + '</sup>';
}
articlesHTML += '</h2><p>' + article.articleAbstract + '</p>'
+ '<span class="ico-tags ico" title="' + Label.tagLabel + '">';
var articleTags = article.articleTags.split(",");
for (var j = 0; j < articleTags.length; j++) {
articlesHTML += '<a rel="category tag" href="' + latkeConfig.servePath
+ '/tags/' + encodeURIComponent(articleTags[j]) + '">' + articleTags[j] + '</a>';
if (j < articleTags.length - 1) {
articlesHTML += ",";
}
}
articlesHTML += '</span>&nbsp;<span class="ico-author ico" title="' + Label.authorLabel + '">'
+ '<a rel="author" href="' + latkeConfig.servePath + '/authors/' + article.authorId + '">'
+ article.authorName + '</a></span>&nbsp;<span class="ico-comment ico" title="'
+ Label.commentLabel + '"><a rel="nofollow" href="' + latkeConfig.servePath + article.articlePermalink
+ '#comments">' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount)
+ '</a></span>&nbsp;<span class="ico-view ico" title="' + Label.viewLabel + '">'
+ '<a rel="nofollow" href="${servePath}${article.articlePermalink}">' + article.articleViewCount
+ '</a></span></div></article>';
}
$more.before(articlesHTML).data("page", currentPage);
// 最后一页处理
if (pagination.paginationPageCount === currentPage) {
$more.remove();
} else {
$more.css("background", "none #60829F").text(Label.moreLabel);
}
$(window).resize();
}
});
}
};
......
......@@ -10,7 +10,7 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<h2 class="nav-abs" onclick="window.location.href='${servePath}/tag-articles-feed.do?oId=${tag.oId}'">
<h2 style="cursor: pointer" class="nav-abs" onclick="window.location.href='${servePath}/tag-articles-feed.do?oId=${tag.oId}'">
${tag.tagTitle}
(${tag.tagPublishedRefCount})
<img src="${staticServePath}/images/feed.png" alt="Atom"/>
......
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