Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop

Conflicts:
	public/stylesheets/css/edu-common.css
This commit is contained in:
huang 2017-06-07 17:43:52 +08:00
commit aaf1135e35
98 changed files with 1394 additions and 745 deletions

View File

@ -371,7 +371,7 @@ class AttachmentsController < ApplicationController
@attachment = Attachment.find(params[:attachments ].first[1][:attachment_id])
#将需要修改的记录保存到历史记录
@history = AttachmentHistory.new
@history.attributes = @old_attachment.attributes.dup.except("id")
@history.attributes = @old_attachment.attributes.dup.except("id", "resource_bank_id")
@history.attachment_id = params[:old_attachment_id]
#需要更新版本号,需要拿到原来该文件最大的历史版本号
@old_history = @old_attachment.attachment_histories.reorder('version desc').first

View File

@ -46,21 +46,22 @@ class CoursesController < ApplicationController
syllabus_members = SyllabusMember.where("user_id = #{@user.id}")
syllabus_member_ids = syllabus_members.empty? ? "(-1)" : "(" + syllabus_members.map{|syl_mem| syl_mem.syllabus_id}.join(',') + ")"
search = params[:search].nil? ? '' : params[:search]
@search = params[:search].nil? ? '' : params[:search]
@select = params[:select].nil? ? '' : params[:select]
# 我发布的课程
create_syllabuses = Syllabus.where("user_id = #{@user.id} and title like '%#{search}%'").order("created_at desc")
create_syllabuses = Syllabus.where("user_id = #{@user.id} and title like '%#{@search}%'").order("created_at desc")
# 我参与的课程
join_syllabuses = Syllabus.where("(id in #{syllabus_ids} or id in #{syllabus_member_ids}) and user_id != #{@user.id} and title like '%#{search}%'").order("created_at desc")
join_syllabuses = Syllabus.where("(id in #{syllabus_ids} or id in #{syllabus_member_ids}) and user_id != #{@user.id} and title like '%#{@search}%'").order("created_at desc")
# 我的所有课程
all_syllabuses = Syllabus.where("title like '%#{search}%'").order("created_at desc")
all_syllabuses = Syllabus.where("title like '%#{@search}%'").order("created_at desc")
@syllabus_count = Syllabus.all.count
@join_syllabuses_count = join_syllabuses.count
@create_syllabuses_count = create_syllabuses.count
# 页面筛选的课程
if params[:select] == "create"
if @select == "create"
@syllabuses = create_syllabuses
elsif params[:select] == "join"
elsif @select == "join"
@syllabuses = join_syllabuses
else
@syllabuses = all_syllabuses

View File

@ -19,37 +19,42 @@ class HomeworkCommonController < ApplicationController
#unless params[:page]
# update_homework_time(@course.homework_commons)
#end
@search = "#{params[:search].to_s.strip.downcase}"
@search = "#{params[:search].to_s.strip.downcase}" if params[:search]
@order = params[:order]
@new_homework = HomeworkCommon.new
@new_homework.homework_detail_manual = HomeworkDetailManual.new
@new_homework.course = @course
@page = params[:page] ? params[:page].to_i + 1 : 0
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
if @search
@homework_commons = @course.homework_commons.where("name like '%#{@search}%'")
else
@homework_commons = @course.homework_commons
end
if @order.blank?
if @is_teacher
@homework_commons = @course.homework_commons.where("name like '%#{@search}%'").order("created_at desc")
@homework_commons = @homework_commons.order("created_at desc")
else
@homework_commons = @course.homework_commons.where("name like '%#{@search}%' and publish_time <= '#{Time.now}'").order("created_at desc")
@homework_commons = @homework_commons.where("publish_time <= '#{Time.now}'").order("created_at desc")
end
else
case @order
when '1'
@homework_commons = @course.homework_commons.includes(:homework_detail_manual).where("name like '%#{@search}%' and homework_detail_manuals.comment_status = #{@order} and end_time > '#{Time.now}'").order("homework_commons.created_at desc")
@homework_commons = @homework_commons.includes(:homework_detail_manual).where("homework_detail_manuals.comment_status = #{@order} and end_time > '#{Time.now}'").order("homework_commons.created_at desc")
when '2'
@homework_commons = @course.homework_commons.includes(:homework_detail_manual).where("name like '%#{@search}%' and homework_detail_manuals.comment_status = #{@order} and late_time > '#{Time.now}'").order("homework_commons.created_at desc")
@homework_commons = @homework_commons.includes(:homework_detail_manual).where("homework_detail_manuals.comment_status = #{@order} and late_time > '#{Time.now}'").order("homework_commons.created_at desc")
when '3'
@homework_commons = @course.homework_commons.includes(:homework_detail_manual).where("name like '%#{@search}%' and (homework_detail_manuals.comment_status = #{@order} and homework_detail_manuals.evaluation_end > '#{Time.now}')
@homework_commons = @homework_commons.includes(:homework_detail_manual).where("(homework_detail_manuals.comment_status = #{@order} and homework_detail_manuals.evaluation_end > '#{Time.now}')
or (homework_detail_manuals.comment_status = 1 and end_time < '#{Time.now}' and allow_late = 0 and anonymous_comment = 0 and homework_detail_manuals.evaluation_start >= '#{Time.now}')
or (homework_detail_manuals.comment_status = 2 and late_time < '#{Time.now}' and anonymous_comment = 0 and homework_detail_manuals.evaluation_start >= '#{Time.now}')").order("homework_commons.created_at desc")
when '4'
@homework_commons = @course.homework_commons.includes(:homework_detail_manual).where("name like '%#{@search}%' and (homework_detail_manuals.comment_status = #{@order} and homework_detail_manuals.appeal_time > '#{Time.now}')").order("homework_commons.created_at desc")
@homework_commons = @homework_commons.includes(:homework_detail_manual).where("(homework_detail_manuals.comment_status = #{@order} and homework_detail_manuals.appeal_time > '#{Time.now}')").order("homework_commons.created_at desc")
when '5'
@homework_commons = @course.homework_commons.includes(:homework_detail_manual).where("name like '%#{@search}%' and (homework_detail_manuals.comment_status = #{@order} and archive_time > '#{Time.now}')
@homework_commons = @homework_commons.includes(:homework_detail_manual).where("(homework_detail_manuals.comment_status = #{@order} and archive_time > '#{Time.now}')
or (homework_detail_manuals.comment_status = 1 and end_time < '#{Time.now}' and (anonymous_comment = 1 or (anonymous_comment = 0 and homework_detail_manuals.evaluation_start < '#{Time.now}')) and archive_time >= '#{Time.now}')
or (homework_detail_manuals.comment_status = 2 and late_time < '#{Time.now}' and (anonymous_comment = 1 or (anonymous_comment = 0 and homework_detail_manuals.evaluation_start < '#{Time.now}')) and archive_time >= '#{Time.now}')").order("homework_commons.created_at desc")
else
@homework_commons = @course.homework_commons.includes(:homework_detail_manual).where("name like '%#{@search}%' and homework_detail_manuals.comment_status = #{@order}").order("homework_commons.created_at desc")
@homework_commons = @homework_commons.includes(:homework_detail_manual).where("homework_detail_manuals.comment_status = #{@order}").order("homework_commons.created_at desc")
end
end
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))

View File

@ -150,7 +150,7 @@ class MyController < ApplicationController
# 基本资料不完善 @force为false 完善 @force为true
@force = false
if params[:tip]
@force = trues
@force = true
else
user = UserExtensions.where(:user_id => User.current.id).first
if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
@ -160,6 +160,9 @@ class MyController < ApplicationController
end
end
# 用户认证
@auth = @user.authentication ? false : true
@s_message = AppliedMessage.where(:status => 3, :user_id => User.current.id, :viewed => 0, :applied_type => 'ApplyAddSchools').first
@d_message = AppliedMessage.where(:status => 3, :user_id => User.current.id, :viewed => 0, :applied_type => 'ApplyAddDepartment').first

View File

@ -27,6 +27,10 @@ class ShixunsController < ApplicationController
@latest_myshixuns = myshixuns.order("created_at desc").limit(4)
end
def autocompletion
end
def index
# @type = params[:type]
# @status = params[:status]

View File

@ -363,7 +363,7 @@ class StudentWorkController < ApplicationController
@homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now).order("created_at desc")
@all_homework_commons = @course.homework_commons.order("created_at desc")
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 3 && !@is_teacher #是不是匿评
@show_all = false
# 0表示没有分组的学生-1表示所有分组的学生
@ -376,11 +376,11 @@ class StudentWorkController < ApplicationController
end
#开放作品 || 老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && @homework.end_time < Time.now && !@homework.student_works.where(:user_id => User.current.id).empty?)
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.homework_detail_manual.comment_status == 6)
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}")
@show_all = true
elsif User.current.member_of_course?(@course)
if @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
if @homework.homework_detail_manual.comment_status == 1 || @homework.homework_detail_manual.comment_status == 2 #学生 && 未开启匿评 只看到自己的
if @homework.homework_type == 3
pro = @homework.student_work_projects.where(:user_id => User.current.id).first
if pro.nil?
@ -391,7 +391,7 @@ class StudentWorkController < ApplicationController
else
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
end
elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表
elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表
if @homework.homework_type == 3
pro = @homework.student_work_projects.where(:user_id => User.current.id).first
if pro.nil?
@ -403,7 +403,7 @@ class StudentWorkController < ApplicationController
my_work = @homework.student_works.where(:user_id => User.current.id)
end
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
elsif @homework.homework_detail_manual.comment_status == 5 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
if @homework.homework_type == 3
pro = @homework.student_work_projects.where(:user_id => User.current.id).first
if pro.nil?
@ -429,11 +429,11 @@ class StudentWorkController < ApplicationController
end
else
if (@homework.is_open == 1 &&@course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && @homework.end_time < Time.now && !@homework.student_works.where(:user_id => User.current.id).empty?)
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.homework_detail_manual.comment_status == 6)
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").includes(:user => {:user_extensions => []}, :project => {}, :student_works_scores => {}).order("#{@order} #{@b_sort}")
@show_all = true
elsif User.current.member_of_course?(@course)
if @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
if @homework.homework_detail_manual.comment_status == 1 || @homework.homework_detail_manual.comment_status == 2 #学生 && 未开启匿评 只看到自己的
if @homework.homework_type == 3
pro = @homework.student_work_projects.where(:user_id => User.current.id).first
if pro.nil?
@ -444,7 +444,7 @@ class StudentWorkController < ApplicationController
else
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
end
elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表
elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表
if @homework.homework_type == 3
pro = @homework.student_work_projects.where(:user_id => User.current.id).first
if pro.nil?
@ -456,7 +456,7 @@ class StudentWorkController < ApplicationController
my_work = @homework.student_works.where(:user_id => User.current.id)
end
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
elsif @homework.homework_detail_manual.comment_status == 5 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
if @homework.homework_type == 3
pro = @homework.student_work_projects.where(:user_id => User.current.id).first
if pro.nil?
@ -509,7 +509,7 @@ class StudentWorkController < ApplicationController
format.js
format.html { render :layout => 'base_edu'}
format.xls {
filename = "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@homework.name}#{l(:excel_homework_list)}.xls"
filename = "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@homework.name}#{l(:excel_homework_list)}.xls"
send_data(homework_to_xls(@stundet_works), :type => "text/excel;charset=utf-8; header=present",
:filename => filename_for_content_disposition(filename))
}

View File

