新版题库

This commit is contained in:
cxt 2016-08-03 11:12:55 +08:00
parent 5b66489b61
commit 718b13e6c1
20 changed files with 372 additions and 282 deletions

View File

@ -592,23 +592,25 @@ class UsersController < ApplicationController
#用户作业列表
def user_homeworks
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@order,@b_sort = params[:order] || "publish_time",params[:sort] || "desc"
@user = User.current
@r_sort = @b_sort == "desc" ? "asc" : "desc"
if(params[:type].blank? || params[:type] == "1") #我的题库
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
elsif params[:type] == "2" #题库
courses = @user.courses.where("is_delete = 1")
course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")"
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and course_id not in #{course_ids}").order("#{@order} #{@b_sort}")
elsif params[:type] == "2" #公共题库
visible_course = Course.where("is_delete = 0")
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
end
@type = params[:type]
@limit = 25
@limit = 10
@is_remote = true
@hw_count = @homeworks.count
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
@offset ||= @hw_pages.offset
@homeworks = paginateHelper @homeworks,25
@homeworks = paginateHelper @homeworks,10
respond_to do |format|
format.js
format.html {render :layout => 'static_base'}
@ -641,15 +643,15 @@ class UsersController < ApplicationController
end
def choose_user_course
homework = HomeworkCommon.find params[:send_id].to_i
if homework.user != User.current && homework.course.is_public == 0 && !User.current.allowed_to?(:as_teacher,homework.course)
ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, params[:send_id].to_i)
if ah.empty?
@status = 2
elsif ah.first.status != 2
@status = ah.first.status
end
end
homework = HomeworkCommon.find params[:homework].to_i
# if homework.user != User.current && homework.course.is_public == 0 && !User.current.allowed_to?(:as_teacher,homework.course)
# ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, params[:send_id].to_i)
# if ah.empty?
# @status = 2
# elsif ah.first.status != 2
# @status = ah.first.status
# end
# end
if !params[:search].nil?
search = "%#{params[:search].to_s.strip.downcase}%"
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and (#{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p)",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
@ -658,7 +660,7 @@ class UsersController < ApplicationController
end
@search = params[:search]
#这里仅仅是传递需要发送的资源id
@send_id = params[:send_id]
@send_id = params[:homework]
respond_to do |format|
format.js
end
@ -751,30 +753,26 @@ class UsersController < ApplicationController
end
def user_homework_type
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@order,@b_sort = params[:order] || "publish_time",params[:sort] || "desc"
@r_sort = @b_sort == "desc" ? "asc" : "desc"
@user = User.current
if(params[:type].blank? || params[:type] == "1") #我的题库
courses = @user.courses.where("is_delete = 1")
course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")"
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and publish_time <= '#{Date.today}' and course_id not in #{course_ids}").order("#{@order} #{@b_sort}")
elsif params[:type] == "2" #题库
if params[:is_import].to_i == 1
visible_course = Course.where("is_public = 1 && is_delete = 0")
elsif params[:is_import].to_i == 0
visible_course = Course.where("is_delete = 0")
end
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and course_id not in #{course_ids}").order("#{@order} #{@b_sort}")
elsif params[:type] == "2" #公共题库
visible_course = Course.where("is_public = 1 && is_delete = 0")
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
elsif params[:type] == "3" #申请题库
none_visible_course = Course.where("is_delete = 1")
none_visible_course_ids = none_visible_course.empty? ? "(-1)" : "(" + none_visible_course.map{|course| course.id}.join(",") + ")"
#apply_homeworks = ApplyHomework.where("user_id = ?",@user.id).order('created_at desc')
#homework_ids = apply_homeworks.empty? ? "(-1)" : "(" + apply_homeworks.map{|ah| ah.homework_common_id}.join(",") + ")"
#@homeworks = HomeworkCommon.where("id in #{homework_ids} and course_id not in #{none_visible_course_ids}")
sql = "SELECT homework_commons.* FROM homework_commons INNER JOIN apply_homeworks as ah ON homework_commons.id = ah.homework_common_id where ah.user_id = #{@user.id} and homework_commons.course_id not in #{none_visible_course_ids} order by ah.created_at desc"
@homeworks = HomeworkCommon.find_by_sql(sql)
# elsif params[:type] == "3" #申请题库
# none_visible_course = Course.where("is_delete = 1")
# none_visible_course_ids = none_visible_course.empty? ? "(-1)" : "(" + none_visible_course.map{|course| course.id}.join(",") + ")"
# #apply_homeworks = ApplyHomework.where("user_id = ?",@user.id).order('created_at desc')
# #homework_ids = apply_homeworks.empty? ? "(-1)" : "(" + apply_homeworks.map{|ah| ah.homework_common_id}.join(",") + ")"
# #@homeworks = HomeworkCommon.where("id in #{homework_ids} and course_id not in #{none_visible_course_ids}")
#
# sql = "SELECT homework_commons.* FROM homework_commons INNER JOIN apply_homeworks as ah ON homework_commons.id = ah.homework_common_id where ah.user_id = #{@user.id} and homework_commons.course_id not in #{none_visible_course_ids} order by ah.created_at desc"
# @homeworks = HomeworkCommon.find_by_sql(sql)
end
if params[:property]
all_homework_ids = @homeworks.empty? ? "(-1)" : "(" + @homeworks.map{|h| h.id}.join(",") + ")"
@ -792,7 +790,7 @@ class UsersController < ApplicationController
@type = params[:type]
@property = params[:property]
@is_import = params[:is_import]
@limit = params[:is_import].to_i == 1 ? 15 : 25
@limit = params[:is_import].to_i == 1 ? 15 : 10
@is_remote = true
@hw_count = @homeworks.count
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
@ -827,11 +825,11 @@ class UsersController < ApplicationController
#用户主页过滤作业
def user_search_homeworks
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@order,@b_sort = params[:order] || "publish_time",params[:sort] || "desc"
@r_sort = @b_sort == "desc" ? "asc" : "desc"
@user = User.current
search = params[:name].to_s.strip.downcase
type_ids = params[:property]=="" || params[:property].nil? ? "(1, 2, 3)" : "(" + params[:property] + ")"
type_ids = (params[:property]=="" || params[:property].nil? || params[:property]=="0") ? "(1, 2, 3)" : "(" + params[:property] + ")"
if(params[:type].blank? || params[:type] == "1") #我的题库
courses = @user.courses.where("is_delete = 1")
course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")"
@ -844,11 +842,7 @@ class UsersController < ApplicationController
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and course_id not in #{course_ids} and publish_time <= '#{Date.today}' and (name like '%#{search}%') and homework_type in #{type_ids}").order("#{@order} #{@b_sort}")
end
elsif params[:type] == "2" #题库
if params[:is_import].to_i == 1
visible_course = Course.where("is_public = 1 && is_delete = 0")
elsif params[:is_import].to_i == 0
visible_course = Course.where("is_delete = 0")
end
visible_course = Course.where("is_public = 1 && is_delete = 0")
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
all_homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'")
all_user_ids = all_homeworks.map{|hw| hw.user_id}
@ -886,7 +880,7 @@ class UsersController < ApplicationController
end
=end
@type = params[:type]
@limit = params[:is_import].to_i == 1 ? 15 : 25
@limit = params[:is_import].to_i == 1 ? 15 : 10
@is_remote = true
@hw_count = @homeworks.count
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1

View File

@ -72,10 +72,10 @@
<% elsif ma.course_message_type == "Course" %>
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了班级:班级名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了班级:班级名称:<%=ma.course_message.name %></a></li>
<% elsif ma.course_message_type == "JoinCourseRequest" %>
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}" %>
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %>
<li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的班级成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的班级成员申请:<%=content %></a></li>
<% elsif ma.course_message_type == "CourseRequestDealResult" %>
<% content = ma.status == 1 ? '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝' %>
<% content = ma.status == 1 ? '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content && ma.content.include?('9') ? '教师' : '教辅')+'的申请被拒绝' %>
<li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="系统提示 班级申请进度反馈:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>班级申请进度反馈:<%=content %></a></li>
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 0 %>
<li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了班级:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了班级:<%=ma.course.name %></a></li>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify','syllabus','sy_public', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min",'prettify' %>
@ -16,7 +16,7 @@
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'css/common','css/structure','css/public', :media => 'all'%>
<%= stylesheet_link_tag 'css/common','css/structure','css/public','css/popup', :media => 'all'%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">

