Merge branch 'szzh' into gitlab_guange
This commit is contained in:
commit
8164ffc1b2
|
@ -21,7 +21,6 @@ class AccountController < ApplicationController
|
|||
|
||||
# prevents login action to be filtered by check_if_login_required application scope filter
|
||||
skip_before_filter :check_if_login_required
|
||||
|
||||
# Login request and validation
|
||||
def login
|
||||
if request.get?
|
||||
|
|
|
@ -663,7 +663,8 @@ class ApplicationController < ActionController::Base
|
|||
if api_request?
|
||||
logger.error "Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json)."
|
||||
end
|
||||
render_error "Invalid form authenticity token."
|
||||
#render_error "Invalid form authenticity token."
|
||||
redirect_to signin_path(:login=>true)
|
||||
end
|
||||
|
||||
def render_feed(items, options={})
|
||||
|
|
|
@ -332,6 +332,9 @@ class FilesController < ApplicationController
|
|||
#modify by nwb
|
||||
if @project
|
||||
@addTag=false
|
||||
if params[:in_project_toolbar]
|
||||
@in_project_toolbar = params[:in_project_toolbar]
|
||||
end
|
||||
container = (params[:version_id].blank? ? @project : @project.versions.find_by_id(params[:version_id]))
|
||||
attachments = Attachment.attach_filesex(container, params[:attachments], params[:attachment_type])
|
||||
render_attachment_warning_if_needed(container)
|
||||
|
@ -363,6 +366,9 @@ class FilesController < ApplicationController
|
|||
end
|
||||
elsif @course
|
||||
@addTag=false
|
||||
if params[:in_course_toolbar]
|
||||
@in_course_toolbar = params[:in_course_toolbar]
|
||||
end
|
||||
attachments = Attachment.attach_filesex(@course, params[:attachments], params[:attachment_type])
|
||||
|
||||
if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
|
||||
|
|
|
@ -147,6 +147,9 @@ class HomeworkCommonController < ApplicationController
|
|||
else
|
||||
@statue = 3
|
||||
end
|
||||
@user_activity_id = params[:user_activity_id].to_i
|
||||
@is_in_course = params[:is_in_course].to_i
|
||||
@course_activity = params[:course_activity].to_i
|
||||
end
|
||||
|
||||
#关闭匿评
|
||||
|
@ -162,6 +165,9 @@ class HomeworkCommonController < ApplicationController
|
|||
# 匿评关闭消息邮件通知
|
||||
send_message_anonymous_comment(@homework, m_status = 3)
|
||||
Mailer.send_mail_anonymous_comment_close(@homework).deliver
|
||||
@user_activity_id = params[:user_activity_id].to_i
|
||||
@is_in_course = params[:is_in_course].to_i
|
||||
@course_activity = params[:course_activity].to_i
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
@ -188,6 +194,9 @@ class HomeworkCommonController < ApplicationController
|
|||
@homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count}
|
||||
end
|
||||
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
|
||||
@user_activity_id = params[:user_activity_id].to_i
|
||||
@is_in_course = params[:is_in_course].to_i
|
||||
@course_activity = params[:course_activity].to_i
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -89,7 +89,9 @@ class StudentWorkController < ApplicationController
|
|||
else
|
||||
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
|
||||
end
|
||||
if @is_teacher || @homework.homework_detail_manual.nil? #老师 || 超级管理员 显示所有列表
|
||||
#老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
|
||||
if @is_teacher || @homework.homework_detail_manual.nil? ||
|
||||
(@homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name
|
||||
@show_all = true
|
||||
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
|
||||
|
@ -110,7 +112,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
@student_work_count = (search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name).count
|
||||
else
|
||||
if @is_teacher || @homework.homework_detail_manual.nil? #老师 || 超级管理员 显示所有列表
|
||||
if @is_teacher || @homework.homework_detail_manual.nil? || (@homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?) #老师 || 超级管理员 显示所有列表
|
||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
||||
@show_all = true
|
||||
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
|
||||
|
@ -166,6 +168,7 @@ class StudentWorkController < ApplicationController
|
|||
|
||||
def create
|
||||
if params[:student_work]
|
||||
@submit_result = true
|
||||
student_work = StudentWork.find(params[:student_work_id]) if params[:student_work_id]
|
||||
student_work ||= StudentWork.new
|
||||
student_work.name = params[:student_work][:name]
|
||||
|
@ -181,7 +184,6 @@ class StudentWorkController < ApplicationController
|
|||
else
|
||||
student_work.late_penalty = 0
|
||||
end
|
||||
|
||||
if student_work.save
|
||||
course_activity = CourseActivity.where("course_act_type='HomeworkCommon' and course_act_id =#{@homework.id}").first
|
||||
if course_activity
|
||||
|
@ -193,20 +195,16 @@ class StudentWorkController < ApplicationController
|
|||
user_activity.updated_at = Time.now
|
||||
user_activity.save
|
||||
end
|
||||
@student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id).first
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to student_work_index_url(:homework => @homework.id)
|
||||
}
|
||||
format.js
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
@submit_result = false
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_failed_create)
|
||||
redirect_to new_student_work_url(:homework => @homework.id)
|
||||
}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -223,24 +221,36 @@ class StudentWorkController < ApplicationController
|
|||
|
||||
def update
|
||||
if params[:student_work]
|
||||
@submit_result = true
|
||||
@work.name = params[:student_work][:name]
|
||||
@work.description = params[:student_work][:description]
|
||||
@work.project_id = params[:student_work][:project]
|
||||
@work.save_attachments(params[:attachments])
|
||||
render_attachment_warning_if_needed(@work)
|
||||
if @work.save
|
||||
=begin
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_edit)
|
||||
redirect_to student_work_index_url(:homework => @homework.id)
|
||||
}
|
||||
=end
|
||||
@student_work = @work
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
=begin
|
||||
respond_to do |format|
|
||||
format.html{redirect_to edit_student_work_url(@work)}
|
||||
end
|
||||
=end
|
||||
@submit_result = false
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -60,6 +60,11 @@ class WordsController < ApplicationController
|
|||
course_activity.updated_at = Time.now
|
||||
course_activity.save
|
||||
end
|
||||
principal_activity = PrincipalActivity.where("principal_act_type='JournalsForMessage' and principal_act_id =#{parent_id}").first
|
||||
if principal_activity
|
||||
principal_activity.updated_at = Time.now
|
||||
principal_activity.save
|
||||
end
|
||||
user_activity = UserActivity.where("act_type='JournalsForMessage' and act_id =#{parent_id}").first
|
||||
if user_activity
|
||||
user_activity.updated_at = Time.now
|
||||
|
@ -272,6 +277,7 @@ class WordsController < ApplicationController
|
|||
format.js{
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@is_in_course = params[:is_in_course]
|
||||
@course_activity = params[:course_activity]
|
||||
@homework_common_id = params[:homework_common_id]
|
||||
}
|
||||
end
|
||||
|
|
|
@ -2307,15 +2307,15 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
#获取匿评相关连接代码
|
||||
def homework_anonymous_comment homework
|
||||
def homework_anonymous_comment (homework, is_in_course, user_activity_id = -1, course_activity = -1)
|
||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||
elsif homework.student_works.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
||||
case homework.homework_detail_manual.comment_status
|
||||
when 1
|
||||
link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink'
|
||||
link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework,:is_in_course=>is_in_course,:user_activity_id=>user_activity_id,:course_activity=>course_activity), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink'
|
||||
when 2
|
||||
link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink'
|
||||
link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework,:is_in_course=>is_in_course,:user_activity_id=>user_activity_id,:course_activity=>course_activity), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink'
|
||||
when 3
|
||||
# link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
|
||||
end
|
||||
|
@ -2372,10 +2372,12 @@ module ApplicationHelper
|
|||
link_to "作品匿评", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "开启匿评后不可修改作品"
|
||||
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3
|
||||
link_to "匿评结束", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "匿评已结束"
|
||||
elsif homework.homework_type == 2 #编程作业不能修改作品
|
||||
link_to "修改作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_blue'
|
||||
elsif homework.homework_type == 2 && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")#编程作业不能修改作品
|
||||
link_to "修改作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_blue'
|
||||
elsif Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link_to "修改作品(#{homework.student_works.count})", edit_student_work_path(work.id),:class => 'c_blue'
|
||||
else
|
||||
link_to "修改作品(#{homework.student_works.count})", edit_student_work_path(work.id),:class => 'c_blue'
|
||||
link_to "查看作品(#{homework.student_works.count})", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "作业截止后不可修改作品"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -57,12 +57,12 @@ module HomeworkCommonHelper
|
|||
end
|
||||
|
||||
#根据传入作业确定跳转到开启匿评还是关闭匿评功能
|
||||
def alert_anonyoms_path homework,homework_detail_manual
|
||||
def alert_anonyoms_path homework,homework_detail_manual,user_activity_id,is_in_course,course_activity
|
||||
link = ""
|
||||
if homework_detail_manual.comment_status == 1
|
||||
link = start_anonymous_comment_homework_common_url homework.id
|
||||
link = start_anonymous_comment_homework_common_url homework.id,:user_activity_id=>user_activity_id,:is_in_course=>is_in_course,:course_activity=>course_activity
|
||||
elsif homework_detail_manual.comment_status == 2
|
||||
link = stop_anonymous_comment_homework_common_url homework.id
|
||||
link = stop_anonymous_comment_homework_common_url homework.id,:user_activity_id=>user_activity_id,:is_in_course=>is_in_course,:course_activity=>course_activity
|
||||
end
|
||||
link
|
||||
end
|
||||
|
|
|
@ -136,10 +136,8 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
|
||||
#用户动态公共表记录
|
||||
def act_as_principal_activity
|
||||
if self.jour_type == 'Principal'
|
||||
unless self.user_id == self.jour.id && self.user_id != self.reply_id && self.reply_id != 0
|
||||
self.principal_acts << PrincipalActivity.new(:user_id => self.user_id, :principal_id => self.jour_id)
|
||||
end
|
||||
if self.jour_type == 'Principal' && self.m_parent_id.nil?
|
||||
self.principal_acts << PrincipalActivity.new(:user_id => self.user_id, :principal_id => self.jour_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base
|
|||
# 若是主题帖,则内容可以是空
|
||||
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
|
||||
validates_length_of :subject, maximum: 50
|
||||
validates_length_of :content, maximum: 5000
|
||||
validates_length_of :content, maximum: 30000
|
||||
validate :cannot_reply_to_locked_topic, :on => :create
|
||||
|
||||
acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC"
|
||||
|
|
|
@ -128,6 +128,11 @@
|
|||
});
|
||||
|
||||
$mail.blur(function (event) {
|
||||
if (/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(this.value) == false){
|
||||
$('#mail_req').html( '<span style="color: red">邮件格式不对</span>').show();
|
||||
$mail_correct = false;
|
||||
return ;
|
||||
}
|
||||
if ($(this).is('#user_mail')) {
|
||||
$.get('<%=account_valid_ajax_path%>',
|
||||
{ valid: "mail",
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
<div class="talkConIpt ml5 mb10" id="reply<%= @article.id %>">
|
||||
<%= form_for :blog_comment, :url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
||||
<%= render :partial => 'blog_comments/reply_form', :locals => {:f => f,:user=>@user,:article=>@article} %>
|
||||
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'canel_message_replay();', :class => " grey_btn fr c_white mt10 mr5" %>
|
||||
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %>
|
||||
<%= link_to l(:button_submit), "javascript:void(0)", :onclick => 'submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-right: 5px;" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -73,11 +73,18 @@
|
|||
</li>
|
||||
<li style="margin-top: 30px;">
|
||||
<span style="margin-right: 20px;">身 份:</span>
|
||||
<select name="role" class="IDType">
|
||||
<option value="9">教师</option>
|
||||
<option value="7">教辅</option>
|
||||
<option value="10">学生</option>
|
||||
</select>
|
||||
<% if User.current.logged? && User.current.extensions && User.current.extensions.identity == 0%>
|
||||
<select name="role" class="IDType">
|
||||
<option value="9">教师</option>
|
||||
<option value="7">教辅</option>
|
||||
<option value="10">学生</option>
|
||||
</select>
|
||||
<%else%>
|
||||
<select name="role" class="IDType">
|
||||
<option value="10">学生</option>
|
||||
<option value="7">教辅</option>
|
||||
</select>
|
||||
<%end%>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:" class="btn_join" style="margin-left: 50px;" onclick="submit_form(this);">
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<div id="popbox02">
|
||||
<div class="ni_con">
|
||||
<p class="f14 mt5 c_black">
|
||||
当前课程的学期信息不能修改。如果您希望为本课程新建学期,请根据需要执行以下两种操作之一(目前复制学期正在改进中,将尽快上线)。选择前请参考按钮右侧的说明:
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<div class="mt15 grey_c lh22">
|
||||
<a href="javascript:" class="term_btn fl" onclick="newTerm();">
|
||||
新建学期
|
||||
</a>
|
||||
新建学期将为您创建一个新的课程学期,新学期不包括之前学期的任何内容。
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt15 grey_c lh22">
|
||||
<!--<a href="javascript:" class="term_btn fl" onclick="copyTerm();">
|
||||
复制学期
|
||||
</a>-->
|
||||
<div class="disable_btn fl">
|
||||
<span style="display: inline-block">复制学期</span>
|
||||
<span style="display: inline-block">(开发中...)</span>
|
||||
</div>
|
||||
复制学期将为您创建一个新的课程学期,新学期将继承本学期的相关资源,具体您稍后可以选择。
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="f12 mt15">
|
||||
<a href="https://forge.trustie.net/forums/1/memos/1363" class="fl c_red">
|
||||
如何复制之前学期的资源?
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="fr exit" onclick="clickCanel();">退 出</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function newTerm(){
|
||||
window.location.href = '<%= new_course_path(:host=> Setting.host_course)%>';
|
||||
}
|
||||
function copyTerm(){
|
||||
window.location.href = '<%= copy_course_course_path(@course.id)%>';
|
||||
}
|
||||
</script>
|
|
@ -3,6 +3,6 @@ hideModal();
|
|||
<% else %>
|
||||
$("#course_outline_bar").html('<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>')
|
||||
<%end %>
|
||||
<%if @is_in_show_outline_page && @is_in_show_outline_page == 'Y'%>
|
||||
<%#if @is_in_show_outline_page && @is_in_show_outline_page == 'Y'%>
|
||||
window.location.href='<%=syllabus_course_path(@course) %>';
|
||||
<% end %>
|
||||
<%# end %>
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time_selected"} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term_selected"} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
|
@ -92,4 +92,17 @@
|
|||
</div>
|
||||
</div><!---成员结束-->
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<script type="text/javascript">
|
||||
function select() {
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'courses/term_select') %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos");
|
||||
}
|
||||
$("#time_selected").click(select);
|
||||
$("#term_selected").click(select);
|
||||
</script>
|
|
@ -58,7 +58,7 @@
|
|||
'取消大纲',
|
||||
{:controller => 'blog_comments',:action => 'destroy',:user_id=>BlogComment.find(@course.outline).author_id,:blog_id=>BlogComment.find(@course.outline).blog_id, :id => @course.outline,:course_id=>@course.id},
|
||||
:method => :delete,
|
||||
:data => {:confirm => '确定取消么'},
|
||||
:data => {:confirm => '您确定要取消么?'},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == @article.author.id %>
|
||||
</li>
|
||||
|
|
|
@ -1,71 +1,33 @@
|
|||
<span class="add_attachment" data-containerid="<%= container.id %>">
|
||||
<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
|
||||
<button name="button" class="sub_btn" onclick="_file.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse) %></button>
|
||||
<% if @course %>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => ie8? ? '':'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFilesCourseSource(this,"'+ checkBox.to_s+'");',
|
||||
:style => ie8? ? '': 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<% else %>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => ie8? ? '':'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '': 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<% end %>
|
||||
|
||||
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse) %></button>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file#{container.id}",
|
||||
:class => ie8? ? '':'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => "addInputFiles_board(this, '#{container.id}');",
|
||||
:style => ie8? ? '': 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
</span>
|
||||
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
|
||||
|
||||
<span id="upload_file_count">
|
||||
<span id="upload_file_count<%=container.id %>">
|
||||
<%= l(:label_no_file_uploaded)%>
|
||||
</span>
|
||||
(<%= l(:label_max_size) %>:
|
||||
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
%>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
|
||||
</span>
|
||||
</div>
|
|
@ -7,7 +7,7 @@
|
|||
<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 %>
|
||||
<input type="hidden" name="course_attachment_type" value="<%= course_attachment_type%>">
|
||||
<input type="hidden" name="in_course_toolbar" value="Y">
|
||||
<!--<p class="c_grey fr mt10 mr5">-->
|
||||
<div class="c_dark">
|
||||
<input name="course_attachment_type" type="radio" value="1" checked class="c_dark" >课件</input> <span class="c_grey">|</span>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<%= render :partial => 'files/new_style_attachment_list',:locals => {:course => course} %>
|
||||
<%= render :partial => 'files/new_style_attachment_list',:locals => {:container => course} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
<%= form_tag(project_files_path(project), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<!-- <label style="margin-top:3px;"><#%= l(:label_file_upload)%></label> -->
|
||||
<input type="hidden" name="in_project_toolbar" value="Y">
|
||||
<%= render :partial => 'files/attachement_list',:locals => {:project => project} %>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
|
|
|
@ -23,26 +23,35 @@ $("#upload_file_count").text("未上传文件");
|
|||
$('#upload_file_div').slideToggle('slow');
|
||||
<% if @project %>
|
||||
hideModal();
|
||||
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
||||
$("#project_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#project_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<%if @in_project_toolbar%>
|
||||
window.location.href = '<%= project_files_path(@project)%>'
|
||||
<%else%>
|
||||
|
||||
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
||||
$("#project_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#project_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%elsif @course%>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
hideModal();
|
||||
<%if @in_course_toolbar %>
|
||||
window.location.href='<%= course_files_path(@course)%>'
|
||||
<%else%>
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<%end%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
$(document).ready(img_thumbnails);
|
||||
|
|
|
@ -1,96 +1,5 @@
|
|||
<%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor' %>
|
||||
<script>
|
||||
function add_class(id){
|
||||
if($("#"+id).hasClass("sortArrowActiveD")){
|
||||
$("#"+id).removeClass("sortArrowActiveD");
|
||||
$("#"+id).addClass("sortArrowActiveU");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=asc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}else if($("#"+id).hasClass("sortArrowActiveU")){
|
||||
$("#"+id).removeClass("sortArrowActiveU");
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=desc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}else{
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=desc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#complex").click(function(){
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_complex");
|
||||
});
|
||||
$("#popu").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_popu");
|
||||
});
|
||||
$("#time").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
add_class("reorder_time");
|
||||
});
|
||||
<% if @errors %>
|
||||
$('#create_memo_div').slideToggle();$('#create_memo_btn').slideToggle();
|
||||
$("#error").html('<%= @errors.html_safe %>').show();
|
||||
<% end %>
|
||||
});
|
||||
|
||||
function check_and_submit(){
|
||||
if(!check_memo_name()){
|
||||
return;
|
||||
}
|
||||
if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() ){
|
||||
memo_content.sync();
|
||||
$("#new_memo").submit();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.isEmpty()){
|
||||
$("#error").html("主题和内容不能为空").show();
|
||||
}
|
||||
else if($("textarea[name='memo[subject]']").val().trim() == "" && !memo_content.isEmpty() ){
|
||||
$("#error").html("主题不能为空").show();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.isEmpty()){
|
||||
$("#error").html("内容不能为空").show();
|
||||
}
|
||||
}
|
||||
|
||||
function check_memo_name(){
|
||||
if($("#memo_subject").val().trim().length > 50){
|
||||
$("#error").html("主题 过长(最长为 50 个字符)").show();
|
||||
return false;
|
||||
}
|
||||
// if(memo_content.html().trim().length > 5000){
|
||||
// $("#error").html("内容 过长(最长为 5000 个字符)").show();
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
function create_cancle(){
|
||||
$('#create_memo_div').slideToggle();
|
||||
$('#create_memo_btn').slideToggle();
|
||||
$('#memo_subject').val('');
|
||||
memo_content.html('')
|
||||
$('#error').html('').hide();
|
||||
}
|
||||
</script>
|
||||
<div class="postRightContainer">
|
||||
<div id="create_memo_div" style="display: none">
|
||||
<div id="error" class="red fl mb10" style="display: none">error</div>
|
||||
|
@ -141,4 +50,97 @@
|
|||
<!--</div>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function add_class(id){
|
||||
if($("#"+id).hasClass("sortArrowActiveD")){
|
||||
$("#"+id).removeClass("sortArrowActiveD");
|
||||
$("#"+id).addClass("sortArrowActiveU");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=asc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}else if($("#"+id).hasClass("sortArrowActiveU")){
|
||||
$("#"+id).removeClass("sortArrowActiveU");
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=desc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}else{
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= forums_path+"/"+@forum.id.to_s %>' + '.js?' + id + '=desc&page='+<%= @topic_pages.page%>
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#complex").click(function(){
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_complex");
|
||||
});
|
||||
$("#popu").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_popu");
|
||||
});
|
||||
$("#time").click(function () {
|
||||
$("#reorder_complex").removeClass("sortArrowActiveD");
|
||||
$("#reorder_complex").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveU");
|
||||
$("#reorder_popu").removeClass("sortArrowActiveD");
|
||||
add_class("reorder_time");
|
||||
});
|
||||
<% if @errors %>
|
||||
$('#create_memo_div').slideToggle();$('#create_memo_btn').slideToggle();
|
||||
$("#error").html('<%= @errors.html_safe %>').show();
|
||||
<% end %>
|
||||
});
|
||||
|
||||
function check_and_submit(){
|
||||
if(!check_memo_name()){
|
||||
return;
|
||||
}
|
||||
if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() ){
|
||||
memo_content.sync();
|
||||
$("#new_memo").submit();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.isEmpty()){
|
||||
$("#error").html("主题和内容不能为空").show();
|
||||
}
|
||||
else if($("textarea[name='memo[subject]']").val().trim() == "" && !memo_content.isEmpty() ){
|
||||
$("#error").html("主题不能为空").show();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.isEmpty()){
|
||||
$("#error").html("内容不能为空").show();
|
||||
}
|
||||
}
|
||||
|
||||
function check_memo_name(){
|
||||
if($("#memo_subject").val().trim().length > 50){
|
||||
$("#error").html("主题 过长(最长为 50 个字符)").show();
|
||||
return false;
|
||||
}
|
||||
if(memo_content.html().length > 20000){
|
||||
$("#error").html("内容 过长(最长为 20000 个字符)").show();
|
||||
$("html,body").animate({scrollTop:$("#error").offset().top},1000)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function create_cancle(){
|
||||
$('#create_memo_div').slideToggle();
|
||||
$('#create_memo_btn').slideToggle();
|
||||
$('#memo_subject').val('');
|
||||
memo_content.html('')
|
||||
$('#error').html('').hide();
|
||||
}
|
||||
</script>
|
|
@ -34,7 +34,7 @@
|
|||
</p>
|
||||
<% end %>
|
||||
<div class="ni_btn">
|
||||
<a href="javascript:" class="tijiao" onclick="clickOK('<%= alert_anonyoms_path @homework,@homework_detail_manual%>');" style="margin-bottom: 20px;" >
|
||||
<a href="javascript:" class="tijiao" onclick="clickOK('<%= alert_anonyoms_path @homework,@homework_detail_manual,@user_activity_id,@is_in_course,@course_activity%>');" style="margin-bottom: 20px;" >
|
||||
确 定
|
||||
</a>
|
||||
<a href="javascript:" class="tijiao" onclick="clickCanel();" style="margin-bottom: 20px;">
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
<% if @statue == 1%>
|
||||
alert('启动成功');
|
||||
$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');
|
||||
alert('启动成功');
|
||||
<% if @user_activity_id == -1 %>
|
||||
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
|
||||
init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
|
||||
<% else %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
|
||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
|
||||
<% end %>
|
||||
/*$("#<%#= @homework.id %>_start_anonymous_comment").replaceWith('<%#= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');*/
|
||||
<% elsif @statue == 2 %>
|
||||
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
|
||||
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
|
||||
<% elsif @statue == 3%>
|
||||
alert("已开启匿评,请务重复开启");
|
||||
alert("已开启匿评,请务重复开启");
|
||||
<% elsif @statue == 4%>
|
||||
alert("您没有权限开启匿评");
|
||||
alert("您没有权限开启匿评");
|
||||
<% elsif @statue == 5%>
|
||||
alert("作业提交截止之后才能启动匿评");
|
||||
alert("作业提交截止之后才能启动匿评");
|
||||
<% end %>
|
|
@ -1,2 +1,10 @@
|
|||
$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('');
|
||||
alert('关闭成功');
|
||||
alert('关闭成功');
|
||||
<% if @user_activity_id == -1 %>
|
||||
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
|
||||
init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
|
||||
<% else %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
|
||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
|
||||
<% end %>
|
||||
/*
|
||||
$("#<%#= @homework.id %>_stop_anonymous_comment").replaceWith('');*/
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
|
||||
function project_files_upload()
|
||||
{
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_show_project',:locals => {:project => @project}) %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/upload_project_files_on_navbar',:locals => {:container => @project}) %>');
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
$("#error").html('主题不能超过50个字符').show();
|
||||
return;
|
||||
}
|
||||
// if(memo_content.html().trim().length > 5000 ){
|
||||
// $("#error").html('内容不能超过5000个字符').show();
|
||||
// return;
|
||||
// }
|
||||
if(memo_content.html().length > 20000){
|
||||
$("#error").html("内容 过长(最长为 20000 个字符)").show();
|
||||
$("html,body").animate({scrollTop:$("#error").offset().top},1000)
|
||||
return false;
|
||||
}
|
||||
memo_content.sync();
|
||||
$("#edit_memo").submit();
|
||||
}else if($("textarea[name='memo[subject]']").val().trim() == "" && !memo_content.isEmpty() ){
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<span class="add_attachment" data-containerid="<%= container.id %>">
|
||||
<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
|
||||
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse) %></button>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file#{container.id}",
|
||||
:class => ie8? ? '':'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => "addInputFiles_board(this, '#{container.id}');",
|
||||
:style => ie8? ? '': 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
|
||||
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
|
||||
</span>
|
||||
<span id="upload_file_count<%=container.id %>">
|
||||
<%= l(:label_no_file_uploaded)%>
|
||||
</span>
|
||||
(<%= l(:label_max_size) %>:
|
||||
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||
<div class="cl">
|
||||
|
||||
<div>
|
||||
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
|
||||
<div class="upload_con">
|
||||
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
|
||||
<div class="upload_box">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
|
||||
<%= form_tag(project_files_path(container), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<!-- <label style="margin-top:3px;"><#%= l(:label_file_upload)%></label> -->
|
||||
<input type="hidden" name="in_project_toolbar" value="Y">
|
||||
<%= render :partial => 'projects/upload_project_files_list',:locals => {:container => container} %>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_resource()
|
||||
{
|
||||
$('#submit_resource').parent().submit();
|
||||
}
|
||||
</script>
|
|
@ -73,8 +73,7 @@
|
|||
<td class="w150"><span class="rep_history_grey"><%=h repository.scm_name %></span></td>
|
||||
<%if repository.scm_name=="Git"%>
|
||||
<% rep_url = "http://" + repository.login.to_s + '_'+ repository.identifier.to_s + "@" + ip.to_s + h( repository.url.slice(project_path_cut, repository.url.length)) %>
|
||||
<td class="w362 pl5" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis; text-align: left" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
||||
<%=h repository.url.slice(project_path_cut, repository.url.length) %>">
|
||||
<td class="w362 pl5" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis; text-align: left">
|
||||
<span class="rep_history_grey">
|
||||
<textarea id="copy_rep_content2_<%= repository.id %>" class="cloneUrl2 fl" type="input" ><%= rep_url %></textarea>
|
||||
<a href="javascript:void(0);" onclick="jsCopy2(<%= repository.id %>)"><span class="vl_copy2" title="点击复制版本库地址"></span></a>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
|
||||
</div>
|
||||
<%end%>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr evaluation_submit" onclick="$(this).parent().parent().submit();$('#about_hwork_<%= @work.id%>').html('');">提交</a>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr evaluation_submit" onclick="$(this).parent().parent().submit();$('#about_hwork_<%= work.id%>').html('');">提交</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
|
@ -1,6 +1,6 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList340 hworkH30 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
|
||||
<span class="c_dark f14 fb fl <%= @homework.homework_type == 2 ? 'mr60 ml80' : 'mr95 ml100'%>">作品名称</span>
|
||||
<span class="c_dark f14 fb fl <%= @homework.homework_type == 2 ? 'mr90 ml50' : 'mr140 ml50'%>">作品名称</span>
|
||||
<span class="c_dark f14 fb fl mr50">姓名</span>
|
||||
<span class="c_dark f14 fb fl">学号</span>
|
||||
</li>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<li class="hworkList130 c_grey" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<% if student_work.created_at && @homework.end_time%>
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -80,5 +80,6 @@
|
|||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -1,62 +1,63 @@
|
|||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<% is_my_work = student_work.user == User.current%>
|
||||
<li class="hworkList340 width525">
|
||||
<ul>
|
||||
<% if is_my_work%>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 width285">
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<div>
|
||||
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
|
||||
</div>
|
||||
</li>
|
||||
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<ul class="mt10 fl">
|
||||
<li class="hworkStName mr10 mt16" title="姓名">
|
||||
<%= student_work.user.show_name%>
|
||||
</li>
|
||||
<li class="hworkStID mt16" title="学号">
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 width285">
|
||||
<div>
|
||||
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
|
||||
</div>
|
||||
</li>
|
||||
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<ul class="mt10 fl">
|
||||
<li class="hworkStName mr10 mt16" title="姓名">
|
||||
匿名
|
||||
</li>
|
||||
<li class="hworkStID mt16" title="学号">
|
||||
--
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hworkList130 c_grey" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<!-- 成绩 -->
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10">
|
||||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<% is_my_work = student_work.user == User.current%>
|
||||
<li class="hworkList340 width525">
|
||||
<ul>
|
||||
<% if is_my_work%>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 width285">
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<div>
|
||||
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
|
||||
</div>
|
||||
</li>
|
||||
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<ul class="mt10 fl">
|
||||
<li class="hworkStName mr10 mt16" title="姓名">
|
||||
<%= student_work.user.show_name%>
|
||||
</li>
|
||||
<li class="hworkStID mt16" title="学号">
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 width285">
|
||||
<div>
|
||||
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%>
|
||||
</div>
|
||||
</li>
|
||||
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<ul class="mt10 fl">
|
||||
<li class="hworkStName mr10 mt16" title="姓名">
|
||||
匿名
|
||||
</li>
|
||||
<li class="hworkStID mt16" title="学号">
|
||||
--
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hworkList130 c_grey" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<!-- 成绩 -->
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10">
|
||||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time @work.created_at %>
|
||||
<%=format_time work.created_at %>
|
||||
</li>
|
||||
|
||||
<% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
</li>
|
||||
<li class="fr" >
|
||||
<%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= @work.id%>">
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise' %>
|
||||
</li>
|
||||
<% end%>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<li >
|
||||
<span class="tit_fb ">编程代码:</span>
|
||||
<div class="showHworkP break_word">
|
||||
<%= text_format(@work.description) if @work.description%>
|
||||
<%= text_format(work.description) if work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
@ -37,10 +37,10 @@
|
|||
测试结果:
|
||||
</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<% @work.student_work_tests.each_with_index do |test, index| %>
|
||||
<% work.student_work_tests.each_with_index do |test, index| %>
|
||||
<div class="ProResultTop">
|
||||
<p class="c_blue fl">
|
||||
第<%= @work.student_work_tests.count - index%>次测试
|
||||
第<%= work.student_work_tests.count - index%>次测试
|
||||
</p>
|
||||
<span class="fr c_grey">
|
||||
<%= test.created_at.to_s(:db) %>
|
||||
|
@ -79,24 +79,24 @@
|
|||
<% end%>
|
||||
|
||||
<li >
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
|
||||
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="ping_box fl" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%@student_work_scores.each do |score|%>
|
||||
<div id="work_score_<%= score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
|
||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%student_work_scores.each do |student_score|%>
|
||||
<div id="work_score_<%= student_score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
|
||||
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -3,21 +3,21 @@
|
|||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time @work.created_at %>
|
||||
<%=format_time work.created_at %>
|
||||
</li>
|
||||
|
||||
<% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
</li>
|
||||
<li class="fr" >
|
||||
<%= link_to "",edit_student_work_path(@work),:class => "pic_edit"%>
|
||||
<%= link_to "",edit_student_work_path(work),:class => "pic_edit"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= @work.id%>">
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise' %>
|
||||
</li>
|
||||
<% end%>
|
||||
|
@ -25,50 +25,50 @@
|
|||
|
||||
<!--<li ><span class="tit_fb"> 参与人员:</span>程梦雯 王强</li>-->
|
||||
|
||||
<% if @work.project%>
|
||||
<% if work.project%>
|
||||
<li >
|
||||
<span class="tit_fb"> 关联项目:</span>
|
||||
<%= link_to( @work.project.name, project_path(@work.project.id), :class => "linkBlue" )%>
|
||||
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<div class="showHworkP break_word">
|
||||
<%= text_format(@work.description) if @work.description%>
|
||||
<%= text_format(work.description) if work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<span class="tit_fb"> 附件:</span>
|
||||
<% if @work.attachments.empty?%>
|
||||
<% if work.attachments.empty?%>
|
||||
<span style="color: #999999">尚未提交附件</span>
|
||||
<% else%>
|
||||
<div class="fl" style="width: 90%;">
|
||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => @work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
|
||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
|
||||
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="ping_box fl" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%@student_work_scores.each do |score|%>
|
||||
<div id="work_score_<%= score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
|
||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%student_work_scores.each do |student_score|%>
|
||||
<div id="work_score_<%= student_score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
|
||||
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -1,11 +1,11 @@
|
|||
<div class="fl" style="border-bottom:1px solid #eaeaea; padding-bottom:10px; width:720px;">
|
||||
<div class="fl" style="padding-bottom:10px; width:720px;">
|
||||
<span class="c_dark f14 fb fl mr30">
|
||||
作品
|
||||
<font class="f12 c_red">
|
||||
(<%= @student_work_count%>)
|
||||
(已有<%= @student_work_count%>人提交)
|
||||
</font>
|
||||
<% if !@is_teacher && @stundet_works.empty?%>
|
||||
<span class="f12 c_red">未提交</span>
|
||||
<span class="f12 c_red">您尚未提交作品</span>
|
||||
<% end %>
|
||||
</span>
|
||||
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
|
||||
|
@ -35,6 +35,14 @@
|
|||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<div id="about_hwork_<%= student_work.id%>"></div>
|
||||
<div id="about_hwork_<%= student_work.id%>">
|
||||
<% if student_work.user == User.current && !@is_evaluation %>
|
||||
<% if @homework.homework_type == 2%>
|
||||
<%=render :partial => 'programing_work_show', :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
|
||||
<% else %>
|
||||
<%=render :partial => 'show' , :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
|
@ -0,0 +1,33 @@
|
|||
<div id="popbox02">
|
||||
<div class="ni_con">
|
||||
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
|
||||
<p class="f14 mt5">
|
||||
<span class="fb">作品名称:</span><%=@student_work.name%>
|
||||
</p>
|
||||
<p class="f14 mt5">
|
||||
<span class="fb">作品描述:</span><%=@student_work.description%>
|
||||
</p>
|
||||
<p class="mt5">
|
||||
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
|
||||
<% if @student_work.attachments.empty? %>
|
||||
<span class="fl c_red"><%= "无附件"%></span>
|
||||
<% else %>
|
||||
<div class="fl grey_c">
|
||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<div class="ni_btn mt10">
|
||||
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px; margin-left: 55px;" >
|
||||
确 定
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function clickOK() {
|
||||
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,16 @@
|
|||
<% if @submit_result%>
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos");
|
||||
<% else %>
|
||||
window.location.href = '<%= new_student_work_url(:homework => @homework.id)%>';
|
||||
<% end %>
|
||||
|
||||
function clickCanel() {
|
||||
hideModal('#popbox02');
|
||||
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
|
||||
}
|
|
@ -26,7 +26,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div class="HomeWorkCon mt15">
|
||||
<%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
|
||||
<%= labelled_form_for @work,:html => { :multipart => true },:remote=>true do |f|%>
|
||||
<div class=" c_red mb10">
|
||||
提示:作品名称和描述中不要出现真实的姓名信息
|
||||
</div>
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt5">
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="edit_student_work(<%= @work.id%>);">确定</a>
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="popupRegex();edit_student_work(<%= @work.id%>);">确定</a>
|
||||
<span class="fr mr10 mt3">或</span>
|
||||
<%= link_to "取消", student_work_index_path(:homework => @homework), :class => "fr mr10 mt3"%>
|
||||
</div>
|
||||
|
@ -60,3 +60,12 @@
|
|||
<% end%>
|
||||
</div><!----HomeWorkCon end-->
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function popupRegex(){
|
||||
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos");
|
||||
}
|
||||
</script>
|
|
@ -120,14 +120,31 @@
|
|||
|
||||
<div class="homeworkInfo" id="homeworkInformation">
|
||||
<div class="">
|
||||
<div class="homepagePostTitle fl hidden m_w500" title="<%= @homework.name %>"><%= @homework.name %></div>
|
||||
<div class="homepagePostTitle fl hidden m_w460" title="<%= @homework.name %>"><%= @homework.name %></div>
|
||||
<% if @homework.homework_detail_manual%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 1%>
|
||||
<span class="grey_btn_cir ml10">未开启匿评</span>
|
||||
<% if @homework.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 1%>
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 2%>
|
||||
<span class="green_btn_cir ml10">匿评中</span>
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 3%>
|
||||
<span class="grey_btn_cir ml10">匿评已结束</span>
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_hidden">[ 隐藏作业信息 ]</a> </span>
|
||||
|
@ -145,6 +162,9 @@
|
|||
</div>
|
||||
<div class="mt5">
|
||||
<div class="fontGrey2 db fl">截止时间:<%= @homework.end_time %> 23:59</div>
|
||||
<% if @homework.homework_detail_manual.comment_status == 0 %>
|
||||
<div class="fontGrey2 db fl ml10">发布时间:<%= @homework.publish_time %> 00:00</div>
|
||||
<% end %>
|
||||
<% if @homework.homework_detail_manual%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 1%>
|
||||
<% end_time = @homework.end_time.to_time.to_i + 24*60*60 - 1 %>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
:url => {:controller => 'student_work',
|
||||
:action => 'create',
|
||||
:homework => @homework.id
|
||||
}) do |f|%>
|
||||
},:remote=>true ) do |f| %>
|
||||
<div class=" c_red mb10">
|
||||
提示:作品名称和描述中不要出现真实的姓名信息
|
||||
</div>
|
||||
|
@ -111,11 +111,20 @@
|
|||
</div>
|
||||
|
||||
<div class="mt5">
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="new_student_work();">确定</a>
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="popupRegex();new_student_work();">确定</a>
|
||||
<span class="fr mr10 mt3">或</span>
|
||||
<%= link_to "取消", user_homeworks_user_path(User.current.id), :class => "fr mr10 mt3"%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
</div><!----HomeWorkCon end-->
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function popupRegex(){
|
||||
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos");
|
||||
}
|
||||
</script>
|
|
@ -3,9 +3,9 @@ if($("#about_hwork_<%= @work.id%>").children().length > 0){
|
|||
}
|
||||
else{
|
||||
<% if @homework.homework_type == 2%>
|
||||
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>");
|
||||
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
|
||||
<% else%>
|
||||
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>");
|
||||
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
|
||||
<% end%>
|
||||
$('#score_<%= @work.id%>').peSlider({range: 'min'});
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<% if @submit_result%>
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos");
|
||||
<% else %>
|
||||
window.location.href = '<%= edit_student_work_url(@work)%>';
|
||||
<% end %>
|
||||
|
||||
function clickCanel() {
|
||||
hideModal('#popbox02');
|
||||
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
|
||||
}
|
|
@ -13,25 +13,31 @@
|
|||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w480 fl"> <!--+"(作业名称)"-->
|
||||
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||
</div>
|
||||
<% if activity.homework_detail_manual%>
|
||||
<% if activity.homework_detail_manual.comment_status == 1%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_btn_cir ml5">未开启匿评</span>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_btn_cir ml5">作品提交中</span>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 2%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="green_btn_cir ml5">匿评中</span>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_btn_cir ml5">教师教辅评阅中</span>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 3%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_btn_cir ml5">匿评已结束</span>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_btn_cir ml5">教师教辅评阅中</span>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
|
@ -52,7 +58,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
|
||||
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
|
||||
<div id="intro_content_<%= user_activity_id%>">
|
||||
|
@ -87,7 +93,7 @@
|
|||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
||||
</li>
|
||||
<li>
|
||||
<%= homework_anonymous_comment activity %>
|
||||
<%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
|
@ -161,6 +167,7 @@
|
|||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<!--</p>-->
|
||||
<% else %>
|
||||
<% attachments.each do |attach| %>
|
||||
<ul class="resourcesList">
|
||||
<ul class="resourcesList" onmouseover="$(this).children().css('background-color', '#e1e1e1')" onmouseout="$(this).children().css('background-color', 'white')">
|
||||
<li class="resourcesListCheckbox fl">
|
||||
<input name="checkbox1[]" type="checkbox" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||
</li>
|
||||
|
@ -21,5 +21,7 @@
|
|||
<li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
|
||||
<li style="display: none"><%= attach.id %></li>
|
||||
</ul>
|
||||
<ul class="resourcesListDashLine"></ul>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -10,28 +10,34 @@
|
|||
TO
|
||||
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<span class="homepagePostTitle hidden m_w480 fl">
|
||||
<span class="homepagePostTitle hidden m_w505 fl">
|
||||
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
|
||||
</span>
|
||||
|
||||
<% if homework_common.homework_detail_manual%>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_btn_cir ml5">未发布</span>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_btn_cir ml5">未开启匿评</span>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_btn_cir ml5">作品提交中</span>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="green_btn_cir ml5">匿评中</span>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_btn_cir ml5">教师教辅评阅中</span>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_btn_cir ml5">匿评已结束</span>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_btn_cir ml5">教师教辅评阅中</span>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
|
@ -50,14 +56,14 @@
|
|||
<%= homework_common.language_name%>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostDeadline">
|
||||
<%= l(:label_end_time)%>:<%= homework_common.end_time%> 23:59
|
||||
</div>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%>
|
||||
<div class="homepagePostDeadline ml15">
|
||||
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostDeadline">
|
||||
<%= l(:label_end_time)%>:<%= homework_common.end_time%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="homework_description_<%= homework_common.id%>">
|
||||
<div id="intro_content_<%= homework_common.id%>">
|
||||
|
@ -92,9 +98,9 @@
|
|||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<li>
|
||||
<%= homework_anonymous_comment homework_common %>
|
||||
<%= homework_anonymous_comment(homework_common, is_in_course) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
|
|
|
@ -66,9 +66,10 @@
|
|||
<li>课程名称:<%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></li>
|
||||
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
||||
<li>发布时间:<span style="color:Red;"><%= DateTime.parse(ma.course_message.created_at.to_s).strftime('%Y-%m-%d %H:%M').to_s %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 23:59</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59</span></li>
|
||||
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59</span></li>
|
||||
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
|
||||
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
||||
</ul>
|
||||
|
@ -81,9 +82,9 @@
|
|||
<li>课程名称:<%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></li>
|
||||
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 23:59</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59</span></li>
|
||||
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59</span></li>
|
||||
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
|
||||
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
||||
</ul>
|
||||
|
@ -116,9 +117,9 @@
|
|||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></li>
|
||||
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 23:59</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59</span></li>
|
||||
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59</span></li>
|
||||
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
|
||||
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
||||
<p>请抓紧时间提交您的作品,谢谢!</p>
|
||||
|
@ -154,7 +155,7 @@
|
|||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
||||
<li>匿评截止:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
||||
<li>匿评截止:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59</span></li>
|
||||
</ul>
|
||||
<% unless User.current.allowed_to?(:as_teacher, ma.course_message.course)%>
|
||||
<p>请您尽早完成匿评!如果您在截止日期前未完成匿评,您的最终成绩将被扣除<%= ma.course_message.homework_detail_manual.absence_penalty %>分乘以缺评份数。</p>
|
||||
|
@ -215,7 +216,7 @@
|
|||
<li>失败原因:<span style="color:red;">提交作品的人数低于2人</span></li>
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time%> 24点</span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time%> 23:59</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -314,7 +315,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<p>
|
||||
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 24点结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
|
||||
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 23:59结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -380,7 +381,7 @@
|
|||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.course_message.homework_common.user.show_name, user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<%=link_to ma.course_message.homework_common.user.show_name+"老师", user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span>
|
||||
</li>
|
||||
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
|
@ -397,7 +398,7 @@
|
|||
<ul class="ul_grey">
|
||||
<li>课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)</li>
|
||||
<li>作业标题:<%= ma.course_message.homework_common.name %></li>
|
||||
<li>提交截止:<%= ma.course_message.homework_common.end_time %> 24:00</li>
|
||||
<li>提交截止:<%= ma.course_message.homework_common.end_time %> 23:59</li>
|
||||
<li>提交时间:<%= format_time(ma.course_message.created_at) %></li>
|
||||
<li>迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分</li>
|
||||
</ul>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% @attachments.each do |attachment| %>
|
||||
$("#attachments_fields").append(
|
||||
'<span id="attachments_p<%= attachment.id %>">'+
|
||||
'<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "filename link_file", :readonly=>"readonly")%>'+
|
||||
'<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "upload_filename link_file", :readonly=>"readonly")%>'+
|
||||
'<%= text_field_tag("attachments[p#{attachment.id}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => "description", :style=>"display: inline-block;") %>'+
|
||||
'<span class="ispublic-label"><%= l(:field_is_public)%>:</span>'+
|
||||
'<%= check_box_tag("attachments[p#{attachment.id}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => "is_public")%>'+
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
<div class="ProResultCon "><%= test.results.first %></div>
|
||||
<div class="ProResultCon"><pre><%= test.results.first %></pre></div>
|
||||
<% else %>
|
||||
<div class="ProResultTable " >
|
||||
<ul class="ProResultUl " >
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
<div class="ProResultCon "><%= test.results.first %></div>
|
||||
<div class="ProResultCon"><pre><%= test.results.first %></pre></div>
|
||||
<% else %>
|
||||
<div class="ProResultTable " >
|
||||
<ul class="ProResultUl " >
|
||||
|
|
|
@ -145,7 +145,6 @@
|
|||
var id; //资源id
|
||||
var sendType; //发送到课程 1 发送到项目 2
|
||||
var lastSendType; //保存上次发送的发送类型
|
||||
var last_op
|
||||
$("#resources_list").mousedown(function(e) {
|
||||
//如果是右键的话
|
||||
if (3 == e.which) {
|
||||
|
@ -180,28 +179,6 @@
|
|||
last_line = line;
|
||||
}
|
||||
});
|
||||
|
||||
//鼠标经过时,背景颜色设为灰色
|
||||
$("#resources_list").mouseover(function(e){
|
||||
pageX = e.clientX;
|
||||
pageY = e.clientY;
|
||||
var ele = document.elementFromPoint(pageX,pageY);
|
||||
line = $(ele).parent();
|
||||
if(last_op != null){
|
||||
last_op.children().css("background-color", 'white');
|
||||
restore();
|
||||
last_op == null;
|
||||
}
|
||||
//如果当前的tag是li,那么还要li的父级元素
|
||||
if(line.get(0).tagName === 'LI'){
|
||||
line = line.parent();
|
||||
}
|
||||
//将当前的元素的所有子元素的背景色改为蓝色
|
||||
line.children().css("background-color", '#e1e1e1');
|
||||
//将当前元素赋给 上一个对象 保存起来。
|
||||
last_op = line;
|
||||
});
|
||||
|
||||
//元素包含关系计算
|
||||
var contains = function(root, el) {
|
||||
if (root.compareDocumentPosition)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if @user_activity_id %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework_common,:user_activity_id =>@user_activity_id}) %>");
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework_common,:user_activity_id =>@user_activity_id,:course_activity => @course_activity}) %>");
|
||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
|
||||
<% elsif @homework_common_id && @is_in_course %>
|
||||
$("#homework_common_<%= @homework_common_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework_common,:is_in_course => @is_in_course}) %>");
|
||||
|
|
|
@ -41,7 +41,7 @@ module RedmineApp
|
|||
|
||||
config.active_record.store_full_sti_class = true
|
||||
config.active_record.default_timezone = :local
|
||||
|
||||
config.time_zone = 'Beijing'
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
# config.time_zone = 'Central Time (US & Canada)'
|
||||
|
|
|
@ -354,7 +354,7 @@ zh:
|
|||
# 意见反馈
|
||||
#
|
||||
label_feedback: 意见反馈
|
||||
label_feedback_tips: "欢迎反馈网站问题,课程中遇到的问题请反馈给相关老师!"
|
||||
label_feedback_tips: "请在此提问平台问题,或直接加入师姐答疑群,谢谢!"
|
||||
label_technical_support: "QQ 在线支持:"
|
||||
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
|
||||
label_feedback_value: "该帖来自用户反馈:)"
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
class DeleteJournalsActivity < ActiveRecord::Migration
|
||||
def up
|
||||
UserActivity.all.each do |activity|
|
||||
if activity.act_type == 'JournalsForMessage'
|
||||
if activity.act
|
||||
unless activity.act.m_parent_id.nil?
|
||||
parent_act = UserActivity.where("act_id = #{activity.act.m_parent_id} and act_type='JournalsForMessage' and container_type='Principal'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
else
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
PrincipalActivity.all.each do |activity|
|
||||
if activity.principal_act_type == 'JournalsForMessage'
|
||||
if activity.principal_act
|
||||
unless activity.principal_act.m_parent_id.nil?
|
||||
parent_act = PrincipalActivity.where("principal_act_id = #{activity.principal_act.m_parent_id} and principal_act_type='JournalsForMessage'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.principal_act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
else
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
class AlterUserActivitiesUpdate < ActiveRecord::Migration
|
||||
def up
|
||||
count = UserActivity.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
UserActivity.page(i).per(30).each do |activity|
|
||||
activity.updated_at = activity.created_at
|
||||
activity.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20151102090519) do
|
||||
ActiveRecord::Schema.define(:version => 20151109080256) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#coding=utf-8
|
||||
|
||||
namespace :rep_fault do
|
||||
desc "set ossean's type value"
|
||||
task :rep_update => :environment do
|
||||
rep = Repository.find(400)
|
||||
rep.type = "Repository::Git"
|
||||
rep.save
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,39 @@
|
|||
#coding=utf-8
|
||||
|
||||
namespace :gitlab do
|
||||
desc "sync gitlab's users which lost in last sync"
|
||||
task :add_gid => :environment do
|
||||
users = User.find_by_sql("select * from users where gid is null")
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
g = Gitlab.client
|
||||
users.each do |user|
|
||||
us = g.get("/users?search=#{user.mail}")
|
||||
puts user.mail
|
||||
if us.blank?
|
||||
puts "55555555555555555"
|
||||
s.sync_user(user)
|
||||
else
|
||||
# 解决查询的时候出现多值的情况,比如:123@163.com和g123@163.com
|
||||
puts "66666666666666666666"
|
||||
puts user.id
|
||||
if Array === us
|
||||
us.each do |u|
|
||||
if u.email == user.mail
|
||||
user.gid = u.id
|
||||
user.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
task :sync_members => :environment do
|
||||
projects = Project.all
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
projects.each do |project|
|
||||
puts project.id
|
||||
s.only_members(project.first)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -3,19 +3,27 @@
|
|||
namespace :sync_rep do
|
||||
desc "sync some projects which just have sigle repository"
|
||||
task :sigle => :environment do
|
||||
projects = Project.all
|
||||
projects = Project.where("user_id !=?",12)
|
||||
projects.each do |project|
|
||||
# 针对类型为Git并且只有一个版本库的项目
|
||||
if project.repositories && project.repositories.count == 1 && project.repositories.first.type == "Repository::Git"
|
||||
rep = project.repositories.first
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
s.sync_project(project, path: rep.identifier, import_url: rep.url)
|
||||
rep.type = 'Repository::Gitlab'
|
||||
rep.save
|
||||
puts "*************************************"
|
||||
puts project.id
|
||||
puts rep.id
|
||||
puts rep.identifier
|
||||
count = Repository.find_by_sql("SELECT * FROM `repositories` where identifier = '#{rep.identifier}'").count
|
||||
puts count
|
||||
unless count > 1
|
||||
rep.identifier
|
||||
puts "################################"
|
||||
puts project.id
|
||||
puts rep.id
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
s.sync_project(project, path: rep.identifier, import_url: rep.url)
|
||||
rep.type = 'Repository::Gitlab'
|
||||
rep.save
|
||||
puts "*************************************"
|
||||
puts project.id
|
||||
puts rep.id
|
||||
puts rep.identifier
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,46 +3,46 @@
|
|||
module Trustie
|
||||
module Gitlab
|
||||
module Helper
|
||||
def change_password(uid, en_pwd, salt)
|
||||
return unless uid
|
||||
options = {:encrypted_password=>en_pwd, :password_salt=>salt}
|
||||
self.g.put("/users/ext/#{uid}", :body => options)
|
||||
# g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
|
||||
end
|
||||
def change_password(uid, en_pwd, salt)
|
||||
return unless uid
|
||||
options = {:encrypted_password=>en_pwd, :password_salt=>salt}
|
||||
self.g.put("/users/ext/#{uid}", :body => options)
|
||||
# g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
|
||||
end
|
||||
|
||||
def find_user(user)
|
||||
us = self.g.get("/users?search=#{user.mail}")
|
||||
if Array === us
|
||||
us.each do |u|
|
||||
return u if u.email == user.mail
|
||||
end
|
||||
def find_user(user)
|
||||
us = self.g.get("/users?search=#{user.mail}")
|
||||
if Array === us
|
||||
us.each do |u|
|
||||
return u if u.email == user.mail
|
||||
end
|
||||
return nil
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
def add_user(user)
|
||||
u = nil
|
||||
begin
|
||||
u = find_user(user)
|
||||
unless u
|
||||
u = self.g.create_user(user.mail,
|
||||
user.hashed_password,
|
||||
name: user.show_name,
|
||||
username: user.login,
|
||||
confirm: "true")
|
||||
user.gid = u.id
|
||||
end
|
||||
change_password(u.id, user.hashed_password, user.salt)
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
return u
|
||||
def add_user(user)
|
||||
u = nil
|
||||
begin
|
||||
u = find_user(user)
|
||||
unless u
|
||||
u = self.g.create_user(user.mail,
|
||||
user.hashed_password,
|
||||
name: user.show_name,
|
||||
username: user.login,
|
||||
confirm: "true")
|
||||
user.gid = u.id
|
||||
end
|
||||
change_password(u.id, user.hashed_password, user.salt)
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
return u
|
||||
end
|
||||
|
||||
def del_user(user)
|
||||
return unless user.gid
|
||||
self.g.delete_user(user.gid)
|
||||
end
|
||||
def del_user(user)
|
||||
return unless user.gid
|
||||
self.g.delete_user(user.gid)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -69,6 +69,11 @@ module Trustie
|
|||
|
||||
# import url http://xianbo_trustie2:1234@repository.trustie.net/xianbo/trustie2.git
|
||||
# can use password
|
||||
puts "@@@@@@@@@@@@@@@@@@@@@@@"
|
||||
puts path
|
||||
puts project.description
|
||||
puts gid
|
||||
puts import_url
|
||||
gproject = self.g.create_project(path,
|
||||
path: path,
|
||||
description: project.description,
|
||||
|
@ -81,6 +86,7 @@ module Trustie
|
|||
user_id: gid,
|
||||
import_url: import_url
|
||||
)
|
||||
puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
|
||||
project.gpid = gproject.id
|
||||
project.save!
|
||||
puts "Successfully created #{project.name}"
|
||||
|
@ -100,6 +106,20 @@ module Trustie
|
|||
end
|
||||
end
|
||||
|
||||
def only_members(project)
|
||||
project.members.each do |m|
|
||||
begin
|
||||
gid = m.user.gid
|
||||
unless gid
|
||||
gid = sync_user(m.user).id
|
||||
end
|
||||
self.g.add_team_member(project.gpid, gid, UserLevel::DEVELOPER)
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def remove_project
|
||||
end
|
||||
end
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -663,7 +663,7 @@ function regex_homework_end_publish_time()
|
|||
var myDate = new Date();
|
||||
if($.trim($("#homework_publish_time").val()) == "")
|
||||
{
|
||||
$("#homework_publish_time").val(myDate.toLocaleDateString());
|
||||
$("#homework_publish_time").val(formate_date(myDate));
|
||||
}
|
||||
var publish_time = Date.parse($("#homework_publish_time").val());
|
||||
var end_time = Date.parse($("#homework_end_time").val());
|
||||
|
@ -695,6 +695,21 @@ function regex_homework_end_time()
|
|||
}
|
||||
}
|
||||
|
||||
function formate_date(date){
|
||||
var str = "";
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
var day = date.getDate();
|
||||
if(month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
if(day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
str = year + '-' + month + '-' + day;
|
||||
return str;
|
||||
}
|
||||
|
||||
//验证发送到课程
|
||||
function regex_course_id(){
|
||||
var course_id = $("#course_id").val();
|
||||
|
@ -939,13 +954,19 @@ function regexStudentWorkDescription()
|
|||
function new_student_work()
|
||||
{
|
||||
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||
{$("#new_student_work").submit();}
|
||||
{
|
||||
$("#new_student_work").submit();
|
||||
$("#ajax-indicator").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function edit_student_work(id)
|
||||
{
|
||||
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||
{$("#edit_student_work_" + id).submit();}
|
||||
{
|
||||
$("#edit_student_work_" + id).submit();
|
||||
$("#ajax-indicator").hide();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
(function($){
|
||||
$.fn.fix = function(options){
|
||||
var u = navigator.userAgent;
|
||||
if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
|
||||
$("#scrollsidebar").css("display","none");
|
||||
return;
|
||||
}
|
||||
var defaults = {
|
||||
float : 'right',
|
||||
minStatue : true,
|
||||
|
@ -73,6 +78,11 @@ function cookieget(n)
|
|||
|
||||
|
||||
$(function(){
|
||||
var u = navigator.userAgent;
|
||||
if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
|
||||
$("#scrollsidebar").css("display","none");
|
||||
return;
|
||||
}
|
||||
$(".closeSidebar").click(function(){
|
||||
$(".show_btn").css("display","none");
|
||||
$("#scrollsidebar").css("display","none");
|
||||
|
@ -109,4 +119,30 @@ $(function(){
|
|||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//var browser={
|
||||
// versions:function(){
|
||||
// var u = navigator.userAgent, app = navigator.appVersion;
|
||||
// return {//移动终端浏览器版本信息
|
||||
// trident: u.indexOf('Trident') > -1, //IE内核
|
||||
// presto: u.indexOf('Presto') > -1, //opera内核
|
||||
// webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
|
||||
// gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
|
||||
// mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端
|
||||
// ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
|
||||
// android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
|
||||
// iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
|
||||
// iPad: u.indexOf('iPad') > -1, //是否iPad
|
||||
// webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
|
||||
// };
|
||||
// }(),
|
||||
// language:(navigator.browserLanguage || navigator.language).toLowerCase()
|
||||
//}
|
||||
//document.writeln("语言版本: "+browser.language);
|
||||
//document.writeln(" 是否为移动终端: "+browser.versions.mobile);
|
||||
//document.writeln(" ios终端: "+browser.versions.ios);
|
||||
//document.writeln(" android终端: "+browser.versions.android);
|
||||
//document.writeln(" 是否为iPhone: "+browser.versions.iPhone);
|
||||
//document.writeln(" 是否iPad: "+browser.versions.iPad);
|
||||
//document.writeln(navigator.userAgent);
|
|
@ -97,7 +97,7 @@ function regex_homework_end_publish_time()
|
|||
var myDate = new Date();
|
||||
if($.trim($("#homework_publish_time").val()) == "")
|
||||
{
|
||||
$("#homework_publish_time").val(myDate.toLocaleDateString());
|
||||
$("#homework_publish_time").val(formate_date(myDate));
|
||||
}
|
||||
var end_time = Date.parse($("#homework_end_time").val());
|
||||
var publish_time = Date.parse($("#homework_publish_time").val());
|
||||
|
@ -129,6 +129,21 @@ function regex_homework_end_time()
|
|||
}
|
||||
}
|
||||
|
||||
function formate_date(date){
|
||||
var str = "";
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
var day = date.getDate();
|
||||
if(month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
if(day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
str = year + '-' + month + '-' + day;
|
||||
return str;
|
||||
}
|
||||
|
||||
//验证发送到课程
|
||||
function regex_course_id(){
|
||||
var course_id = $("#course_id").val();
|
||||
|
@ -235,13 +250,19 @@ function regex_evaluation_num(){
|
|||
function new_student_work()
|
||||
{
|
||||
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||
{$("#new_student_work").submit();}
|
||||
{
|
||||
$("#new_student_work").submit();
|
||||
$("#ajax-indicator").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function edit_student_work(id)
|
||||
{
|
||||
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||
{$("#edit_student_work_" + id).submit();}
|
||||
{
|
||||
$("#edit_student_work_" + id).submit();
|
||||
$("#ajax-indicator").hide();
|
||||
}
|
||||
}
|
||||
|
||||
//验证作品名称
|
||||
|
|
|
@ -33,7 +33,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
|
|||
.ctt2{clear:both; }
|
||||
.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||
.hworkListContainer {float:left; clear:both; width:720px;}
|
||||
.showHwork{ border:2px solid #269ac9; width:696px; padding:10px; color:#666666; padding-bottom:0px; }
|
||||
.showHwork{ border:1px solid #eaeaea; width:696px; padding:10px; color:#666666; padding-bottom:0px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); }
|
||||
.showHworkP{ width:630px; float:left;}
|
||||
.showHwork ul li {margin-bottom: 5px;}
|
||||
.hworkPingText{ float:left; border:1px solid #e4e4e4; padding:5px; width:618px; height:35px;}
|
||||
|
@ -41,12 +41,15 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
|
|||
.pingBoxTit{ float:left; width:625px; margin-left:10px;}
|
||||
.pingText{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; }
|
||||
.pingBackTit{ float:left; width:573px; margin-left:10px; }
|
||||
.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle;}
|
||||
.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle; background-color: #f6f6f6;}
|
||||
.hworkH30 {height:30px !important; line-height:30px !important;}
|
||||
.hworkListRow {height:65px; border-bottom:1px solid #eaeaea; line-height:65px; vertical-align:middle;}
|
||||
.hworkListRow {height:65px; border-bottom:1px dashed #eaeaea; line-height:65px; vertical-align:middle; position: relative;}
|
||||
.hworkListRow:hover {background-color:#f6f6f7;}
|
||||
.hworkUl li{ float:left;}
|
||||
.hworkListRow li{ float:left;}
|
||||
.hworkTip{position:absolute; padding:3px 5px; border:1px solid #eaeaea; display:block; right:-108px; top:20px; background-color:#ffffff; line-height:20px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.hworkTip em {display:block; border-width:8px; position:absolute; bottom:4px; left:-16px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
|
||||
.hworkTip span {display:block; border-width:8px; position:absolute; bottom:4px; left:-15px; border-style:dashed solid dashed dashed; border-color:transparent #FFF transparent transparent; font-size:0; line-height:0;}
|
||||
.hworkList340 {width:335px; text-align:left; height:50px; line-height:50px;padding-left:5px;}
|
||||
.hworkList80 {width:80px; text-align:center;}
|
||||
.hworkList50 {width:50px; text-align:center;}
|
||||
|
@ -71,9 +74,9 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
|
|||
.classSplit {border:1px solid #e7e7e7; height:27px; line-height:27px; display:inline-block; margin-left:10px; padding-left:5px; cursor:pointer; outline:none; width:95px; max-width:95px;}
|
||||
.classList {width:45px; border:1px solid #e7e7e7; float:left; position:absolute; background-color:#ffffff; left:-1px;}
|
||||
.hworkPortrait {float:left; width:40px;}
|
||||
.HomeworkNameTitle{width: 285px;text-align: center;margin-left: 50px;}
|
||||
.HomeworkNameTitle{width: 285px;text-align: left;margin-left: 50px;}
|
||||
.HomeworkStuTitle{width: 80px;text-align: center;}
|
||||
.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: center;height: 40px;}
|
||||
.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: left;height: 40px;}
|
||||
.width385{width: 385px;}
|
||||
.width505{width: 505px;}
|
||||
.width165{width: 165px;}
|
||||
|
@ -81,6 +84,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
|
|||
.width525{width: 525px;}
|
||||
.width285{width: 285px;}
|
||||
.mr95{margin-right: 95px;}
|
||||
.mr140 {margin-right: 140px;}
|
||||
.ml100{margin-left: 100px;}
|
||||
.mt16{margin-top: 16px;}
|
||||
.pr10{padding-right: 10px;}
|
||||
|
@ -178,7 +182,9 @@ a.f_grey:hover {color:#000000;}
|
|||
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}*/
|
||||
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.blue_btn_cir{ background:#3498db; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.sticky_btn_cir{ background:#269ac9; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
|
@ -477,7 +483,7 @@ a.xls{ margin-left:5px; color:#136b3b;}
|
|||
/* 开启匿评弹框 */
|
||||
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.ni_con { width:425px; margin:25px 30px;}
|
||||
.ni_con { width:425px; margin:25px 30px;font-family:"微软雅黑","宋体";}
|
||||
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
|
||||
.ni_con p{ color:#808181; }
|
||||
.ni_con a:hover{ text-decoration:none;}
|
||||
|
@ -488,6 +494,14 @@ a:hover.tijiao{ background:#0f99a9;}
|
|||
.ni_con_work { width:300px; margin:25px 20px;}
|
||||
.ni_con_work p{ color:#808181; }
|
||||
a.xls{ margin-left:5px; color:#136b3b;}
|
||||
.grey_c{ color:#808181;}
|
||||
|
||||
.disable_btn { height:46px; display:block; width:90px; color:#fff; background:#d0d2d0; text-align:center; padding-top:4px; margin-right:15px;}
|
||||
a.term_btn{ height:38px; display:block; width:90px; color:#fff; background:#269ac9; text-align:center; padding-top:12px; margin-right:15px;}
|
||||
a:hover.term_btn{ background:#297fb8;}
|
||||
p.c_black{ color:#000000;}
|
||||
a.exit { height:24px; display:block; width:80px; color:#000000; background:#c3c3c3; text-align:center; padding-top:4px;}
|
||||
.lh22{ line-height: 22px;}
|
||||
/* 学生列表*/
|
||||
.st_list{ width:670px;}
|
||||
.st_search{ }
|
||||
|
@ -835,7 +849,7 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
|
|||
a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;}
|
||||
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
|
||||
.show_hwork ul li{ margin-bottom:5px;}
|
||||
.show_hwork_arrow{ position:relative; top:2px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
|
||||
.show_hwork_arrow{ position:relative; top:1px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
|
||||
.tit_fb{ font-weight:bold; width:66px; text-align:right; display:block; float:left;}
|
||||
.ml160{ margin-left:160px;}
|
||||
.show_hwork_p{ width:630px; float:left;}
|
||||
|
@ -889,6 +903,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
|
|||
.c_w{ color:#fff;}
|
||||
|
||||
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.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 -20px no-repeat;color: #7f7f7f;width: 370px;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;}
|
||||
|
@ -966,7 +982,8 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
|
|||
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
|
||||
.W50{ width:50px;}
|
||||
.W200{ width:200px;}
|
||||
.m_w480{max-width: 480px;}
|
||||
.m_w460{max-width: 460px;}
|
||||
.m_w505{max-width: 505px;}
|
||||
.m_w500{max-width: 500px;}
|
||||
.m_w530{max-width: 530px;}
|
||||
.ProResultTable{ color:#888888;}
|
||||
|
|
|
@ -152,11 +152,12 @@ a:hover.tijiao{ background:#0f99a9 !important;}
|
|||
/* 匿名评分弹框 */
|
||||
.alert_praise{width:480px;height:200px;position:fixed;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
||||
.ni_con { width:425px; margin:25px 30px;}
|
||||
.ni_con { width:425px; margin:25px 30px;font-family:"微软雅黑","宋体";}
|
||||
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
|
||||
.ni_con p{ color:#808181;}
|
||||
.ni_con a:hover{ text-decoration:none;}
|
||||
|
||||
.grey_c{ color:#808181;}
|
||||
/*弹框*/
|
||||
.black_overlay{display:none;position:absolute;top:0%;left:0%;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.3;opacity:.30;filter:alpha(opacity=30);}
|
||||
.upload_box{display:none;position:absolute;top:25%;left:35%;width:30%;height: auto;padding:5px;border:3px solid #15bccf; background:#fff;z-index:1002;overflow:auto;}
|
||||
|
|
|
@ -213,6 +213,8 @@ a.bBlue {background-color:#3498db;}
|
|||
a.bBlue:hover {background-color:#297fb8;}
|
||||
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
|
||||
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
|
||||
a.submit_btn2 {background-color: #269ac9; padding: 3px 5px; color: #ffffff;}
|
||||
a.submit_btn2:hover {background-color: #297fb8;}
|
||||
|
||||
/****翻页***/
|
||||
.wlist{float:right;}
|
||||
|
@ -293,8 +295,10 @@ a:hover.bgreen_n_btn{background:#08a384;}
|
|||
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
|
||||
.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}
|
||||
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.sticky_btn_cir{ background:#269ac9; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
|
@ -397,7 +401,8 @@ a.resourcesBlack {font-size:12px; color:#4c4c4c;white-space: nowrap;text-align:
|
|||
a.resourcesBlack:hover {font-size:12px; color:#000000;}
|
||||
.resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
|
||||
.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;}
|
||||
.resourcesList {width:710px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;}
|
||||
.resourcesList {width:710px; height:39px; background-color:#ffffff; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;} /*border-bottom:1px dashed #eaeaea;*/
|
||||
.resourcesListDashLine {width:710px;border-bottom:1px dashed #eaeaea !important; margin-left:auto; margin-right:auto; padding-bottom: 2px} /*border-bottom:1px dashed #eaeaea;*/
|
||||
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
|
||||
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
||||
.resourcesSelectSend {float:right;}
|
||||
|
@ -1073,7 +1078,8 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
|
|||
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
|
||||
.W50{ width:50px;}
|
||||
.W200{ width:200px;}
|
||||
.m_w480{max-width: 480px;}
|
||||
.m_w460{max-width: 460px;}
|
||||
.m_w505{max-width: 505px;}
|
||||
.m_w530{max-width: 530px;}
|
||||
.ProResultTable{ color:#888888;}
|
||||
.T_C{ text-align:center;}
|
||||
|
@ -1147,6 +1153,8 @@ img.ui-datepicker-trigger {
|
|||
text-overflow: ellipsis;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.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 -25px no-repeat;color: #7f7f7f;width: 370px;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);}
|
||||
|
@ -1292,17 +1300,17 @@ a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-rep
|
|||
/* 开启匿评弹框 */
|
||||
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.ni_con { width:425px; margin:25px 30px;}
|
||||
.ni_con { width:425px; margin:15px;font-family:"微软雅黑","宋体";}
|
||||
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
|
||||
.ni_con p{ color:#808181; }
|
||||
.ni_con a:hover{ text-decoration:none;}
|
||||
.ni_btn{ width:190px; margin:15px auto; line-height:1.9;}
|
||||
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
|
||||
a:hover.tijiao{ background:#0f99a9;}
|
||||
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#269ac9; text-align:center; padding-top:4px; float:left; margin-right:15px;}
|
||||
a:hover.tijiao{ background:#297fb8;}
|
||||
.c_pink{ color:#e65d5e;}
|
||||
.ni_con_work { width:300px; margin:25px 20px;}
|
||||
.ni_con_work p{ color:#808181; }
|
||||
|
||||
.grey_c{ color:#808181;}
|
||||
a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
|
||||
a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
|
||||
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
|
|
|
@ -369,6 +369,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
|
|||
#attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
|
||||
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
|
||||
.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: 370px;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:'微软雅黑';}
|
||||
|
|
Loading…
Reference in New Issue