@ -2972,16 +2972,15 @@ class UsersController < ApplicationController
@user = User.current
if !params[:search].nil?
search = "%#{params[:search].to_s.strip.downcase}%"
@course = @user.courses.not_deleted.where(" #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search)
@course = @user.courses.not_deleted_not_end.where(" #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search)
else
@course = @user.courses.not_deleted
@course = @user.courses.not_deleted_not_end
end
@search = params[:search]
@type = params[:type]
#这里仅仅是传递需要发送的资源id
@send_id = params[:send_id]
@send_ids = params[:checkbox1] || params[:send_ids]
@hidden_unproject = hidden_unproject_infos
respond_to do |format|
format.js
end
@ -3059,60 +3058,61 @@ class UsersController < ApplicationController
else
@flag = false
end
@order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
@score = @b_sort == "desc" ? "asc" : "desc"
user_project_ids = User.current.projects.map {|p| p.id}
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
if(params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
if params[:status] == "2"
@attachments = get_course_resources(User.current.id, user_course_ids, @order, @score)
elsif params[:status] == "3"
@attachments = get_project_resources(User.current.id, user_project_ids, @order, @score)
elsif params[:status] == "4"
@attachments = get_attch_resources(User.current.id, @order, @score)
elsif params[:status] == "5"
@attachments = get_principal_resources(User.current.id, @order, @score)
else
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score)
end
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
if params[:status] == "2"
@attachments = get_course_resources_public( user_course_ids, @order, @score)
elsif params[:status] == "3"
@attachments = get_project_resources_public(user_project_ids, @order, @score)
elsif params[:status] == "4"
@attachments = get_attch_resources_public(@order, @score)
elsif params[:status] == "5"
@attachments = get_principal_resources_public(@order, @score)
else
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
end
# elsif params[:type] == "2"
# apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# if params[:status] == "2"
# resource_type = "'Course'"
# elsif params[:status] == "3"
# resource_type = "'Project'"
# elsif params[:status] == "5"
# resource_type = "'Principal'"
# else
# resource_type = "'Project','OrgSubfield','Principal','Course'"
# end
# @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
end
@type = params[:type]
@limit = 25
@path = user_resource_user_path(User.current, :type => @type)
@user = User.current
@is_remote = true
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
@attachments = paginateHelper @attachments,25
# @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
# @score = @b_sort == "desc" ? "asc" : "desc"
# user_project_ids = User.current.projects.map {|p| p.id}
# user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
# if(params[:type] == "1") # 我的资源
# # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
# if params[:status] == "2"
# @attachments = get_course_resources(User.current.id, user_course_ids, @order, @score)
# elsif params[:status] == "3"
# @attachments = get_project_resources(User.current.id, user_project_ids, @order, @score)
# elsif params[:status] == "4"
# @attachments = get_attch_resources(User.current.id, @order, @score)
# elsif params[:status] == "5"
# @attachments = get_principal_resources(User.current.id, @order, @score)
# else
# # 公共资源库:所有公开资源或者我上传的私有资源
# @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score)
# end
# elsif (params[:type].blank? || params[:type] == "6") # 公共资源
# if params[:status] == "2"
# @attachments = get_course_resources_public( user_course_ids, @order, @score)
# elsif params[:status] == "3"
# @attachments = get_project_resources_public(user_project_ids, @order, @score)
# elsif params[:status] == "4"
# @attachments = get_attch_resources_public(@order, @score)
# elsif params[:status] == "5"
# @attachments = get_principal_resources_public(@order, @score)
# else
# # 公共资源库:所有公开资源或者我上传的私有资源
# @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score)
# end
# # elsif params[:type] == "2"
# # apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id}
# # if params[:status] == "2"
# # resource_type = "'Course'"
# # elsif params[:status] == "3"
# # resource_type = "'Project'"
# # elsif params[:status] == "5"
# # resource_type = "'Principal'"
# # else
# # resource_type = "'Project','OrgSubfield','Principal','Course'"
# # end
# # @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score)
# end
# @type = params[:type]
# @limit = 25
# @path = user_resource_user_path(User.current, :type => @type)
# @user = User.current
# @is_remote = true
# @atta_count = @attachments.count
# @atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
# @offset ||= @atta_pages.offset
# #@curse_attachments_all = @all_attachments[@offset, @limit]
# @attachments = paginateHelper @attachments,25
@course = @ori.course
respond_to do |format|
format.js
end

View File

@ -3558,50 +3558,50 @@ module ApplicationHelper
if User.current.logged?
if User.current.member_of_course?(homework.course)
if is_teacher #老师显示作品数量
link_to "作品(#{count})", student_work_index_url_in_org(homework.id, 2), :class => "c_blue"
link_to "作品(#{count})", student_work_index_url_in_org(homework.id, 2), :class => "c_blue homepagePostSubmit"
else #学生显示提交作品、修改作品等按钮
work = cur_user_works_for_homework homework
project = cur_user_projects_for_homework homework
if work.nil? && homework.end_time >= Time.now
if homework.homework_type ==3 && project.nil? && homework.homework_detail_group.base_on_project == 1
link_to "提交作品(#{count})","javascript:void(0)", :class => 'c_grey',:style=>"cursor:not-allowed",:title => '请先关联项目再提交作品'
link_to "提交作品(#{count})","javascript:void(0)", :class => 'c_grey homepagePostSubmit',:style=>"cursor:not-allowed",:title => '请先关联项目再提交作品'
else
link_to "提交作品(#{count})", new_student_work_url_without_domain(homework.id),:class => 'c_blue'
end
elsif work.nil? && homework.end_time < Time.now
if homework.homework_type ==3 && project.nil? && homework.homework_detail_group.base_on_project == 1
link_to "补交作品(#{count})","javascript:void(0)", :class => 'c_grey',:style=>"cursor:not-allowed",:title => '请先关联项目再补交作品'
else
link_to "补交作品(#{count})", new_student_work_url_without_domain(homework.id),:class => 'c_red'
if homework.allow_late
if homework.homework_type ==3 && project.nil? && homework.homework_detail_group.base_on_project == 1
link_to "补交作品(#{count})","javascript:void(0)", :class => 'c_grey homepagePostSubmit',:style=>"cursor:not-allowed",:title => '请先关联项目再补交作品'
else
link_to "补交作品(#{count})", new_student_work_url_without_domain(homework.id),:class => 'c_red homepagePostSubmit'
end
end
else
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 && StudentWorksEvaluationDistribution.where("student_work_id = #{work.id}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
elsif work
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3 && StudentWorksEvaluationDistribution.where("student_work_id = #{work.id}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
if homework.homework_type != 3
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "开启匿评后不可修改作品"
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue homepagePostSubmit', :title => "开启匿评后不可修改作品"
else
work_ids = "(" + homework.student_works.has_committed.map(&:id).join(",") + ")"
if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "开启匿评后不可修改作品"
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue homepagePostSubmit', :title => "开启匿评后不可修改作品"
else
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "匿评开启后提交的作品不参与匿评"
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue homepagePostSubmit', :title => "匿评开启后提交的作品不参与匿评"
end
end
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "匿评已结束"
elsif homework.homework_type == 2 && homework.end_time >= Time.now#编程作业不能修改作品
link_to "修改作品(#{count})", new_student_work_url_without_domain(homework.id),:class => 'c_blue'
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status > 3
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue homepagePostSubmit', :title => "匿评已结束"
elsif homework.end_time >= Time.now && work.user_id == User.current.id
link_to "修改作品(#{count})", edit_student_work_url_without_domain(work.id),:class => 'c_blue'
link_to "修改作品(#{count})", edit_student_work_url_without_domain(work.id),:class => 'c_blue homepagePostSubmit'
else
link_to "查看作品(#{count})", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "作业截止后不可修改作品"
link_to "查看作品(#{count})", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue homepagePostSubmit', :title => "作业截止后不可修改作品"
end
end
end
else
link_to "作品(#{count})", "javascript:void(0)", :class => "c_blue", :onclick => "notice_sure_box('您不是班级成员,不能提交作品<br/>请先从老师处获取邀请码后加入班级,再提交作品')"
link_to "作品(#{count})", "javascript:void(0)", :class => "c_blue homepagePostSubmit", :onclick => "notice_sure_box('您不是班级成员,不能提交作品<br/>请先从老师处获取邀请码后加入班级,再提交作品')"
end
else
link_to "作品(#{count})", "javascript:void(0)", :class => "c_blue", :onclick => "login_notice_box('#{signin_url_without_domain}');"
link_to "作品(#{count})", "javascript:void(0)", :class => "c_blue homepagePostSubmit", :onclick => "login_notice_box('#{signin_url_without_domain}');"
end
end

View File

@ -103,7 +103,7 @@ module StudentWorkHelper
if homework.allow_late
link_to "补交作品", new_student_work_url_without_domain(homework.id),:class => 'task-btn task-btn-blue fr'
end
else
elsif work
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3 && StudentWorksEvaluationDistribution.where("student_work_id = #{work.id}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
if homework.homework_type != 3
link_to "匿评作品", student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr', :title => "开启匿评后不可修改作品"
@ -112,15 +112,15 @@ module StudentWorkHelper
if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0
link_to "匿评作品", student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr', :title => "开启匿评后不可修改作品"
else
link_to "查看作品",student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr', :title => "匿评开启后提交的作品不参与匿评"
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr', :title => "匿评开启后提交的作品不参与匿评"
end
end
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status > 3
link_to "查看作品",student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr', :title => "匿评已结束"
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr', :title => "匿评已结束"
elsif homework.end_time >= Time.now && work.user_id == User.current.id
link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'task-btn task-btn-blue fr'
else
link_to "查看作品", student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr', :title => "作业截止后不可修改作品"
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr', :title => "作业截止后不可修改作品"
end
end
end

View File

@ -5,6 +5,16 @@
已认证
<% end %>
</div>
<% if !@user.authentication && @apply_user_auth && @apply_user_auth.status == 0 %>
<%= render :partial => "welcome/one_btn_mask_pop",
:locals => {
:tip1 => "更多功能,需要经过管理员的授权审核",
:tip2 => "认证申请已提交我们将在1个工作日内完成审核",
:btn => "试用申请",
:url => "javascript:void(0);"
}
%>
<% end %>
<div class="mr15 ml50">
<div class="clearfix ml50 mb30 mt30">
<div class="user-liucheng fl">1.上传图片</div>
@ -66,4 +76,4 @@
</div>
<a href="javascript:void(0);" class="task-btn task-btn-grey fr" disabled style="margin-right:100px;">提交认证申请</a>
<div class="cl"></div>
</div>
</div>

View File

@ -107,4 +107,4 @@
<% else %>
<%= render :partial => 'has_authentication' %>
<% end %>
</div>
</div>

View File

@ -1,12 +1,11 @@
<div style="width:820px;">
<div class="muban_popup_top">
<h3 class="fl">更新资源版本</h3>
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="hideModal();"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con" >
<div class=" clear ml15 mr15 mt15" id="attachment_history_popub">
<%= render :partial => "files/attachment_history_popub" %>
<div class="task-popup" style="width:820px;">
<div class="task-popup-title clearfix">
<h3 class="fl color-grey">更新资源版本</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task-popup-content">
<div class="clear ml15 mr15 mt15" id="attachment_history_popub">
<%= render :partial => "files/attachment_history_popub" %>
</div>
</div>
</div>
</div>

View File

@ -1,15 +1,13 @@
<div style="width:820px;">
<div class="muban_popup_top">
<h3 class="fl">删除资源</h3>
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="attachment_fresh_for_destroy();"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con" >
<div class=" clear ml15 mr15 mt15" id="attachment_history_popub">
<%= render :partial => "files/attachment_history_popub_delete" %>
<div class="task-popup" style="width:820px;">
<div class="task-popup-title clearfix">
<h3 class="fl color-grey">删除资源</h3>
<a href="javascript:void(0);" class="" onclick="attachment_fresh_for_destroy();"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task-popup-content">
<div class="clear ml15 mr15 mt15" id="attachment_history_popub">
<%= render :partial => "files/attachment_history_popub_delete" %>
</div>
</div>
</div>
</div>
<script>
function attachment_fresh_for_destroy(){

View File

@ -18,6 +18,7 @@
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:allow_blank => '0',
:file_count => l(:label_file_count),
:lebel_file_uploding => l(:lebel_file_uploding),
:delete_all_files => l(:text_are_you_sure_all)

View File

@ -8,8 +8,7 @@
if(!regexTopicSubject()) {
result=false;
return result;
}
if(params.content!=undefined){
} else if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
@ -128,10 +127,10 @@
<div id="topic_editor" style="display: none;">
<%if User.current.allowed_to?(:as_teacher, course) %>
<div class="mt10">
<%= f.check_box :sticky, :value => topic.sticky %>
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
<%= f.check_box :locked, :value => topic.locked %>
<%= label_tag 'message_locked', l(:label_board_locked) %>
<%= f.check_box :sticky, :value => topic.sticky, :class => 'magic-checkbox fl' %>
<%= label_tag 'message_sticky', l(:label_board_sticky), :class => 'fl' %>
<%= f.check_box :locked, :value => topic.locked, :class => 'magic-checkbox fl' %>
<%= label_tag 'message_locked', l(:label_board_locked), :class => 'fl ml10' %>
<div class="cl"></div>
</div>
<% end %>

View File

@ -67,17 +67,7 @@
}
else if (data.status == -2){
// confirm("对不起该作业的作品过少不能查重!");
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起该作业的作品过少不能查重!",:status=>0, :homework=> homework,:courseid=> courseid})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","30%").css("left","50%").css("padding-top","10px").css("position","fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
function closeModal(){
hideModal($(".blue-border-box"));
}
notice_box("对不起该作业的作品过少不能查重!");
}
return;
}

View File

@ -1,3 +1,4 @@
<% if @syllabuses.count > 0 %>
<% @syllabuses.each do | sy | %>
<div class="sub-con fl" style="cursor: default;">
<div class="task-index-list-box-top">
@ -38,9 +39,15 @@
<div class="cl"></div>
<div style="text-align:center;">
<div class="pages_right_min" style="width:auto; display:inline-block;">
<ul id="homework_pository_ref_pages">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @syllabuses_pages, @syllabus_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
</div>
<% else %>
<div class="edu-tab-con-box">
<img src="../images/bigdata/edu-class/edu-nodata.png" class="edu-nodata-img">
<p class="edu-nodata-p mb30">没有数据可以显示!</p>
</div>
<% end %>

View File

@ -29,7 +29,7 @@
</div>
<div class="right fl">
<div class="banner clearfix mb20 font-16">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr">
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
</span>

View File

@ -33,7 +33,7 @@
</div>
<div class="right fl">
<div class="banner clearfix mb20 font-16">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr">
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
</span>

View File

@ -29,7 +29,7 @@
</div>
<div class="right fl">
<div class="banner clearfix mb20 font-16">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr">
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
</span>

View File

@ -27,7 +27,7 @@
</div>
<div class="right fl">
<div class="banner clearfix mb20 font-16">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr">
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
</span>

View File

@ -2,27 +2,36 @@
<div class="task-index-head mt20 mb20">
<div class="task-index-head-top-course">
<h2 class="fl task-inde-head-title">智能课堂</h2>
<%= link_to "创建", new_syllabus_path, :class => "task-btn task-btn-green fr mt6" %>
<%= link_to "创建", new_course_path, :class => "task-btn task-btn-green fr mt6" %>
<div class="cl"></div>
</div>
<ul class="task-index-head-info clearfix">
<li><span class="color-orange font-bd"><%= @syllabus_count %></span><br/><span >全部课程</span></li>
<li><span class="color-orange font-bd"><%= @join_syllabuses_count %></span><br/><span>你已参</span></li>
<li><span class="color-orange font-bd"><%= @join_syllabuses_count %></span><br/><span>你已参</span></li>
<!-- <li><span class="color-orange font-bd"><%#= @create_syllabuses_count %></span><br/><span>你已创建</span></li>-->
</ul>
</div>
<div class=" clearfix mb15 fl">
<select class="task task-height-40 panel-box-sizing fl color-grey " style="width:160px; border: none;" id="syllabuses" onchange="submit_select_syllabuses(this.value)">
<option value="all">所有课程</option>
<option value="create">我发布的课程</option>
<option value="join">我参与的课程</option>
<!--<option>我收藏的课程</option>-->
</select>
<div class="header-search fl ml10 mr15" >
<input type="text" placeholder="输入课程名字的关键字进行搜索" class="header-search-input fl" id="course_search" style="width: 200px;height: 40px;" />
<a href="javascript:void(0);" onclick="search_syllabuses();"><i class="fa fa-search font-16 mt12 mr10"></i></a>
</div>
<div class="clearfix mb15 fl">
<li class="edu-dropdown fl ml15 mr5" id="thirdly_select" style="width: 100px">
<a href="javascript:void(0);" class="edu-dropdown-toggle" id="all_syllabuses" >所有课程<i class="fa fa-caret-down ml5" ></i></a>
<ul class="edu-dropdown-menu" id="all_syllabuses_list">
<li onclick="change_language(this);"><a id="courses_index_syllabuses_1" href="<%= courses_path(:select => "all", :search => @search) %>" data-remote="true">所有课程</a></li>
<li onclick="change_language(this);"><a id="courses_index_syllabuses_2" href="<%= courses_path(:select => "create", :search => @search) %>" data-remote="true">我发布的课程</a></li>
<li onclick="change_language(this);"><a id="courses_index_syllabuses_3" href="<%= courses_path(:select => "join", :search => @search) %>" data-remote="true">我参与的课程</a></li>
</ul>
</li>
<form action="<%= courses_path(:select => @select) %>" data-remote="true" onsubmit="submitFn(this, event);" class="fl ml15" >
<div class="search-wrapper">
<div class="input-holder">
<input type="text" class="search-input" name="search" placeholder="输入课程关键字进行搜索" />
<button class="search-icon" onclick="searchToggle(this, event);"><i class="fa fa-search font-16 mt5"></i></button>
</div>
<span class="close" onclick="searchToggle(this, event);"><i class="fa fa-times font-16 mt5"></i></span>
</div>
</form>
</div>
<div class="cl"></div>
<div class="content clearfix" id="intelligence_course_list">
<%= render :partial => 'courses/courseList' %>
@ -48,7 +57,8 @@
function submit_select_syllabuses(value){
console.log(value);
$.ajax({
url: "<%= courses_path %>" + ".js",
url: "<%= courses_path %>",
remote: true,
data: { select: value, search: $("#course_search").val() }
});
}
@ -63,4 +73,54 @@
submit_select_syllabuses(value)
}
function change_language(ev){
$(ev).parent().hide();
$("#all_syllabuses").html($(ev).children().html() + '<i class="fa fa-caret-down ml5" ></i>');
}
function change_progress(ev){
$(ev).parent().hide();
$("#all_progress").html($(ev).children().html() + '<i class="fa fa-caret-down ml5" ></i>');
submit_select_syllabuses(value)
}
$("#thirdly_select").hover(function(){
$("#all_syllabuses_list").show();
}, function(){
$("#all_syllabuses_list").hide();
});
// 搜索框
function searchToggle(obj, evt){
var container = $(obj).closest('.search-wrapper');
if(!container.hasClass('active')){
container.addClass('active');
evt.preventDefault();
}
else if(container.hasClass('active') && $(obj).closest('.input-holder').length == 0){
container.removeClass('active');
// clear input
container.find('.search-input').val('');
// clear and hide result container when we press close
container.find('.result-container').fadeOut(100, function(){$(this).empty();});
}
}
function submitFn(obj, evt){
value = $(obj).find('.search-input').val().trim();
_html = "Yup yup! Your search text sounds like this: ";
if(!value.length){
_html = "Yup yup! Add some text friend :D";
}
else{
_html += "<b>" + value + "</b>";
}
$(obj).find('.result-container').html('<span>' + _html + '</span>');
$(obj).find('.result-container').fadeIn(100);
evt.preventDefault();
}
</script>

View File

@ -1 +1,4 @@
$("#intelligence_course_list").html("<%= j(render :partial => "courses/courseList") %>");
$("#intelligence_course_list").html("<%= j(render :partial => "courses/courseList") %>");
$("#courses_index_syllabuses_1").attr('href','<%= courses_path(:select => "all", :search => @search) %>');
$("#courses_index_syllabuses_2").attr('href','<%= courses_path(:select => "create", :search => @search) %>');
$("#courses_index_syllabuses_3").attr('href','<%= courses_path(:select => "join", :search => @search) %>');

View File

@ -1,7 +1,7 @@
<div class="stud-class-container">
<p style="line-height: 2.0;">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '智能课堂', user_course_community_path(User.current) %>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '智能课堂', courses_path %>
</p>
<div class="edu-con-top ">
<span class="ml15 color-grey font-16">新建班级</span>
@ -29,9 +29,12 @@
</li>
<li class="pt20 clearfix">
<label class="panel-form-label label fl"><span class="color-orange mr5">*</span>班级名称&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input type="text" name="course[name]" id="new_course_name" class="task task-height-40 panel-box-sizing fl color-grey" maxlength="100" placeholder="例如&nbsp;&nbsp;计算机学院通信工程专业16级1班" onkeyup="regex_course_name('new');">
<input type="text" name="course[name]" id="new_course_name" class="task task-height-40 panel-box-sizing fl color-grey" maxlength="100" placeholder="例如软件工程计算机系2016秋季A班" onkeyup="regex_course_name('new');">
<div class="cl"></div>
<span class="color-orange fl none" id="new_course_name_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>班级名称不能为空且至少有两个字符</span>
<div class="cl"></div>
<li class="ml125 mb5 fontGrey3" style="margin-left:25%;"><i class="fa fa-check-circle color-light-green mr5"></i>正确示例软件工程计算机系2016秋季A班</li>
<li class="ml125 fontGrey3" style="margin-left:25%;"><i class="fa fa-times-circle color-orange mr5"></i>错误示例计算机系2016秋季A班</li>
</li>
<li class="pt20 clearfix">
<label class="panel-form-label label fl">总学时&nbsp;&nbsp;&nbsp;&nbsp;</label>
@ -57,7 +60,7 @@
</div>
</div>
<div class="cl"></div>
<span class="color-orange fl none" id="new_course_end_date_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>结束日期必须于当前日期</span>
<span class="color-orange fl none" id="new_course_end_date_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>结束日期必须于当前日期</span>
</li>
<li class="pt20 clearfix">
<label class="panel-form-label label fl">&nbsp;&nbsp;&nbsp;&nbsp;</label>

View File

@ -16,10 +16,10 @@
<i class="fa fa-caret-down color-blue font-12" style="display:none;" aria-hidden="true"></i>
</p>
<p class="fl font-16" data-option="module">
模块设置
<i class="fa fa-caret-down color-blue font-12" style="display:none;z-index:100;" aria-hidden="true"></i>
</p>
<!--<p class="fl font-16" data-option="module">-->
<!--模块设置-->
<!--<i class="fa fa-caret-down color-blue font-12" style="display:none;z-index:100;" aria-hidden="true"></i>-->
<!--</p>-->
</div>
<div class="container">
@ -50,9 +50,12 @@
<li class="pt20 clearfix">
<label class="panel-form-label label fl"><span class="color-orange mr5">*</span>班级名称&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<input type="text" name="course[name]" id="edit_course_name" value="<%= @course.name %>" class="task task-height-40 panel-box-sizing fl color-grey" maxlength="100" placeholder="例如&nbsp;&nbsp;计算机学院通信工程专业16级1班" onkeyup="regex_course_name('edit');">
<input type="text" name="course[name]" id="edit_course_name" value="<%= @course.name %>" class="task task-height-40 panel-box-sizing fl color-grey" maxlength="100" placeholder="例如软件工程计算机系2016秋季A班" onkeyup="regex_course_name('edit');">
<div class="cl"></div>
<span class="color-orange fl none" id="edit_course_name_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>班级名称不能为空且至少有两个字符</span>
<div class="cl"></div>
<li class="ml125 mb5 fontGrey3" style="margin-left:25%;"><i class="fa fa-check-circle color-light-green mr5"></i>正确示例软件工程计算机系2016秋季A班</li>
<li class="ml125 fontGrey3" style="margin-left:25%;"><i class="fa fa-times-circle color-orange mr5"></i>错误示例计算机系2016秋季A班</li>
</li>
<li class="pt20 clearfix">
<label class="panel-form-label label fl">总学时&nbsp;&nbsp;&nbsp;&nbsp;</label>
@ -78,7 +81,7 @@
</div>
</div>
<div class="cl"></div>
<span class="color-orange fl none" id="edit_course_end_date_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>结束日期必须于当前日期</span>
<span class="color-orange fl none" id="edit_course_end_date_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>结束日期必须于当前日期</span>
</li>
<li class="pt20 clearfix ">
<label class="panel-form-label label fl">&nbsp;&nbsp;&nbsp;&nbsp;</label>
@ -112,9 +115,9 @@
</div>
</div>
<!--------------------模块设置-------------------->
<div class="module" id="setting_moduels_list" style="display:none;">
<%= render :partial => 'courses/settings/moduels' %>
</div>
<!--<div class="module" id="setting_moduels_list" style="display:none;">-->
<!--<%#= render :partial => 'courses/settings/moduels' %>-->
<!--</div>-->
</div>
</div>
</div>
@ -132,8 +135,8 @@
'/courses/<%= @course.id %>/has_group_student_list?group_id=<%= @role %>'
);
<% end %>
<% elsif @select_tab == 'module'%>
$(".stud-class-set .news .nav p[data-option='module']").click();
<%# elsif @select_tab == 'module'%>
// $(".stud-class-set .news .nav p[data-option='module']").click();
<% end %>
});

