...
|
...
|
@@ -72,7 +72,7 @@ require("./login"); |
|
|
commentsItem = '';
|
|
|
commentsList.prependTo(that.$element);
|
|
|
|
|
|
if(data.length == 0) return;
|
|
|
if(data.length === 0) return;
|
|
|
var total = data.total,
|
|
|
viewMoreNum = total-5;
|
|
|
viewMore = $('<div class="view-more"><a href="javascript:;">View <span>'+viewMoreNum+'</span> more</a></div>'),
|
...
|
...
|
@@ -82,29 +82,29 @@ require("./login"); |
|
|
|
|
|
|
|
|
for (var i = 0; i < commentLen; i++){
|
|
|
if(commentArr[i].isSelf == true){
|
|
|
commentsItem = $('<li class="clearfix">\n\
|
|
|
<div class="userimg">\n\
|
|
|
<img src="'+commentArr[i].userimg+'" alt="">\n\
|
|
|
<i class="'+commentArr[i].partnerType+'"></i>\n\
|
|
|
</div>\n\
|
|
|
<div class="userinfo">\n\
|
|
|
<h6>'+commentArr[i].username+'</h6>\n\
|
|
|
<p class="comment-text">'+commentArr[i].content+'</p>\n\
|
|
|
<a class="delete-comment" href="javascript:;" pid="'+commentArr[i].id+'"></a>\n\
|
|
|
</div>\n\
|
|
|
</li>');
|
|
|
if(commentArr[i].isSelf === true){
|
|
|
commentsItem = $('<li class="clearfix">'+
|
|
|
'<div class="userimg">'+
|
|
|
'<img src="'+commentArr[i].userimg+'" alt="">'+
|
|
|
'<i class="'+commentArr[i].partnerType+'"></i>'+
|
|
|
'</div>'+
|
|
|
'<div class="userinfo">'+
|
|
|
'<h6>'+commentArr[i].username+'</h6>'+
|
|
|
'<p class="comment-text">'+commentArr[i].content+'</p>'+
|
|
|
'<a class="delete-comment" href="javascript:;" pid="'+commentArr[i].id+'"></a>'+
|
|
|
'</div>'+
|
|
|
'</li>');
|
|
|
}else{
|
|
|
commentsItem = $('<li class="clearfix">\n\
|
|
|
<div class="userimg">\n\
|
|
|
<img src="'+commentArr[i].userimg+'" alt="">\n\
|
|
|
<i class="'+commentArr[i].partnerType+'"></i>\n\
|
|
|
</div>\n\
|
|
|
<div class="userinfo">\n\
|
|
|
<h6>'+commentArr[i].username+'</h6>\n\
|
|
|
<p class="comment-text">'+commentArr[i].content+'</p>\n\
|
|
|
</div>\n\
|
|
|
</li>');
|
|
|
commentsItem = $('<li class="clearfix">'+
|
|
|
'<div class="userimg">'+
|
|
|
'<img src="'+commentArr[i].userimg+'" alt="">'+
|
|
|
'<i class="'+commentArr[i].partnerType+'"></i>'+
|
|
|
'</div>'+
|
|
|
'<div class="userinfo">'+
|
|
|
'<h6>'+commentArr[i].username+'</h6>'+
|
|
|
'<p class="comment-text">'+commentArr[i].content+'</p>'+
|
|
|
'</div>'+
|
|
|
'</li>');
|
|
|
}
|
|
|
commentsList.append(commentsItem);
|
|
|
}
|
...
|
...
|
@@ -118,8 +118,8 @@ require("./login"); |
|
|
$(".view-more").find("span").text(num+'k+');
|
|
|
}else if(string.length == 5){
|
|
|
$(".view-more").find("span").text(num+'w+');
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
if(data.page){
|
|
|
var commentPage = data.page;
|
...
|
...
|
@@ -138,19 +138,19 @@ require("./login"); |
|
|
_creatTextareaDom:function(){
|
|
|
data = this.options.login;
|
|
|
var textarea = $('<div class="comment-textarea"><textarea placeholder="'+tips.getTips("textareaPlaceholder")+'" cid='+this.options.cid+'></textarea></div>'),
|
|
|
loginarea = $('<div class="login-status clearfix">\n\
|
|
|
<div class="userimg">\n\
|
|
|
<img src="'+YohoConfig.resUrl+'/res/new/boys/images/detail/user-img.png" alt="">\n\
|
|
|
<i></i>\n\
|
|
|
</div>\n\
|
|
|
<div class="userinfo">\n\
|
|
|
<span></span>\n\
|
|
|
<a class="exit-btn" href="javascript:;">退出</a>\n\
|
|
|
</div>\n\
|
|
|
<div class="publish">\n\
|
|
|
<a class="publish-btn" href="javascript:;">Publish</a>\n\
|
|
|
</div>\n\
|
|
|
</div>');
|
|
|
loginarea = $('<div class="login-status clearfix">'+
|
|
|
'<div class="userimg">'+
|
|
|
'<img src="'+YohoConfig.resUrl+'/res/new/boys/images/detail/user-img.png" alt="">'+
|
|
|
'<i></i>'+
|
|
|
'</div>'+
|
|
|
'<div class="userinfo">'+
|
|
|
'<span></span>'+
|
|
|
'<a class="exit-btn" href="javascript:;">退出</a>'+
|
|
|
'</div>'+
|
|
|
'<div class="publish">'+
|
|
|
'<a class="publish-btn" href="javascript:;">Publish</a>'+
|
|
|
'</div>'+
|
|
|
'</div>');
|
|
|
textarea.appendTo(this.$element);
|
|
|
loginarea.appendTo(textarea);
|
|
|
if(this.options.isFeedback){
|
...
|
...
|
@@ -166,20 +166,20 @@ require("./login"); |
|
|
_creatFeedbackLogin:function(){
|
|
|
var $feedbackLogin = '';
|
|
|
if(tips.isJian){
|
|
|
$feedbackLogin = $('<div class="feedback-login clearfix">\n\
|
|
|
<span>'+tips.getTips("thirdLoginFeedback")+'</span>\n\
|
|
|
<a class="qq" ref="/passport/partner/index/oauth/qq" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-qq.png" alt="" /></a>\n\
|
|
|
<a class="yoho" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-yoho.png" alt="" /></a>\n\
|
|
|
<a class="sina" ref="/passport/partner/index/oauth/sina" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-sina.png" alt="" /></a>\n\
|
|
|
</div>');
|
|
|
$feedbackLogin = $('<div class="feedback-login clearfix">'+
|
|
|
'<span>'+tips.getTips("thirdLoginFeedback")+'</span>'+
|
|
|
'<a class="qq" ref="/passport/partner/index/oauth/qq" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-qq.png" alt="" /></a>'+
|
|
|
'<a class="yoho" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-yoho.png" alt="" /></a>'+
|
|
|
'<a class="sina" ref="/passport/partner/index/oauth/sina" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-sina.png" alt="" /></a>'+
|
|
|
'</div>');
|
|
|
}else{
|
|
|
$feedbackLogin = $('<div class="feedback-login clearfix">\n\
|
|
|
<span>'+tips.getTips("thirdLoginFeedback")+'</span>\n\
|
|
|
<a class="fb" ref="/passport/partner/index/oauth/facebook" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-facebook.png" alt="" /></a>\n\
|
|
|
<a class="yoho" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-yoho.png" alt="" /></a>\n\
|
|
|
<a class="sina" ref="/passport/partner/index/oauth/sina" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-sina.png" alt="" /></a>\n\
|
|
|
<a class="qq" ref="/passport/partner/index/oauth/qq" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-qq.png" alt="" /></a>\n\
|
|
|
</div>');
|
|
|
$feedbackLogin = $('<div class="feedback-login clearfix">'+
|
|
|
'<span>'+tips.getTips("thirdLoginFeedback")+'</span>'+
|
|
|
'<a class="fb" ref="/passport/partner/index/oauth/facebook" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-facebook.png" alt="" /></a>'+
|
|
|
'<a class="yoho" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-yoho.png" alt="" /></a>'+
|
|
|
'<a class="sina" ref="/passport/partner/index/oauth/sina" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-sina.png" alt="" /></a>'+
|
|
|
'<a class="qq" ref="/passport/partner/index/oauth/qq" href="javascript:;"><img src="'+YohoConfig.resUrl+'/res/new/boys/images/about/thirdbtn-qq.png" alt="" /></a>'+
|
|
|
'</div>');
|
|
|
}
|
|
|
$feedbackLogin.appendTo(this.$element);
|
|
|
},
|
...
|
...
|
@@ -286,7 +286,7 @@ require("./login"); |
|
|
'</div>'+
|
|
|
'</li>';
|
|
|
}
|
|
|
if($target.find("li").size()==0){
|
|
|
if($target.find("li").size()===0){
|
|
|
$target.html(commentItem);
|
|
|
}else{
|
|
|
$target.find("li").eq(0).before(commentItem);
|
...
|
...
|
@@ -302,7 +302,7 @@ require("./login"); |
|
|
var comments = 1;
|
|
|
if(!!parseInt(that.options.commentNum.eq(0).text())){
|
|
|
comments = parseInt(that.options.commentNum.eq(0).text())+1;
|
|
|
};
|
|
|
}
|
|
|
that.options.commentNum.text(comments);
|
|
|
}
|
|
|
else if(900000 == response.code){
|
...
|
...
|
@@ -337,29 +337,29 @@ require("./login"); |
|
|
var pageIcon = $('<div class="channel-index-pager">'+commentPage+'</div>');
|
|
|
$(".comments-list").empty();
|
|
|
for (var i = 0; i < commentLen; i++){
|
|
|
if(commentArr[i].isSelf == true){
|
|
|
commentsItem = $('<li class="clearfix">\n\
|
|
|
<div class="userimg">\n\
|
|
|
<img src="'+commentArr[i].userimg+'" alt="">\n\
|
|
|
<i class="'+commentArr[i].partnerType+'"></i>\n\
|
|
|
</div>\n\
|
|
|
<div class="userinfo">\n\
|
|
|
<h6>'+commentArr[i].username+'</h6>\n\
|
|
|
<p class="comment-text">'+commentArr[i].content+'</p>\n\
|
|
|
<a class="delete-comment" href="javascript:;" pid="'+commentArr[i].id+'"></a>\n\
|
|
|
</div>\n\
|
|
|
</li>');
|
|
|
if(commentArr[i].isSelf === true){
|
|
|
commentsItem = $('<li class="clearfix">'+
|
|
|
'<div class="userimg">'+
|
|
|
'<img src="'+commentArr[i].userimg+'" alt="">'+
|
|
|
'<i class="'+commentArr[i].partnerType+'"></i>'+
|
|
|
'</div>'+
|
|
|
'<div class="userinfo">'+
|
|
|
'<h6>'+commentArr[i].username+'</h6>'+
|
|
|
'<p class="comment-text">'+commentArr[i].content+'</p>'+
|
|
|
'<a class="delete-comment" href="javascript:;" pid="'+commentArr[i].id+'"></a>'+
|
|
|
'</div>'+
|
|
|
'</li>');
|
|
|
}else{
|
|
|
commentsItem = $('<li class="clearfix">\n\
|
|
|
<div class="userimg">\n\
|
|
|
<img src="'+commentArr[i].userimg+'" alt="">\n\
|
|
|
<i class="'+commentArr[i].partnerType+'"></i>\n\
|
|
|
</div>\n\
|
|
|
<div class="userinfo">\n\
|
|
|
<h6>'+commentArr[i].username+'</h6>\n\
|
|
|
<p class="comment-text">'+commentArr[i].content+'</p>\n\
|
|
|
</div>\n\
|
|
|
</li>');
|
|
|
commentsItem = $('<li class="clearfix">'+
|
|
|
'<div class="userimg">'+
|
|
|
'<img src="'+commentArr[i].userimg+'" alt="">'+
|
|
|
'<i class="'+commentArr[i].partnerType+'"></i>'+
|
|
|
'</div>'+
|
|
|
'<div class="userinfo">'+
|
|
|
'<h6>'+commentArr[i].username+'</h6>'+
|
|
|
'<p class="comment-text">'+commentArr[i].content+'</p>'+
|
|
|
'</div>'+
|
|
|
'</li>');
|
|
|
}
|
|
|
$(".comments-list").append(commentsItem);
|
|
|
}
|
...
|
...
|
|