@oncereply 看下可以了不?

This commit is contained in:
Vanessa 2013-02-20 14:50:00 +08:00
parent 6974ac2412
commit 2c8b130ac3
2 changed files with 44 additions and 34 deletions

View File

@ -131,10 +131,16 @@ a:hover {
.article-comments{ .article-comments{
margin-bottom: 20px; margin-bottom: 20px;
position: relative;
}
.comment-body-ref {
position: absolute;
left: 86px;
width: 80%;
} }
.bs-docs-example { .bs-docs-example {
position: relative;
padding: 20px; padding: 20px;
*padding-top: 0px; *padding-top: 0px;
background-color: #fff; background-color: #fff;
@ -146,7 +152,6 @@ a:hover {
} }
.bs-docs-example-child { .bs-docs-example-child {
position: relative;
padding: 5px; padding: 5px;
*padding-top: 0px; *padding-top: 0px;
background-color: #fff; background-color: #fff;

View File

@ -2,13 +2,13 @@
<!-- comments --> <!-- comments -->
<div id="comments" class="comments article-comments"> <div id="comments" class="comments article-comments">
<#list commentList as comment> <#list commentList as comment>
<div class="media bs-docs-example-child" id="media_${comment.oId}"> <div class="media bs-docs-example-child" id="${comment.oId}">
<#if "http://" == comment.commentURL> <#if "http://" == comment.commentURL>
<a class="pull-left" title="${comment.commentName}"><img class="media-object img-polaroid" data-src="holder.js/64x64" style="width: 64px; height: 64px;" src="${comment.commentThumbnailURL}"></a> <a class="pull-left" title="${comment.commentName}"><img class="media-object img-polaroid" data-src="holder.js/64x64" style="width: 64px; height: 64px;" src="${comment.commentThumbnailURL}"></a>
<#else> <#else>
<a class="pull-left" href="${comment.commentURL}" target="_blank"><img class="media-object img-polaroid" data-src="holder.js/64x64" style="width: 64px; height: 64px;" src="${comment.commentThumbnailURL}"></a> <a class="pull-left" href="${comment.commentURL}" target="_blank"><img class="media-object img-polaroid" data-src="holder.js/64x64" style="width: 64px; height: 64px;" src="${comment.commentThumbnailURL}"></a>
</#if> </#if>
<div class="media-body" id="${comment.oId}"> <div class="media-body">
<h4 class="media-heading"> <h4 class="media-heading">
<#if "http://" == comment.commentURL> <#if "http://" == comment.commentURL>
<a>${comment.commentName}</a> <a>${comment.commentName}</a>
@ -18,12 +18,14 @@
<#if comment.isReply> <#if comment.isReply>
<i class="icon-share-alt"></i> <i class="icon-share-alt"></i>
<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}', 10);"
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a> onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
</#if> </#if>
<span class="pull-right" style="font-size: 12px;font-weight: normal;color: #676767;"> <span class="pull-right" style="font-size: 12px;font-weight: normal;color: #676767;">
<i class="icon-time"></i> ${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")} <i class="icon-time"></i>
<i class="icon-comment"></i><a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> ${comment.commentDate?string("yyyy-MM-dd HH:mm:ss")}
<i class="icon-comment"></i>
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
</span> </span>
</h4> </h4>
${comment.commentContent} ${comment.commentContent}
@ -116,7 +118,7 @@
var addComment = function (result, state) { var addComment = function (result, state) {
var html = new Array(); var html = new Array();
html.push('<div class="media bs-docs-example-child" id="media_'+result.oId+'">'); html.push('<div class="media bs-docs-example-child" id="'+result.oId+'">');
html.push('<a class="pull-left" href="#" target="_blank">'); html.push('<a class="pull-left" href="#" target="_blank">');
html.push('<img class="media-object img-polaroid" data-src="holder.js/64x64" style="width: 64px; height: 64px;" src="'+result.commentThumbnailURL+'">'); html.push('<img class="media-object img-polaroid" data-src="holder.js/64x64" style="width: 64px; height: 64px;" src="'+result.commentThumbnailURL+'">');
html.push('</a>'); html.push('</a>');
@ -124,12 +126,15 @@
html.push('<h4 class="media-heading">'); html.push('<h4 class="media-heading">');
html.push(result.replyNameHTML); html.push(result.replyNameHTML);
if (state !== "") { if (state !== "") {
var commentOriginalCommentName = $("#" + page.currentCommentId + " .media-heading a").first().text();
html.push('&nbsp;<i class="icon-share-alt"></i>'); html.push('&nbsp;<i class="icon-share-alt"></i>');
html.push('&nbsp;<a href="#'+page.currentCommentId+'">'+page.currentCommentId+'</a>'); html.push('&nbsp;<a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 20);"'
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">'+commentOriginalCommentName+'</a>');
} }
html.push('<span class="pull-right" style="font-size: 12px;font-weight: normal;color: #676767;">'); html.push('<span class="pull-right" style="font-size: 12px;font-weight: normal;color: #676767;">');
html.push('<i class="icon-time"></i> '+ result.commentDate.substring(0, 19)); html.push('<i class="icon-time"></i> '+ result.commentDate.substring(0, 19));
html.push('&nbsp;<i class="icon-comment"></i>'); html.push('&nbsp;<i class="icon-comment"></i>&nbsp;');
html.push('<a rel="nofollow" href="javascript:replyTo(\''+result.oId+'\');">${replyLabel}</a>'); html.push('<a rel="nofollow" href="javascript:replyTo(\''+result.oId+'\');">${replyLabel}</a>');
html.push('</span>'); html.push('</span>');
html.push('</h4>'); html.push('</h4>');