View File

@ -32,7 +32,7 @@
</div>
<div class="right fl">
<div class="banner clearfix font-16 teacher_banner">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr color-blue font-14">
<%= link_to '添加学生', search_not_students_course_path(@course), :remote => true, :class => 'color-blue' %>
<%= link_to "导出成绩", export_course_member_excel_course_path(@course, :group_id => 0, :name => @search, :format => 'xls'), :class => 'color-blue' %>

View File

@ -32,7 +32,7 @@
</div>
<div class="right fl">
<div class="banner clearfix font-16 teacher_banner">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr color-blue">
<%= link_to "导出成绩", export_course_member_excel_course_path(@course, :group_id => @group.id, :name => @search, :format => 'xls'), :class => 'color-blue font-14' %>
</span>

View File

@ -6,7 +6,7 @@
</div>
<div class="right fl">
<div class="banner clearfix font-16 teacher_banner" style="border-bottom:1px solid #eee;">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
<span class="span2 fr color-blue">
<%= link_to '添加教师/助教', search_not_teachers_course_path(@course), :remote => true, :class => 'color-blue font-14' %>
</span>

View File

@ -31,7 +31,7 @@
</div>
<div class="right fl">
<div class="banner clearfix font-16 teacher_banner">
<span class="span1 fl color-grey">成员列表</span>
<span class="span1 fl ">成员列表</span>
</div>
<div class="edu-bg" style="min-height:500px;">

View File

@ -6,9 +6,9 @@
<!--<i class="fa fa-check-square-o color-blue blue fl" style="display:none;" aria-hidden="true"></i>-->
<input id="add_student_<%= user.id %>" type="checkbox" class="fl mt7 mr5 magic-checkbox" name="membership[user_ids][]" value="<%= user.id %>">
<label for="add_student_<%= user.id %>">
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1"><%= user.show_name %>(<%= user.login %>)</a>
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-name-dark"><%= user.show_name %>(<%= user.login %>)</a>
<span class="fl color-grey span2 ml10"><%= user.user_extensions.user_technical_title %></span>
<span class="span3 fl ml10"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
<span class="span3 fl ml10 edu-txt-w140 task-hide"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
</label>
</li>
<% end %>

View File

@ -6,9 +6,9 @@
<!--<i class="fa fa-check-square-o color-blue blue fl" style="display:none;" aria-hidden="true"></i>-->
<input id="choose_course_teacher_<%= user.id %>" type="checkbox" class="fl mt7 mr5 magic-checkbox" name="membership[user_ids][]" value="<%= user.id %>">
<label for="choose_course_teacher_<%= user.id %>">
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1"><%= user.show_name %>(<%= user.login %>)</a>
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-txt-w140"><%= user.show_name %>(<%= user.login %>)</a>
<span class="fl color-grey span2 ml10"><%= user.user_extensions.user_technical_title %></span>
<span class="span3 fl ml10"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
<span class="span3 fl ml10 edu-txt-w140 task-hide"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
</label>
</li>
<% end %>

View File

@ -1,8 +1,8 @@
<table class="muban_table mb15" cellpadding="0" cellspacing="0">
<table class="muban_table mb15" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>资源名称</th>
<th >下载数</th>
<th>下载数</th>
<th>引用数</th>
<th>版本号</th>
<th></th>
@ -10,7 +10,7 @@
</thead>
<tbody>
<tr>
<td><p class="popup_ziyuan_title fl"><%= @attachment.filename %></p><span class="muban_icons_blue ml5 fl">当前版本</span></td>
<td><p class="popup_ziyuan_title fl"><%= @attachment.filename %></p><span class="muban_icons_blue mt5 ml5 fl">当前版本</span></td>
<td class="text_c"><%= @attachment.downloads %></td>
<td class="text_c"><%= @attachment.try(:quotes).to_i %></td>
<td class="text_c"><%= format_time(@attachment.created_on) %></td>
@ -51,10 +51,9 @@
</div>
<div class="cl"></div>
<textarea style="resize:none" type="text" placeholder="请在此编辑资源描述" name="description" class="mr15 mb10 muban_textarea" ><%= @attachment.description %></textarea>
<div class="clear mb15">
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="btn fr" onclick="attachment_fresh_for_destroy()">取消</a>
<%#= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %>
<a href="javascript:void(0);" onclick = "upload_attachment_version(event);" onfocus = 'this.blur()' id = 'upload_files_submit_btn' class = 'btn btn-blue fr mr5' >确定</a>
<div class="clearfix">
<a href="javascript:void(0);" onclick ="upload_attachment_version(event);" onfocus = 'this.blur()' id='upload_files_submit_btn' class="task-btn task-btn-blue fr">确定</a>
<a href="javascript:void(0);" onclick="attachment_fresh_for_destroy()" class="task-btn fr mr10">取消</a>
</div>
<% end %>

View File

@ -1,8 +1,8 @@
<table class="muban_table mb10" cellpadding="0" cellspacing="0">
<table class="muban_table mb10" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>资源名称</th>
<th >下载数</th>
<th>下载数</th>
<th>引用数</th>
<th>版本号</th>
<th></th>
@ -28,7 +28,6 @@
<td class="text_c">
<%= link_to( '删除资源', attachment_path(history.attachment, :history_id => history, :type => "history_delete"),
:remote => true,
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => "postOptionLink",
:class => "btn") if allow_to_delete_attachment(history) %>

View File

@ -101,8 +101,8 @@
<%= submit_tag "班内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
<%#= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite" %>
<% if is_course_teacher(User.current,@course) || (@course.publish_resource==1 && User.current.member_of_course?(@course) ) %>
<input class="blueBtn fr mr5" value="上传资源" onclick="course_files_upload();">
<%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :course_id => @course.id), :class => "blue-btn fr mr5", :remote => true) %>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr mr5" onclick="course_files_upload();">上传资源</a>
<%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :course_id => @course.id), :class => "task-btn task-btn-blue fr mr5", :remote => true) %>
<% end %>
<% end %>

View File

