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