View File

@ -1,12 +1,17 @@
<div id="popbox02">
<div class="ni_con">
<p style="display: block;font-size: 14px;margin-left: 30px;margin-top: 20px;">
题目已发送到目标课程的作业列表,但需要您设置发布和截止时间,以激活相应作业,谢谢!
</p>
<div class="ni_btn">
<a href="javascript:void(0)" class="tijiao c_white ml45" onclick="hideModal();">
确&nbsp;&nbsp;定
</a>
</div>
<div id="sy_popup_box" style="width:380px;">
<div class="sy_popup_top sy_popup_top_tishi">
<h3 class="fl">提示</h3>
<a href="javascript:void(0);" class="sy_icons_close02 fr" onclick="hideModal()"></a>
<div class="cl"></div>
</div>
<div class="sy_popup_con02" >
<ul class="sy_popup_tishi">
<li>
题目已发送到目标课程的作业列表,但需要您设置发布和截止时间,以激活相应作业,谢谢!
</li>
<li>
<a href="javascript:void(0);" class="sy_btn_blue mt10" onclick="hideModal()">知道了</a>
</li>
</ul>
</div>
</div>

View File

@ -1,52 +1,25 @@
<div class="subjectDetail fl mt10">
<div class="subjectInfo">题目信息</div>
<div class="subject-content-wrapper">
<% if homework.nil? %>
<span id="homework_notice_span"><span class="center db">本题库遵循创作共用许可证</span><br>
教师给学生出题本质上是一种创作行为,题目的作者通常为此付出大量时间和精力。好的题目不仅能加深学生对知识点的理解,还能激发学生兴趣,提升学习效率。为此,本网站的题库许可证基于创作共用许可证( Creative Commons License )建立,其核心条款包括:<br/><br/>
1. 署名:必须提到原作者。<br/><br/>
2. 非商业用途:不得用于盈利性目的。<br/><br/>
3. 相同方式共享:允许修改原作品,但必须使用相同的许可证发布。<br/><br/>
对此许可证的支持或反对,请在网站中留言,我们不断完善,谢谢!
</span>
<!-- <%# elsif homework.nil? && status == 1 %>
<span class="c_red">您选中的作业目前为私有作业,您的分享请求已发送至老师,请耐心等待老师的同意。</span>
<%# elsif homework.nil? && status == 2 %>
<span class="c_red">您选中的作业目前为私有作业,请点击“请求分享”按钮向题目的作者发送分享请求吧!<br/>
祝您成功:)
</span>
<%# elsif homework.nil? && status == 3 %>
<span class="c_red">您选中的作业目前为私有作业,您的分享请求已被老师拒绝,暂时不可查看作业详情。</span>-->
<% else %>
<div class="subjectIntro mb15">标题:<%=homework.name %><br />
来源:<%=homework.course.name %><br />
<% if homework.homework_type == 2 && homework.homework_detail_programing %>
编程语言:<%=homework.language_name %><br/>
<% end %>
贡献者:<%=homework.user.show_name %>
<% if homework.user.user_extensions.occupation && homework.user.user_extensions.occupation!="" %>
<%=homework.user.user_extensions.occupation%>
<% end %>
<br />
描述如下:
</div>
<div class="subjectContent" id="homework_description">
<%=homework.description.html_safe %>
</div>
<% if homework.homework_type == 2 %>
<div class="subjectContent mt10">
测试集:<%=homework.homework_tests.count %>组
</div>
<% elsif homework.homework_type ==3 && homework.homework_detail_group %>
<div class="subjectContent mt10">
分组人数:<%=homework.homework_detail_group.min_num %> - <%=homework.homework_detail_group.max_num %>人
</div>
<% end %>
<% end %>
<div class="hw_popup_box">
<div class="hw_popup_top clear">
<a href="javascript:void(0);" class="hw_icons_close fr" style="outline: none;" onclick="hideModal()"></a>
</div>
</div>
<div class="hw_popup_con">
<div class="clear">
<h3 class="sy_classlist_title fl"><%=@homework.name %></h3>
<span class="hw_icon_open fl mt3"></span>
</div>
<span class=" mr15">作者:<%=link_to @homework.user.show_name, user_path(@homework.user_id), :class => 'hw_cgrey', :target => '_blank'%></span>
<div class="hw_popup_txt">
<p><%=@homework.description.html_safe %></p>
<% if @homework.homework_type == 2 %>
<p class="subjectContent mt10">
测试集:<%=@homework.homework_tests.count %>组
</p>
<% elsif @homework.homework_type ==3 && @homework.homework_detail_group %>
<p class="subjectContent mt10">
分组人数:<%=@homework.homework_detail_group.min_num %> - <%=@homework.homework_detail_group.max_num %>人
</p>
<% end %>
</div>
</div>
</div>