@ -1,12 +1,11 @@
<script src="/javascripts/jquery.datetimepicker.js" type="text/javascript"></script>
<div id="muban_popup_box" style="width:340px;">
<div class="muban_popup_top">
<h3 class="fl">发布设置</h3>
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="$('#datetimepicker_mask').datetimepicker('destroy');"></a>
<div class="cl"></div>
<div class="task-popup" style="width:340px;">
<div class="task-popup-title clearfix">
<h3 class="fl color-grey">发布设置</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="muban_popup_con clear mt15" style="margin-left: 37px;">
<div class="task-popup-content clear" style="margin-left: 37px;">
<%= form_tag(republish_file_course_file_path(@course,@file), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
<div class="mb10">
<label class="fl c_dark f14" style="margin-top: 4px;">延期发布:</label>
@ -18,8 +17,9 @@
<span class="fl c_red" style="margin-top: 4px;" id="publish_time_notice"></span>
<div class="cl"></div>
</div>
<a href="javascript:void(0);" class="fr sy_btn_blue" style="margin-right: 115px;" id="submit_file" onclick="submit_republish_file();">确定</a>
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="margin-right: 65px;" id="submit_file" onclick="submit_republish_file();">确定</a>
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
<% end %>
</div>
<div class="cl"></div>

View File

@ -23,12 +23,8 @@
</span>
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
<span id="upload_file_count<%=container.id %>">
<%= l(:label_no_file_uploaded)%>
</span>
<span class="fr c_blue" style="margin-right: <%= container.class.to_s == 'Course' ? 58 : 45 %>px;">单个文件最大限制:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %></span>
<span class="fr c_blue" style="margin-right: <%= container.class.to_s == 'Course' ? 26 : 45 %>px;">单个文件最大限制:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %></span>
<div class="cl"></div>
<div>
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
</span>
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html"></span>
</div>

View File

@ -17,7 +17,7 @@
:class => "linkGrey3 f_14",
:style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %>
<% end %>
<%= file_preview_eye(file, class: 'preview') %>
<%#= file_preview_eye(file, class: 'preview') %>
<span id="image_private_<%= file.id%>">
<% if file.is_public? == false%>
<span class="img_private ml5">私有</span>
@ -82,7 +82,7 @@
<%end%>
<li>
<% if file.destroyable %>
<%= link_to( '删除资源', attachment_path(file),:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
<%= link_to( '删除资源', "javascript:void(0);", :onclick => "delete_confirm_box_3('#{attachment_path(file)}', '确定要删除该资源吗?')", :class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
<% else %>
<%= link_to '删除资源',attachment_versions_delete_path(file), :class => "postOptionLink", :remote => true %>
<% end %>

View File

@ -1,47 +1,46 @@
<script src="/javascripts/jquery.datetimepicker.js" type="text/javascript"></script>
<div id="muban_popup_box" style="width:450px;">
<div class="muban_popup_top">
<h3 class="fl">上传资源</h3>
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="$('#datetimepicker_mask').datetimepicker('destroy');"></a>
<div class="cl"></div>
<div class="task-popup" style="width:450px;">
<div class="task-popup-title clearfix">
<h3 class="fl color-grey">上传资源</h3>
<a href="javascript:void(0);" onclick="$('#datetimepicker_mask').datetimepicker('destroy');" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="muban_popup_con clear mt15 ml55">
<div class="">
<div class="task-popup-content clear">
<div class="ml15">
<%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
<%= form_tag(course_files_path(course), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
<%= form_tag(course_files_path(course), :multipart => true,:remote => !ie8?,:id=>"upload_course_file_form") do %>
<input type="hidden" name="in_course_toolbar" value="Y">
<!--<p class="c_grey fr mt10 mr5">-->
<ul class="c_dark mt10 mb10 f14 attachment_type_ul">
<li class="fl">
<input id="atta_type_1" name="course_attachment_type[]" type="checkbox" value="1" checked class="fl" />
<label for="atta_type_1" class="c_grey fl ml5">课件&nbsp;|&nbsp;</label>
<input id="atta_type_1" name="course_attachment_type[]" type="checkbox" value="1" checked class="fl magic-checkbox" />
<label for="atta_type_1" class="c_grey fl">课件&nbsp;|&nbsp;</label>
</li>
<li class="fl">
<input id="atta_type_2" name="course_attachment_type[]" type="checkbox" value="2" class="fl"/>
<label for="atta_type_2" class="c_grey fl ml5">软件&nbsp;|&nbsp;</label>
<input id="atta_type_2" name="course_attachment_type[]" type="checkbox" value="2" class="fl magic-checkbox"/>
<label for="atta_type_2" class="c_grey fl">软件&nbsp;|&nbsp;</label>
</li>
<li class="fl">
<input id="atta_type_3" name="course_attachment_type[]" type="checkbox" value="3" class="fl"/>
<label for="atta_type_3" class="c_grey fl ml5">媒体&nbsp;|&nbsp;</label>
<input id="atta_type_3" name="course_attachment_type[]" type="checkbox" value="3" class="fl magic-checkbox"/>
<label for="atta_type_3" class="c_grey fl">媒体&nbsp;|&nbsp;</label>
</li>
<li class="fl">
<input id="atta_type_4" name="course_attachment_type[]" type="checkbox" value="4" class="fl"/>
<label for="atta_type_4" class="c_grey fl ml5">代码&nbsp;|&nbsp;</label>
<input id="atta_type_4" name="course_attachment_type[]" type="checkbox" value="4" class="fl magic-checkbox"/>
<label for="atta_type_4" class="c_grey fl">代码&nbsp;|&nbsp;</label>
</li>
<li class="fl">
<input id="atta_type_5" name="course_attachment_type[]" type="checkbox" value="5" class="fl"/>
<label for="atta_type_5" class="c_grey fl ml5">论文&nbsp;|&nbsp;</label>
<input id="atta_type_5" name="course_attachment_type[]" type="checkbox" value="5" class="fl magic-checkbox"/>
<label for="atta_type_5" class="c_grey fl">论文&nbsp;|&nbsp;</label>
</li>
<li class="fl">
<input id="atta_type_6" name="course_attachment_type[]" type="checkbox" value="6" class="fl"/>
<label for="atta_type_6" class="c_grey fl ml5">其他</label>
<input id="atta_type_6" name="course_attachment_type[]" type="checkbox" value="6" class="fl magic-checkbox"/>
<label for="atta_type_6" class="c_grey fl">其他</label>
</li>
</ul>
<div class="cl"></div>
<div class="mb10">
<div class="mb10 mt10">
<%= render :partial => 'files/new_style_attachment_list',:locals => {:container => course} %>
</div>
<div class="cl"></div>
@ -62,13 +61,13 @@
<div class="mb10">
<label class="fl c_dark f14" style="margin-top: 4px;">附件描述:</label>
<div class="fl ml10">
<textarea name="description" placeholder="介绍一下您的资源,让它得到更多人的青睐吧~" style="width: 249px; height: 60px; font-size: 12px;" class="InputBox fl"></textarea>
<textarea name="description" placeholder="介绍一下您的资源,让它得到更多人的青睐吧~" style="width: 291px; height: 60px; font-size: 12px;" class="InputBox fl"></textarea>
</div>
<div class="cl"></div>
</div>
<a href="javascript:void(0);" class="fr sy_btn_blue" style="margin-right: 59px;" id="submit_resource" onclick="submit_course_resource();">确定</a>
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
<span id="upload_file_count_notice" class="fl c_red none"></span>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="margin-right: 27px;" id="submit_resource" onclick="submit_course_resource();">确定</a>
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
<div class="cl"></div>
<% end %>
</div>
@ -103,11 +102,25 @@
function submit_course_resource()
{
<% if User.current.allowed_to?(:as_teacher,course) %>
if(regex_publish_time()) {
$('#submit_resource').parent().submit();
if($("#upload_course_file_form").find('.upload_filename').length == 0){
$("#upload_file_count_notice").html('请至少上传一个资源').show();
event.preventDefault();
return false;
}else{
$("#upload_file_count_notice").hide();
if(regex_publish_time()) {
$('#submit_resource').parent().submit();
}
}
<% else %>
$('#submit_resource').parent().submit();
if($("#upload_course_file_form").find('.upload_filename').length == 0){
$("#upload_file_count_notice").html('请至少上传一个资源').show();
event.preventDefault();
return false;
}else {
$("#upload_file_count_notice").hide();
$('#submit_resource').parent().submit();
}
<% end %>
}
function reset_publish_time(){

View File

@ -439,11 +439,11 @@
//更新文件版本 表单提交确认,原则是只能有一个更新文件
function upload_attachment_version(event){
if($("#upload_form").find('.upload_filename').length > 1){
$("#upload_file_count").html('(只能上传一个更新文件)')
$("#upload_file_count").html('(只能上传一个更新文件)');
event.preventDefault();
return false;
}else if($("#upload_form").find('.upload_filename').length == 0){
$("#upload_file_count").html('(请上传一个更新文件)')
$("#upload_file_count").html('(请上传一个更新文件)');
event.preventDefault();
return false;
}else{

View File

@ -10,25 +10,26 @@
<script type="text/javascript">
// 自动完成
/* CodeMirror.commands.autocomplete = function(cm) {
cm.showHint({hint: CodeMirror.hint.anyword});
};*/
CodeMirror.commands.autocomplete = function(cm) {
cm.showHint({hint: CodeMirror.hint.anyword});
};
var codeContents = $("#challenge-answer-edit-small").val(); // 获取版本库代码内容
var changeCode = codeContents;// 修改代码的内容(初始化时,与版本库代码一致,便于判断)
$(function(){
loading = $("#ajax-indicator").children('span')[0]; // 加载中的html
});
var editor_CodeMirror = CodeMirror.fromTextArea(document.getElementById("challenge-answer-edit-small"), {
mode: {name: "text/x-c++src",
// version: 2,
singleLineStringErrors: false},
/* mode: {name: "text/x-c++src",
// version: 2,
singleLineStringErrors: false},*/ // 目前补全js是引入的javascript-hint,因此目前不能指定语言
lineNumbers: true,
theme: "railscasts",
// extraKeys: {"Ctrl-Q": "autocomplete"}, // 快捷键
indentUnit: 4, //代码缩进为一个tab的距离
matchBrackets: true,
autoRefresh: true,
smartIndent: true//智能换行
smartIndent: true,//智能换行
extraKeys: {"Ctrl-Q": "autocomplete"}
});
editor_CodeMirror.on('change',function(cMirror){
@ -60,6 +61,90 @@
editor_CodeMirror.on('blur',function(cMirror){
clearInterval(sh);
});
// 以下情景用于剔除自动补全功能(下面键盘事件,讲不触发自动补全功能)
var ExcludedIntelliSenseTriggerKeys =
{
"8": "backspace",
"9": "tab",
"13": "enter",
"16": "shift",
"17": "ctrl",
"18": "alt",
"19": "pause",
"20": "capslock",
"27": "escape",
"32": "space",
"33": "pageup",
"34": "pagedown",
"35": "end",
"36": "home",
"37": "left",
"38": "up",
"39": "right",
"40": "down",
"45": "insert",
"46": "delete",
"59": ";",
"91": "left window key",
"92": "right window key",
"93": "select",
"107": "add",
"109": "subtract",
"110": "decimal point",
"111": "divide",
"112": "f1",
"113": "f2",
"114": "f3",
"115": "f4",
"116": "f5",
"117": "f6",
"118": "f7",
"119": "f8",
"120": "f9",
"121": "f10",
"122": "f11",
"123": "f12",
"144": "numlock",
"145": "scrolllock",
"186": "semicolon",
"187": "equalsign",
"188": "comma",
"189": "dash",
"190": "period",
"191": "slash",
"192": "graveaccent",
"220": "backslash",
"222": "quote"
};
// codemmirror键盘按下事件用来触发自动补全代码功能
editor_CodeMirror.on("keyup", function(editor, event)
{
var __Cursor = editor.getDoc().getCursor();
var __Token = editor.getTokenAt(__Cursor);
if (!editor.state.completionActive &&
!ExcludedIntelliSenseTriggerKeys[(event.keyCode || event.which).toString()])
{
// 中文编码的( 与 { 对于键盘事件是相同的,所以需要再判断
if(event.shiftKey && event.keyCode == 57){
if(__Token.string == '('){
editor.replaceSelection(")"); // 自动添加}
editor.setCursor(__Cursor.line, __Cursor.ch); // 设置光标位置在输入(之后
return; // 输入的是"(" 不启动补全功能
}
}else if(event.shiftKey && event.keyCode == 219){
if(__Token.string == '{'){
editor.replaceSelection("}"); // 自动添加}
editor.setCursor(__Cursor.line, __Cursor.ch);// 设置光标位置在输入{之后
return; // 输入的是"{" 不启动补全功能
}
}else if(__Token.string.match(/^[\u4e00-\u9fa5]+$/)){
return; // 输入的是中文,也不启动自动补全功能
}
CodeMirror.commands.autocomplete(editor, null, { completeSingle: false }); // 开启自动补全
}
});
// 设置版本库字体间距
// $("#challenge-answer-edit-small" ).nextAll(".CodeMirror").css("line-height", 1.2);
$(document).ready(function(){

View File

@ -2,7 +2,7 @@
<h3 class="fl">
<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir'} %>
</h3>
<span id="save_status" class="ml15 fl font-14"></span>
<h3 id="save_status" class="ml15 fl" style="font-weight: normal"></h3>
<div class="fr mt5 -horizontal">
<a href="javascript:void(0);" onclick="repository_extend_and_zoom();" id="extend_and_zoom"><i class="fa fa-arrows-alt font-16"></i></a>
</div>

View File

@ -1,4 +1,4 @@
<%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/edit/matchbrackets.js", "/codemirror/mode/clike/clike" %>
<%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint" %>
<%= stylesheet_link_tag "/codemirror/lib/codemirror" %>
<%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %>
<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js',

View File

@ -57,18 +57,14 @@
<label class="panel-form-label fl mr10">&nbsp;</label>
<span class="fl mr5 task-form-30 ml20">
<label class="mr5">教师评分</label>
<select class="task-height-40 task-form-30 disabled-bg" disabled>
<option><%= (@homework_detail_manual.te_proportion * 100).to_i %>%</option>
</select>
<input type="text" class="task-height-40 task-form-30 panel-box-sizing disabled-bg" value="<%= (@homework_detail_manual.te_proportion * 100).to_i %>%" disabled>
</span>
</li>
<li class="clearfix ">
<label class="panel-form-label fl mr10">&nbsp;</label>
<span class="fl mr5 task-form-30 ml20">
<label class="mr5">助教评分</label>
<select class="task-height-40 task-form-30 disabled-bg" disabled>
<option><%= (@homework_detail_manual.ta_proportion * 100).to_i %>%</option>
</select>
<input type="text" class="task-height-40 task-form-30 panel-box-sizing disabled-bg" value="<%= (@homework_detail_manual.ta_proportion * 100).to_i %>%" disabled>
</span>
</li>
<% if @homework.homework_type == 2 %>
@ -76,9 +72,7 @@
<label class="panel-form-label fl mr10">&nbsp;</label>
<span class="fl mr5 task-form-30 ml20">
<label class="mr5">系统评分</label>
<select class="task-height-40 task-form-30 disabled-bg" disabled>
<option><%= (@homework_detail_programing.ta_proportion * 100).to_i %>%</option>
</select>
<input type="text" class="task-height-40 task-form-30 panel-box-sizing disabled-bg" value="<%= (@homework_detail_programing.ta_proportion * 100).to_i %>%" disabled>
</span>
</li>
<li class="clearfix">

View File

@ -25,10 +25,10 @@
<%= image_tag(url_to_avatar(@course),width:"178", height: "100", :id=>'nh_source_tx') %>
</div>
-->
<ul class="fl edu-class-top-info ml15">
<li class="mb10 font-16"><%= @course.name %></li>
<li class="color-grey clearfix mb10">
<span class="fl font-14">邀请码:<span class="color-orange">
<ul class="fl edu-class-top-info ml15" style="width:95%;" >
<li class="mb10 font-16 clearfix">
<span class="fl " style="width:80%;"><%= @course.name %> </span>
<span class="fl font-14 fr">邀请码:<span class="color-orange">
<% if @course.invite_code_halt == 0 %>
<% if User.current.admin? || User.current.member_of_course?(@course) %>
<%=@course.generate_invite_code %>
@ -40,16 +40,8 @@
<% end %>
</span>
</span>
<div class="edu-weixin-share fl ml30">
<a href="#" class=" fr font-14 ">分享<i class="fa fa-weixin fr mt5 ml5" aria-hidden="true"></i></a>
<div class="cl"></div>
<div class="edu-weixin-hide">
<font></font>
<img src="images/bigdata/trustie_QR.jpg" width="100" height="100" alt="微信分享">
<p class="edu-weixin-p">用微信扫描二维码分享给你的小伙伴</p>
</div>
</div>
</li>
<li class="color-grey clearfix font-12">
<span class="javascript:void(0);"><%= link_to @course.teacher.show_name, user_path(@course.teacher), :class => 'edu-info-dark task-hide fl' %></span>
<span class="ml30 edu-info-dark task-hide fl"><%= get_occupation_from_user(@course.teacher).blank? ? '' : get_occupation_from_user(@course.teacher) %></span>
@ -89,8 +81,10 @@
<% end %>
</li>
</ul>
<% if is_teacher %>
<div class="fr edu-position edu-position-hidebox">
<div class="fr edu-position edu-position-hidebox" style="margin-top:-3px;" >
<a href="javascript:void(0);" class="font-16"><i class="fa fa-bars"></i></a>
<ul class="edu-position-hide undis">
<li><a href="javascript:void(0);" onclick="delete_confirm_box('<%=private_or_public_course_path(@course) %>', '您确定要设置为<%= @course.is_public == 0 ? "公开" : "私有" %>吗?');"><%= @course.is_public == 0 ? "设为公开" : "设为私有" %></a></li>
@ -103,13 +97,28 @@
<li><a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= course_path(@course) %>', '班级删除后数据将无法恢复,是否确定删除?')">删除</a></li>
</ul>
</div>
<% elsif User.current.logged? && User.current.member_of_course?(@course) %>
<div class="fr edu-position edu-position-hidebox">
<div class="fr edu-position edu-position-hidebox" style="margin-top:-3px;" >
<a href="javascript:void(0);" class="font-16"><i class="fa fa-bars"></i></a>
<ul class="edu-position-hide undis">
<li><a href="javascript:void(0);" onclick="delete_confirm_box_3('<%=join_path(:object_id => @course.id) %>', '您确定要退出该班级吗?');">退出班级</a></li>
</ul>
</div>
<% end %>
<div class="color-grey clearfix fr" >
<!-- <div class="edu-weixin-share fl ml30">
<a href="#" class=" fr font-14 ">分享<i class="fa fa-weixin fr mt5 ml5" aria-hidden="true"></i></a>
<div class="cl"></div>
<div class="edu-weixin-hide">
<font></font>
<img src="images/bigdata/trustie_QR.jpg" width="100" height="100" alt="微信分享">
<p class="edu-weixin-p">用微信扫描二维码分享给你的小伙伴</p>
</div>
</div>-->
</div>
</div>
</div>

View File

@ -1,10 +1,10 @@
<footer class="inner-footer" id="new_footer">
<div class="inner-footer_con">
<ul class="clearfix inner-footer-nav">
<li><a href="javascript:void(0);" class="fl a_forced" target="_blank">网站首页</a></li>
<li><a href="javascript:void(0);" class="fl a_forced" target="_blank">服务协议</a></li>
<li><a href="javascript:void(0);" class="fl a_forced">支持</a></li>
<li><a href="javascript:void(0);" class="fl a_forced" target="_blank">社区</a></li>
<li><a href="<%= my_account_path %>" class="fl a_forced" target="_blank">网站首页</a></li>
<li><a href="<%= my_account_path %>" class="fl a_forced" target="_blank">服务协议</a></li>
<li><a href="<%= my_account_path %>" class="fl a_forced">支持</a></li>
<li><a href="<%= my_account_path %>" class="fl a_forced" target="_blank">社区</a></li>
</ul>
<div class="cl"></div>
<div class="fl" style="width:440px;">
@ -26,7 +26,7 @@
</ul>
</li>
</ul>
<a href="javascript:void(0);" class="fl a_forced"><img src="../images/bigdata/bigdata-logo.png" width="50" height="50" alt="高校智能化教学与实训平台"></a>
<a href="<%= my_account_path %>" class="fl a_forced"><img src="../images/bigdata/bigdata-logo.png" width="50" height="50" alt="高校智能化教学与实训平台"></a>
<p class="inner-footer-p-big fr ml30">高校智能化教学与实训平台</p>
</div>
<div class="cl"></div>

View File

@ -1,6 +1,6 @@
<div class="header_con clearfix">
<div class="fl clearfix new-logo">
<a href="javascript:void(0);" class="fl a_forced"><img src="../images/bigdata/bigdata-logo.png" width="45" height="45" alt="高校智能化教学与实训平台"></a>
<a href="<%= my_account_path %>" class="fl a_forced"><img src="../images/bigdata/bigdata-logo.png" width="45" height="45" alt="高校智能化教学与实训平台"></a>
</div>
<div class="header-search fl mt10 ml15 mr15">
<dropdown class="fl">
@ -15,13 +15,13 @@
</dropdown>
<input type="text" placeholder="请输入关键词进行搜索" class="header-search-input fl">
<a href="#"><i class="fa fa-search font-16 mt8 mr10"></i></a>
<a href="<%= my_account_path %>"><i class="fa fa-search font-16 mt8 mr10"></i></a>
</div>
<ul class="fl innner-nav">
<li><a href="javascript:void(0);" class="new-nav-a a_forced">智能课堂</a></li>
<li><a href="javascript:void(0);" class=" new-nav-a a_forced">项目实训</a></li>
<li><a href="javascript:void(0);" class="new-nav-a a_forced">论坛</a></li>
<li><a href="javascript:void(0);" class=" new-nav-a a_forced">帮助中心</a></li>
<li><a href="<%= my_account_path %>" class="new-nav-a a_forced">智能课堂</a></li>
<li><a href="<%= my_account_path %>" class=" new-nav-a a_forced">项目实训</a></li>
<li><a href="<%= my_account_path %>" class="new-nav-a a_forced">论坛</a></li>
<li><a href="<%= my_account_path %>" class=" new-nav-a a_forced">帮助中心</a></li>
<div class="cl"></div>
</ul>
@ -33,19 +33,19 @@
<div class="task-user-dropdown">
<font></font>
<ul class="task-user-dropdown-nav">
<li><a href="javascript:void(0);" class="task-index-name task-hide"><%= User.current.show_name %></a></li>
<li><a href="<%= my_account_path %>" class="task-index-name task-hide"><%= User.current.show_name %></a></li>
<span class="task-line"></span>
<li><a href="javascript:void(0);" class="a_forced">我的主页</a></li>
<li><a href="javascript:void(0);" class="a_forced">我的课程</a></li>
<li><a href="javascript:void(0);" class="a_forced">我的实训</a></li>
<li><a href="javascript:void(0);" class="a_forced">我的留言</a></li>
<li><a href="<%= my_account_path %>" class="a_forced">我的主页</a></li>
<li><a href="<%= my_account_path %>" class="a_forced">我的课程</a></li>
<li><a href="<%= my_account_path %>" class="a_forced">我的实训</a></li>
<li><a href="<%= my_account_path %>" class="a_forced">我的留言</a></li>
<span class="task-line"></span>
<li><a href="javascript:void(0);" class="a_forced">修改资料</a></li>
<li><a href="<%= my_account_path %>" class="a_forced">修改资料</a></li>
<li><%= link_to '退出', logout_url_without_domain %></li>
</ul>
</div>
</ul>
<a href="javascript:void(0);" class="fr inner-nav-mes a_forced" style="color:#fff;">
<a href="<%= my_account_path %>" class="fr inner-nav-mes a_forced" style="color:#fff;">
<i class="fa fa-bell fl"></i>
<span class="inner-nav-cir fl ml5">0</span>
</a>

View File

@ -56,7 +56,7 @@
<p class="mb10 font-14">
<i class="fa fa-map-marker mr5 color-grey" ></i>
<%= link_to User.current.show_name, user_path(User.current) %> >
<%= link_to '智能课堂', user_course_community_path(User.current) %> >
<%= link_to '智能课堂', courses_path %> >
<%= link_to @course.syllabus.title, syllabus_path(@course.syllabus), :title => '课程' %> >
<%= link_to @course.name, course_path(@course), :title => '班级' %>
</p>
@ -70,61 +70,75 @@
<li class="clearfix" id="sy_01">
<a href="<%= course_path(@course) %>" class="fl ml15">动态</a>
</li>
<% course_modules = @course.create_course_modules.where(:hidden => 0).order("position asc") %>
<% course_board = @course.boards.where("parent_id is NULL").first %>
<% course_modules.each_with_index do |cm, i| %>
<% case cm.module_type %>
<% when "news" %>
<li class="clearfix" id="sy_04">
<a href="<%= course_news_index_path(@course) %>" class="fl ml15 ">通知</a>
<span class="edu-cir-grey fl ml10 mt15"><%= @course.news.count %></span>
<%= link_to( "+", new_course_news_path(@course, :is_new => 1), :class => 'fr mr15 font-18 link-color-grey', :title => "#{l(:label_course_news_new)}") if is_teacher %>
</li>
<% when "boards" %>
<% count = course_board ? course_board.messages.count : 0 %>
<li class="clearfix" id="sy_02">
<a href="<%=course_boards_path(@course) %>" class="fl ml15 ">讨论</a>
<span class="edu-cir-grey fl ml10 mt15"><%= count %></span>
<%= link_to( "+", course_boards_path(@course, :flag => true, :is_new => 1), :class => 'fr mr15 font-18 link-color-grey', :title => "#{l(:label_message_new)}") if User.current.logged? %>
</li>
<div id="board_children_list">
<%= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %>
</div>
<% when "attachment" %>
<li class="clearfix" id="sy_05">
<a href="<%= course_files_path(@course) %>" class="fl ml15 ">资源</a>
<span class="edu-cir-grey fl ml10 mt15"><%= course_file_num %></span>
<% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>
<a class="fr mr15 font-18 link-color-grey" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();">+</a>
<% end %>
</li>
<% when "homework" %>
<li class="clearfix" id="sy_03">
<a href="<%= homework_common_index_path(:course => @course.id) %>" class="fl ml15 ">作业</a>
<span class="edu-cir-grey fl ml10 mt15"><%= homework_num %></span>
<% if is_teacher %>
<a href="javascript:void(0);" onclick="alert_choose_homework_type('<%= @course.id %>');" class="fr mr15 font-18 link-color-grey" title="新建作业">+</a>
<% end %>
</li>
<% when "exercises" %>
<% count = User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count %>
<li class="clearfix" id="sy_08">
<a href="<%= User.current.logged? ? exercise_index_path(:course_id => @course.id) : signin_url_without_domain %>" class="fl ml15 ">试卷</a>
<span class="edu-cir-grey fl ml10 mt15"><%= count %></span>
<%= link_to( "+", new_exercise_path(:course_id => @course.id), :class => 'fr mr15 font-18 link-color-grey', :title =>"新建试卷") if is_teacher %>
</li>
<% when "poll" %>
<li class="clearfix" id="sy_07">
<a href="<%= poll_index_path(:polls_type => "Course", :polls_group_id => @course.id) %>" class="fl ml15 ">问卷</a>
<span class="edu-cir-grey fl ml10 mt15"><%= course_poll_count %></span>
<%= link_to( "+", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'fr mr15 font-18 link-color-grey', :title =>"#{l(:label_new_poll)}") if is_teacher %>
</li>
<% when "statistics" %>
<li class="clearfix" id="sy_010">
<a href="<%= course_statistics_course_path(@course) %>" class="fl ml15 ">统计</a>
</li>
<li class="clearfix" id="sy_03">
<a href="<%= homework_common_index_path(:course => @course.id) %>" class="fl ml15 ">作业</a>
<span class="edu-cir-grey fl ml10 mt15"><%= homework_num %></span>
<% if is_teacher %>
<a href="javascript:void(0);" onclick="alert_choose_homework_type('<%= @course.id %>');" class="fr mr15 font-18 link-color-grey" title="新建作业">+</a>
<% end %>
<% end %>
</li>
<li class="clearfix" id="sy_05">
<a href="<%= course_files_path(@course) %>" class="fl ml15 ">资源</a>
<span class="edu-cir-grey fl ml10 mt15"><%= course_file_num %></span>
<% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>
<a class="fr mr15 font-18 link-color-grey" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();">+</a>
<% end %>
</li>
<%# course_modules = @course.create_course_modules.where(:hidden => 0).order("position asc") %>
<%# course_board = @course.boards.where("parent_id is NULL").first %>
<%# course_modules.each_with_index do |cm, i| %>
<%# case cm.module_type %>
<%# when "news" %>
<!--<li class="clearfix" id="sy_04">-->
<!--<a href="<%#= course_news_index_path(@course) %>" class="fl ml15 ">通知</a>-->
<!--<span class="edu-cir-grey fl ml10 mt15"><%#= @course.news.count %></span>-->
<!--<%#= link_to( "+", new_course_news_path(@course, :is_new => 1), :class => 'fr mr15 font-18 link-color-grey', :title => "#{l(:label_course_news_new)}") if is_teacher %>-->
<!--</li>-->
<!--<%# when "boards" %>-->
<!--<%# count = course_board ? course_board.messages.count : 0 %>-->
<!--<li class="clearfix" id="sy_02">-->
<!--<a href="<%#=course_boards_path(@course) %>" class="fl ml15 ">讨论</a>-->
<!--<span class="edu-cir-grey fl ml10 mt15"><%#= count %></span>-->
<!--<%#= link_to( "+", course_boards_path(@course, :flag => true, :is_new => 1), :class => 'fr mr15 font-18 link-color-grey', :title => "#{l(:label_message_new)}") if User.current.logged? %>-->
<!--</li>-->
<!--<div id="board_children_list">-->
<!--<%#= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %>-->
<!--</div>-->
<!--<%# when "attachment" %>-->
<!--<li class="clearfix" id="sy_05">-->
<!--<a href="<%#= course_files_path(@course) %>" class="fl ml15 ">资源</a>-->
<!--<span class="edu-cir-grey fl ml10 mt15"><%#= course_file_num %></span>-->
<!--<%# if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>-->
<!--<a class="fr mr15 font-18 link-color-grey" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();">+</a>-->
<!--<%# end %>-->
<!--</li>-->
<!--<%# when "homework" %>-->
<!--<li class="clearfix" id="sy_03">-->
<!--<a href="<%#= homework_common_index_path(:course => @course.id) %>" class="fl ml15 ">作业</a>-->
<!--<span class="edu-cir-grey fl ml10 mt15"><%#= homework_num %></span>-->
<!--<%# if is_teacher %>-->
<!--<a href="javascript:void(0);" onclick="alert_choose_homework_type('<%#= @course.id %>');" class="fr mr15 font-18 link-color-grey" title="新建作业">+</a>-->
<!--<%# end %>-->
<!--</li>-->
<!--<%# when "exercises" %>-->
<!--<%# count = User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count %>-->
<!--<li class="clearfix" id="sy_08">-->
<!--<a href="<%#= User.current.logged? ? exercise_index_path(:course_id => @course.id) : signin_url_without_domain %>" class="fl ml15 ">试卷</a>-->
<!--<span class="edu-cir-grey fl ml10 mt15"><%#= count %></span>-->
<!--<%#= link_to( "+", new_exercise_path(:course_id => @course.id), :class => 'fr mr15 font-18 link-color-grey', :title =>"新建试卷") if is_teacher %>-->
<!--</li>-->
<!--<%# when "poll" %>-->
<!--<li class="clearfix" id="sy_07">-->
<!--<a href="<%#= poll_index_path(:polls_type => "Course", :polls_group_id => @course.id) %>" class="fl ml15 ">问卷</a>-->
<!--<span class="edu-cir-grey fl ml10 mt15"><%#= course_poll_count %></span>-->
<!--<%#= link_to( "+", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'fr mr15 font-18 link-color-grey', :title =>"#{l(:label_new_poll)}") if is_teacher %>-->
<!--</li>-->
<!--<%# when "statistics" %>-->
<!--<li class="clearfix" id="sy_010">-->
<!--<a href="<%#= course_statistics_course_path(@course) %>" class="fl ml15 ">统计</a>-->
<!--</li>-->
<%# end %>
<%# end %>
</ul>
<span class="font-12 fr" style="color:#ccc;"><i class="fa fa-eye mr5" ></i><%= @course.visits %> 次访问</span>
</div>

View File

@ -46,11 +46,11 @@
<ul class="panel-user-leftnav">
<h3 class="mb15 ml15 mt15">账户管理</h3>
<% if @force %>
<li><a href="javascript:void(0);" class="a_forced" id="account_setting_1">基本资料</a></li>
<li><a href="javascript:void(0);" class="a_forced" id="account_setting_2">修改头像</a></li>
<li><a href="javascript:void(0);" class="a_forced" id="account_setting_3">身份认证</a></li>
<li><a href="javascript:void(0);" class="a_forced" id="account_setting_4">安全设置</a></li>
<li><a href="javascript:void(0);" class="a_forced" id="account_setting_5">修改密码</a></li>
<li><a href="<%= my_account_path %>" class="a_forced" id="account_setting_1">基本资料</a></li>
<li><a href="<%= my_account_path %>" class="a_forced" id="account_setting_2">修改头像</a></li>
<li><a href="<%= my_account_path %>" class="a_forced" id="account_setting_3">身份认证</a></li>
<li><a href="<%= my_account_path %>" class="a_forced" id="account_setting_4">安全设置</a></li>
<li><a href="<%= my_account_path %>" class="a_forced" id="account_setting_5">修改密码</a></li>
<% else %>
<li><%= link_to '基本资料', my_account_path, :id => 'account_setting_1' %></li>
<li><%= link_to '修改头像', avatar_account_path, :id => 'account_setting_2' %></li>

View File

@ -26,7 +26,7 @@
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey" ></i>
<%= link_to User.current.show_name, user_path(User.current) %> >
<%= link_to '智能课堂', user_course_community_path(User.current) %> >
<%= link_to '智能课堂', courses_path %> >
<%= link_to @course.syllabus.title, syllabus_path(@course.syllabus), :title => '课程' %> >
<%= link_to @course.name, course_path(@course), :title => '班级' %>
</p>

View File

@ -1,5 +1,5 @@
<div class="panel-user-right-con clearfix">
<div id="edit_account_div" class="<%= @force ? '' : 'none' %>">
<div id="edit_account_div" class="none">
<div class="alert alert-orange mb15 mt15 <%= (@s_message.nil? && @d_message.nil?) ? 'none' : '' %>" id="account_tip">
<a data-dismiss="alert" class="task-close fr" type="button" id="account_tip_a">×</a>
@ -147,14 +147,14 @@
</li>
<li class="clearfix" style="margin-right:41px;">
<a href="javascript:void(0);" id="my_account_form_link" class="task-btn task-btn-blue fr">保存</a>
<a href="javascript:void(0);" onclick="cancel_edit_account('<%= @force %>');" class="task-btn fr mr10">取消</a>
<a href="javascript:void(0);" onclick="cancel_edit_account();" class="task-btn fr mr10">取消</a>
</li>
</ul>
<% end %>
</div>
</div>
<div id="show_account_div" class="<%= @force ? 'none' : '' %>">
<div id="show_account_div" class="">
<div class="panel-form mr15 mt30">
<a href="javascript:void(0);" class="fr mb10" title="编辑资料" id="edit_my_account"><i class="fa fa-edit font-16"></i></a>
@ -163,7 +163,7 @@
<li class="clearfix mb10">
<label class="panel-form-label fl"><span class="color-red mr5">*</span>真实姓名:</label>
<p class="fl task-bg-grey02 panel-box-sizing "><%= @user.try(:lastname) + @user.try(:firstname) %></p>
<p class="fl task-bg-grey02 panel-box-sizing "><span class="mr15"><%= @user.try(:lastname) + @user.try(:firstname) %></span></p>
</li>
<li class="clearfix mb10">
<label class="panel-form-label fl"><span class="color-red mr5">*</span>我的性别:</label>
@ -185,6 +185,10 @@
<i class="fa fa-times-circle-o" aria-hidden="true"></i>
未认证
</span>
<span class="color-orange ml20">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
认证中
</span>
<% end %>
</p>
</li>
@ -196,7 +200,7 @@
<% else %>
<label class="panel-form-label fl"><span class="color-red mr5">*</span>职称:</label>
<p class="fl task-bg-grey02 panel-box-sizing"><%= @user.user_extensions.try(:technical_title) %></p>
<p class="fl task-bg-grey02 panel-box-sizing"><span class="mr15"><%= @user.user_extensions.try(:technical_title) %></span></p>
<% end %>
</li>
<li class="clearfix mb10">
@ -241,7 +245,20 @@
<% title = "" %>
<% language = "" %>
<% end %>
<% if @force %>
<%= render :partial => "welcome/guidance_mask" %>
<% elsif @auth %>
<%= render :partial => 'welcome/two_btn_mask_pop',
:locals => {
:btn1 => "试用申请",
:btn2 => "身份认证",
:tip1 => "更多功能,需要经过管理员的授权审核",
:tip2 => "建议先提交身份认证,再进行试用申请",
:url1 => "javascript:void(0);",
:url2 => "#{authentication_account_path}"
}
%>
<% end %>
<script type="text/javascript">
function apply_add_school() {
var htmlvalue = "<%= escape_javascript(render :partial => 'my/apply_add_school')%>";

View File

@ -0,0 +1,151 @@
<%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint" %>
<%= stylesheet_link_tag "/codemirror/lib/codemirror", "/codemirror/addon/hint/show-hint", "/codemirror/doc/docs" %>
<div id=nav>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></a>
<ul>
<li><a href="../index.html">Home</a>
<li><a href="../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a class=active href="#">Any Word Completion</a>
</ul>
</div>
<article>
<h2>Any Word Completion Demo</h2>
<form><textarea id="code" name="code">
(function() {
"use strict";
var WORD = /[\w$]+/g, RANGE = 500;
CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
var word = options && options.word || WORD;
var range = options && options.range || RANGE;
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
var start = cur.ch, end = start;
while (end < curLine.length && word.test(curLine.charAt(end))) ++end;
while (start && word.test(curLine.charAt(start - 1))) --start;
var curWord = start != end && curLine.slice(start, end);
var list = [], seen = {};
function scan(dir) {
var line = cur.line, end = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
for (; line != end; line += dir) {
var text = editor.getLine(line), m;
word.lastIndex = 0;
while (m = word.exec(text)) {
if ((!curWord || m[0].indexOf(curWord) == 0) && !seen.hasOwnProperty(m[0])) {
seen[m[0]] = true;
list.push(m[0]);
}
}
}
}
scan(-1);
scan(1);
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
});
})();
</textarea></form>
<p>Press <strong>ctrl-space</strong> to activate autocompletion. The
completion uses
the <a href="../doc/manual.html#addon_anyword-hint">anyword-hint.js</a>
module, which simply looks at nearby words in the buffer and completes
to those.</p>
<script>
CodeMirror.commands.autocomplete = function(cm) {
cm.showHint({hint: CodeMirror.hint.anyword});
};
var shixuns_editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
extraKeys: {"Ctrl-Q": "autocomplete"}
});
var ExcludedIntelliSenseTriggerKeys =
{
"8": "backspace",
"9": "tab",
"13": "enter",
"16": "shift",
"17": "ctrl",
"18": "alt",
"19": "pause",
"20": "capslock",
"27": "escape",
"32": "space",
"33": "pageup",
"34": "pagedown",
"35": "end",
"36": "home",
"37": "left",
"38": "up",
"39": "right",
"40": "down",
"45": "insert",
"46": "delete",
"91": "left window key",
"92": "right window key",
"93": "select",
"107": "add",
"109": "subtract",
"110": "decimal point",
"111": "divide",
"112": "f1",
"113": "f2",
"114": "f3",
"115": "f4",
"116": "f5",
"117": "f6",
"118": "f7",
"119": "f8",
"120": "f9",
"121": "f10",
"122": "f11",
"123": "f12",
"144": "numlock",
"145": "scrolllock",
"186": "semicolon",
"187": "equalsign",
"188": "comma",
"189": "dash",
"190": "period",
"191": "slash",
"192": "graveaccent",
"220": "backslash",
"222": "quote"
}
shixuns_editor.on("keyup", function(editor, event)
{
if(event.shiftKey){
console.log("#############");
console.log(event.keyCode);
console.log("#############")
}
var __Cursor = editor.getDoc().getCursor();
var __Token = editor.getTokenAt(__Cursor);
console.log(!ExcludedIntelliSenseTriggerKeys[(event.keyCode || event.which).toString()]);
if (!editor.state.completionActive &&
!ExcludedIntelliSenseTriggerKeys[(event.keyCode || event.which).toString()])
{
// 中文编码的( 与 { 对于键盘事件是相同的,所以需要再判断
if(event.shiftKey && event.keyCode == 57){
if(__Token.string == '('){
editor.replaceSelection(")"); // 自动添加}
editor.setCursor(__Cursor.line, __Cursor.ch); // 设置光标位置在输入(之后
}
}else if(event.shiftKey && event.keyCode == 219){
if(__Token.string == '{'){
editor.replaceSelection("}"); // 自动添加}
editor.setCursor(__Cursor.line, __Cursor.ch);// 设置光标位置在输入{之后
}
}
CodeMirror.commands.autocomplete(editor, null, { completeSingle: false });
}
});
</script>
</article>

View File

@ -12,7 +12,7 @@
<td><%= student_work.user.show_name%></td>
<td><%= student_work.updated_at %></td>
<td class="<%= score_color student_work.student_score %>">
<%= format("%.1f",student_work.student_score) %>(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
<%= student_work.student_score.nil? ? '--' : format("%.1f",student_work.student_score) %>(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
</td>
<td>
<%= link_to '查看', student_work_path(student_work), :class => 'link-color-blue' %>

View File

@ -269,16 +269,23 @@
<% if @homework.homework_detail_manual.comment_status == 1%>
<% end_time = @homework.end_time.to_i %>
<% if end_time >= Time.now.to_i %>
<span class="fr">提交剩余时间<span class="color-orange"> <%= (end_time - Time.now.to_i) / (24*60*60) %> 天 <%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%> 分</span></span>
<span class="ml30">提交剩余时间<span class="color-orange"> <%= (end_time - Time.now.to_i) / (24*60*60) %> 天 <%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%> 分</span></span>
<% else %>
<span class="color-orange fr">提交已截止</span>
<span class="color-orange ml30">提交已截止</span>
<% end %>
<% elsif @homework.homework_detail_manual.comment_status == 2%>
<% late_time = @homework.late_time.to_i %>
<% if late_time >= Time.now.to_i %>
<span class="ml30">补交剩余时间<span class="color-orange"> <%= (late_time - Time.now.to_i) / (24*60*60) %> 天 <%= ((late_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((late_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%> 分</span></span>
<% else %>
<span class="color-orange ml30">补交已截止</span>
<% end %>
<% elsif @homework.homework_detail_manual.comment_status == 3%>
<% end_time = @homework.homework_detail_manual.evaluation_end.to_time.to_i + 24*60*60 - 1 %>
<% if end_time >= Time.now.to_i %>
<span class="fr">匿评剩余时间<span class="color-orange"> <%= (end_time - Time.now.to_i) / (24*60*60)%> 天 <%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%> 分</span></span>
<span class="ml30">匿评剩余时间<span class="color-orange"> <%= (end_time - Time.now.to_i) / (24*60*60)%> 天 <%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%> 分</span></span>
<% else %>
<span class="color-orange fr">匿评已截止</span>
<span class="color-orange ml30">匿评已截止</span>
<% end %>
<% end%>
<% end%>

View File

@ -1,13 +1,7 @@
//代码查重
<% if @work_count <= 1 %>
//弹框
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起该作业的作品过少不能查重!",:status=>0, :homework=> @homework,:courseid=> @course_id})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
notice_box("对不起该作业的作品过少不能查重!");
function closeModal() {
hideModal($(".blue-border-box"));

View File

@ -3,7 +3,7 @@
<% allow_visit = course.is_delete == 0 && (User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1) %>
<li class="clearfix">
<span class="span4 fl ">
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" class="fl mr5" target="<%= allow_visit ? '_blank' : "" %>"><%= course.name %></a>
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" onclick="<%= allow_visit ? '' : 'notice_sure_box(\'你不是该私有班级的成员,不能访问\')' %>" class="fl mr5" target="<%= allow_visit ? '_blank' : "" %>"><%= course.name %></a>
<% if course.is_public == 0 %>
<a href="javascript:void(0);" class="fa fa-lock fl" style="padding-top:18px;color:#ccc;" aria-hidden="true"></a>
<% end %>

View File

@ -1,4 +1,5 @@
<% @join_syllabuses.each_with_index do |syllabus, index|%>
<% if @join_syllabuses.count > 0 %>
<% @join_syllabuses.each_with_index do |syllabus, index|%>
<% course_count = @status == 1 ? syllabus.courses.where("is_delete = 0 and is_end = 0").count : syllabus.courses.where("is_delete = 0 and is_end = 1").count %>
<% if !(@status == 2 && course_count == 0) %>
<div class="sub-con color-grey">
@ -8,7 +9,7 @@
<i class="fa fa-minus-square color-blue font-20 cut" aria-hidden="true" style="display:none;"></i>
</span>
<span class="span1 ">
<a href="<%= syllabus_path(syllabus.id) %>" class="ml10 mr10" target="_blank"><%= syllabus.title %></a>
<a href="<%= syllabus_path(syllabus.id) %>" class="ml6 mr10" target="_blank"><%= syllabus.title %></a>
<% if course_count > 0 %>
<em class="font-12"><%= course_count %></em>
<% end %>
@ -37,3 +38,6 @@
</div>
<% end %>
<% end %>
<% else %>
<%= render :partial => 'welcome/no_data' %>
<% end %>

View File

@ -1,3 +1,4 @@
<% if @my_syllabuses.count > 0 %>
<% @my_syllabuses.each_with_index do |syllabus, index|%>
<% course_count = @status == 1 ? syllabus.courses.where("is_delete = 0 and is_end = 0").count : syllabus.courses.where("is_delete = 0 and is_end = 1").count %>
<% if !(@status == 2 && course_count == 0) %>
@ -8,7 +9,7 @@
<i class="fa fa-minus-square color-blue font-20 cut" aria-hidden="true" style="display:none;"></i>
</span>
<span class="span1">
<a href="<%= syllabus_path(syllabus.id) %>" class="ml10 mr10" target="_blank"><%= syllabus.title %></a>
<a href="<%= syllabus_path(syllabus.id) %>" class="ml6 mr10" target="_blank"><%= syllabus.title %></a>
<% if course_count > 0 %>
<em class="font-12"><%= course_count %></em>
<% end %>
@ -36,4 +37,7 @@
</ul>
</div>
<% end %>
<% end %>
<% else %>
<%= render :partial => 'welcome/no_data' %>
<% end %>

View File

@ -1,7 +1,7 @@
<div class="edu-class-container" style="flex: 1 0 auto;">
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '智能课堂', user_course_community_path(User.current) %>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '智能课堂', courses_path %>
</p>
<div class="edu-con-top ">
<p class="ml15 color-grey">编辑课程</p>

View File

@ -1,7 +1,7 @@
<div class="edu-class-container" style="flex: 1 0 auto;">
<p class="mb10">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '智能课堂', user_course_community_path(User.current) %>
<%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to '智能课堂', courses_path %>
</p>
<div class="edu-con-top ">
<p class="ml15 color-grey">新建课程</p>

View File

@ -1,28 +1,18 @@
<%= form_tag add_exist_file_to_course_user_path(user, :type => defined?(type) ? type : "6" ),:remote=>true,:id=>'course_list_form' do %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<div class="clearfix mb15 edu-bg-light-blue edu-max-h200">
<%= hidden_field_tag(:send_id, send_id) %>
<ul>
<% 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) + '['+course.time.to_s+course.term + ']'%></li>
</ul>
<li class="clearfix">
<label class="fl mt5 ml5 edu-class-pop-label edu-color-grey">
<input id="send_course_<%= course.id %>" type="checkbox" class="fl mt8 mr5 magic-checkbox" name="course_ids[]" value="<%= course.id %>">
<label for="send_course_<%= course.id %>" class="edu-info-dark task-hide fl" title="<%= course.name %>"><%= course.name %></label>
</label>
</li>
<% end %>
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</ul>
</div>
<div class="cl"></div>
<% end %>

View File

@ -23,7 +23,8 @@
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey edu-txt-850"%>
<% end %>
</div>
<%=get_hw_status(activity).html_safe %>
<% homework_curr_status = homework_curr_time(activity) %>
<span class="edu-filter-btn <%= homework_status_color homework_curr_status[:status] %> ml10 fl mt3"><%= homework_curr_status[:status] %></span>
<div class="cl"></div>
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>

View File

@ -11,7 +11,7 @@
</div>
<% end %>
<% end %>
<div class="homepagePostSubmit">
<div class="">
<%= user_for_homework_common activity,is_teacher,work %>
</div>
<% if !is_teacher && !work.nil? && work.user == User.current && activity.end_time < Time.now %>

View File

@ -14,50 +14,51 @@
});
});
</script>
<div class="f16 fb fontBlue mb10">选用资源库中的资源</div>
<div class="subjectList fl mr10">
<% if !params[:course_id].nil? %>
<a href="<%= import_resources_user_path(User.current, :type => '6', :course_id => params[:course_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
<a href="<%= import_resources_user_path(User.current, :type => '1', :course_id => params[:course_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
<% elsif !params[:project_id].nil? %>
<a href="<%= import_resources_user_path(User.current, :type => '6', :project_id => params[:project_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
<a href="<%= import_resources_user_path(User.current, :type => '1', :project_id => params[:project_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
<% elsif !params[:subfield_file_id].nil? %>
<a href="<%= import_resources_user_path(User.current, :type => '6', :subfield_file_id => params[:subfield_file_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
<a href="<%= import_resources_user_path(User.current, :type => '1', :subfield_file_id => params[:subfield_file_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
<% end %>
<div id="user_import_resource_search">
<%=render :partial=>'users/user_import_resource_search', :locals => {:type => @type, :search => '', :mul_id => @resource_id, :mul_type => @resource_type} %>
<div class="task-popup" style="width:615px;">
<div class="task-popup-title clearfix">
<h3 class="fl color-grey">选用资源库中的资源</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<!--<%#= form_tag( url_for(:controller => 'users', :action => 'import_resources_search', :id => User.current.id), :remote => true , :method => 'get', :id => 'resource_search_form') do %>-->
<!--<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="subjectSearch fr" />-->
<!--<%#= hidden_field_tag(:type,type.nil? ? 1 : type) %>-->
<!--<%#= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none' %>-->
<!--<%# end %>-->
<div class="cl"></div>
<div class="task-popup-content clear">
<div class="subjectList fl mr10">
<% if !params[:course_id].nil? %>
<a href="<%= import_resources_user_path(User.current, :type => '6', :course_id => params[:course_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
<a href="<%= import_resources_user_path(User.current, :type => '1', :course_id => params[:course_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
<% elsif !params[:project_id].nil? %>
<a href="<%= import_resources_user_path(User.current, :type => '6', :project_id => params[:project_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
<a href="<%= import_resources_user_path(User.current, :type => '1', :project_id => params[:project_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
<% elsif !params[:subfield_file_id].nil? %>
<a href="<%= import_resources_user_path(User.current, :type => '6', :subfield_file_id => params[:subfield_file_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
<a href="<%= import_resources_user_path(User.current, :type => '1', :subfield_file_id => params[:subfield_file_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
<% end %>
<div id="user_import_resource_search">
<%=render :partial=>'users/user_import_resource_search', :locals => {:type => @type, :search => '', :mul_id => @resource_id, :mul_type => @resource_type} %>
</div>
<div style="height:441px; min-height:441px; max-height:441px;">
<ul class="subjectBanner mt10">
<li class="subjectName fl hidden"><span style="padding-left:15px;">资源名称</span></li>
<li class="subjectType fl">类别</li>
<li class="subjectCount fl">大小</li>
<li class="subjectPublisher fl">上传者</li>
<li class="fl subjectDate">上传时间</li>
</ul>
<div id="import_resource_info_list">
<%= render :partial => 'users/user_import_resource_list',:locals => {:project_id => params[:project_id], :subfield_file_id => params[:subfield_file_id], :course_id => params[:course_id]} %>
<div class="cl"></div>
<div style="height:441px; min-height:441px; max-height:441px;">
<ul class="subjectBanner mt10">
<li class="subjectName fl hidden"><span style="padding-left:15px;">资源名称</span></li>
<li class="subjectType fl">类别</li>
<li class="subjectCount fl">大小</li>
<li class="subjectPublisher fl">上传者</li>
<li class="fl subjectDate">上传时间</li>
</ul>
<div id="import_resource_info_list">
<%= render :partial => 'users/user_import_resource_list',:locals => {:project_id => params[:project_id], :subfield_file_id => params[:subfield_file_id], :course_id => params[:course_id]} %>
</div>
</div>
<div class="fl mt0">
<ul class="wlist" id="pages" style="margin-top: 5px;">
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
</ul>
</div>
<a href="javascript:void(0);" class="task-btn task-btn-blue mt5 fr" onclick="$('#resource_import_container_form').submit();hideModal()">选用</a>
<a href="javascript:void(0);" class="task-btn fr mr10 mt5" onclick="hideModal()">取消</a>
<div class="cl"></div>
</div>
</div>
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="$('#resource_import_container_form').submit();hideModal()">选用</a></div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal()">取消</a></div>
<div class="pageRoll mt0">
<ul class="wlist" id="pages" style="margin-top: 5px;">
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
</ul>
</div>
<div class="cl"></div>
</div>

View File

@ -1,35 +1,30 @@
<div class="boxContainer">
<div>
<div class="sendText fl mr10" style="width: auto">发送到</div>
<div class="resourcesSendTo">
<% unless send_ids.blank? %>
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
<% end %>
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');">
<option value="1">班级</option>
<option value="2">项目</option>
<option value="3">组织</option>
</select>
<div class="task-popup" style="width:450px;">
<div class="task-popup-title clearfix task-popup-bggrey">
<h3 class="fl">发送资源</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task_popup_con">
<div class="newupload_conbox">
<div class="mb10 mt-10 edu-position">
<%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> '' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="task-form-100 task-height-40 panel-box-sizing" />
<script>
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','','file')
</script>
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt5"><i class="fa fa-search"></i></a>
<% end %>
</div>
<div id="course_file_form">
<%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :courses => courses, :type => type} %>
</div>
<div>
<span class="color-red undis fl" id="search_course_notice_h"></span>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_send_res_to_course();">确定</a>
<a href="javascript:void(0);" class="pop_close task-btn fr mr10">取消</a>
<div class="cl"></div>
</div>
</div>
<div class="cl"></div>
</div>
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div class="fl">
<%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> 'resourcesSearchBox' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="searchResourcePopup" />
<script>
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','<%= send_ids%>','file')
</script>
<!--<a href="javascript:void(0);" class="searchIconPopup"></a>-->
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<div id="course_file_form">
<%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :send_ids => send_ids, :courses => courses, :type => type} %>
</div>
</div>

View File

@ -5,12 +5,10 @@
<% @attachments.each do |attach| %>
<ul class="subjectRow">
<li class="subjectName fl hidden">
<label>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<span>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5 magic-checkbox" style="vertical-align:middle;" />
<label for="resource_atta_<%= attach.id %>">
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
</span>
</label>
</label>
</li>
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>
<li class="subjectCount fl hidden"><%= (number_to_human_size(attach.filesize)).gsub("ytes", "") %></li>

View File

@ -1,4 +1,4 @@
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="subjectSearch fr" />
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="subjectSearch fr pl10" />
<script type="text/javascript">
var lastSearchCondition = '';
var count = 0;

View File

@ -1,15 +1,15 @@
<% if @flag == true%>
$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user => @user, :type => @type} ) %>');
$("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>');
$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>');
$("#user_resource_type_filter").html('<%= escape_javascript( render :partial => 'user_resource_type_filter' , :locals => {:user => @user, :type => @type, :status => @status}) %>');
$("#upload_private_resource").html('<%= escape_javascript( render :partial => 'show_new_upload' , :locals => {:user => @user, :type => @type, :status => @status}) %>');
$("#res_count").html(0);
$("#checkboxAll").attr('checked',false);
$("#res_all_count").html(<%= @atta_count%>);
$("#reference_number_<%= @ori.id %>").text("<%= @ori.quotes %>");
hideModal();
alert("发送成功");
notice_box("发送成功");
$("#resource_detail_<%=@ori.id %>").html("<%= j(render :partial=>'files/resource_detail',:locals => {:file => @ori}) %>");
//$("#search_div").html('<%#= escape_javascript( render :partial => 'resource_search_form',:locals => {:user => @user, :type => @type} ) %>');
//$("#resource_tip_list").html('<%#= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>');
//$("#resources_list").html('<%#= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
//$("#pages").html('<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>');
//$("#user_resource_type_filter").html('<%#= escape_javascript( render :partial => 'user_resource_type_filter' , :locals => {:user => @user, :type => @type, :status => @status}) %>');
//$("#upload_private_resource").html('<%#= escape_javascript( render :partial => 'show_new_upload' , :locals => {:user => @user, :type => @type, :status => @status}) %>');
//$("#res_count").html(0);
//$("#checkboxAll").attr('checked',false);
//$("#res_all_count").html(<%#= @atta_count%>);
//$("#reference_number_<%#= @ori.id %>").text("<%#= @ori.quotes %>");
<% else%>
<% end %>

View File

@ -1,23 +1,10 @@
<% if params[:project_id] %>
$('#ajax-modal').html('<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => @type, :project_id => params[:project_id], :mul_id => @resource_id, :mul_type => @resource_type}) %>');
var htmlvalue = '<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => @type, :project_id => params[:project_id], :mul_id => @resource_id, :mul_type => @resource_type}) %>';
<% elsif params[:course_id] %>
$('#ajax-modal').html('<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => @type, :course_id => params[:course_id], :mul_id => @resource_id, :mul_type => @resource_type}) %>');
var htmlvalue = '<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => @type, :course_id => params[:course_id], :mul_id => @resource_id, :mul_type => @resource_type}) %>';
<% elsif params[:subfield_file_id] %>
$('#ajax-modal').html('<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => @type, :subfield_file_id => params[:subfield_file_id], :mul_id => @resource_id, :mul_type => @resource_type}) %>');
var htmlvalue = '<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => @type, :subfield_file_id => params[:subfield_file_id], :mul_id => @resource_id, :mul_type => @resource_type}) %>';
<% end %>
showModal('ajax-modal', '615px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 580px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
<% if params[:project_id] %>
$('#ajax-modal').parent().css("top","10%").css("left","34%").css("border","3px solid #269ac9");
<% else %>
$('#ajax-modal').parent().css("top","20%").css("left","42%").css("border","3px solid #269ac9");
<% end %>
$('#ajax-modal').parent().addClass("popbox_polls");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
$('#ajax-modal').css("padding","");
$('#ajax-modal').parent().removeClass(" popbox resourceUploadPopup shareDP");
pop_box_new(htmlvalue, 615, 607);

View File

@ -11,22 +11,35 @@
//$("#upload_box").css('display','block');
<% if params[:is_observe].nil? %>
<% if params[:send_type].present? && params[:send_type] == 'news' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
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");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);
<% elsif params[:send_type] == 'file' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids, :type=>@type}) %>');
var htmlvalue = "<%= escape_javascript(render :partial => 'users/resource_share_popup', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :type=>@type}) %>";
pop_box_new(htmlvalue, 452, 463);
<% elsif params[:send_type] == 'message' %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
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");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);
<% end %>
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");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);
<% else %>
<% if params[:send_type] == 'news' %>
$("#course_news_form").html("<%= escape_javascript(render :partial => 'users/course_news_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>")

View File

@ -0,0 +1,121 @@
<%= javascript_include_tag 'paopao' %>
<style type="text/css">
*{
margin:0;
padding: 0;
}
#maskBg{
width: 0;
height: 0;
position: absolute;
left:0;
top:0;
right:0;
bottom:0;
z-index: 10000 !important;
}
#mask{
width:0;
height:0;
position:absolute;
z-index: 1;
border: 0 solid #000;
opacity: 0.6;
transition: all .3s;
}
#mask::before{
content: "";
width: 100%;
height:100%;
border-radius: 50%;
border: 100px solid #000;
position: absolute;
left: -100px;
top:-100px;
}
#maskTitle{
width:400px;
height:400px;
position: absolute;
z-index: 2;
}
#pointer{
width:400px;
height:100px;
background-repeat: no-repeat;
background-position: center center;
}
#mianWarn{
width:400px;
height:180px;
position: relative;
left: -30px;
top: -20px;
}
#nextStep{
display: block;
width:80px;
height:30px;
margin:0 auto;
line-height: 28px;
font-size:16px;
text-align: center;
border-radius:3px;
border: 1px solid #fff;
color: #fff;
}
#warnData{
height:90px;
text-align: center;
line-height: 80px;
color: #fff;
background-repeat: no-repeat;
background-position: center;
}
#closeMaskWarn{
font-size:18px;
position: absolute;
right:0;
top:0;
width: 20px;
height:20px;
text-align: center;
line-height: 20px;
font-weight: 600;
color: #FFF;
}
#outPointer{
position: absolute;
right:0;
bottom:0;
width:80px;
text-align: center;
line-height: 20px;
height:20px;
font-size:14px;
color: #FFF;
}
</style>
<link rel="stylesheet" type="text/css" href="css/paopao.css"/>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/paopao.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
var arrObj = [$('#edit_my_account')];
var arrTitle = ['请先填写基本资料信息'];
$.guidance({
obj:arrObj,
title:arrTitle
});
});
// 提供给遮罩层点击"知道了"调用
function show_edit(){
$("#show_account_div").hide();
$("#edit_account_div").show();
}
</script>
</head>

