详情页面回复

This commit is contained in:
txz 2016-04-01 22:35:44 +08:00
parent 7dccb0d963
commit 0d24de7198
5 changed files with 19 additions and 19 deletions

View File

@ -27,7 +27,7 @@ module Mobile
elsif ac.act_type == "Message" || ac.act_type == "BlogComment" || ac.act_type == "JournalsForMessage"
ac.nil? || ac.act.nil? ? 0 : ac.act.children.count
elsif ac.act_type == "Issue"
ac.nil? || ac.act.nil? ? 0 : ac.act.journals.count
ac.nil? || ac.act.nil? ? 0 : ac.act.journals.where("notes != null").count
end
when :subject
if ac.act_type == "HomeworkCommon"

View File

@ -23,7 +23,7 @@ module Mobile
when :issue_status
IssueStatus.find(issue.status_id).name
when :journals_count
issue.journals.count
issue.journals.where("notes != null").count
when :project_name
issue.project.name
end

View File

@ -66,7 +66,7 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" onclick="window.open('course_notice.html?id=<!=activities[i].act_id!>');" class="c-grey">回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" <!--onclick="window.open('course_notice.html?id=<!=activities[i].act_id!>');"--> class="c-grey">回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div>
</div>
@ -88,7 +88,7 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" onclick="window.open('course_discussion.html?id=<!=activities[i].act_id!>');" class="c-grey">回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" <!--onclick="window.open('course_discussion.html?id=<!=activities[i].act_id!>');"--> class="c-grey">回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div>
</div>
@ -148,7 +148,7 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" onclick="window.open('project_discussion.html?id=<!=activities[i].act_id!>');" class="c-grey"> 回复 (<!=activities[i].reply_count!>) </a></div>
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" <!--onclick="window.open('project_discussion.html?id=<!=activities[i].act_id!>');"--> class="c-grey"> 回复 (<!=activities[i].reply_count!>) </a></div>
<div class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div>
</div>
@ -182,7 +182,7 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" onclick="window.open('message_detail.html?id=<!=activities[i].act_id!>');" class="c-grey"> 回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" <!--onclick="window.open('message_detail.html?id=<!=activities[i].act_id!>');"--> class="c-grey"> 回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div>
</div>
@ -205,7 +205,7 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" onclick="window.open('blog_detail.html?id=<!=activities[i].act_id!>');" class="c-grey"> 回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" <!--onclick="window.open('blog_detail.html?id=<!=activities[i].act_id!>');"--> class="c-grey"> 回复 (<!=activities[i].reply_count!>)</a></div>
<div class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div>
</div>

View File

@ -17,9 +17,9 @@ $(document).ready(function(){
$('.post-reply-submit').click(function(){
replyInsert();
});
$('post-interactive-praise').click(function(){
/*$('post-interactive-praise').click(function(){
praiseClick();
});
});*/
};
var loadDataFromServer = function(id){
@ -85,11 +85,11 @@ $(document).ready(function(){
};
//点赞效果
var praiseClick = function(){
/*var praiseClick = function(){
var praiseNum = $(".post-interactive-praise").text().match(/\d+/g);
praiseNum++;
$(".praise-num").text("(" + praiseNum + ")");
};
};*/
});

View File

@ -20,9 +20,9 @@ $(document).ready(function(){
$('.post-reply-submit').click(function(){
replyInsert();
});
$('post-interactive-praise').click(function(){
/*$('post-interactive-praise').click(function(){
praiseClick();
});
});*/
};
var loadDataFromServer = function(id){
@ -67,14 +67,14 @@ $(document).ready(function(){
//获取并传送回复用户数据
var userInfo = {
"replyType" : "homework_assignment",
"replyContent" : postInput
"Type" : "Issue",
"Content" : postInput
};
$.ajax({
type: "POST", //提交方式
dataType: "json", //类型
url: "前台地址/后台方法", //提交的页面,方法名
url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名
data: userInfo, //参数如果没有可以为null
success: function (data) { //如果执行成功,那么执行此方法
alert(data.result); //用data.d来获取后台传过来的json语句或者是单纯的语句
@ -85,14 +85,14 @@ $(document).ready(function(){
});
}
}
};
//点赞效果
var praiseClick = function(){
/*var praiseClick = function(){
var praiseNum = $(".post-interactive-praise").text().match(/\d+/g);
praiseNum++;
$(".praise-num").text("(" + praiseNum + ")");
}
}*/
});