修护 solo issue 130
This commit is contained in:
parent
dbfc858e19
commit
5de4413f05
@ -1,178 +1,176 @@
|
||||
<#macro comments commentList article>
|
||||
<h2 class="comment-label">${commentLabel}</h2>
|
||||
<div id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}"
|
||||
class="comment-body <#if comment_index % 2 == 0>comment-even<#else>comment-odd</#if>">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a>${comment.commentName}</a>
|
||||
<#else>
|
||||
<a href="${comment.commentURL}"
|
||||
target="_blank">${comment.commentName}</a>
|
||||
</#if><#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 20);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div>
|
||||
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="115px">
|
||||
${commentNameLabel}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentEmailLabel}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentURLLabel}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentEmotionsLabel}
|
||||
</th>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
${commentContentLabel}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${captchaLabel}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th width="262px">
|
||||
<span class="right error-msg" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right">
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var oddEven = "";
|
||||
if ($("#comments div").first().hasClass("comment-even")) {
|
||||
oddEven = "comment-odd";
|
||||
} else {
|
||||
oddEven = "comment-even";
|
||||
}
|
||||
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body ' + oddEven + '"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<img alt="' + $("#commentName" + state).val() + '" src="' + result.commentThumbnailURL
|
||||
+ '"/></div><div class="left comment-info">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-info a").first().text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0]
|
||||
+ '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 20);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">'
|
||||
+ commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += ' ' + result.commentDate + '<div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div><div><a rel="nofollow" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div></div><div class="clear"></div></div>';
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='comment-form' id='replyForm' cellpadding='0' cellspacing='0'>";
|
||||
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<h2 class="comment-label">${commentLabel}</h2>
|
||||
<div id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}"
|
||||
class="comment-body <#if comment_index % 2 == 0>comment-even<#else>comment-odd</#if>">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a>${comment.commentName}</a>
|
||||
<#else>
|
||||
<a href="${comment.commentURL}"
|
||||
target="_blank">${comment.commentName}</a>
|
||||
</#if><#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 20);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div>
|
||||
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="115px">
|
||||
${commentNameLabel}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentEmailLabel}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentURLLabel}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentEmotionsLabel}
|
||||
</th>
|
||||
<td id="emotions">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
${commentContentLabel}
|
||||
</th>
|
||||
<td>
|
||||
<textarea rows="10" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${captchaLabel}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<button class="right" id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
<span style="margin-top: 13px;" class="right error-msg" id="commentErrorTip"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var oddEven = "";
|
||||
if ($("#comments div").first().hasClass("comment-even")) {
|
||||
oddEven = "comment-odd";
|
||||
} else {
|
||||
oddEven = "comment-even";
|
||||
}
|
||||
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body ' + oddEven + '"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<img alt="' + $("#commentName" + state).val() + '" src="' + result.commentThumbnailURL
|
||||
+ '"/></div><div class="left comment-info">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-info a").first().text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0]
|
||||
+ '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 20);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">'
|
||||
+ commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += ' ' + result.commentDate + '<div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div><div><a rel="nofollow" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div></div><div class="clear"></div></div>';
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='comment-form' id='replyForm' cellpadding='0' cellspacing='0'>";
|
||||
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
@ -53,7 +53,7 @@
|
||||
<th>
|
||||
${commentName1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
@ -61,7 +61,7 @@
|
||||
<th>
|
||||
${commentEmail1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
@ -69,7 +69,7 @@
|
||||
<th>
|
||||
${commentURL1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
@ -99,7 +99,7 @@
|
||||
<th valign="top">
|
||||
${commentContent1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<td>
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
@ -111,12 +111,10 @@
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th>
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right">
|
||||
<td colspan="2" align="right">
|
||||
<span style="line-height: 28px;" class="error-msg" id="commentErrorTip"></span>
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1,185 +1,183 @@
|
||||
<#macro comments commentList article>
|
||||
<div id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}">
|
||||
<img class="left" alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
<div class="comment-panel left">
|
||||
<div class="comment-top">
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a>${comment.commentName}</a>
|
||||
<#else>
|
||||
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 11);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">
|
||||
${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<#if article.commentable>
|
||||
<div class="reply">
|
||||
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="comment-title">
|
||||
${postCommentsLabel}
|
||||
</div>
|
||||
<table id="commentForm" class="comment" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="200px">
|
||||
<span class="comment-label">
|
||||
${commentNameLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${commentEmailLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${commentURLLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${commentEmotionsLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
<span class="comment-label">
|
||||
${commentContentLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${captchaLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th>
|
||||
<span class="right error-msg" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<input id="submitCommentButton" type="button" onclick="page.submitComment();" value="${submmitCommentLabel}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId + '">'
|
||||
+ '<img class="left" alt="' + $("#commentName" + state).val() + '" src="' + result.commentThumbnailURL
|
||||
+ '"/><div class="comment-panel left"><div class="comment-top">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId + " .comment-top a").first().text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 11);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += ' ' + result.commentDate
|
||||
+ '</div><div class="comment-content">' + Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div><div class="clear"></div><div class="reply"><a rel="nofollow" href="javascript:replyTo(\'' + result.oId + '\');">${replyLabel}</a>'
|
||||
+ '</div></div><div class="clear"></div></div>';
|
||||
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table width='100%' cellspacing='0' cellpadding='0' class='comment' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<div id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}">
|
||||
<img class="left" alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
<div class="comment-panel left">
|
||||
<div class="comment-top">
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a>${comment.commentName}</a>
|
||||
<#else>
|
||||
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 11);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">
|
||||
${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<#if article.commentable>
|
||||
<div class="reply">
|
||||
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="comment-title">
|
||||
${postCommentsLabel}
|
||||
</div>
|
||||
<table id="commentForm" class="comment" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="200px">
|
||||
<span class="comment-label">
|
||||
${commentNameLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${commentEmailLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${commentURLLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${commentEmotionsLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td id="emotions">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
<span class="comment-label">
|
||||
${commentContentLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td>
|
||||
<textarea rows="10" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="comment-label">
|
||||
${captchaLabel}
|
||||
</span>
|
||||
<span class="arrow-right"></span>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span style="margin-top: 20px;" class="right error-msg" id="commentErrorTip"></span>
|
||||
<input id="submitCommentButton" type="button" onclick="page.submitComment();" value="${submmitCommentLabel}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId + '">'
|
||||
+ '<img class="left" alt="' + $("#commentName" + state).val() + '" src="' + result.commentThumbnailURL
|
||||
+ '"/><div class="comment-panel left"><div class="comment-top">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId + " .comment-top a").first().text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 11);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += ' ' + result.commentDate
|
||||
+ '</div><div class="comment-content">' + Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div><div class="clear"></div><div class="reply"><a rel="nofollow" href="javascript:replyTo(\'' + result.oId + '\');">${replyLabel}</a>'
|
||||
+ '</div></div><div class="clear"></div></div>';
|
||||
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table width='100%' cellspacing='0' cellpadding='0' class='comment' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
@ -1,172 +1,170 @@
|
||||
<#macro comments commentList article>
|
||||
<div class="comments" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment-body">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<div>
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a class="left" title="${comment.commentName}">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a href="${comment.commentURL}" target="_blank" title="${comment.commentName}">${comment.commentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<div class="left">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 3);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
<a rel="nofollow" class="no-underline"
|
||||
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
<div class="clear">
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="208px">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
<td colspan="2" width="400px">
|
||||
${commentNameLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
${commentEmailLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
${commentURLLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="3">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
</td>
|
||||
<td>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th align="right">
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right">
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<div><img alt="' + $("#commentName" + state).val() +
|
||||
'" src="' + result.commentThumbnailURL + '"/></div>' + result.replyNameHTML;
|
||||
|
||||
commentHTML += '</div><div class="left comment-info"><div class="left">' + result.commentDate;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-author>a").text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 3);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += '</div><div class="right"> <a rel="nofollow" class="no-underline" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div><div class="clear"></div><div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><div class="clear"></div></div></div>';
|
||||
|
||||
$("#comments").addClass("comments");
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
if ($("#comments div").length === 0) {
|
||||
$("#comments").removeClass("comments");
|
||||
}
|
||||
page.load();
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<div class="comments" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment-body">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<div>
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a class="left" title="${comment.commentName}">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a href="${comment.commentURL}" target="_blank" title="${comment.commentName}">${comment.commentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<div class="left">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 3);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
<a rel="nofollow" class="no-underline"
|
||||
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
<div class="clear">
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="208px">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
<td width="400px">
|
||||
${commentNameLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
<td>
|
||||
${commentEmailLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
<td>
|
||||
${commentURLLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
</td>
|
||||
<td>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<span style="line-height: 22px;" class="error-msg" id="commentErrorTip"></span>
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<div><img alt="' + $("#commentName" + state).val() +
|
||||
'" src="' + result.commentThumbnailURL + '"/></div>' + result.replyNameHTML;
|
||||
|
||||
commentHTML += '</div><div class="left comment-info"><div class="left">' + result.commentDate;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-author>a").text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 3);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += '</div><div class="right"> <a rel="nofollow" class="no-underline" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div><div class="clear"></div><div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><div class="clear"></div></div></div>';
|
||||
|
||||
$("#comments").addClass("comments");
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
if ($("#comments div").length === 0) {
|
||||
$("#comments").removeClass("comments");
|
||||
}
|
||||
page.load();
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
@ -1,170 +1,168 @@
|
||||
<#macro comments commentList article>
|
||||
<div class="comments" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment-body">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<div>
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a title="${comment.commentName}">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a title="${comment.commentName}" href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<div class="left">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 3);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="right">
|
||||
<#if article.commentable>
|
||||
<a rel="nofollow" class="no-underline" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="208px">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
<td colspan="2" width="400px">
|
||||
${commentNameLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
${commentEmailLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
${commentURLLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="3">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
</td>
|
||||
<td>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th align="right">
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right">
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<div><img alt="' + $("#commentName" + state).val() + '" src="' +
|
||||
result.commentThumbnailURL + '"/></div>' + result.replyNameHTML;
|
||||
|
||||
commentHTML += '</div><div class="left comment-info"><div class="left">' + result.commentDate;
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-author a").text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 3);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
commentHTML += '</div><div class="right"> <a rel="nofollow" class="no-underline" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div><div class="clear"></div><div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><div class="clear"></div></div></div>';
|
||||
|
||||
$("#comments").addClass("comments");
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
|
||||
if ($("#comments div").length === 0) {
|
||||
$("#comments").removeClass("comments");
|
||||
}
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<div class="comments" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment-body">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<div>
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a title="${comment.commentName}">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a title="${comment.commentName}" href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<div class="left">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 3);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="right">
|
||||
<#if article.commentable>
|
||||
<a rel="nofollow" class="no-underline" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="208px">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
<td width="400px">
|
||||
${commentNameLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
<td>
|
||||
${commentEmailLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
<td>
|
||||
${commentURLLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
</td>
|
||||
<td>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<div><img alt="' + $("#commentName" + state).val() + '" src="' +
|
||||
result.commentThumbnailURL + '"/></div>' + result.replyNameHTML;
|
||||
|
||||
commentHTML += '</div><div class="left comment-info"><div class="left">' + result.commentDate;
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-author a").text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 3);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
commentHTML += '</div><div class="right"> <a rel="nofollow" class="no-underline" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div><div class="clear"></div><div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><div class="clear"></div></div></div>';
|
||||
|
||||
$("#comments").addClass("comments");
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
|
||||
if ($("#comments div").length === 0) {
|
||||
$("#comments").removeClass("comments");
|
||||
}
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
@ -1,168 +1,166 @@
|
||||
<#macro comments commentList article>
|
||||
<div class="share">
|
||||
<a class="share-comment" href="#commentForm">
|
||||
${commentList?size} ${commentLabel}
|
||||
</a>
|
||||
<span class="clear"></span>
|
||||
</div>
|
||||
<div id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="<#if comment_index % 2 == 0>comment-even<#else>comment-odd</#if>">
|
||||
<img class="comment-header" title="${comment.commentName}"
|
||||
alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
<div class="comment-panel">
|
||||
<div class="left">
|
||||
<#if "http://" == comment.commentURL>
|
||||
${comment.commentName}
|
||||
<#else>
|
||||
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
<#if comment.isReply> @
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 20);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
|
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
</div>
|
||||
</#if>
|
||||
<span class="clear"></span>
|
||||
<div class="article-body">${comment.commentContent}</div>
|
||||
</div>
|
||||
<span class="clear"></span>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="form">
|
||||
<h4>${postCommentsLabel}</h4>
|
||||
<table id="commentForm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
<label for="commentName">${commentNameLabel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
<label for="commentEmail">${commentEmailLabel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentURL"/>
|
||||
<label for="commentURL">${commentURLLabel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th>
|
||||
<span class="tip" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticlesLabel}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var oddEven = "";
|
||||
if ($("#comments>div").first().hasClass("comment-even")) {
|
||||
oddEven = "comment-odd";
|
||||
} else {
|
||||
oddEven = "comment-even";
|
||||
}
|
||||
var commentHTML = '<div id="' + result.oId + '" class="oddEven"><img class="comment-header" \
|
||||
title="' + $("#commentName" + state).val() + '" alt="' + $("#commentName" + state).val() +
|
||||
'" src="' + result.commentThumbnailURL + '"/><div class="comment-panel"><div class="left">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId + " .comment-panel>.left a").first().text();
|
||||
commentHTML += ' @ <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"><a rel="nofollow" href="javascript:replyTo(\'' + result.oId
|
||||
+ '\');">${replyLabel}</a>' + ' | ' + result.commentDate
|
||||
+ '</div><span class="clear"></span><div class="article-body">' +
|
||||
Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><span class="clear"></span></div>';
|
||||
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
$("#replyForm label").each(function () {
|
||||
$this = $(this);
|
||||
$this.attr("for", $this.attr("for") + "Reply");
|
||||
});
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .article-body");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<div class="share">
|
||||
<a class="share-comment" href="#commentForm">
|
||||
${commentList?size} ${commentLabel}
|
||||
</a>
|
||||
<span class="clear"></span>
|
||||
</div>
|
||||
<div id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="<#if comment_index % 2 == 0>comment-even<#else>comment-odd</#if>">
|
||||
<img class="comment-header" title="${comment.commentName}"
|
||||
alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
<div class="comment-panel">
|
||||
<div class="left">
|
||||
<#if "http://" == comment.commentURL>
|
||||
${comment.commentName}
|
||||
<#else>
|
||||
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
<#if comment.isReply> @
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 20);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
|
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
</div>
|
||||
</#if>
|
||||
<span class="clear"></span>
|
||||
<div class="article-body">${comment.commentContent}</div>
|
||||
</div>
|
||||
<span class="clear"></span>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="form">
|
||||
<h4>${postCommentsLabel}</h4>
|
||||
<table id="commentForm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
<label for="commentName">${commentNameLabel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
<label for="commentEmail">${commentEmailLabel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
<label for="commentURL">${commentURLLabel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="tip" id="commentErrorTip"></span>
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticlesLabel}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var oddEven = "";
|
||||
if ($("#comments>div").first().hasClass("comment-even")) {
|
||||
oddEven = "comment-odd";
|
||||
} else {
|
||||
oddEven = "comment-even";
|
||||
}
|
||||
var commentHTML = '<div id="' + result.oId + '" class="oddEven"><img class="comment-header" \
|
||||
title="' + $("#commentName" + state).val() + '" alt="' + $("#commentName" + state).val() +
|
||||
'" src="' + result.commentThumbnailURL + '"/><div class="comment-panel"><div class="left">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId + " .comment-panel>.left a").first().text();
|
||||
commentHTML += ' @ <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"><a rel="nofollow" href="javascript:replyTo(\'' + result.oId
|
||||
+ '\');">${replyLabel}</a>' + ' | ' + result.commentDate
|
||||
+ '</div><span class="clear"></span><div class="article-body">' +
|
||||
Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><span class="clear"></span></div>';
|
||||
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
$("#replyForm label").each(function () {
|
||||
$this = $(this);
|
||||
$this.attr("for", $this.attr("for") + "Reply");
|
||||
});
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .article-body");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
@ -1,172 +1,170 @@
|
||||
<#macro comments commentList article>
|
||||
<div class="comments" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment-body">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<div>
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a title="${comment.commentName}" name="${comment.oId}">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a title="${comment.commentName}" name="${comment.oId}" href="${comment.commentURL}"
|
||||
target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<div class="left">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 3);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
<a rel="nofollow" class="no-underline"
|
||||
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
<div class="clear">
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="208px">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
<td colspan="2" width="400px">
|
||||
${commentNameLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
${commentEmailLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentURL"/>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
${commentURLLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="3">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
</td>
|
||||
<td>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<th align="right">
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right">
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<div><img alt="' + $("#commentName" + state).val() +
|
||||
'" src="' + result.commentThumbnailURL + '"/></div>' + result.replyNameHTML;
|
||||
|
||||
commentHTML += '</div><div class="left comment-info"><div class="left">' + result.commentDate;
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-author a").text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 3);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
commentHTML += '</div><div class="right"> <a rel="nofollow" class="no-underline" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div><div class="clear"></div><div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><div class="clear"></div></div></div>';
|
||||
|
||||
$("#comments").addClass("comments");
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
if ($("#comments div").length === 0) {
|
||||
$("#comments").removeClass("comments");
|
||||
}
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<div class="comments" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment-body">
|
||||
<div class="comment-panel">
|
||||
<div class="left comment-author">
|
||||
<div>
|
||||
<img alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
</div>
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a title="${comment.commentName}" name="${comment.oId}">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a title="${comment.commentName}" name="${comment.oId}" href="${comment.commentURL}"
|
||||
target="_blank">${comment.commentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left comment-info">
|
||||
<div class="left">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<#if comment.isReply>
|
||||
@
|
||||
<a href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 3);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
<a rel="nofollow" class="no-underline"
|
||||
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
<div class="clear">
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<table id="commentForm" class="comment-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="208px">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
<td width="400px">
|
||||
${commentNameLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
<td>
|
||||
${commentEmailLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentURL"/>
|
||||
</td>
|
||||
<td>
|
||||
${commentURLLabel}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
</td>
|
||||
<td>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId
|
||||
+ '" class="comment-body"><div class="comment-panel"><div class="left comment-author">'
|
||||
+ '<div><img alt="' + $("#commentName" + state).val() +
|
||||
'" src="' + result.commentThumbnailURL + '"/></div>' + result.replyNameHTML;
|
||||
|
||||
commentHTML += '</div><div class="left comment-info"><div class="left">' + result.commentDate;
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-author a").text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 3);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
commentHTML += '</div><div class="right"> <a rel="nofollow" class="no-underline" href="javascript:replyTo(\''
|
||||
+ result.oId + '\');">${replyLabel}</a>'
|
||||
+'</div><div class="clear"></div><div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div></div><div class="clear"></div></div></div>';
|
||||
|
||||
$("#comments").addClass("comments");
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
|
||||
page.addReplyForm(id, commentFormHTML);
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
if ($("#comments div").length === 0) {
|
||||
$("#comments").removeClass("comments");
|
||||
}
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
@ -1,184 +1,182 @@
|
||||
<#macro comments commentList article>
|
||||
<div class="comments-header"></div>
|
||||
<div class="comments marginTop12" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment">
|
||||
<div class="comment-panel">
|
||||
<div class="comment-top"></div>
|
||||
<div class="comment-body">
|
||||
<div class="comment-title">
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a name="${comment.oId}" class="left">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a name="${comment.oId}" href="${comment.commentURL}"
|
||||
target="_blank" class="left">${comment.commentName}</a>
|
||||
</#if>
|
||||
<#if comment.isReply>
|
||||
@ <a
|
||||
href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 17);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<a rel="nofollow" class="no-underline"
|
||||
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div>
|
||||
<img class="comment-picture left" alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="comments">
|
||||
<div class="comment-top"></div>
|
||||
<div class="comment-body">
|
||||
<div class="comment-title">
|
||||
<a>${postCommentsLabel}</a>
|
||||
</div>
|
||||
<table id="commentForm" class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
${commentName1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentEmail1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentURL1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="3">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
${commentContent1Label}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
${captcha1Label}
|
||||
</th>
|
||||
<td valign="top" style="min-width: 190px;">
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
<td>
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right">
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="comment-bottom"></div>
|
||||
</div>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId + '" class="comment"><div class="comment-panel">'
|
||||
+ '<div class="comment-top"></div><div class="comment-body"><div class="comment-title">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-title a").first().text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 17);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += '<div class="right">' + result.commentDate
|
||||
+ ' <a rel="nofollow" class="no-underline" href="javascript:replyTo(\'' + result.oId + '\');">${replyLabel}</a>'
|
||||
+ '</div><div class="clear"></div></div><div><img alt="' + $("#commentName" + state).val()
|
||||
+ '" src="' + result.commentThumbnailURL + '" class="comment-picture left"/>'
|
||||
+ '<div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div>'
|
||||
+ ' <div class="clear"></div></div></div><div class="comment-bottom"></div></div></div>';
|
||||
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<div id='replyForm'><div class='comment-top'></div>"
|
||||
+ "<div class='comment-body'><table class='form comment-reply'>";
|
||||
|
||||
page.addReplyForm(id, commentFormHTML, "</div><div class='comment-bottom'></div></div>");
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
<#macro comments commentList article>
|
||||
<div class="comments-header"></div>
|
||||
<div class="comments marginTop12" id="comments">
|
||||
<#list commentList as comment>
|
||||
<div id="${comment.oId}" class="comment">
|
||||
<div class="comment-panel">
|
||||
<div class="comment-top"></div>
|
||||
<div class="comment-body">
|
||||
<div class="comment-title">
|
||||
<#if "http://" == comment.commentURL>
|
||||
<a name="${comment.oId}" class="left">${comment.commentName}</a>
|
||||
<#else>
|
||||
<a name="${comment.oId}" href="${comment.commentURL}"
|
||||
target="_blank" class="left">${comment.commentName}</a>
|
||||
</#if>
|
||||
<#if comment.isReply>
|
||||
@ <a
|
||||
href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
|
||||
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 17);"
|
||||
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
|
||||
</#if>
|
||||
<#if article.commentable>
|
||||
<div class="right">
|
||||
${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
|
||||
<a rel="nofollow" class="no-underline"
|
||||
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
|
||||
</div>
|
||||
</#if>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div>
|
||||
<img class="comment-picture left" alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
|
||||
<div class="comment-content">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
<#if article.commentable>
|
||||
<div class="comments">
|
||||
<div class="comment-top"></div>
|
||||
<div class="comment-body">
|
||||
<div class="comment-title">
|
||||
<a>${postCommentsLabel}</a>
|
||||
</div>
|
||||
<table id="commentForm" class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
${commentName1Label}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentName"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentEmail1Label}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" class="normalInput" id="commentEmail"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
${commentURL1Label}
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="commentURL"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="emotions" colspan="2">
|
||||
<span class="em00" title="${em00Label}"></span>
|
||||
<span class="em01" title="${em01Label}"></span>
|
||||
<span class="em02" title="${em02Label}"></span>
|
||||
<span class="em03" title="${em03Label}"></span>
|
||||
<span class="em04" title="${em04Label}"></span>
|
||||
<span class="em05" title="${em05Label}"></span>
|
||||
<span class="em06" title="${em06Label}"></span>
|
||||
<span class="em07" title="${em07Label}"></span>
|
||||
<span class="em08" title="${em08Label}"></span>
|
||||
<span class="em09" title="${em09Label}"></span>
|
||||
<span class="em10" title="${em10Label}"></span>
|
||||
<span class="em11" title="${em11Label}"></span>
|
||||
<span class="em12" title="${em12Label}"></span>
|
||||
<span class="em13" title="${em13Label}"></span>
|
||||
<span class="em14" title="${em14Label}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
${commentContent1Label}
|
||||
</th>
|
||||
<td>
|
||||
<textarea rows="10" cols="96" id="comment"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign="top">
|
||||
${captcha1Label}
|
||||
</th>
|
||||
<td valign="top" style="min-width: 190px;">
|
||||
<input type="text" class="normalInput" id="commentValidate"/>
|
||||
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<span class="error-msg" id="commentErrorTip"></span>
|
||||
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="comment-bottom"></div>
|
||||
</div>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro comment_script oId>
|
||||
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var page = new Page({
|
||||
"nameTooLongLabel": "${nameTooLongLabel}",
|
||||
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
|
||||
"mailInvalidLabel": "${mailInvalidLabel}",
|
||||
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
|
||||
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
|
||||
"captchaErrorLabel": "${captchaErrorLabel}",
|
||||
"loadingLabel": "${loadingLabel}",
|
||||
"oId": "${oId}",
|
||||
"skinDirName": "${skinDirName}",
|
||||
"blogHost": "${blogHost}",
|
||||
"randomArticles1Label": "${randomArticles1Label}",
|
||||
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
|
||||
});
|
||||
|
||||
var addComment = function (result, state) {
|
||||
var commentHTML = '<div id="' + result.oId + '" class="comment"><div class="comment-panel">'
|
||||
+ '<div class="comment-top"></div><div class="comment-body"><div class="comment-title">' + result.replyNameHTML;
|
||||
|
||||
if (state !== "") {
|
||||
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-title a").first().text();
|
||||
commentHTML += ' @ <a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
|
||||
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 17);"'
|
||||
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
|
||||
}
|
||||
|
||||
commentHTML += '<div class="right">' + result.commentDate
|
||||
+ ' <a rel="nofollow" class="no-underline" href="javascript:replyTo(\'' + result.oId + '\');">${replyLabel}</a>'
|
||||
+ '</div><div class="clear"></div></div><div><img alt="' + $("#commentName" + state).val()
|
||||
+ '" src="' + result.commentThumbnailURL + '" class="comment-picture left"/>'
|
||||
+ '<div class="comment-content">'
|
||||
+ Util.replaceEmString($("#comment" + state).val().replace(/</g, "<").replace(/>/g, ">").replace(/\n/g,"<br/>"))
|
||||
+ '</div>'
|
||||
+ ' <div class="clear"></div></div></div><div class="comment-bottom"></div></div></div>';
|
||||
|
||||
return commentHTML;
|
||||
}
|
||||
|
||||
var replyTo = function (id) {
|
||||
var commentFormHTML = "<div id='replyForm'><div class='comment-top'></div>"
|
||||
+ "<div class='comment-body'><table class='form comment-reply'>";
|
||||
|
||||
page.addReplyForm(id, commentFormHTML, "</div><div class='comment-bottom'></div></div>");
|
||||
};
|
||||
|
||||
(function () {
|
||||
page.load();
|
||||
// emotions
|
||||
page.replaceCommentsEm("#comments .comment-content");
|
||||
<#nested>
|
||||
})();
|
||||
</script>
|
||||
</#macro>
|
Loading…
x
Reference in New Issue
Block a user