Commit e177a9de 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/plugin.js
	war/src/main/webapp/js/admin/pluginList.js
parents 00a7450c e184084d
......@@ -200,7 +200,7 @@
</activation>
<properties>
<jacobeExecutable>
../src/main/resources/etc/jacobe/linux/jacobe.exe
../src/main/resources/etc/jacobe/linux/jacobe
</jacobeExecutable>
</properties>
</profile>
......
File mode changed from 100644 to 100755
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.deploy.on.save>false</netbeans.deploy.on.save>
</properties>
</project-shared-configuration>
......@@ -46,4 +46,4 @@ jdbc.tablePrefix=b3_solo
#### Cache ####
cache.maxPageCnt=128
cache.maxDataCnt=128
\ No newline at end of file
cache.maxDataCnt=128
......@@ -3633,14 +3633,10 @@ admin.plugin = {
success: function(result, textStatus){
$("#loadMsg").text(Label.loadingLabel);
$("#tipMsg").text(result.msg);
if (!result.sc) {
$("#loadMsg").text("");
return;
}
//where to put the id?
$("#PluginSetting").dialog("open");
$("#PluginSetting").html(result);
$("#loadMsg").text("");
$("#PluginSetting").dialog("open");
}
});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -39,28 +39,6 @@ admin.plugin = {
}
},
toSetting:function(pluginId){
var requestJSONObject = {
"oId": pluginId
};
$.ajax({
url: latkeConfig.servePath + "/console/plugin/toSetting",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){
$("#loadMsg").text(Label.loadingLabel);
//$("#tipMsg").text(result.msg);
$("#PluginSetting").html("<a>jjjj</a>");
$("#loadMsg").text("");
$("#PluginSetting").dialog("open");
}
});
},
/*
* 根据当前 hash 初始化或刷新插件
*/
......@@ -72,7 +50,7 @@ admin.plugin = {
isCurrentPlugin = false;
// 根据当前 hash 和插件 path 判别是非为当前插件
if (data.index && window.location.hash.indexOf(data.hash) > -1) {
if (data.index && window.location.hash.indexOf(data.hash) > -1) {
isCurrentPlugin = true;
} else if(data.path.replace("/", "#") === window.location.hash ||
(window.location.hash === "#main" && data.path.indexOf("/main/panel") > -1)) {
......@@ -153,4 +131,4 @@ admin.plugin = {
break;
}
}
};
\ No newline at end of file
};
......@@ -92,7 +92,7 @@ admin.pluginList = {
}
datas[i].expendRow += "</a> ";
datas[i].expendRow +="<a href='javascript:void(0)' onclick=\"admin.plugin.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);
......@@ -101,7 +101,37 @@ admin.pluginList = {
}
});
},
toSetting:function(pluginId){
$("#loadMsg").text(Label.loadingLabel);
var requestJSONObject = {
"oId": pluginId
};
$.ajax({
url: latkeConfig.servePath + "/console/plugin/toSetting",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){
$("#tipMsg").text(result.msg);
$("#PluginSetting").html(result);
$("#PluginSetting").dialog({
width: 700,
height: 190,
"modal": true,
"hideFooter": true
});
$("#PluginSetting").dialog("open");
$("#loadMsg").text("");
}
});
},
changeStatus: function (pluginId, status) {
if (status === "ENABLED") {
status = "DISABLED";
......@@ -144,4 +174,4 @@ admin.register["plugin-list"] = {
"refresh": function () {
$("#loadMsg").text("");
}
}
\ No newline at end of file
}
......@@ -387,6 +387,12 @@ $.extend(Page.prototype, {
}
});
$("#comment").keypress(function (event) {
if (event.keyCode === 13 && event.ctrlKey) {
that.submitComment();
}
});
// captcha
$("#captcha").click(function () {
$(this).attr("src", latkeConfig.servePath + "/captcha.do?code=" + Math.random());
......@@ -642,6 +648,13 @@ $.extend(Page.prototype, {
this.insertEmotions("Reply");
$("#commentReply").unbind().keypress(function (event) {
if (event.keyCode === 13 && event.ctrlKey) {
that.submitComment(id, 'Reply');
event.preventDefault();
}
});
$("#commentValidateReply").unbind().keypress(function (event) {
if (event.keyCode === 13) {
that.submitComment(id, 'Reply');
......
This diff is collapsed.
......@@ -6,12 +6,12 @@
<div class="module">
<div class="dot"></div>
<div class="arrow"></div>
<time>
<time class="article-time">
<span>
${article.articleCreateDate?string("yy-MM-dd HH:mm")}
</span>
</time>
<h2>
<h2 class="article-title">
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
......
......@@ -14,9 +14,18 @@
<div class="wrapper">
<div class="container">
<div class="module">
<div class="article-title">
<h2>
<a class="ft-gray" href="${servePath}${article.articlePermalink}">
<article class="article">
<time class="article-time">
<span>
<#if article.hasUpdated>
${article.articleUpdateDate?string("yy-MM-dd HH:mm")}
<#else>
${article.articleCreateDate?string("yy-MM-dd HH:mm")}
</#if>
</span>
</time>
<h2 class="article-title">
<a href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.hasUpdated>
......@@ -30,77 +39,60 @@
</sup>
</#if>
</h2>
<div class="right">
<a rel="nofollow" class="ft-gray" href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}&nbsp;&nbsp;${commentLabel}
</a>&nbsp;&nbsp;
<a rel="nofollow" class="ft-gray" href="${servePath}${article.articlePermalink}">
${article.articleViewCount}&nbsp;&nbsp;${viewLabel}
</a>
</div>
<div class="clear"></div>
</div>
<div class="article-body">
${article.articleContent}
<p>
${article.articleContent}
</p>
<#if "" != article.articleSign.signHTML?trim>
<p>
${article.articleSign.signHTML}
</p>
</#if>
</div>
<div class="right ft-gray">
<#if article.hasUpdated>
${article.articleUpdateDate?string("yy-MM-dd HH:mm")}
<#else>
${article.articleCreateDate?string("yy-MM-dd HH:mm")}
</#if>
<a rel="nofollow" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</div>
<div class="left ft-gray">
<#list article.articleTags?split(",") as articleTag>
<a rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">${articleTag}</a><#if articleTag_has_next>,</#if>
</#list>
</div>
<div class="clear"></div>
<div class="fn-mgtb10">
<#if 0 != relevantArticlesDisplayCount>
<div id="relevantArticles" class="article-relative"></div>
</#if>
<#if 0 != randomArticlesDisplayCount>
<div id="randomArticles" class="article-relative"></div>
<span class="ico-tags ico" title="${tagLabel}">
<#list article.articleTags?split(",") as articleTag><a rel="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}">
<#if article.articleCommentCount == 0>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
${noCommentLabel}
</a>
<#else>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}
</a>
</#if>
</span>
<span class="ico-view ico" title="${viewLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}">
${article.articleViewCount}
</a>
</span>
</article>
<div class="fn-clear" style="margin-top: 30px;">
<#if nextArticlePermalink??>
<div class="left">
<a href="${servePath}${nextArticlePermalink}">
<span class="ico-pre">«</span>
${nextArticleTitle}
</a>
</div>
</#if>
<#if previousArticlePermalink??>
<div class="right">
<a href="${servePath}${previousArticlePermalink}">
${previousArticleTitle}
<span class="ico-next">»</span>
</a>
</div>
</#if>
<div class="clear"></div>
</div>
<#if nextArticlePermalink??>
<div class="left">
<span class="ft-gray">&lt;</span>
<a href="${servePath}${nextArticlePermalink}">${nextArticleTitle}</a>
</div>
</#if>
<#if previousArticlePermalink??>
<div class="right">
<a href="${servePath}${previousArticlePermalink}">${previousArticleTitle}</a>
<span class="ft-gray">&gt;</span>
</div>
</#if>
<div class="clear"></div>
<@comments commentList=articleComments article=article></@comments>
</div>
</div>
</div>
<#include "footer.ftl">
<@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles('<h4 class="ft-gray">${randomArticlesLabel}</h4>');
</#if>
<#if 0 != relevantArticlesDisplayCount>
page.loadRelevantArticles('${article.oId}', '<h4 class="ft-gray">${relevantArticlesLabel}</h4>');
</#if>
<#if 0 != externalRelevantArticlesDisplayCount>
page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>");
</#if>
</@comment_script>
<@comment_script oId=article.oId></@comment_script>
</body>
</html>
......@@ -10,7 +10,11 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<h2 class="nav-abs"><img src="${authorThumbnailURL}"/>${authorName}</h2>
<h2 class="nav-abs">
<img width="90" title="${authorName}" src="${authorThumbnailURL}"/>
<br/>
${authorName}
</h2>
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
......
......@@ -330,6 +330,32 @@ img {
width: 25px;
cursor: pointer;
}
.ico-next,
.ico-pre {
background: none repeat scroll 0 0 #6599C6;
border-radius: 10em 10em 10em 10em;
color: #FFFFFF;
display: block;
float: left;
font: 20px/100% "Times New Roman",Times,serif;
height: 28px;
margin: -8px 10px 0 0;
padding: 4px 0 0;
text-align: center;
transition: background 1s ease 0s;
width: 32px;
}
.ico-next {
float: right;
margin: -8px 0 0 10px;
}
a:hover > .ico-next,
a:hover > .ico-pre {
background-color: #000;
}
/* end icon */
/* start framework */
......@@ -465,13 +491,21 @@ img {
right: inherit
}
.articles > article time {
.article {
position: relative;
}
time.article-time {
top: -8px;
left: 50%;
position: absolute;
}
.articles > article time > span {
.article time.article-time {
top: -40px;
}
time.article-time > span {
background-color: #FFFFFF;
border: 1px solid #A8A9A9;
border-radius: 20em 20em 20em 20em;
......@@ -480,11 +514,11 @@ img {
padding: 5px 10px;
}
.articles > article > div > h2 {
article .article-title {
margin: 0;
}
.articles > article > div > h2 > a {
article .article-title a {
color: #000;
text-decoration: none;
}
......@@ -557,6 +591,11 @@ img {
.comment-form {
width: 100%;
margin: 30px 0;
}
#commentForm {
margin-top: 0;
}
.comment-form input[type='text'],
......@@ -566,7 +605,7 @@ img {
border-radius: 5px 5px 5px 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
margin: 5px 5px 5px 0;
padding: 6px 10px;
padding: 6px;
}
.comment-form input[type='text']:focus,
......@@ -606,5 +645,7 @@ img {
position: absolute;
right: 30px;
top: 61px;
z-index: 1;
text-align: center;
}
/* end others */
\ No newline at end of file
......@@ -59,7 +59,7 @@ var timeline = {
_setNavCurrent: function () {
$(".header li a").each(function () {
if($(this).attr("href") === location.href) {
if($(this).attr("href") === location.href.split("#")[0]) {
this.className = "current";
} else {
this.className = "";
......
......@@ -113,22 +113,22 @@
});
var addComment = function (result, state) {
var commentHTML = '<div id="' + result.oId + '"><img class="comment-header" \
var commentHTML = '<li id="' + result.oId + '"><img \
title="' + $("#commentName" + state).val() + '" alt="' + $("#commentName" + state).val() +
'" src="' + result.commentThumbnailURL + '"/><div class="comment-panel"><div class="left">' + result.replyNameHTML;
'" src="' + result.commentThumbnailURL + '"/><div><span class="author">' + result.replyNameHTML;
if (state !== "") {
var commentOriginalCommentName = $("#" + page.currentCommentId + " .comment-panel>.left a").first().text();
var commentOriginalCommentName = $("#" + page.currentCommentId + " .author > a").first().text();
commentHTML += '&nbsp;@&nbsp;<a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 20);"'
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
}
commentHTML += '</div><div class="right ft-gray">' + result.commentDate.substring(2, 16)
+ '&nbsp;<a rel="nofollow" href="javascript:replyTo(\'' + result.oId
+ '\');">${replyLabel}</a></div><span class="clear"></span><div class="article-body">' +
Util.replaceEmString($("#comment" + state).val().replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g,"<br/>"))
+ '</div></div><span class="clear"></span></div>';
commentHTML += '</span>&nbsp;<small><b>' + result.commentDate.substring(2, 16)
+ '</b></small><span class="ico-reply ico right"><a rel="nofollow" href="javascript:replyTo(\'' + result.oId
+ '\');">${replyLabel}</a></span><p>'
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g,"<br/>"))
+ '</p></div></li>';
return commentHTML;
}
......
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