Merge branch 'weixin_guange' of https://git.trustie.net/jacknudt/trustieforge into weixin_guange

This commit is contained in:
cxt 2016-04-01 22:38:57 +08:00
commit cc2fe6108a
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" elsif ac.act_type == "Message" || ac.act_type == "BlogComment" || ac.act_type == "JournalsForMessage"
ac.nil? || ac.act.nil? ? 0 : ac.act.children.count ac.nil? || ac.act.nil? ? 0 : ac.act.children.count
elsif ac.act_type == "Issue" 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 end
when :subject when :subject
if ac.act_type == "HomeworkCommon" if ac.act_type == "HomeworkCommon"

View File

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

View File

@ -66,7 +66,7 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="post-interactive"> <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 class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div> </div>
</div> </div>
@ -88,7 +88,7 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="post-interactive"> <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 class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div> </div>
</div> </div>
@ -148,7 +148,7 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="post-interactive"> <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 class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div> </div>
</div> </div>
@ -182,7 +182,7 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="post-interactive"> <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 class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div> </div>
</div> </div>
@ -205,7 +205,7 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="post-interactive"> <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 class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div> </div>
</div> </div>

View File

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

View File

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