This commit is contained in:
cxt 2015-11-02 14:52:14 +08:00
commit 32eb508caa
7 changed files with 36 additions and 7 deletions

View File

@ -36,7 +36,7 @@ module CoursesHelper
#生成课程老师成员链接
def course_teacher_link teacher_num
if User.current.member_of_course?(@course) || User.current.admin?
link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue'
link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue', :id => 'teacher_number'
else
content_tag 'span',teacher_num, :class => 'info_foot_num c_blue'
end
@ -45,7 +45,7 @@ module CoursesHelper
#生成课程学生列表连接
def course_student_link student_num
if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?
link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue'
link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue', :id => "student_number"
else
content_tag 'span',student_num, :class => 'info_foot_num c_blue'
end

View File

@ -24,9 +24,9 @@
<div class="mt5">
<!--<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #269ac9;">-->
<%#= l(:label_technical_support) %>
<!--白&nbsp;&nbsp;&nbsp;羽</a>-->
<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=4fe2d63a4527cddce038f04f0b1d728a62082074fb4a74870a5444ee1a6910ad" style="color: #269ac9;">
请加入师姐答疑群</a>
<!--白&nbsp;&nbsp;&nbsp;羽</a> http://shang.qq.com/wpa/qunwpa?idkey=4fe2d63a4527cddce038f04f0b1d728a62082074fb4a74870a5444ee1a6910ad-->
<a href="javascript:void(0);" style="color: #269ac9;">
<p style="text-align: center"> 请加入师姐答疑群</p> <p style="text-align: center">173184401</p> </a>
</div>
</div>
<div class="side_bottom"></div>

View File

@ -76,7 +76,7 @@
<!--参数-->
<div class="pr_info_foot">
<%= l(:label_member) %><%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue' %>
<%= l(:label_member) %><%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue', :id => 'project_members_number' %>
<span>|&nbsp;</span>
<%= l(:label_user_watcher) %><%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>

View File

@ -4,6 +4,7 @@
<% else%>
$('#pro_st_tbc_03').html('<%= escape_javascript(render :partial => 'projects/settings/new_members') %>');
hideOnLoad();
$("#project_members_number").html("<%= @project.members.count %>");
alert("<%= @succes_message%>");
<% end%>
<%elsif @course%>
@ -11,6 +12,8 @@
alert("<%= @create_member_error_messages%>");
<% else%>
$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
$("#teacher_number").html("<%= searchTeacherAndAssistant(@course).count %>");
$("#student_number").html("<%= studentCount(@course) %>");
alert("添加成功");
<% end%>
hideOnLoad();

View File

@ -1,7 +1,10 @@
<%if @project%>
$('#pro_st_tbc_03').html('<%= escape_javascript(render :partial => 'projects/settings/new_members') %>');
$("#project_members_number").html("<%= @project.members.count %>");
// $('#tab-content-members').html('<%#= escape_javascript(render :partial => 'projects/settings/members') %>');
<%elsif @course%>
$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
$("#teacher_number").html("<%= searchTeacherAndAssistant(@course).count %>")
$("#student_number").html("<%= studentCount(@course) %>");
<%end%>
hideOnLoad();

View File

@ -174,7 +174,7 @@
<li><input id="new_password_confirmation" name="new_password_confirmation" class="w210" type="password" required="true" nh_required="1"></li>
<li class="ml2">
<a href="javascript:;" id="my_password_form_link" class="blue_btn fl">确认</a>
<!--<input type="submit" id="my_password_form_btn" style="display:none;"/>-->
<input type="submit" id="my_password_form_btn" style="display:none;"/>
<!--<a href="javascript:void(0);" class="grey_btn ml10 fl">取消</a>-->
</li>
</ul>

View File

@ -145,6 +145,7 @@
var id; //资源id
var sendType; //发送到课程 1 发送到项目 2
var lastSendType; //保存上次发送的发送类型
var last_op
$("#resources_list").mousedown(function(e) {
//如果是右键的话
if (3 == e.which) {
@ -179,6 +180,28 @@
last_line = line;
}
});
//鼠标经过时,背景颜色设为灰色
$("#resources_list").mouseover(function(e){
pageX = e.clientX;
pageY = e.clientY;
var ele = document.elementFromPoint(pageX,pageY);
line = $(ele).parent();
if(last_op != null){
last_op.children().css("background-color", 'white');
restore();
last_op == null;
}
//如果当前的tag是li那么还要li的父级元素
if(line.get(0).tagName === 'LI'){
line = line.parent();
}
//将当前的元素的所有子元素的背景色改为蓝色
line.children().css("background-color", '#e1e1e1');
//将当前元素赋给 上一个对象 保存起来。
last_op = line;
});
//元素包含关系计算
var contains = function(root, el) {
if (root.compareDocumentPosition)