|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<% if @controller_name=='ActivityNotifys' %>
|
|
|
|
|
<a class="fl about_me" href="<%=course_path(@course)%>"><%= l(:label_activity)%></a>
|
|
|
|
|
<h2 class="fl project_h2">与我相关</h2>
|
|
|
|
|
<a class="fl about_me" style="width:80px;" href="<%=course_path(@course)%>"><%= l(:label_activity)%></a>
|
|
|
|
|
<h2 class="fl project_h2" style="width:100px;">与我相关
|
|
|
|
|
<span class="c_orange f12" style="display:none;">(<font id="new_notify_count"><%=get_new_notify_count(@course,'Course')%></font>)</span>
|
|
|
|
|
</h2>
|
|
|
|
|
<div class="fr mt10 mr5 c_grey02">
|
|
|
|
|
<a class="c_dblue">
|
|
|
|
|
<label class="mr5" style="cursor:pointer;" data-href="<%= course_activity_notifys_path(@course) %>/chang_read_flag" nhname='nh_act_link_all'>全部标为已读</label>
|
|
|
|
@ -10,7 +12,9 @@
|
|
|
|
|
<% else %>
|
|
|
|
|
<h2 class="fl project_h2"><%= l(:label_activity)%></h2>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<a class="fl about_me" href="<%=course_activity_notifys_path(@course)%>">与我相关</a>
|
|
|
|
|
<a class="fl about_me" href="<%=course_activity_notifys_path(@course)%>">与我相关
|
|
|
|
|
<span class="c_orange f12" style="display:none;">(<font id="new_notify_count"><%=get_new_notify_count(@course,'Course')%></font>)</span>
|
|
|
|
|
</a>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
@ -80,6 +84,14 @@
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function(){
|
|
|
|
|
function nh_new_notify_count_show(){
|
|
|
|
|
var new_notify_count = $("#new_notify_count").html();
|
|
|
|
|
if(new_notify_count>0){
|
|
|
|
|
$("#new_notify_count").parent('span').show();
|
|
|
|
|
}else{
|
|
|
|
|
$("#new_notify_count").parent('span').hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$("div[nhname='container']").each(function(){
|
|
|
|
|
var container = $(this);
|
|
|
|
|
var btn = $("a[nhname='nh_act_link']",container);
|
|
|
|
@ -92,6 +104,8 @@
|
|
|
|
|
$.ajax({url:url,dataType:'text',success:function(data){
|
|
|
|
|
if(data == 'true'){
|
|
|
|
|
flag.remove();
|
|
|
|
|
$("#new_notify_count").html($("#new_notify_count").html()-1);
|
|
|
|
|
nh_new_notify_count_show();
|
|
|
|
|
}
|
|
|
|
|
}});
|
|
|
|
|
}
|
|
|
|
@ -104,8 +118,11 @@
|
|
|
|
|
$.ajax({url:url,dataType:'text',success:function(data){
|
|
|
|
|
if(data == 'true'){
|
|
|
|
|
$("span[nhname='nh_act_flag']").remove();
|
|
|
|
|
$("#new_notify_count").html('0');
|
|
|
|
|
nh_new_notify_count_show();
|
|
|
|
|
}
|
|
|
|
|
}});
|
|
|
|
|
});
|
|
|
|
|
nh_new_notify_count_show();
|
|
|
|
|
});
|
|
|
|
|
</script>
|