View File

@ -1,39 +1,53 @@
<ul class="subject-list-banner">
<li class="subject-list-name fl hidden"><span style="padding-left:15px;">作业名称</span></li>
<li class="subject-list-from fl">
<%= link_to "来源",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "course_name", :sort => @r_sort),:class => "fl ml55",:remote => true%>
<% if @order == "course_name"%>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "course_name", :sort => @r_sort),:class => "#{@r_sort == 'desc' ? 'st_up' : 'st_down'} mt12 fl" ,:remote => true%>
<% end%>
</li>
<li class="subject-list-type fl">
<%= link_to "类别",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "homework_type", :sort => @r_sort),:class => "fl ml10",:remote => true%>
<% if @order == "homework_type"%>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "homework_type", :sort => @r_sort),:class => "#{@r_sort == 'desc' ? 'st_up' : 'st_down'} mt12 fl" ,:remote => true%>
<% end%>
</li>
<li class="subject-list-publisher fl">
<%= link_to "贡献者",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "user_name", :sort => @r_sort),:class => "fl ml20",:remote => true%>
<% if @order == "user_name"%>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "user_name", :sort => @r_sort),:class => "#{@r_sort == 'desc' ? 'st_up' : 'st_down'} mt12 fl" ,:remote => true%>
<% end%>
</li>
<li class="subject-list-count fl">
<%= link_to "引用数",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort),:class => "fl ml5",:remote => true%>
<% if @order == "quotes"%>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort),:class => "#{@r_sort == 'desc' ? 'st_up' : 'st_down'} mt12 fl" ,:remote => true%>
<% end%>
</li>
<li class="fl subject-list-date">
<%= link_to "发布时间",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort),:class => "fl",:remote => true%>
<% if @order == "publish_time"%>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort),:class => "#{@r_sort == 'desc' ? 'st_up' : 'st_down'} mt12 fl" ,:remote => true%>
<% end%>
</li>
<li class="fl subject-list-option">
操作
</li>
</ul>
<div id="homework_repository">
<%=render :partial => 'homework_repository', :locals => {:homeworks => homeworks} %>
</div>
<% homeworks.each do |homework| %>
<ul class="sy_classlist">
<span class="hw_icons_cir fl mt5 mr5"></span>
<div class="fl ">
<h3 class="sy_classlist_title fl">
<% if type == "1" %>
<%=link_to homework.name, student_work_index_path(:homework => homework), :class => 'hw_cgrey', :target => "_blank" %>
<% else %>
<%=homework.name %>
<% end %>
</h3>
<span class="<%=homework.course.is_public? ? 'hw_icon_open' : 'hw_icon_private'%> fl mt3"></span>
<div class="cl"></div>
<p class="sy_cgrey">
<span class="fl">
<span class="fl">来源:</span>
<%=link_to homework.course.name.to_s + "#{current_time_and_term_short(homework.course)}", course_path(homework.course), :class => 'hw_cgrey hw_list_classname fl mr15', :target => '_blank' %>
</span>
<% if type == "2" %>
<span class="mr15 fl">
<span class="fl">贡献者:</span>
<%=link_to homework.user.show_name, user_path(homework.user_id), :class => 'hw_cgrey hw_list_teachername fl', :target => '_blank'%>
</span>
<% end %>
<span class="mr15 fl">类别:
<% case homework.homework_type %>
<% when 1 %>
普通
<% when 2 %>
编程
<% when 3 %>
分组
<% end %>
</span>
<span class="fl mr15">引用数:<span id="subject_count_homework_<%=homework.id %>"><%= homework.quotes %></span></span>
<% if homework.publish_time.nil? %>
<span class="fl mr15">发布时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- -</span>
<% else %>
<span class="fl mr15">发布时间:<%= format_date(homework.publish_time) %></span>
<% end %>
</p>
<div class="cl"></div>
</div>
<% student_ids = homework.course.student.empty? ? [] : homework.course.student.map{|student| student.student_id}.join(',') %>
<% if student_ids.include?(User.current.id.to_s) %>
<a href="javascript:void(0);" class="hw_btn_grey fr mt5" title="您选中的题是“我收到的作业”,不能发送">发送</a>
<% else %>
<a href="javascript:void(0);" class="hw_btn_green fr mt5" onclick="choose_course('<%=User.current.id%>', '<%=homework.id %>');" data-remote="true">发送</a>
<% end %>
<a href="javascript:void(0);" class="hw_btn_green fr mt5 mr5" onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id,:is_import => 0) %>')" data-remote="true">预览</a>
<div class="cl"></div>
</ul>
<% end %>