View File

@ -1,4 +1,4 @@
<div class="p2 font-14 color-grey mb10" style="text-align: center">
<img src="/images/edu_user/edu-nodata.png"/>
<p class="font-16">没有数据可以显示!</p>
<div class="edu-tab-con-box">
<img class="edu-nodata-img" src="/images/edu_user/edu-nodata.png"/>
<p class="edu-nodata-p mb30">没有数据可以显示!</p>
</div>

View File

@ -0,0 +1,29 @@
<!-- 带1个按钮的遮罩弹框 -->
<!-- params
tip1: 提示语1(大)
tip2: 提示语2
btn: 按钮文字;
url按钮的链接
按钮如果不要跳转 传javascript:void(0), 如果按钮使用js效果使用其id进行绑定不要写在公共的js里面
-->
<div class="task-popup-warp" style="background-color: rgba(0,0,0,0.7);;position: fixed;left: 0;top: 0;">
<div class="task-popup" style="width:500px;position: fixed;left: 40%;top: 30%">
<div class=" task-popup-title clearfix task-popup-bggrey">
<h3 class="fl ">提示</h3>
<a href="javascript:void(0);" onclick="$('.task-popup-warp').remove();"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task_popup_con color-dark-grey">
<div class="task-popup-content">
<p class="task-popup-text-center font-16">
<%= tip1 %>
</p>
<p class="task-popup-text-center font-12 color-grey mb10">
<%= tip2 %>
</p>
<div class="clearfix task-popup-submit04">
<a href="<%= url %>" class="task-btn task-btn-blue" id="btn_mask"><%= btn %></a>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,32 @@
<!-- 带2个按钮的遮罩弹框 -->
<!-- params
tip1: 提示语1(大)
tip2: 提示语2
btn1: 右侧按钮文字;
btn2: 左侧按钮文字;
url1 右侧按钮的链接;
url2左侧按钮的链接
按钮如果不要跳转 传javascript:void(0), 如果按钮使用js效果使用其id进行绑定不要写在公共的js里面
-->
<div class="task-popup-warp" style="background-color: rgba(0,0,0,0.7);;position: fixed;left: 0;top: 0;">
<div class="task-popup" style="width:500px;position: fixed;left: 40%;top: 30%">
<div class=" task-popup-title clearfix task-popup-bggrey">
<h3 class="fl">提示</h3>
<a href="javascript:void(0);" onclick="$('.task-popup-warp').remove();"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task_popup_con color-dark-grey" >
<div class="task-popup-content">
<p class="task-popup-text-center font-16">
<%= tip1 %>
</p>
<p class="task-popup-text-center font-12 color-grey mb10">
<%= tip2 %>
</p>
<div class="clearfix task-popup-submit" style="width:180px;">
<a href="<%= url1 %>" class="task-btn task-btn-blue fr" id="mask-left-btn"><%= btn1 %></a>
<a href="<%= url2 %>" class="task-btn task-btn-blue fr mr10" id="mask-right-btn"><%= btn2 %></a>
</div>
</div>
</div>
</div>
</div>