View File

@ -1,4 +1,22 @@
<input type="text" name="search" placeholder="输入作业、老师姓名的关键词进行搜索" class="subject-pop-search fr" />
<span class="sy_cgrey ">排序:</span>
<%= link_to "发布时间",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
<% if order == "publish_time" %>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
<% else %>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
<% end %>
<%= link_to "引用数",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
<% if order == "quotes" %>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
<% else %>
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
<% end %>
<div class="hw_search_box fr mr10">
<input class="hw_search-input" name="search" value='<%=search %>' placeholder="输入作业、老师姓名的关键词进行搜索" type="text" >
<span class="hw_btn_search"></span>
</div>
<div class="cl"></div>
<script type="text/javascript">
var lastSearchCondition = '';
var count = 0;

View File

@ -1,18 +1,49 @@
<div class="boxContainer" style="height: auto;">
<div>
<div class="sendText fl mr10" style="width: auto">发送到</div>
<div class="hw_sendpopup_box">
<div class="hw_sendpopup_top">
<h3 class="fl">发送</h3>
<a href="javascript:void(0);" class="hw_sendpopup_close fr" onclick="hideModal()"></a>
<div class="cl"></div>
</div>
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div class="fl">
<!--<input type="text" name="search" placeholder="输入班级ID或者名称搜索" class="subjectSearch fr" />-->
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="mt10 mb10 course-search" />
</div>
<div id="send_homework_to_course_form">
<%= render :partial => "users/send_homework_to_course_form", :locals => {:user => user, :courses => courses, :send_id => send_id} %>
<div class="hw_sendpopup_con">
<div class="hw_sendpopup_tishi">
<p>选择的题目将被发送到班级作业</p>
</div>
<div class="hw_sendpopup_con_innner">
<div class="hw_search_box mb10" >
<input class="hw_sendpopup_search_input" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级名称进行搜索" type="text" >
<span class="hw_btn_search" style="margin-top: -10px;"></span>
</div>
<div id="send_homework_to_course_form">
<%= render :partial => "users/send_homework_to_course_form", :locals => {:user => user, :courses => courses, :send_id => send_id} %>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//全选与取消全选
//复选框事件
//全选、取消全选的事件
function selectAll() {
if ($("#SelectAll").is(":checked")) {
$(":checkbox").attr("checked", true);
} else {
$(":checkbox").attr("checked", false);
}
}
//子复选框的事件
function setSelectAll() {
//当没有选中某个子复选框时SelectAll取消选中
if (!$("#subcheck").checked) {
$("#SelectAll").attr("checked", false);
}
var chsub = $("input[type='checkbox'][id='subcheck']").length; //获取subcheck的个数
var checkedsub = $("input[type='checkbox'][id='subcheck']:checked").length; //获取选中的subcheck的个数
if (checkedsub == chsub) {
$("#SelectAll").attr("checked", true);
}
}
function send_submit() {
var checkboxs = $("input[name='course_ids[]']:checked");
if(checkboxs.length == 0) {
@ -32,7 +63,7 @@
}
lastSearchCondition = $(e.target).val().trim();
$.ajax({
url: '<%= url_for(:controller => 'users', :action => 'choose_user_course') %>'+'?search='+ e.target.value+'&send_id=<%=send_id %>',
url: '<%= url_for(:controller => 'users', :action => 'choose_user_course') %>'+'?search='+ e.target.value+'&homework=<%=send_id %>',
type:'get',
data: {is_observe:true},
success: function(data){ },

View File

@ -1,27 +1,25 @@
<%= form_tag send_homework_to_course_user_path(user), :remote => true, :id => 'choose_course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<div class="courseReferContainer">
<ul class="hw_sendpopup_searchli">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name, :lendght => 25) + '['+current_time_and_term(course) + ']' %></li>
</ul>
<li>
<input type="checkbox" name="course_ids[]" id="subcheck" onclick="setSelectAll();" value="<%= course.id %>" />
<label><%=course.name + ''+current_time_and_term_short(course) + ''%></label>
</li>
<% end %>
<% end %>
</ul>
<div>
<p><input type="checkbox" name="check_all" id="SelectAll" onclick="selectAll();"/><label>全选</label></p>
<p class="clear mt5">
<label>&nbsp;</label>
<a href="javascript:void(0);" onfocus='this.blur();' onclick="send_submit();" class="sy_btn_blue fl">发&nbsp;&nbsp;送</a>
<a href="javascript:void(0);" onclick="hideModal();" class="sy_btn_grey fl ml10">取&nbsp;&nbsp;消</a>
</p>
</div>
<span id="choose_courses_notice" class="c_red"></span>
</div>
<div class="cl"></div>
<span id="choose_courses_notice" class="c_red"></span>
<div>
<div class="courseSendSubmit">
<a href="javascript:void(0);" onfocus='this.blur();' onclick="send_submit();" class="sendSourceText">确定</a>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a>
</div>
</div>
<div class="cl"></div>
<span id="choose_courses_notice" class="c_red"></span>

View File

@ -1,20 +1,15 @@
<% if @status == 1 || @status == 2 || @status == 3 %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_notice', :locals => {:status => @status}) %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");
<% else %>
<%# if @status == 1 || @status == 2 || @status == 3 %>
// $("#ajax-modal").html('<%#= escape_javascript( render :partial => 'users/send_notice', :locals => {:status => @status}) %>');
// showModal('ajax-modal', '500px');
// $('#ajax-modal').siblings().remove();
// $('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
// "<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
// $('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");
<%# else %>
<% if params[:is_observe].nil? %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>');
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
var htmlvalue = "<%= escape_javascript(render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>";
pop_box_new(htmlvalue,460,50,50);
<% else %>
$("#send_homework_to_course_form").html("<%= escape_javascript(render :partial => 'users/send_homework_to_course_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>");
<% end %>
<% end %>
<%# end %>

View File

@ -1,9 +1,4 @@
$("#subject_count_homework_<%=@homework.id %>").html(<%= @homework.quotes %>);
$("#ajax-modal").html("<%=escape_javascript(render :partial => 'homework_post_notice') %>");
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
hideModal();
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_post_notice') %>";
pop_box_new(htmlvalue,380,40,50);

View File

@ -1,5 +1,6 @@
<% if @is_import.to_i == 1 %>
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>@homework}) %>");
<% else %>
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>@homework}) %>");
var htmlvalue = "<%= escape_javascript(render :partial => 'users/homework_repository_detail') %>";
pop_box_new(htmlvalue,820,50,50);
<% end %>

View File

@ -6,8 +6,7 @@ $("#homework_search_input").html("<%=escape_javascript(render :partial=>'homewor
<% else %>
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>''})%>');
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
$("#homework_search_input").html("<%=escape_javascript(render :partial=>'homework_repository_search', :locals=>{:type=>@type,:is_import=>@is_import,:property=>@property}) %>");
$("#homework_search_input").html('<%= escape_javascript(render :partial => 'users/homework_repository_search', :locals => {:type => @type,:is_import => @is_import,:property => @property,:order => @order, :b_sort => @b_sort, :search => ''})%>');
$("#homework_type_all").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 0) %>');
$("#homework_type_nor").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 1) %>');
$("#homework_type_pro").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 2) %>');

View File

@ -1,89 +1,65 @@
<%= stylesheet_link_tag 'css/common','css/structure','css/public','css/org','repository' %>
<script>
$(document).ready(function(){
$(".resource-switch").click(function(){
$(".resource-switch").children().removeClass("resource-tab-active");
$(this).children().addClass("resource-tab-active");
});
$("input[name='checkMenu']").click(function(){
if($("input[name='checkMenu']:checked").length >= 1){
$(".resourcesSelectSendButton").removeClass("inactive-border");
$(".resourcesSelectSendButton").mouseover(function(){
$(this).css("backgroundColor","#297fb8");
});
$(".resourcesSelectSendButton").mouseout(function(){
$(this).css("backgroundColor","#fff");
});
$(".sendButtonBlue").removeClass("inactive-text");
}
});
});
function choose_course(user_id) {
var check = $('input[name="checkMenu"]:checked');
if(check.length == 0) {
$("#choose_homework_notice").text("请先选择一个作业");
} else {
var hw_id = $('input[name="checkMenu"]:checked').val();
$("#choose_homework_notice").text("");
$.ajax({
type: 'get',
url: '/users/' + user_id + '/choose_user_course?homework='+hw_id,
data:{send_id:$('input[name="checkMenu"]:checked').val()}
});
function g(o){return document.getElementById(o);}
function HoverLi(n, url){
for(var i=1;i<=2;i++){
g('hw_tab_nav_'+i).className='hw_tab_nomal';
}
g('hw_tab_nav_'+n).className='hw_tab_hover';
$.get(url, {}, function(data){});
}
function show_homework_detail(url){
$.get(
url,
{},
function (data) {
}
);
};
function choose_course(user_id, hw_id) {
$.ajax({
type: 'get',
url: '/users/' + user_id + '/choose_user_course?homework='+hw_id
});
}
</script>
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="resource-wrapper mb10">
<ul class="resource-banner">
<li class="fl resource-switch">
<a href="<%= user_homework_type_user_path(@user,:is_import => 0) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active" data-remote="true">我的题库</a>
</li>
<li class="fl resource-switch">
<a href="<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 0) %>" id="user_homeworks_choose" class="resource-tab" style="text-align: center;" data-remote="true">题库</a>
</li>
<li class="fl resource-switch">
<a href="<%= user_homework_type_user_path(@user,:type=>'3',:is_import => 0) %>" id="apply_homeworks_choose" class="resource-tab" data-remote="true">申请题库</a>
</li>
<li class="fl w680 border-bottom h34">&nbsp;</li>
<li class="fr resource-banner-li border-bottom h34">
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="resourcesType">
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0) %>" id="homework_type_all" class="resourcesTypeAll resourcesGrey" data-method="get" data-remote="true">全部</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 1) %>" id="homework_type_nor" class="homepagePostTypeAssignment postTypeGrey" data-method="get" data-remote="true">普通作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 2) %>" id="homework_type_pro" class="program-btn postTypeGrey" data-method="get" data-remote="true" style="white-space:nowrap;">编程作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 3) %>" id="homework_type_gro" class="group-btn resourcesGrey" data-method="get" data-remote="true">分组作业</a> </li>
</ul>
</li>
</ul>
</li>
<div class="cl"></div>
<div class="hw_content">
<ul id="hw_tab_nav">
<li id="hw_tab_nav_1" class="hw_tab_hover" onclick="HoverLi(1, '<%= user_homework_type_user_path(@user,:is_import => 0) %>');">
<a href="javascript:void(0)" id="public_homeworks_choose" class="hw_tab_type" style="text-align: center;">我的题库</a>
</li>
<li id="hw_tab_nav_2" onclick="HoverLi(2, '<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 0) %>');">
<a href="javascript:void(0)" id="user_homeworks_choose" class="hw_tab_type" style="text-align: center;">公共题库</a>
</li>
</ul>
<div class="hw_more_box" >
<ul>
<li class="hw_more_icons">
<ul class="hw_more_txt">
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0) %>" id="homework_type_all" class="hw_more_li" data-method="get" data-remote="true">全部作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 1) %>" id="homework_type_nor" class="hw_more_li" data-method="get" data-remote="true">普通作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 2) %>" id="homework_type_pro" class="hw_more_li" data-method="get" data-remote="true" style="white-space:nowrap;">编程作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 3) %>" id="homework_type_gro" class="hw_more_li" data-method="get" data-remote="true">分组作业</a> </li>
</ul>
<div class="cl"></div>
<div id="homework_search_input" class="mt10 fl">
<%=render :partial=>'homework_repository_search', :locals=>{:type => @type,:is_import => 0,:property => nil} %>
</div>
<div class="cl"></div>
<div class="w683 fl mr10 mt10" id="homework_repository_list">
<%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>@type,:is_import => 0,:property => @property,:search=>''} %>
</div>
<div id="homework_repository_detail">
<%=render :partial => 'homework_repository_detail', :locals => {:homework => nil} %>
</div>
<div class="cl"></div>
<div>
<ul class="wlist mt10" id="homework_pository_ref_pages" style="margin-top: 5px;margin-right: 295px">
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
</ul>
</div>
<div class="fl resourcesSelectSendButton mr15 inactive-border mt10">
<a href="javascript:void(0)" onclick="choose_course('<%=User.current.id %>');" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>
</div>
<span class="c_red fl mt15" id="choose_homework_notice"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="cl"></div>
<div id="hw_tab_con_1">
<div class="sy_category" id="homework_search_input">
<%=render :partial=>'homework_repository_search', :locals=>{:type => '1',:is_import => 0,:property => nil,:order => @order, :b_sort => @b_sort, :search => ''} %>
</div>
<div class="sy_classbox" style="min-height:800px;" id="homework_repository_list">
<%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>'1',:is_import => 0,:property => @property,:search=>''} %>
</div>
<div class="cl"></div>
<div>
<ul class="wlist mt10" id="homework_pository_ref_pages" style="margin-top: 5px;margin-right: 295px">
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
</ul>
</div>
</div>
</div>