View File

@ -41,6 +41,7 @@ RedmineApp::Application.routes.draw do
match 'add_collaborators', :via => [:get, :post]
post 'shixun_members_added'
get 'shixun_monitor'
get 'autocompletion'
get 'shixun_exec'
post 'add_script'
post 'shixun_members'

View File

@ -2,154 +2,159 @@
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
var Pos = CodeMirror.Pos;
var Pos = CodeMirror.Pos;
function forEach(arr, f) {
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
}
function forEach(arr, f) {
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
}
function arrayContains(arr, item) {
if (!Array.prototype.indexOf) {
var i = arr.length;
while (i--) {
if (arr[i] === item) {
return true;
function arrayContains(arr, item) {
if (!Array.prototype.indexOf) {
var i = arr.length;
while (i--) {
if (arr[i] === item) {
return true;
}
}
return false;
}
}
return false;
}
return arr.indexOf(item) != -1;
}
function scriptHint(editor, keywords, getToken, options) {
// Find the token at the cursor
var cur = editor.getCursor(), token = getToken(editor, cur);
if (/\b(?:string|comment)\b/.test(token.type)) return;
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
// If it's not a 'word-style' token, ignore the token.
if (!/^[\w$_]*$/.test(token.string)) {
token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
type: token.string == "." ? "property" : null};
} else if (token.end > cur.ch) {
token.end = cur.ch;
token.string = token.string.slice(0, cur.ch - token.start);
return arr.indexOf(item) != -1;
}
var tprop = token;
// If it is a property, find out what it is a property of.
while (tprop.type == "property") {
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (tprop.string != ".") return;
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (!context) var context = [];
context.push(tprop);
}
return {list: getCompletions(token, context, keywords, options),
function scriptHint(editor, keywords, getToken, options) {
// Find the token at the cursor
var cur = editor.getCursor(), token = getToken(editor, cur);
if (/\b(?:string|comment)\b/.test(token.type)) return;
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
// If it's not a 'word-style' token, ignore the token.
if (!/^[\w$_]*$/.test(token.string)) {
token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
type: token.string == "." ? "property" : null};
} else if (token.end > cur.ch) {
token.end = cur.ch;
token.string = token.string.slice(0, cur.ch - token.start);
}
var tprop = token;
// If it is a property, find out what it is a property of.
while (tprop.type == "property") {
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (tprop.string != ".") return;
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (!context) var context = [];
context.push(tprop);
}
return {list: getCompletions(token, context, keywords, options),
from: Pos(cur.line, token.start),
to: Pos(cur.line, token.end)};
}
function javascriptHint(editor, options) {
return scriptHint(editor, javascriptKeywords,
function (e, cur) {return e.getTokenAt(cur);},
options);
};
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
function getCoffeeScriptToken(editor, cur) {
// This getToken, it is for coffeescript, imitates the behavior of
// getTokenAt method in javascript.js, that is, returning "property"
// type and treat "." as indepenent token.
var token = editor.getTokenAt(cur);
if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
token.end = token.start;
token.string = '.';
token.type = "property";
}
else if (/^\.[\w$_]*$/.test(token.string)) {
token.type = "property";
token.start++;
token.string = token.string.replace(/\./, '');
}
return token;
}
function coffeescriptHint(editor, options) {
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
}
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
"toUpperCase toLowerCase split concat match replace search").split(" ");
var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
var funcProps = "prototype apply call bind".split(" ");
var javascriptKeywords = ("break case catch continue debugger default delete do else false finally for function " +
"if in instanceof new null return switch throw true try typeof var void while with").split(" ");
var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
function forAllProps(obj, callback) {
if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {
for (var name in obj) callback(name)
} else {
for (var o = obj; o; o = Object.getPrototypeOf(o))
Object.getOwnPropertyNames(o).forEach(callback)
}
}
function getCompletions(token, context, keywords, options) {
var found = [], start = token.string, global = options && options.globalScope || window;
function maybeAdd(str) {
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
}
function gatherCompletions(obj) {
if (typeof obj == "string") forEach(stringProps, maybeAdd);
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
forAllProps(obj, maybeAdd)
}
if (context && context.length) {
// If this is a property, see if it belongs to some object we can
// find in the current environment.
var obj = context.pop(), base;
if (obj.type && obj.type.indexOf("variable") === 0) {
if (options && options.additionalContext)
base = options.additionalContext[obj.string];
if (!options || options.useGlobalScope !== false)
base = base || global[obj.string];
} else if (obj.type == "string") {
base = "";
} else if (obj.type == "atom") {
base = 1;
} else if (obj.type == "function") {
if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
(typeof global.jQuery == 'function'))
base = global.jQuery();
else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
base = global._();
}
while (base != null && context.length)
base = base[context.pop().string];
if (base != null) gatherCompletions(base);
} else {
// If not, just look in the global object and any local scope
// (reading into JS mode internals to get at the local and global variables)
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
if (!options || options.useGlobalScope !== false)
gatherCompletions(global);
forEach(keywords, maybeAdd);
function javascriptHint(editor, options) {
return scriptHint(editor, javascriptKeywords,
function (e, cur) {return e.getTokenAt(cur);},
options);
};
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
function getCoffeeScriptToken(editor, cur) {
// This getToken, it is for coffeescript, imitates the behavior of
// getTokenAt method in javascript.js, that is, returning "property"
// type and treat "." as indepenent token.
var token = editor.getTokenAt(cur);
if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
token.end = token.start;
token.string = '.';
token.type = "property";
}
else if (/^\.[\w$_]*$/.test(token.string)) {
token.type = "property";
token.start++;
token.string = token.string.replace(/\./, '');
}
return token;
}
function coffeescriptHint(editor, options) {
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
}
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
/* var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
"toUpperCase toLowerCase split concat match replace search").split(" ");
var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
var funcProps = "prototype apply call bind".split(" ");*/
var javascriptKeywords = ("double float int long short null true false enum super this void auto for register static const friend mutable explicit virtual template typename printf " +
"break continue return do while if else for instanceof switch case default try catch finally throw throws assert import package boolean byte char delete private " +
"inline struct union signed unsigned export extern namespace using operator sizeof typedef typeid and del from not as elif or with pass except " +
"print exec raise is def lambda private protected public abstract class extends final implements interface native new static strictfp synchronized transient main " +
"String string System println vector bool boolean FALSE TRUE").split(" ");
/*
var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
*/
function forAllProps(obj, callback) {
if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {
for (var name in obj) callback(name)
} else {
for (var o = obj; o; o = Object.getPrototypeOf(o))
Object.getOwnPropertyNames(o).forEach(callback)
}
}
function getCompletions(token, context, keywords, options) {
var found = [], start = token.string, global = options && options.globalScope || window;
function maybeAdd(str) {
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
}
function gatherCompletions(obj) {
if (typeof obj == "string") forEach(stringProps, maybeAdd);
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
forAllProps(obj, maybeAdd)
}
if (context && context.length) {
// If this is a property, see if it belongs to some object we can
// find in the current environment.
var obj = context.pop(), base;
if (obj.type && obj.type.indexOf("variable") === 0) {
if (options && options.additionalContext)
base = options.additionalContext[obj.string];
if (!options || options.useGlobalScope !== false)
base = base || global[obj.string];
} else if (obj.type == "string") {
base = "";
} else if (obj.type == "atom") {
base = 1;
} else if (obj.type == "function") {
if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
(typeof global.jQuery == 'function'))
base = global.jQuery();
else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
base = global._();
}
while (base != null && context.length)
base = base[context.pop().string];
if (base != null) gatherCompletions(base);
} else {
// If not, just look in the global object and any local scope
// (reading into JS mode internals to get at the local and global variables)
/* for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);*/
/* for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
if (!options || options.useGlobalScope !== false)
gatherCompletions(global);*/
forEach(keywords, maybeAdd);
}
return found;
}
return found;
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -35,11 +35,16 @@ function addFile_board(inputEl, file, eagerUpload, id,btnId) {
});
fileSpan.append(
$('<i></i>').attr({
'class': 'fa fa-folder mr5 color-light-grey',
'aria-hidden': true
}),
$('<input>', {
'type': 'text',
'class': 'upload_filename readonly',
'class': 'upload_filename readonly hidden',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly'
'readonly': 'readonly',
'style': 'border:none; max-width:300px;white-space: nowrap; text-overflow:ellipsis;'
}).val(file.name),
// $('<input>', {
// 'type': 'text',
@ -58,10 +63,10 @@ function addFile_board(inputEl, file, eagerUpload, id,btnId) {
// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
// checked: 'checked'
// }).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({
$('<a><i class="fa fa-trash-o mr5"></i></a>').attr({
'href': "#",
'class': 'remove-upload',
'data-containerid': id
'style': 'vertical-align:top;'
}).click(function() {
if (confirm($(inputEl).data('areYouSure'))) {
removeFile();
@ -104,20 +109,26 @@ function addFile(inputEl, file, eagerUpload,btnId) {
'class': 'attachment'
});
var allow_blank = $(inputEl).data('allow-blank');
if(allow_blank == '0'){
} else{
fileSpan.append(
$('<label>&nbsp;</label>').attr({
'class': 'panel-form-label fl'
}))
}
fileSpan.append(
$('<label>&nbsp;</label>').attr({
'class': 'panel-form-label fl'
}),
$('<i></i>').attr({
'class': 'fa fa-folder mr5 color-light-grey',
'aria-hidden': true
}),
$('<input>', {
'type': 'text',
'class': 'readonly hidden',
'class': 'upload_filename readonly hidden',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly',
'style': 'border:none; max-width:980px;white-space: nowrap; text-overflow:ellipsis;',
'style': 'border:none; max-width:980px;white-space: nowrap; text-overflow:ellipsis;'
}).val(file.name),
// $('<input>', {
// 'type': 'text',
@ -296,8 +307,8 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl,btnId) {
if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) { //所有文件上传完毕,更改状态
$('input:submit', form).removeAttr('disabled');
$('#' + btnId).removeAttr("disabled");
$('#' + btnId).val('确定')
$('#' + btnId).css('background-color', '#269ac9')
$('#' + btnId).val('确定');
$('#' + btnId).css('background-color', '#3498db');
if(containerid == undefined ){
var count = $('#attachments_fields>span').length;
$('#upload_file_count').html("<span id=\"count\">" + count + "</span>" + $(inputEl).data('fileCount'));
@ -318,7 +329,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl,btnId) {
var count = $('#attachments_fields>span').length;
$('#'+btnId).attr("disabled",true);
$('#'+btnId).val('提交中');
$('#'+btnId).css('background-color','#c1c1c1')
$('#'+btnId).css('background-color','#c1c1c1');
$('#upload_file_count').html("<span id=\"count\">1</span>" + $(inputEl).data('lebelFileUploding'));//目前肯定是穿一个文件
if (count >= 1) {
var add_attachs = $('.add_attachment');
@ -335,7 +346,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl,btnId) {
var count = $('#attachments_fields' + containerid + '>span').length;
$('#'+btnId).attr("disabled",true);
$('#'+btnId).val('提交中');
$('#'+btnId).css('background-color','#c1c1c1')
$('#'+btnId).css('background-color','#c1c1c1');
$('#upload_file_count' + containerid).html("<span id=\"count\">1</span>" + $(inputEl).data('lebelFileUploding'));//目前肯定是穿一个文件
if (count >= 1) {
var add_attachs = $('.add_attachment').filter(function(index) {

View File

@ -55,12 +55,12 @@ $(function(){
$("#account_tip_a").parent().hide();
});
$(".a_forced").on("click", function(){
/* $(".a_forced").on("click", function(){
if($("#account_tip").children("p[type='1']").length == 0){
$("#account_tip").append("<p type='1'>完善您的基本资料后,才能使用其他功能哦</p>");
}
$("#account_tip").show();
});
});*/
});
function cancel_edit_account(status) {

View File

@ -576,7 +576,7 @@ function regex_course_name(str)
syl_title = $("#"+str+"_syllabus_id").find("option:selected").text();
if(name.length < 2)
{
$("#"+str+"_course_name_notice").html('<i class="fa fa-exclamation-circle mr5" ></i>班级名称不能为空且至少有两个字符');
$("#"+str+"_course_name_notice").html('<i class="fa fa-exclamation-circle mr5" ></i>班级名称不能为空且至少有两个字符');
$("#"+str+"_course_name_notice").show();
return false;
}
@ -919,4 +919,14 @@ function formate_time(time){
}
str = year + '-' + month + '-' + day + ' ' + hour + ':' + min;
return str;
}
function submit_send_res_to_course(){
if($("input[name='course_ids[]']:checked").length >= 1){
$("#search_course_notice_h").html("").hide();
$("#course_list_form").submit();
hideModal();
}else{
$("#search_course_notice_h").html("请先选择一个班级").show();
}
}

View File

@ -378,4 +378,12 @@ function submit_add_student_form(){
}else{
$("#add_student_notice").html("请至少选择一个用户").show();
}
}
function res_send_to_course(id, user_id, send_type){
$.ajax({
type: 'get',
url: '/users/' + user_id + '/search_user_course',
data:{send_id:id, send_type:send_type}
});
}

View File

@ -282,33 +282,33 @@ function alert_choose_homework_type(id){
'<span class="fl mt5">作业类别:</span>' +
'<ul class="fl">' +
'<li class="clearfix">' +
'<input type="radio" name="homework_type" value="1" id="homework_type_1" class="fl mt12 magic-radio">' +
'<label for="homework_type_1" class="fl mt5 ml5 edu-class-pop-label edu-color-grey">' +
'<input type="radio" name="homework_type" value="1" id="homework_type_1" class="fl magic-radio">' +
'<label for="homework_type_1" class="fl ml5 edu-class-pop-label edu-color-grey">' +
'普通作业' +
'</label>' +
'</li>' +
'<li class="clearfix">' +
'<input type="radio" name="homework_type" value="3" id="homework_type_2" class="fl mt12 magic-radio">' +
'<label for="homework_type_2" class="fl mt5 ml5 edu-class-pop-label edu-color-grey">' +
'<input type="radio" name="homework_type" value="3" id="homework_type_2" class="fl magic-radio">' +
'<label for="homework_type_2" class="fl ml5 edu-class-pop-label edu-color-grey">' +
'分组作业' +
'</label>' +
'</li>' +
'<li class="clearfix">' +
'<input type="radio" name="homework_type" value="2" id="homework_type_3" class="fl mt12 magic-radio edu-color-grey">' +
'<label for="homework_type_3" class="fl mt5 ml5 edu-class-pop-label">' +
'<input type="radio" name="homework_type" value="2" id="homework_type_3" class="fl magic-radio edu-color-grey">' +
'<label for="homework_type_3" class="fl ml5 edu-class-pop-label">' +
'编程作业' +
'</label>' +
'</li>' +
'<li class="clearfix">' +
'<input type="radio" name="homework_type" value="4" id="homework_type_4" class="fl mt12 magic-radio edu-color-grey">' +
'<label for="homework_type_4" class="fl mt5 ml5 edu-class-pop-label">' +
'<input type="radio" name="homework_type" value="4" id="homework_type_4" class="fl magic-radio edu-color-grey">' +
'<label for="homework_type_4" class="fl ml5 edu-class-pop-label">' +
'实训作业' +
'</label>' +
'</li>' +
'</ul>' +
'<span id="homework_type_notice" class="c_red none">请先选择作业类型</span>' +
'</div>' +
'<div class="cl"></div>' +
'<div id="homework_type_notice" class="clearfix c_red none mt-10 ml75">请先选择作业类型</div>' +
'<div class="task-popup-submit clearfix">' +
'<a href="javascript:void(0);" class="task-btn fl pop_close">取消</a>' +
'<a href="javascript:void(0);" onclick="new_homework_type('+id+');" class="task-btn task-btn-blue fr">确定</a>' +

View File

@ -0,0 +1,114 @@
(function ($) {
$.guidance = function (json,fn) {
//json.obj 设置跟随对象 必选参数
//json.title 设置提示消息 必选参数
//json.url 设置下一步链接 可选参数
//json.style 定义样式 可选参数 默认有背景
json.url = json.url || "javascript:;";
json.style = json.style || {} ;
json.title = json.title || '可设置的提示信息哦,可以更换的背景图片哦';
json.style.bgImg = json.style.bgImg || "url(img/questionmark.png)";
json.style.point1 = json.style.point1 || 'url(../images/bigdata/pointer2.png)';
json.style.point2 = json.style.point2 || 'url(../images/bigdata/pointer2.png)';
var index = 0;
if (json.obj.length>0){
window.closeAll = function () {
$('#maskBg').remove();
window.closeAll = null;
}
var $viewG = $('<div id="maskBg">\
<div id="mask"></div>\
<div id="maskTitle">\
<div id="pointer"></div>\
<div id="mianWarn">\
<p id="warnData"></p>\
<a href="javascript:;" id="nextStep" onclick = "show_edit();closeAll()">知道了</a>\
</div>\
</div>\
</div>');
var viewW = $(document.body).width();
var viewH = $(document.body).height();
$viewG.css({
'height':viewH + 'px',
'width': viewW + 'px'
});
if ($('#maskBg').length<=0){
$(document.body).append($viewG);
$('#warnData').css('background-image',json.style.bgImg);
}
function mainWarn (posObj) {
var iW = posObj.innerWidth();
var iH = posObj.innerHeight();
var iL = posObj.offset().left;
var iT = posObj.offset().top;
var userAgent = window.navigator.userAgent.toLowerCase();
var version = $.browser.version;
console.log(userAgent);
console.log(version);
var newIL = (parseInt(version) < 50) ? (iL - 1.8) : iL;
$('#mask').css({
'width':iW + 2 + 'px',
'height': iH + 'px',
'border-width':iT + 'px' + ' '+ (viewW - iL - iW) + 'px' + ' '+ (viewH - iH - iT) + 'px' + ' ' + newIL + 'px'
});
if (iL<400){
$('#maskTitle').css({
'left':iL + iW - 30 + 'px',
'top':iT + iH + 10 + 'px'
});
$('#pointer').css('background-image',json.style.point1);
} else if ((viewW - iL - iW) < 400){
$('#maskTitle').css({
'left':iL - 260 + 'px',
'top':iT + iH - 36 + 'px'
});
$('#pointer').css('background-image',json.style.point2);
} else {
$('#maskTitle').css({
'left':iL - 260 + 'px',
'top':iT + iH - 36 + 'px'
});
$('#pointer').css('background-image',json.style.point1);
}
}
if ($.isArray(json.obj)){
mainWarn(json.obj[index]);
$('#warnData').text(json.title[index]);
$('#nextStep').bind('click',function () {
index++;
if (index == json.obj.length){
closeAll();
return;
}
mainWarn(json.obj[index]);
$('#warnData').text(json.title[index]);
});
} else {
mainWarn(json.obj);
$('#warnData').text(json.title);
if (fn){
$('#nextStep').bind('click',fn);
}else {
$('#nextStep').bind('click',function () {
closeAll();
});
}
}
}
}
})(jQuery);
/*
气泡提示功能说明
json.obj 可以是单独的,可以是一个数组,但必须是jQuery 对象
json.title 对应 json.obj
json.url 设计本应该为下一步提供链接
json.style = {}
设置 语言信息,背景图信息功能
关于fn目前只能在单独使用的时候调用,也就是不在传入多个对象的时候调用
*/

View File

@ -1875,8 +1875,6 @@ span.required {color: #bb0000;}
#attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
#attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
#attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block; padding-left:16px;margin-left: 5px;}
a.remove-upload:hover {text-decoration:none !important;}
/*gcm upload file count and deleteall*/
#upload_file_count #count {color:red; font-size:1.5em;}

View File

@ -626,7 +626,6 @@ blockquote {background: #e8e8e8;padding: 10px;margin-bottom: 5px;word-break: bre
#attachments_fields input.description {margin-left: 4px;width: 100px;}
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
#attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px; white-space: nowrap; }
span.add_attachment {font-size: 80%;line-height: 2.5em;}
#attachments_fields span {display: block;white-space: nowrap;}
@ -641,10 +640,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields input.description {margin-left:4px; width:100px; }
.attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';}
.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
a.remove-upload:hover {text-decoration:none !important;}
.attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
.attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields span {display: block;white-space: nowrap;}
@ -977,7 +974,6 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
@ -1065,7 +1061,6 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; }
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}

View File

@ -27,7 +27,6 @@ a:hover.DropBtn{background: url(../images/homepage_icon.png) -125px -370px no-re
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; }
a.link_file{ background:url(/images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(/images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(/images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}
@ -430,7 +429,7 @@ a.blueCir{ display:inline-block; padding:2px 5px; background-color:#ffffff;borde
a:hover.blueCir{ background:#3598db; color:#fff;}
.proList {background-color:#eaeaea; padding:5px 10px; display:block; max-width:655px; float:left;}
.reCon{ margin:5px; width:710px;}
.reTop{width:710px; height:40px; background:#eaeaea; padding:5px;}
.reTop{width:99%; height:40px; background:#eaeaea; padding:5px; }
.filesTag{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;cursor: pointer }
.fileTagWrap{ width:710px;}
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}

View File

@ -69,9 +69,9 @@ a:hover.link-color-grey03{color:#3498db!important;}
.font-28{ font-size: 28px!important;}
.font-30{ font-size: 30px!important;}
/*通用内外边距*/
.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}
.mt-10{ margin-top:-10px;}.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}
.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb50{ margin-bottom: 50px;}
.ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml35{ margin-left:35px;}.ml50{ margin-left: 50px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;}
.ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml35{ margin-left:35px;}.ml50{ margin-left: 50px;}.ml75{ margin-left: 75px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;}
.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}
.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}
.pb5{ padding-bottom:5px;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}

View File

@ -36,8 +36,10 @@ a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40
.upload_select_box li div.mt5{ margin-top:0px;}
.upload_select_box li:hover{ background:#e4eaf6;}
.task-popup-submit02{ margin:15px auto; width:110px;}
.task-popup-submit03{ margin:15px auto; width:70px;}
.task-popup-submit04{ margin:15px auto; width:85px;}
/*智能课堂弹框tab 20170428byLB*/
.newupload_conbox{ background: #fff; padding:15px; padding-bottom: 0;}
.newupload_conbox{ background: #fff; padding-bottom: 0;}
.newupload_navbox{border-bottom:1px solid #dbdbdb;}
.newupload_nav { height: 38px; line-height: 38px; background: #e7e7e7; }
.newupload_nav li {float:left; padding:0 15px; display: block; text-align:center; }

View File

@ -225,6 +225,7 @@ a.task-index-name{ display: inline-block; max-width:80px;}
.edu-con-top{ padding:10px 0; background:#fff; border-bottom:1px solid #eee;font-size:16px; }
.edu-con-top h2{ font-size:16px;}
.edu-con-bg01{ width: 100%; background:#fff;}
.edu-con-top .color-grey{ color:#666!important;}
/*附件上传的样式*/
.atta_input{ width: 980px; white-space: nowrap; text-overflow:ellipsis;}

View File

@ -83,7 +83,7 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
.subject-list {width:685px;}
.subject-detail {width:285px;}
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.choose-active {background-color:#3b94d6; color:#ffffff;}
a.choose-active {background-color:#3498db; color:#ffffff !important;}
.subject-pop-banner {width:685px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
.subject-pop-name {width:260px; padding-left:10px; padding-right:10px;}
@ -230,8 +230,6 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.attachments_fields input.is_public_checkbox {width:20px;}
.attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(/images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
a.remove-upload:hover {text-decoration:none !important;}
.attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(/images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px;}
.attachments_fields span {display: block;white-space: nowrap;}
.attachments_fields .ajax-waiting input.filename {background:url(/images/hourglass.png) no-repeat 0px 50%;}

View File

@ -220,11 +220,11 @@ span.at {color:#3b94d6;}
span.at a{color:#3b94d6;text-decoration: none;}
/*新课程、项目资源库*/
.reCon{ margin:5px; width:710px;}
.reTop{width:710px; height:40px; background:#eaeaea; padding:5px;}
.reTop{width:99%; height:40px; background:#eaeaea; padding:5px;}
.researchBox { width:240px; height:24px; border:1px solid #dddddd; color:#666666; outline:none;}
.blueBtn{ width:60px; height:26px; color:#FFF; border:none; background-color:#3b94d6; cursor:pointer; padding-left:0px; text-align:center;}
.blueBtn:hover {background-color:#2788d0;}
a.blue-btn{ padding:4px 7px; color:#FFF; border:none; background-color:#3b94d6; cursor:pointer; text-align:center;}
a.blue-btn{ padding:0px 7px; color:#FFF!important; border:none; background-color:#3b94d6; cursor:pointer; text-align:center;}
a.blue-btn:hover {background-color:#2788d0;}
/*151228个人名片*/
.menuSetting {background:url(/images/hwork_icon.png) -5px -132px no-repeat; display:inline-block; width:20px; height:20px;}

View File

@ -113,7 +113,6 @@ div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-
.ajax-waiting input.upload_filename {background:url(/images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(/images/loading.gif) no-repeat 0px 50%;}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.upload_filename{ background: url(/images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 270px;border: none !important; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;}
.message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);}
.description{display: none !important;}
@ -323,7 +322,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
a.homepageMenuControl {float:left; width:180px;}
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
.homepageRightBanner {width:975px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; }
.homepageRightBanner {width:975px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px;border-bottom:1px solid #eee; }
.homepagetopBanner {width:750px; height: 100px; margin:0px auto; float:right; background-color: #90C5EC; border:1px solid #dddddd;}
.homepageRightBannerImg{width:1000px; margin:0px auto; height: 60px; margin-top: 10px; background:url(/images/TeachersDay.jpg)}
a.homepageWhite {color:#ffffff;}

View File

@ -1130,7 +1130,6 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; }
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}
@ -1199,7 +1198,6 @@ img.ui-datepicker-trigger {
.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;}
.message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);}
@ -1468,7 +1466,7 @@ span.at a{color:#269ac9;text-decoration: none;}
.subject-list {width:685px;}
.subject-detail {width:285px;}
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.choose-active {background-color:#269ac9; color:#ffffff;}
a.choose-active {background-color:#3498db; color:#ffffff !important;}
.subject-pop-banner {width:685px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
.subject-pop-name {width:260px; padding-left:10px; padding-right:10px;}

View File

@ -282,17 +282,6 @@ span.add_attachment {
.c_dark {
color: #2d2d2d;
}
.upload_filename {
background: url(../images/pic_file.png) 0 -20px no-repeat;
color: #7f7f7f;
width: 270px;
border: none;
padding-left: 20px;
margin-right: 10px;
margin-bottom: 5px;
white-space: nowrap;
text-overflow: ellipsis;
}
.profiler-results.profiler-left {
left: 0px;
}
@ -305,7 +294,6 @@ span.add_attachment {
.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }

View File

@ -283,17 +283,6 @@ span.add_attachment {
.c_dark {
color: #2d2d2d;
}
.upload_filename {
background: url(../images/pic_file.png) 0 -20px no-repeat;
color: #7f7f7f;
width: 270px;
border: none;
padding-left: 20px;
margin-right: 10px;
margin-bottom: 5px;
white-space: nowrap;
text-overflow: ellipsis;
}
.profiler-results.profiler-left {
left: 0px;
}
@ -307,7 +296,6 @@ span.add_attachment {
.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }

View File

@ -356,10 +356,8 @@ blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;}
#attachments_fields input.description {margin-left:4px; width:100px; }
#attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';}
#attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
a.remove-upload:hover {text-decoration:none !important;}
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
#attachments_fields span {display: block;white-space: nowrap;}
@ -370,16 +368,13 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
.reply_btn:hover{ background:#999; color:#fff; }
.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.attachments_fields input.description {margin-left:4px; width:100px; }
.attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';}
div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
a.remove-upload:hover {text-decoration:none !important;}
.attachments_fields input.is_public_checkbox {width:20px;}
.attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
.attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields span {display: block;white-space: nowrap;}

View File

@ -1087,7 +1087,7 @@ a:hover.userCancel{border:1px solid #888888; }
.subject-list {width:685px;}
.subject-detail {width:285px;}
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.choose-active {background-color:#269ac9; color:#ffffff;}
a.choose-active {background-color:#3498db; color:#ffffff !important;}
.subject-pop-banner {width:685px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
.subject-pop-name {width:260px; padding-left:10px; padding-right:10px;}