View File

@ -5,5 +5,5 @@ $("#homework_detail_information").html("<%=escape_javascript(render :partial =>
<% else %>
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>@search})%>');
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
$("#homework_search_input").html('<%= escape_javascript(render :partial => 'users/homework_repository_search', :locals => {:type => @type,:is_import => @is_import,:property => @property,:order => @order, :b_sort => @b_sort, :search => @search})%>');
<% end %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -80,6 +80,8 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.text_c{ text-align:center;}
/* Float & Clear */
.clear{ zoom:1;}
.clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;}
.cl{ clear:both; overflow:hidden; }
.fl{float:left;}
.fr{float:right;}

View File

@ -422,6 +422,7 @@ a.sy_icons_close02{
margin:8px 10px 0 0;
border: none;
outline: none;
transition: all 0s linear;
}
a:hover.sy_icons_close02{
background: url(/images/sy/sy_icons_close02.png) -40px 0px no-repeat;

View File

@ -13,6 +13,42 @@ a.sy_cblack{ color: #333;}
a.sy_cgrey{ color: #888;}
a.sy_cmore{ font-size:12px; color:#888; font-weight:normal;}
a:hover.sy_cmore{color: #ee4a1f;}
/* 题库新增*/
a.hw_cgreen{ color: #60b25e;}
a:hover.hw_cgreen{ color: #49a047;}
a.hw_cgrey{ color: #888;}
a:hover.hw_cgrey{ color: #3b94d6;}
a.hw_btn_green{
color: #60b25e !important;
border:1px solid #60b25e;
background:#fff;
text-align: center;
font-size: 12px;
padding:0 15px;
height: 30px;
line-height: 30px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
}
a:hover.hw_btn_green,a:active.hw_btn_green{ background: #51a74f; color:#fff !important;}
a.hw_btn_grey{
color: #888 !important;
border:1px solid #888;
background:#fff;
text-align: center;
font-size: 12px;
padding:0 15px;
height: 30px;
line-height: 30px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
}
.hw_icons_cir{ display:block; width:15px; height:15px; background:url(../images/hw/icons_hw.png) 0 0px no-repeat;}
.hw_icons_lock{ display:block; width:15px; height:16px; background:url(../images/hw/icons_hw.png) 0 -90px no-repeat;}
/* 按钮*/
a.btn_orange_big{
display:inline-block;
@ -169,3 +205,21 @@ a.sy_icons_close{
padding:0 5px;
width:220px;
}
/* 题库预览弹框 */
.hw_popup_box{width:790px; max-height:770px; padding:15px; background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow: 0px 0px 8px rgba(20, 124, 17, 0.5);-moz-box-shadow: 0px 0px 8px rgba(20, 124, 17, 0.5);box-shadow: 0px 0px 8px rgba(20, 124, 17, 0.5);}
.hw_popup_top a.hw_icons_close{display:block;width:26px; height:26px;background: url(../images/hw/icons_hw.png) 0 -95px no-repeat; transition: all 0s linear;}
.hw_popup_top a:hover.hw_icons_close{background: url(../images/hw/icons_hw.png) -41px -95px no-repeat; }
.hw_popup_con{ width:770px; max-height:770px; margin:0 auto;}
.hw_popup_txt{width:770px; max-height:700px; margin:15px auto;overflow:auto;}
/* 题库发送弹框 */
.hw_sendpopup_box{ width:460px;background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow: 0px 0px 8px rgba(146, 153, 169, 0.5);-moz-box-shadow: 0px 0px 8px rgba(146, 153, 169, 0.5);box-shadow: 0px 0px 8px rgba(146, 153, 169, 0.5);}
.hw_sendpopup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;}
.hw_sendpopup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px;}
a.hw_sendpopup_close{width:20px; height:20px;display:block;background: url(../images/hw/icons_hw.png) -42px 0 no-repeat;margin:10px 5px 0 0;}
.hw_sendpopup_tishi{ border:1px solid #eee5a8; background:#faf9da; width:423px; margin:15px auto 0; height:38px; line-height:38px; color:#ff964d; padding-left:5px;}
.hw_sendpopup_con_innner{ padding:15px; width:400px; margin:15px auto 0; border:1px solid #d3d8e7; background:#f7f9fd;}
.hw_sendpopup_searchli{ max-height: 300px; overflow: auto; width:400px;}
.hw_sendpopup_searchli li{ font-size:14px; margin-bottom:5px;color:#333; width:370px;}
.hw_sendpopup_searchli li label{ margin-left:5px;}
.hw_sendpopup_search_input{width:393px; height:28px; border:none; border:1px solid #d3d8e7; background:#fff; padding-left:5px}

View File

@ -188,6 +188,7 @@ input.syllabus_input_min{
white-space: nowrap;
text-overflow:ellipsis;
}
.sy_classlist_title a:hover{ color:#333;}
.sy_con_r{
width:205px;
}
@ -581,3 +582,36 @@ a:hover.sy_class_ltitle{ color:#333;}
.sy_class_lclass li:last-child { border-bottom:none;}
.sy_class_r{ width: 748px; background: #fff; border: 1px solid #e5e5e5;}
/* 题库tab */
.hw_content{ width: 998px; margin: 0 auto; margin-top:12px; background:#fff; border:1px solid #e1e1e1; position:relative; }
#hw_tab_nav {border-bottom:1px solid #e7e7e7;height:50px;background: #f8f8f8; }
#hw_tab_nav li {float:left; padding:0px 50px;text-align:center;height: 47px;line-height: 47px; }
#hw_tab_nav li a{font-size:16px;}
.hw_tab_hover {border-top:3px solid #60b25e;border-bottom:1px solid #fff; background: #fff;}
.hw_tab_hover a{ color:#60b25e !important; }
.hw_tab_nomal {border-bottom:none; }
.hw_tab_nomal a{ color:#333;}
.undis {display:none;}
.dis {display:block;}
.hw_more_box {position:absolute; width:24px; height:15px; right:15px; top:15px;}
.hw_more_box ul li:hover ul {display:block; }
.hw_more_icons {background:url(../images/hw/icons_hw.png) 0px -30px no-repeat; width:24px; height:15px; }
.hw_more_icons:hover {background:url(../images/hw/icons_hw.png) -40px -30px no-repeat;}
.hw_more_txt {width:75px; font-size:12px; color:#616060; background-color:#fff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-40px; top:15px; padding:5px 0px; display:none; box-shadow: 0px 0px 8px rgba(146, 153, 169, 0.5); z-index:1000;}
.hw_more_txt li a.hw_more_li {font-size:12px;color:#888; display:block; width:75px;height:24px;line-height:24px;text-align:center; }
.hw_more_txt li a.hw_more_li:hover {background-color:#f0f0f0;}
.hw_search_box{ position:relative; }
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;}
.hw_search_box span.hw_btn_search{display:block; width:20px; height:20px; background:url(../images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:15px;}
/*.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;}*/
.hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;}
.hw_list_classname{ width:300px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.hw_list_teachername{ width:80px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
/* 我的作业 */
.hw_classname{ width:180px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
#hw_tab_con_1 .sy_classbox .sy_classlist:last-child{ border-bottom:1px solid #ddd;}
.hw_tab_top{ height: 50px; line-height: 50px; padding-left: 15px; border-bottom:1px solid #ddd; border-left:3px solid #3b94d6; }