Merge branch 'szzh' into develop
This commit is contained in:
commit
60ef287f12
|
@ -5,9 +5,9 @@ class HomeworkCommonController < ApplicationController
|
|||
layout "base_courses"
|
||||
|
||||
include StudentWorkHelper
|
||||
before_filter :find_course, :only => [:index,:new,:create,:next_step]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
|
||||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
||||
before_filter :find_course, :only => [:index,:new,:create]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr]
|
||||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr]
|
||||
before_filter :member_of_course, :only => [:index]
|
||||
|
||||
def index
|
||||
|
@ -23,116 +23,11 @@ class HomeworkCommonController < ApplicationController
|
|||
#新建作业,在个人作业列表创建作业
|
||||
def new
|
||||
render_404
|
||||
# @homework_type = "1"
|
||||
#
|
||||
# @homework = HomeworkCommon.new
|
||||
# @homework.safe_attributes = params[:homework_common]
|
||||
# @homework.late_penalty = 2
|
||||
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
# @homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||
#
|
||||
# if @homework_type == "1"
|
||||
# #匿评作业相关属性
|
||||
# @homework_detail_manual = HomeworkDetailManual.new
|
||||
# @homework_detail_manual.ta_proportion = 0.6
|
||||
# @homework_detail_manual.absence_penalty = 2
|
||||
# @homework_detail_manual.evaluation_num = 3
|
||||
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
# @homework.homework_detail_manual = @homework_detail_manual
|
||||
# elsif @homework_type == "2"
|
||||
# #编程作业相关属性
|
||||
# @homework_detail_programing = HomeworkDetailPrograming.new
|
||||
# @homework.homework_detail_programing = @homework_detail_programing
|
||||
# end
|
||||
# respond_to do |format|
|
||||
# format.html
|
||||
# end
|
||||
end
|
||||
|
||||
#新建作业,在个人作业列表创建作业
|
||||
def create
|
||||
redirect_to user_homeworks_user_path(User.current.id)
|
||||
# if params[:homework_common]
|
||||
# homework = HomeworkCommon.new
|
||||
# homework.name = params[:homework_common][:name]
|
||||
# homework.description = params[:homework_common][:description]
|
||||
# homework.end_time = params[:homework_common][:end_time]
|
||||
# homework.publish_time = params[:homework_common][:publish_time]
|
||||
# homework.homework_type = params[:homework_common][:homework_type]
|
||||
# homework.late_penalty = params[:late_penalty]
|
||||
# homework.user_id = User.current.id
|
||||
# homework.course_id = @course.id
|
||||
#
|
||||
# homework.save_attachments(params[:attachments])
|
||||
# render_attachment_warning_if_needed(homework)
|
||||
#
|
||||
# if homework.homework_type == 2
|
||||
# homework_detail_programing = HomeworkDetailPrograming.new
|
||||
# homework_detail_programing.language = params[:language]
|
||||
# homework_detail_programing.standard_code = params[:standard_code]
|
||||
# homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
|
||||
# question = {title:homework.name,content:homework.description}
|
||||
# question[:input] = []
|
||||
# question[:output] = []
|
||||
# if params[:input] && params[:output] && params[:result]
|
||||
# params[:input].each do |k,v|
|
||||
# if params[:output].include? k
|
||||
# homework_test = HomeworkTest.new
|
||||
# homework_test.input = v
|
||||
# homework_test.output = params[:output][k]
|
||||
# homework_test.result = params[:result][k]
|
||||
# homework_test.error_msg = params[:error_msg]
|
||||
# homework.homework_tests << homework_test
|
||||
# question[:input] << homework_test.input
|
||||
# question[:output] << homework_test.output
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# # uri = URI('http://192.168.80.21:8080/api/questions.json')
|
||||
# # body = question.to_json
|
||||
# # res = Net::HTTP.new(uri.host, uri.port).start do |client|
|
||||
# # request = Net::HTTP::Post.new(uri.path)
|
||||
# # request.body = body
|
||||
# # request["Content-Type"] = "application/json"
|
||||
# # client.request(request)
|
||||
# # end
|
||||
# # result = JSON.parse(res.body)
|
||||
# # homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0
|
||||
#
|
||||
# homework.homework_detail_programing = homework_detail_programing
|
||||
# else
|
||||
# #匿评作业相关属性
|
||||
# homework_detail_manual = HomeworkDetailManual.new
|
||||
# homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
|
||||
# homework_detail_manual.comment_status = 1
|
||||
# homework_detail_manual.evaluation_start = params[:evaluation_start]
|
||||
# homework_detail_manual.evaluation_end = params[:evaluation_end]
|
||||
# homework_detail_manual.evaluation_num = params[:evaluation_num]
|
||||
# homework_detail_manual.absence_penalty = params[:absence_penalty]
|
||||
# homework.homework_detail_manual = homework_detail_manual
|
||||
# end
|
||||
#
|
||||
# if homework.save
|
||||
# homework_detail_programing.save if homework_detail_programing
|
||||
# homework_detail_manual.save if homework_detail_manual
|
||||
# respond_to do |format|
|
||||
# format.html {
|
||||
# flash[:notice] = l(:notice_successful_create)
|
||||
# redirect_to homework_common_index_path(:course => @course.id)
|
||||
# }
|
||||
# end
|
||||
# return
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# respond_to do |format|
|
||||
# format.html {
|
||||
# flash[:notice] = l(:notice_failed_create)
|
||||
# redirect_to new_homework_common_path(:course => @course.id)
|
||||
# }
|
||||
# end
|
||||
end
|
||||
|
||||
def edit
|
||||
|
@ -294,6 +189,27 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#启动匿评参数设置
|
||||
def start_evaluation_set
|
||||
|
||||
end
|
||||
|
||||
#设置匿评参数
|
||||
def set_evaluation_attr
|
||||
if @homework_detail_manual
|
||||
unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s
|
||||
@homework_detail_manual.evaluation_start = params[:evaluation_start]
|
||||
end
|
||||
|
||||
unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s
|
||||
@homework_detail_manual.evaluation_end = params[:evaluation_end]
|
||||
end
|
||||
|
||||
@homework_detail_manual.evaluation_num = params[:evaluation_num]
|
||||
@homework_detail_manual.save
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
#获取课程
|
||||
def find_course
|
||||
|
|
|
@ -223,7 +223,6 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
if saved
|
||||
|
||||
#修改界面增加跟踪者
|
||||
watcherlist = @issue.watcher_users
|
||||
select_users = []
|
||||
|
@ -253,9 +252,7 @@ class IssuesController < ApplicationController
|
|||
JournalReply.add_reply(@issue.current_journal.id, reply_id, User.current.id)
|
||||
end
|
||||
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal.new_record?
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to issue_url(@issue.id) }
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
|
|
@ -36,8 +36,7 @@ class JournalsController < ApplicationController
|
|||
sort_update(@query.sortable_columns)
|
||||
|
||||
if @query.valid?
|
||||
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC",
|
||||
:limit => 25)
|
||||
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC", :limit => 25)
|
||||
end
|
||||
@title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name)
|
||||
render :layout => false, :content_type => 'application/atom+xml'
|
||||
|
@ -72,9 +71,9 @@ class JournalsController < ApplicationController
|
|||
end
|
||||
# Replaces pre blocks with [...]
|
||||
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> "
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
# @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
||||
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n"
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
|
||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content << "</blockquote>"
|
||||
@id = user.id
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
|
|
|
@ -162,7 +162,7 @@ class ProjectsController < ApplicationController
|
|||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
render :layout => 'base'
|
||||
render :layout => 'new_base'
|
||||
else
|
||||
redirect_to signin_url
|
||||
end
|
||||
|
@ -188,7 +188,7 @@ class ProjectsController < ApplicationController
|
|||
@project.safe_attributes = params[:project]
|
||||
@project.organization_id = params[:organization_id]
|
||||
@project.user_id = User.current.id
|
||||
@project.project_new_type = 1
|
||||
@project.project_new_type = params[:project_new_type]
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
|
@ -220,7 +220,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.html { render :action => 'new', :layout => 'new_base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -101,33 +101,12 @@ class UsersController < ApplicationController
|
|||
elsif @user != User.current && !User.current.admin?
|
||||
return render_403
|
||||
end
|
||||
# 记录当前点击按钮的时间
|
||||
# 考虑到用户未退出刷新消息页面
|
||||
message_time = OnclickTime.where("user_id =?", User.current).first
|
||||
if message_time.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
message_new_time.onclick_time = Time.now
|
||||
message_new_time.save
|
||||
else
|
||||
# 24小时内显示
|
||||
contrast_time = Time.now - 86400
|
||||
message_time.update_attributes(:onclick_time => Time.now)
|
||||
end
|
||||
@user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc")
|
||||
# 当前用户查看消息,则设置消息为已读
|
||||
# DO 待优化,只需查出符合条件的再更新
|
||||
# 初始化/更新 点击按钮时间
|
||||
# 24小时内显示系统消息
|
||||
update_onclick_time
|
||||
# 全部设为已读
|
||||
if params[:viewed] == "all"
|
||||
course_querys = @user.course_messages
|
||||
forge_querys = @user.forge_messages
|
||||
user_querys = @user.user_feedback_messages
|
||||
forum_querys = @user.memo_messages
|
||||
if User.current.id == @user.id
|
||||
course_querys.update_all(:viewed => true)
|
||||
forge_querys.update_all(:viewed => true)
|
||||
user_querys.update_all(:viewed => true)
|
||||
forum_querys.update_all(:viewed => true)
|
||||
end
|
||||
update_message_viewed(@user)
|
||||
end
|
||||
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
|
||||
case params[:type]
|
||||
|
@ -197,6 +176,39 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 初始化/更新 点击按钮时间
|
||||
def update_onclick_time
|
||||
# 记录当前点击按钮的时间
|
||||
# 考虑到用户未退出刷新消息页面
|
||||
message_time = OnclickTime.where("user_id =?", User.current).first
|
||||
if message_time.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
message_new_time.onclick_time = Time.now
|
||||
message_new_time.save
|
||||
else
|
||||
# 24小时内显示
|
||||
contrast_time = Time.now - 86400
|
||||
message_time.update_attributes(:onclick_time => Time.now)
|
||||
end
|
||||
# 24小时内显示系统消息
|
||||
@user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc")
|
||||
end
|
||||
|
||||
# 消息设置为已读
|
||||
def update_message_viewed(user)
|
||||
course_querys = CourseMessage.where("user_id =? and viewed =?", user, 0)
|
||||
forge_querys = ForgeMessage.where("user_id =? and viewed =?", user, 0)
|
||||
user_querys = UserFeedbackMessage.where("user_id =? and viewed =?", user, 0)
|
||||
forum_querys = MemoMessage.where("user_id =? and viewed =?", user, 0)
|
||||
if User.current.id == @user.id
|
||||
course_querys.update_all(:viewed => true)
|
||||
forge_querys.update_all(:viewed => true)
|
||||
user_querys.update_all(:viewed => true)
|
||||
forum_querys.update_all(:viewed => true)
|
||||
end
|
||||
end
|
||||
|
||||
# 系统消息
|
||||
def user_system_messages
|
||||
@sytem_messages = SystemMessage.order("created_at desc").all
|
||||
|
|
|
@ -2306,7 +2306,7 @@ module ApplicationHelper
|
|||
when 2
|
||||
link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink'
|
||||
when 3
|
||||
link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
|
||||
# link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
|
||||
end
|
||||
else
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评"
|
||||
|
|
|
@ -76,6 +76,36 @@ module ProjectsHelper
|
|||
return result
|
||||
end
|
||||
|
||||
# 项目类型
|
||||
def project_type_select
|
||||
type = []
|
||||
option1 = []
|
||||
option1 << l(:label_development_team)
|
||||
option1 << l(:label_development_team)
|
||||
option2 = []
|
||||
option2 << l(:label_research_group)
|
||||
option2 << l(:label_research_group)
|
||||
option3 = []
|
||||
option3 << l(:label_friend_organization)
|
||||
option3 << l(:label_friend_organization)
|
||||
type << option1
|
||||
type << option2
|
||||
type << option3
|
||||
type
|
||||
end
|
||||
|
||||
# 项目类型描述
|
||||
def project_newtype_descrption
|
||||
case params
|
||||
when 1
|
||||
value = l(:label_type_des_development)
|
||||
when 2
|
||||
value = l(:label_type_des_research)
|
||||
when 3
|
||||
value = l(:label_type_des_friend)
|
||||
end
|
||||
end
|
||||
|
||||
# 被邀请成员的状态
|
||||
def status_for_ivitied(ivite_list, project)
|
||||
if ivite_list.user.member_of?(project)
|
||||
|
|
|
@ -463,7 +463,7 @@ module UsersHelper
|
|||
def get_issue_des_update(journal)
|
||||
no_html = "message"
|
||||
arr = details_to_strings(journal.details, no_html)
|
||||
unless journal.notes.empty?
|
||||
unless journal.notes.blank?
|
||||
arr << "留言内容:" + journal.notes
|
||||
end
|
||||
str = ''
|
||||
|
|
|
@ -171,11 +171,16 @@ class Journal < ActiveRecord::Base
|
|||
|
||||
# 缺陷状态更改,消息提醒
|
||||
def act_as_forge_message
|
||||
receivers = []
|
||||
# 直接回复
|
||||
if self.user_id != self.issue.author_id
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.issue.author_id, :project_id => self.issue.project_id, :viewed => false)
|
||||
receivers << self.issue.author_id
|
||||
end
|
||||
if self.user_id != self.issue.assigned_to_id && self.issue.assigned_to_id != self.issue.author_id # 指派人不是自己的话,则给指派人发送
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.issue.assigned_to_id, :project_id => self.issue.project_id, :viewed => false)
|
||||
receivers << self.issue.assigned_to_id
|
||||
end
|
||||
receivers.each do |r|
|
||||
self.forge_messages << ForgeMessage.new(:user_id => r, :project_id => self.issue.project_id, :viewed => false)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -5,8 +5,34 @@ class JournalReply < ActiveRecord::Base
|
|||
|
||||
belongs_to :user
|
||||
belongs_to :journal
|
||||
after_create :send_journal_messages
|
||||
|
||||
def self.add_reply(journal_id, reply_id, user_id)
|
||||
self.create(:journal_id => journal_id, :reply_id => reply_id, :user_id => user_id)
|
||||
end
|
||||
|
||||
def send_journal_messages
|
||||
journal = self.journal
|
||||
replier = User.find(self.reply_id)
|
||||
receivers = []
|
||||
# 被回复的人发送消息
|
||||
if journal.user_id != self.reply_id && self.reply_id != journal.issue.author_id
|
||||
receivers << replier
|
||||
end
|
||||
if journal.user_id != journal.issue.author_id && self.reply_id != journal.issue.author_id
|
||||
receivers << self.journal.issue.author
|
||||
end
|
||||
# journal_forge_messages = ForgeMessage.new
|
||||
receivers.each do |r|
|
||||
journal.forge_messages << ForgeMessage.new(:user_id =>r.id, :project_id => journal.issue.project_id, :viewed => false)
|
||||
end
|
||||
|
||||
# if self.user_id != self.journal_reply.user_id
|
||||
# receivers << self.journal_reply.user_id
|
||||
# end
|
||||
# # 给缺陷发布者发送
|
||||
# if self.user_id != self.issue.author_id && self.journal_reply.user_id != self.issue.author_id
|
||||
# receivers << self.issue.author_id
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -264,6 +264,7 @@ class User < Principal
|
|||
if OnclickTime.where("user_id =?", User.current).first.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
# 第一次初始化点击铃铛时间
|
||||
message_new_time.onclick_time = User.current.last_login_on.nil? ? Time.now : User.current.last_login_on
|
||||
message_new_time.save
|
||||
end
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<div class="markPopup" id="popbox02">
|
||||
<%= form_for('new_form',:url => {:controller => 'homework_common',:action => 'set_evaluation_attr',:homework => @homework.id},:method => "post",:remote => true) do |f|%>
|
||||
<span class="uploadText">匿评设置</span>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt15">
|
||||
<span class="f14 fontGrey3 fl mt5">开启匿评</span>
|
||||
<div class="calendar_div fl ml10">
|
||||
<input type="text" name="evaluation_start" id="evaluation_start_time" placeholder="开启匿评日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= @homework_detail_manual.evaluation_start%>"/>
|
||||
<%= calendar_for('evaluation_start_time')%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p id="homework_evaluation_start_time" class="c_red"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt15">
|
||||
<span class="f14 fontGrey3 fl mt5">关闭匿评</span>
|
||||
<div class="calendar_div fl ml10">
|
||||
<input type="text" name="evaluation_end" id="evaluation_end_time" placeholder="关闭匿评日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= @homework_detail_manual.evaluation_end%>"/>
|
||||
<%= calendar_for('evaluation_end_time')%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p id="homework_evaluation_end_time" class="c_red"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt15 mb10">
|
||||
<span class="f14 fontGrey3 mr10 fl mt5">匿评人数</span>
|
||||
<input type="text" name="evaluation_num" id="evaluation_num" placeholder="默认匿评人数为3" maxlength="2" class="markInput fl" value="<%= @homework_detail_manual.evaluation_num%>"/>
|
||||
<div class="cl"></div>
|
||||
<p id="evaluation_num_notice" class="c_red"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mb20 none">
|
||||
<span class="f14 fontGrey3 mr10">禁用匿评</span>
|
||||
<input type="checkbox" />
|
||||
<span class="f12 c_red ml10">禁用后将无法进行学生互评</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div>
|
||||
<div class="courseSendSubmit">
|
||||
<a href="javascript:void(0);" class="sendSourceText" onclick="submit_set_evaluation_attr('<%= @homework.end_time%>');">确定</a>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" class="sendSourceText linkGrey6" onclick="clickCanel();">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
</div>
|
|
@ -25,9 +25,9 @@
|
|||
( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )
|
||||
</p>
|
||||
<% if @is_teacher%>
|
||||
<%= homework_anonymous_comment(homework)%>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework,:is_in_course => 1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
||||
<%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit") %>
|
||||
<%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit ml10") %>
|
||||
<%= homework_anonymous_comment(homework)%>
|
||||
<% elsif @is_student%>
|
||||
<%= student_anonymous_comment homework %>
|
||||
<%= student_new_homework homework %>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
clickCanel();
|
|
@ -0,0 +1,6 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_common/set_evalutation_att') %>');
|
||||
showModal('ajax-modal', '350px');
|
||||
$('#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","25%").css("left","35%").css("position","fixed");
|
|
@ -1,2 +1,2 @@
|
|||
$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('<a class="postOptionLink" title="匿评结束" href="javascript:void(0);">匿评结束</a>');
|
||||
$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('');
|
||||
alert('关闭成功');
|
|
@ -6,12 +6,11 @@
|
|||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_status) %>:</label>
|
||||
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
||||
<%= f.select :status_id,
|
||||
(@allowed_statuses.collect { |p| [p.name, p.id] }),
|
||||
{:no_label => true},
|
||||
# ajax 刷新
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w150" %>
|
||||
<%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }),
|
||||
{:no_label => true},
|
||||
# ajax 刷新
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w150" %>
|
||||
<% else %>
|
||||
<%= h(@issue.status.name) %>
|
||||
<% end %>
|
||||
|
@ -20,10 +19,9 @@
|
|||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_priority) %>:</label>
|
||||
<% if @issue.safe_attribute? 'priority_id' %>
|
||||
<%= f.select :priority_id,
|
||||
(@priorities.collect { |p| [p.name, p.id] }),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
<%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -32,8 +30,8 @@
|
|||
<label class="label"><%= l(:field_assigned_to) %>:</label>
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
<%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to),
|
||||
{:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
{:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -41,8 +39,8 @@
|
|||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<label class="label"><%= l(:field_fixed_version) %>:</label>
|
||||
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||||
new_project_version_path(@issue.project),
|
||||
:remote => true,
|
||||
|
@ -60,11 +58,7 @@
|
|||
<li>
|
||||
<label class="label02"><%= l(:field_start_date) %>:</label>
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
<%= f.text_field :start_date,
|
||||
:size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('start_date') %>
|
||||
<%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('start_date') %>
|
||||
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -72,10 +66,7 @@
|
|||
<li>
|
||||
<label class="label02"><%= l(:field_due_date) %>:</label>
|
||||
<% if @issue.safe_attribute? 'due_date' %>
|
||||
<%= f.text_field :due_date, :size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('due_date') %>
|
||||
<%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('due_date') %>
|
||||
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -83,10 +74,7 @@
|
|||
<li>
|
||||
<label class="label02"><%= l(:field_estimated_hours) %>:</label>
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('estimated_hours') %>
|
||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('estimated_hours') %>
|
||||
<span class="mt3 ml5"><%= l(:field_hours) %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -94,9 +82,9 @@
|
|||
<li><label class="label02"> % 完成 : </label>
|
||||
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
|
||||
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label => true},
|
||||
:onchange => "PrecentChange(this.value)",
|
||||
:class => "w150" %>
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label => true},
|
||||
:onchange => "PrecentChange(this.value)",
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<!--属性-->
|
||||
<div class="pro_info_box mb10">
|
||||
<%= issue_fields_rows do |rows| %>
|
||||
<ul class="fl" >
|
||||
<li><p class="label03" > 状态 : </p><p class="pro_info_p"><%= @issue.status.name %></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %>
|
||||
<li><p class="label03" > 指派给 : </p><span class="pro_info_p"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl" >
|
||||
<li><p class="label03" > 优先级 : </p><span class="pro_info_p" style="width:50px;"><%= @issue.priority.name %></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('done_ratio') %>
|
||||
<li><p class="label03" > % 完成 : </p><span class="pro_info_p" style="width:50px;"><%= @issue.done_ratio %>%</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl " >
|
||||
<% unless @issue.disabled_core_fields.include?('start_date') %>
|
||||
<li><p class="label03" style="width:50px;" > 开始 : </p><p class="pro_info_p"><%= format_date(@issue.start_date) %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
|
||||
<li><p class="label03" style="width:50px;"> 周期 : </p><span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl " >
|
||||
<% unless @issue.disabled_core_fields.include?('due_date') %>
|
||||
<li><p class="label03" > 计划完成 : </p><span class="pro_info_p" style="width:120px;"><%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
|
||||
<li><p class="label03" > 目标版本 : </p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %><!--pro_info_box end-->
|
||||
<%#= render_custom_fields_rows(@issue) %>
|
||||
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||||
</div>
|
||||
<!--pro_info_box 属性 end-->
|
|
@ -6,21 +6,17 @@
|
|||
<div id="all_attributes" style="display:none;">
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<div class="ping_C mb10 ml10"></div>
|
||||
<!--<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();">-->
|
||||
<!--<%#= l(:button_submit) %>-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<% end %><!--end-->
|
||||
|
||||
<!--<fieldset><legend><%#= l(:field_notes) %></legend>-->
|
||||
<!--回复框-->
|
||||
<% if @journals.present? %>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="journal_issue_note" class="wiki"></div>
|
||||
<div id="journal_issue_note" class="wiki">
|
||||
|
||||
</div>
|
||||
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
||||
<fieldset><legend>回复</legend>
|
||||
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
|
||||
|
|
|
@ -28,11 +28,7 @@
|
|||
<li>
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
||||
<%= f.text_field :subject,
|
||||
:class => "w576",
|
||||
:maxlength => 255,
|
||||
:style => "font-size:small",
|
||||
:no_label => true %>
|
||||
<%= f.text_field :subject, :class => "w576", :maxlength => 255, :style => "font-size:small", :no_label => true %>
|
||||
<!--Added by young-->
|
||||
<%= javascript_tag do %>
|
||||
observeAutocompleteField('issue_subject',
|
||||
|
@ -53,13 +49,7 @@
|
|||
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
|
||||
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor",
|
||||
# :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
|
||||
# :accesskey => accesskey(:edit),
|
||||
# :class => "w583",
|
||||
:width=>'87%',
|
||||
:resizeType => 0,
|
||||
:no_label => true %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'87%', :resizeType => 0, :no_label => true %>
|
||||
<%# end %>
|
||||
<%#= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
|
@ -68,13 +58,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
<li>
|
||||
<% if @copy_from && @copy_from.attachments.any? %>
|
||||
<p>
|
||||
<%# if @copy_from && @copy_from.attachments.any? %>
|
||||
<!--<p>-->
|
||||
<!-- 去除附件复制功能 -->
|
||||
<!-- <label for="copy_attachments"><#%= l(:label_copy_attachments) %></label>
|
||||
<#%= check_box_tag 'copy_attachments', '1', @copy_attachments %> -->
|
||||
</p>
|
||||
<% end %>
|
||||
<!--</p>-->
|
||||
<%# end %>
|
||||
<% if @copy_from && !@copy_from.leaf? %>
|
||||
<p>
|
||||
<label for="copy_subtasks"><%= l(:label_copy_subtasks) %></label>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<% i = 0 %>
|
||||
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
|
||||
<% @issue.editable_custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||||
<% if i == split_on -%>
|
||||
</div><div class="splitcontentright">
|
||||
<% end -%>
|
||||
<% i += 1 -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="splitcontentleft">
|
||||
<% i = 0 %>
|
||||
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
|
||||
<% @issue.editable_custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||||
<% if i == split_on -%>
|
||||
</div><div class="splitcontentright">
|
||||
<% end -%>
|
||||
<% i += 1 -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg' %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_issue_edit) %></h2>
|
||||
</div>
|
||||
|
@ -12,6 +12,7 @@
|
|||
<div class="ping_dispic">
|
||||
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
|
||||
</div>
|
||||
|
||||
<div class="talk_txt fl">
|
||||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]} fl" %>' title="<%= get_issue_type(@issue.tracker_id)[1] %>"></span>
|
||||
|
@ -20,32 +21,59 @@
|
|||
</p><br/>
|
||||
|
||||
<div class="cl"></div>
|
||||
<p>由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>
|
||||
<%# if @issue.created_on != @issue.updated_on %>
|
||||
添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||
<%# else %>
|
||||
<%#= format_time(@issue.updated_on).html_safe %>
|
||||
<%# end %>
|
||||
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||
</div>
|
||||
|
||||
<!--talk_txt end-->
|
||||
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
|
||||
<div class="cl"></div>
|
||||
<div class="talk_info mb10 list_style" style="word-break:break-all;">
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<div class="talk_info mb10" style="word-break:break-all;">
|
||||
<% if @issue.description? %>
|
||||
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<div class="pro_pic_box mb10">
|
||||
<a href="javascript:void(0)" class="link_img fl">
|
||||
<!--显示附件、图片-->
|
||||
<%= link_to_attachment_project @issue, :thumbnails => true %></a><br/>
|
||||
<% end -%>
|
||||
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
||||
</div><!--pro_pic_box end-->
|
||||
<div class="cl"></div>
|
||||
<!--属性-->
|
||||
</div><!--pro_pic_box end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--属性-->
|
||||
<<<<<<< .mine
|
||||
<%= render :partial => 'attributes_show' %>
|
||||
<!--pro_info_box 属性 end-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=======
|
||||
<div class="pro_info_box mb10">
|
||||
<%= issue_fields_rows do |rows| %>
|
||||
<ul class="fl">
|
||||
|
@ -73,7 +101,18 @@
|
|||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
>>>>>>> .theirs
|
||||
|
||||
<<<<<<< .mine
|
||||
<%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %>
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>-->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
=======
|
||||
<ul class="fl ">
|
||||
<% unless @issue.disabled_core_fields.include?('start_date') %>
|
||||
<li><p class="label03" style="width:50px;"> 开始 : </p>
|
||||
|
@ -82,6 +121,33 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
>>>>>>> .theirs
|
||||
<<<<<<< .mine
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=======
|
||||
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
|
||||
<li><p class="label03" style="width:50px;"> 周期 : </p>
|
||||
<span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
|
||||
|
@ -106,28 +172,23 @@
|
|||
<% end %><!--pro_info_box end-->
|
||||
<%#= render_custom_fields_rows(@issue) %>
|
||||
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||||
</div>
|
||||
<!--pro_info_box 属性 end-->
|
||||
<div class="cl"></div>
|
||||
<%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
>>>>>>> .theirs
|
||||
</div>
|
||||
|
||||
<!--problem_main end-->
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<!--留言-->
|
||||
<% if @issue.editable? %>
|
||||
<div id="update">
|
||||
<%= render :partial => 'edit' %>
|
||||
</div>
|
||||
<p style="padding-top: 5px"></p>
|
||||
|
||||
<!--引用时不能修改,剥离出引用内容-->
|
||||
|
||||
<%#--引用时不能修改,剥离出引用内容--%>
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
|
||||
<%= l(:button_submit) %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<%#= submit_tag l(:button_submit) %>
|
||||
<%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
|
||||
</div>
|
||||
|
@ -138,6 +199,7 @@
|
|||
<%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
|
|
|
@ -5,6 +5,7 @@ $('#issue_notes').val("<%= raw escape_javascript(@content) %>");
|
|||
%>
|
||||
$('#issue_private_notes').attr('checked', true);
|
||||
<% end %>
|
||||
//quote_issue_journal()
|
||||
|
||||
showAndScrollTo("update", "notes");
|
||||
$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<style type="text/css">
|
||||
html{ overflow-x:hidden;}
|
||||
.scrollsidebar{ position:fixed;bottom:1px; right:1px; background:none; }
|
||||
.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; }
|
||||
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
||||
.side_content .side_list {width:154px;overflow:hidden;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left;margin-top: 200px; cursor:pointer;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;}
|
||||
.show_btn span { display:none;}
|
||||
.close_btn{width:24px;height:24px;cursor:pointer;}
|
||||
.side_title,.side_bottom,.close_btn,.show_btn {background:url(/images/sidebar_bg.png) no-repeat; }
|
||||
|
@ -13,21 +13,21 @@
|
|||
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
|
||||
.close_btn span { display:none;}
|
||||
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
|
||||
.msgserver { margin:2px 0px 0px 4px; padding-top: 0px}
|
||||
.msgserver a { padding-left:4px;}
|
||||
.opnionText{ width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;}
|
||||
.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
|
||||
.opnionButton:hover{background: #0fa9bb; }
|
||||
|
||||
/* blue skin as the default skin */
|
||||
.side_title {background-position:-195px 0;}
|
||||
.side_center {background:url(/images/blue_line.png) repeat-y center;}
|
||||
.side_bottom {background-position:-195px -50px;}
|
||||
.close_btn {background-position:-44px 0;}
|
||||
.close_btn:hover {background-position:-66px 0;}
|
||||
.show_btn {background-position:-119px 0;}
|
||||
.msgserver a {color:#15bccf; }
|
||||
.msgserver a:hover { text-decoration:underline; }
|
||||
.msgserver { margin:10px 0 0px 5px;}
|
||||
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; }
|
||||
.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
|
||||
a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;}
|
||||
a.opnionButton:hover{background: #297fb8; }
|
||||
/* blue skin as the default skin */
|
||||
.side_title {background-position:-195px 0;}
|
||||
.side_center {background:url(/images/blue_line.png) repeat-y center; }
|
||||
.side_bottom {background-position:-195px -50px;}
|
||||
.close_btn {background-position:-44px 0;}
|
||||
.close_btn:hover {background-position:-66px 0;}
|
||||
.show_btn {background-position:-119px 0;}
|
||||
.msgserver a {color:#269ac9; }
|
||||
.msgserver a:hover { text-decoration:underline; }
|
||||
.closeSidebar {background:url(/images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;}
|
||||
</style>
|
||||
|
||||
<head>
|
||||
|
@ -39,7 +39,7 @@
|
|||
minStatue : true,
|
||||
skin : 'blue',
|
||||
durationTime : 1000
|
||||
}
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
|
||||
this.each(function(){
|
||||
|
@ -56,13 +56,13 @@
|
|||
if(options.minStatue == "true"){
|
||||
$(".show_btn").css("float", options.float);
|
||||
sideContent.css('width', 0);
|
||||
show_btn.css('width', 25);
|
||||
show_btn.css('width', 29);
|
||||
|
||||
}
|
||||
//close
|
||||
closeBtn.bind("click",function(){
|
||||
sideContent.animate({width: '0px'},"fast");
|
||||
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
|
||||
show_btn.stop(true, true).delay(300).animate({ width: '29px'},"fast");
|
||||
cookiesave('minStatue','true','','','');
|
||||
});
|
||||
//show
|
||||
|
@ -83,14 +83,10 @@ $(function(){
|
|||
$("#button1").click(function(){
|
||||
myTips("<%= l(:label_feedback_success) %>","success");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function f_submit()
|
||||
{
|
||||
// var subject = $("#memo_subject").val();
|
||||
// var content = $("#memo_content_1").val();
|
||||
// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"...");
|
||||
$("#new_memo").submit();
|
||||
}
|
||||
|
||||
|
@ -169,15 +165,15 @@ function cookieget(n)
|
|||
<div class="side_center">
|
||||
<div class="custom_service">
|
||||
<% get_memo %>
|
||||
<% if @public_forum %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @public_forum %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="msgserver">
|
||||
<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #15BCCF;">
|
||||
|
@ -188,6 +184,9 @@ function cookieget(n)
|
|||
<div class="side_bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="show_btn"><span><%= l(:label_submit)%></span></div>
|
||||
<div class="show_btn">
|
||||
<%= l(:label_submit)%>
|
||||
<a href="#" class="closeSidebar"></a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="show_btn">
|
||||
<span>在线客服</span>
|
||||
<span><%= l(:label_submit)%></span>
|
||||
<a href="javascript:void(0)" class="closeSidebar"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -170,9 +170,9 @@
|
|||
<div class=" mt10">
|
||||
<h3 class="mb10 c_blue">请选择项目类型:</h3>
|
||||
<ul class="mb10" id="project_type">
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label class="f14"> 开发模式:<span class="f12 ml5 c_grey">为团队开发提供一系列在线协同工具。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label class="f14"> 研讨模式:<span class="f12 ml5 c_grey">为小组研究提供阶段汇报和交流工具。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14"> 圈子模式:<span class="f12 ml5 c_grey">为朋友圈提供简洁的交流和分享工具。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label class="f14"> 开发模式:<span class="f12 ml5 c_grey">面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label class="f14"> 研讨模式:<span class="f12 ml5 c_grey">面向小组研究,支持任务分工、论坛交流、资源分享等。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14"> 圈子模式:<span class="f12 ml5 c_grey">面向好友分享,支持论坛交流、资源分享等。</span></label></li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" class="orange_btn" onclick="click_ok('<%= change_project_type_project_path @project%>');" >确定</a>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<%= l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name) %>
|
||||
<hr />
|
||||
|
||||
<h1><%= link_to(h(@project.name), @applied_url) %></h1>
|
||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||
<span style="float: left; width: 526px">
|
||||
<p><%=link_to @user.show_name, user_url(@user) %> 申请加入项目:<%=link_to @project.name, @applied_url %> </p>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name) %>
|
||||
<%= l(:mail_issue_content)%>
|
||||
<%=link_to @user.show_name, user_url(@user) %>
|
||||
<%=link_to @project.name, @applied_url %>
|
||||
|
||||
|
||||
|
||||
<h1><%= link_to(h(@project.name), @applied_url) %></h1>
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<%# 这些代码删除也没什么影响,暂时放着,待优化 %>
|
||||
<%= wikitoolbar_for 'project_description' %>
|
||||
|
||||
<% @project.custom_field_values.each do |value| %>
|
||||
<p>
|
||||
<%= custom_field_tag_with_label :project, value %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'project_identifier' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function() {
|
||||
$("#project_inherit_members").change(function(){
|
||||
if (!$(this).is(':checked')) {
|
||||
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
|
||||
$("#project_inherit_members").attr("checked", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,23 +1,112 @@
|
|||
<% @nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
|
||||
<%= labelled_form_for @project do |f| %>
|
||||
<div class="project_new">
|
||||
<%=l(:label_project_new)%>
|
||||
<span class="description">
|
||||
</span>
|
||||
<div class="box tabular" >
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)">
|
||||
<%=raw l(:label_project_new_description)%>
|
||||
</p>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= error_messages_for 'project' %>
|
||||
<div class="project_r_h02">
|
||||
<h2 class="project_h2"><%= l(:label_project_new)%></h2>
|
||||
</div>
|
||||
<div class="hwork_new">
|
||||
<ul>
|
||||
<%= labelled_form_for @project do |f| %>
|
||||
<li class="ml45">
|
||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_projects_new_name)%> :</label>
|
||||
<input type="text" name="project[name]" id="project_name" class="courses_input" maxlength="100" onkeyup="regex_project_name();">
|
||||
<span class="c_red" id="project_name_notice" style="display: none;">项目名称不能为空</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_type_project)%> :</label>
|
||||
<%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %>
|
||||
<span class=" ml15 c_orange" id = "project_newtype_select">为团队提供系列在线开发工具!</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label class="fl" > <%= l(:label_tags_project_description) %> :</label>
|
||||
<textarea name="project[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" ></textarea>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li>
|
||||
<p style="display: none" >
|
||||
<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
|
||||
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<em class="info">
|
||||
<%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %>
|
||||
<%= l(:text_project_identifier_info).html_safe %>
|
||||
</em>
|
||||
<% end %></p>
|
||||
</li>
|
||||
<li class=" mb5 ml80">
|
||||
<label >公开 :</label>
|
||||
<input id="project_is_public" name="project[is_public]" type="checkbox" value="1" checked="checked">
|
||||
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li>
|
||||
<p style="display:none;">
|
||||
<%= f.text_field :project_type, :value => 0 %>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<%= render :partial => 'form_new', :locals => { :f => f } %>
|
||||
</li>
|
||||
<li class=" ml90" >
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_project();" >提交</a>
|
||||
<%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
||||
</ul>
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<% html_title(l(:label_project_new)) -%>
|
||||
|
||||
<script>
|
||||
//////////////////////////////////////////////////////////////
|
||||
//新建项目
|
||||
//验证项目名称
|
||||
function regex_project_name()
|
||||
{
|
||||
var name = $.trim($("#project_name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#project_name_notice").show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_notice").hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//提交新建项目
|
||||
function submit_new_project()
|
||||
{
|
||||
if(regex_project_name())
|
||||
{
|
||||
$("#new_project").submit();
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#project_new_type').change(function(){
|
||||
var type = $('#project_new_type').val();
|
||||
if(type == '1'){
|
||||
$(this).next().html("<%= l(:label_type_des_development)%>");
|
||||
}
|
||||
else if(type == '2'){
|
||||
$(this).next().html("<%= l(:label_type_des_research)%>");
|
||||
}
|
||||
else if(type == '3'){
|
||||
$(this).next().html("<%= l(:label_type_des_friend)%>");
|
||||
}
|
||||
// var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值
|
||||
// var p2=$('#param2').val();//获取本页面其他标签的值
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 名称 :</label>
|
||||
<label class="label02"><span class="c_red">*</span> 项目名称 :</label>
|
||||
<!--<input id="project_name" name="project[name]" class=" w543" type="text" value="<%#= @project.name%>">-->
|
||||
<input type="text" name="project[name]" id="project_name" class="w543" maxlength="100" onkeyup="regex_project_name();" value="<%= @project.name %>">
|
||||
<span class="c_red ml110" id="project_name_notice" style="display: none;">项目名称不能为空!</span>
|
||||
|
@ -15,7 +14,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<li >
|
||||
<label class="label02" > 描述 :</label>
|
||||
<label class="label02" > 项目描述 :</label>
|
||||
<textarea class="w543" id="project_description" name="project[description]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
@ -24,11 +23,6 @@
|
|||
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">隐藏代码库 :</label>
|
||||
<input id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" class="blue_btn ml110" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
|
||||
<% end %>
|
||||
|
|
|
@ -3,27 +3,29 @@
|
|||
<li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
|
||||
<ul>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>">
|
||||
<% 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 #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<%= link_to(image_tag(url_to_avatar(User.current),:width =>"40",:height => "40"),user_activities_path(User.current.id))%>
|
||||
</li>
|
||||
<div onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>">
|
||||
<% 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,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
</div>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hworkList130 c_grey">
|
||||
<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>
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%>
|
||||
</li>
|
||||
<li>
|
||||
<%= homework_anonymous_comment homework_common %>
|
||||
</li>
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
homework_description_editor.html("");
|
||||
$("#homework_editor").toggle();
|
||||
}
|
||||
|
||||
function checkAllBox(doc){
|
||||
|
||||
}
|
||||
</script>
|
||||
<div class="homepageRightBanner mb10">
|
||||
<div class="NewsBannerName">作业</div>
|
||||
|
|
|
@ -118,17 +118,47 @@
|
|||
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业:</span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<li class="homepageNewsPubTypeHomework fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotReadHomework fl":"homepageNewsTypeHomework fl" %>">发布了作业于课程:<%= ma.course_message.course.name %></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl" style="width:315px;"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p><strong>标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.nil? %>
|
||||
<div class="fl"><strong>内容:</strong></div>
|
||||
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -146,7 +176,39 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<%= ma.course_message.name %>
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
||||
<% else %>
|
||||
|
@ -274,7 +336,13 @@
|
|||
<% if ma.course_message_type == "StudentWorksScore" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<% unless ma.content.nil? %>
|
||||
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
|
||||
|
@ -283,6 +351,13 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" class="message_title_red system_message_style" >
|
||||
<%= ma.content.html_safe %>
|
||||
<p><strong>课程:</strong><%= ma.course.name %>
|
||||
(<%= ma.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%=ma.course_message.student_work.homework_common.name %></p>
|
||||
<% unless ma.course_message.student_work.homework_common.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.student_work.homework_common.description.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -314,7 +389,10 @@
|
|||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
||||
"#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
|
@ -323,7 +401,16 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<%= ma.course_message.notes %>
|
||||
<div class="fl"><strong>回复内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.notes %></div>
|
||||
<div class="fl"><strong>您的作品评论:</strong></div>
|
||||
<div class="ml80"><%= ma.course_message.jour.comment %></div>
|
||||
<p><strong>课程:</strong><%= ma.course.name %>(<%= ma.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%=ma.course_message.jour.student_work.homework_common.name %></p>
|
||||
<% unless ma.course_message.jour.student_work.homework_common.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.jour.student_work.homework_common.description.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
@ -577,7 +664,14 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style" >
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
<% if ma.journals_for_message.reply_id == 0 %>
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
<% else %>
|
||||
<div class="fl"><strong>您的留言:</strong></div>
|
||||
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
||||
<div class="fl"><strong>回复内容:</strong></div>
|
||||
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||
|
||||
|
|
|
@ -285,6 +285,7 @@ zh:
|
|||
label_tags_issue_description: 问题描述
|
||||
|
||||
label_tags_project_name: "项目名称:"
|
||||
label_projects_new_name: "项目名称"
|
||||
label_tags_project_description: "项目描述"
|
||||
|
||||
label_tags_user_mail: "用户邮箱:"
|
||||
|
|
|
@ -60,6 +60,10 @@ zh:
|
|||
label_friend_organization: 圈子模式
|
||||
label_research_group: 研讨模式
|
||||
label_development_team: 开发模式
|
||||
label_type_project: 项目类型
|
||||
label_type_des_development: 开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。
|
||||
label_type_des_research: 研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。
|
||||
label_type_des_friend: 圈子模式:面向好友分享,支持论坛交流、资源分享等。
|
||||
|
||||
label_member: 成员
|
||||
project_module_attachments: 资源
|
||||
|
|
|
@ -101,6 +101,8 @@ RedmineApp::Application.routes.draw do
|
|||
get 'start_anonymous_comment'
|
||||
get 'stop_anonymous_comment'
|
||||
get 'alert_anonymous_comment'
|
||||
get 'start_evaluation_set'
|
||||
post 'set_evaluation_attr'
|
||||
end
|
||||
collection do
|
||||
post 'next_step'
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
#coding=utf-8
|
||||
|
||||
namespace :homework_evaluation do
|
||||
desc "start and end evaluation"
|
||||
def get_assigned_homeworks(student_works, n, index)
|
||||
student_works += student_works
|
||||
student_works[index + 1 .. index + n]
|
||||
end
|
||||
#自动开启匿评的任务
|
||||
task :start_evaluation => :environment do
|
||||
homework_detail_manuals = HomeworkDetailManual.where("evaluation_start = '#{Date.today}'")
|
||||
homework_detail_manuals.each do |homework_detail_manual|
|
||||
homework_common = homework_detail_manual.homework_common
|
||||
if homework_detail_manual.comment_status == 1 #新建状态才可开启匿评
|
||||
student_works = homework_common.student_works
|
||||
if student_works && student_works.size >= 2
|
||||
student_works.each_with_index do |work, index|
|
||||
user = work.user
|
||||
n = homework_detail_manual.evaluation_num
|
||||
n = n < student_works.size ? n : student_works.size - 1
|
||||
assigned_homeworks = get_assigned_homeworks(student_works, n, index)
|
||||
assigned_homeworks.each do |h|
|
||||
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
|
||||
student_works_evaluation_distributions.save
|
||||
end
|
||||
end
|
||||
homework_detail_manual.update_column('comment_status', 2)
|
||||
# 匿评开启消息邮件通知
|
||||
else
|
||||
#作业数小于2,启动失败
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#自动关闭匿评的任务
|
||||
task :end_evaluation => :environment do
|
||||
homework_detail_manuals = HomeworkDetailManual.where("evaluation_end = '#{Date.today}'")
|
||||
homework_detail_manuals.each do |homework_detail_manual|
|
||||
homework_common = homework_detail_manual.homework_common
|
||||
if homework_detail_manual.comment_status == 2 #开启匿评状态才可关闭匿评
|
||||
#计算缺评扣分
|
||||
work_ids = "(" + homework_common.student_works.map(&:id).join(",") + ")"
|
||||
homework_common.student_works.each do |student_work|
|
||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
|
||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manuals.absence_penalty : 0
|
||||
student_work.save
|
||||
end
|
||||
homework_detail_manual.update_column('comment_status', 3)
|
||||
# 匿评关闭消息邮件通知
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.7 KiB |
|
@ -975,3 +975,14 @@ $(function(){
|
|||
function new_homework_alert(){
|
||||
alert("您好!课程内直接发布作业的功能正在改进中,请直接点击\n顶部导航栏的“作业”向本课程发送作业。谢谢!如有问\n题,可参见帮助中心。");
|
||||
}
|
||||
|
||||
function show_student_work(url){
|
||||
$.get(
|
||||
url,
|
||||
{
|
||||
|
||||
},
|
||||
function (data) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
minStatue : true,
|
||||
skin : 'blue',
|
||||
durationTime : 1000
|
||||
}
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
|
||||
this.each(function(){
|
||||
|
@ -13,17 +13,13 @@
|
|||
var thisBox = $(this),
|
||||
closeBtn = thisBox.find('.close_btn' ),
|
||||
show_btn = thisBox.find('.show_btn' ),
|
||||
sideContent = thisBox.find('.side_content'),
|
||||
sideList = thisBox.find('.side_list')
|
||||
;
|
||||
sideContent = thisBox.find('.side_content');
|
||||
var defaultTop = thisBox.offset().top; //????????top
|
||||
|
||||
thisBox.css(options.float, 0);
|
||||
if(options.minStatue == "true"){
|
||||
$(".show_btn").css("float", options.float);
|
||||
show_btn.css("float", options.float);
|
||||
sideContent.css('width', 0);
|
||||
show_btn.css('width', 25);
|
||||
|
||||
}
|
||||
//close
|
||||
closeBtn.bind("click",function(){
|
||||
|
@ -37,26 +33,12 @@
|
|||
sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast");
|
||||
cookiesave('minStatue','false','','','');
|
||||
});
|
||||
|
||||
|
||||
|
||||
}); //end this.each
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
||||
$(function(){
|
||||
$("#button1").click(function(){
|
||||
myTips("<%= l(:label_feedback_success) %>","success");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function f_submit()
|
||||
{
|
||||
// var subject = $("#memo_subject").val();
|
||||
// var content = $("#memo_content").val();
|
||||
// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"...");
|
||||
$("#new_memo").submit();
|
||||
}
|
||||
|
||||
|
@ -68,11 +50,8 @@ function cookiesave(n, v, mins, dn, path)
|
|||
if(!mins) mins = 365 * 24 * 60;
|
||||
if(!path) path = "/";
|
||||
var date = new Date();
|
||||
|
||||
date.setTime(date.getTime() + (mins * 60 * 1000));
|
||||
|
||||
var expires = "; expires=" + date.toGMTString();
|
||||
|
||||
if(dn) dn = "domain=" + dn + "; ";
|
||||
document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path;
|
||||
|
||||
|
@ -86,34 +65,31 @@ function cookieget(n)
|
|||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(name) == 0){
|
||||
return c.substring(name.length,c.length);}
|
||||
|
||||
return c.substring(name.length,c.length);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
$(".closeSidebar").click(function(){
|
||||
$(".show_btn").css("display","none");
|
||||
$("#scrollsidebar").css("display","none");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#button1").click(function(){
|
||||
myTips("<%= l(:label_feedback_success) %>","success");
|
||||
myTips("反馈成功","success");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$(function () {
|
||||
$("#scrollsidebar").fix({
|
||||
float: 'right', //default.left or right
|
||||
minStatue: cookieget('minStatue'),
|
||||
skin: 'green', //default.gray or blue
|
||||
durationTime: 600
|
||||
});
|
||||
$("#scrollsidebar").fix({
|
||||
float: 'right', //default.left or right
|
||||
minStatue: cookieget('minStatue'),
|
||||
skin: 'green', //default.gray or blue
|
||||
durationTime: 600
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#subject").keydown(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
|
@ -123,8 +99,7 @@ $(document).ready(function(){
|
|||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
})
|
||||
$("#subject").keyup(function(){
|
||||
}).keyup(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
|
@ -133,5 +108,5 @@ $(document).ready(function(){
|
|||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
|
@ -136,18 +136,36 @@ function search_homework_by_name(url){
|
|||
);
|
||||
}
|
||||
|
||||
//提交匿评参数设置
|
||||
function submit_set_evaluation_attr(end_time){
|
||||
if(!regex_evaluation_start(end_time)){
|
||||
$("#evaluation_start_time").focus();
|
||||
}
|
||||
else if(!regex_evaluation_end()){
|
||||
$("#evaluation_end_time").focus();
|
||||
}
|
||||
else if(!regex_evaluation_num()){
|
||||
$("#evaluation_num").focus();
|
||||
}
|
||||
else{
|
||||
$('#popbox02 form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
//验证匿评开启时间:大于截止时间,或者为空
|
||||
function regex_evaluation_start(){
|
||||
function regex_evaluation_start(end_time){
|
||||
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
||||
if(evaluation_start == ""){
|
||||
return true;
|
||||
$("#homework_evaluation_start_time").text("开启匿评日期不能为空");
|
||||
return false;
|
||||
}
|
||||
var end_time = new Date($.trim($("#homework_end_time").val()));
|
||||
var end_time = new Date(end_time);
|
||||
var evaluation_start_time = new Date(evaluation_start);
|
||||
if(evaluation_start_time > end_time){
|
||||
$("#homework_evaluation_start_time").text("");
|
||||
return true;
|
||||
}else{
|
||||
$("#homework_end_time_span").text("开启匿评日期必须大于截止日期");
|
||||
$("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -157,17 +175,40 @@ function regex_evaluation_end(){
|
|||
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
||||
var evaluation_end = $.trim($("#evaluation_end_time").val());
|
||||
if(evaluation_end == ""){
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期不能为空");
|
||||
return true;
|
||||
}else if(evaluation_start == ""){
|
||||
$("#homework_end_time_span").text("开启匿评日期为空时,关闭匿评日期必须为空");
|
||||
return false;
|
||||
}
|
||||
var evaluation_start_time = new Date(evaluation_start);
|
||||
var evaluation_end_time = new Date(evaluation_end);
|
||||
if(evaluation_end_time > evaluation_start_time){
|
||||
$("#homework_evaluation_end_time").text("");
|
||||
return true;
|
||||
}else{
|
||||
$("#homework_end_time_span").text("关闭匿评日期必须大于开启匿评日期");
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//验证匿评数量
|
||||
function regex_evaluation_num(){
|
||||
var evaluation_num = $.trim($("#evaluation_num").val());
|
||||
var regex = /^\d+$/;
|
||||
if(evaluation_num==""){
|
||||
$("#evaluation_num_notice").text("匿评人数不能为空");
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num)){
|
||||
if(evaluation_num > 0){
|
||||
$("#evaluation_num_notice").html("");
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$("#evaluation_num_notice").text("匿评人数必须为大于0");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$("#evaluation_num_notice").text("匿评人数只能为数字");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -369,6 +369,9 @@ $(document).ready(function () {
|
|||
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
|
||||
}
|
||||
|
||||
function quote_issue_journal(){
|
||||
document.getElementById("#issue_notes").focus();
|
||||
}
|
||||
|
||||
/*缺陷完成度决定缺陷状态*/
|
||||
function PrecentChange(obj) {
|
||||
|
@ -503,3 +506,4 @@ function judgeprojectname(){
|
|||
function submitProjectFeedback() {
|
||||
$("#project_feedback_form").submit();
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,12 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.clearfix{clear:both;zoom:1}
|
||||
.break_word{ word-break:break-all; word-wrap: break-word;}
|
||||
.white_space{white-space:nowrap;}
|
||||
.fontGrey3 {color:#484848;}
|
||||
a.linkGrey6 {color:#484848 !important;}
|
||||
a.linkGrey6:hover {color:#ffffff !important;}
|
||||
.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;}
|
||||
.markInput { outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;}
|
||||
.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;}
|
||||
|
||||
/* Spacing */
|
||||
.ml2{ margin-left:2px;}
|
||||
|
@ -103,6 +109,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.mb8 {margin-bottom:8px !important;}
|
||||
.mb10{ margin-bottom:10px !important;}
|
||||
.mb12 {margin-bottom:12px !important;}
|
||||
.mb15{margin-bottom: 15px;}
|
||||
.mb20{ margin-bottom:20px;}
|
||||
.pl15{ padding-left:15px;}
|
||||
.w20{ width:20px;}
|
||||
|
@ -515,7 +522,9 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
|||
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
|
||||
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
|
||||
.homepageNewsType {width:110px; padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;}
|
||||
.homepageNewsPubType {width:220px; font-size:12px; color:#888888; display: block;}
|
||||
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
|
||||
.homepageNewsContent {width:365px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageSystenMessageContent {width:291px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
|
@ -527,7 +536,7 @@ a.homepageWhite:hover {color:#a1ebff}
|
|||
a.newsGrey {color:#4b4b4b;}
|
||||
a.newsGrey:hover {color:#000000;}
|
||||
a.newsRed {color:red;}
|
||||
a.newsRed:hovor {color:#888888;}
|
||||
a.newsRed:hover {color:#888888;}
|
||||
a.replyGrey {color:#888888; display:inline-block;}
|
||||
a.replyGrey:hover {color:#4b4b4b;}
|
||||
a.replyGrey1 {color:#888888;}
|
||||
|
@ -704,7 +713,7 @@ html{ overflow-x:hidden;}
|
|||
.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; }
|
||||
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
||||
.side_content .side_list {width:154px;overflow:hidden;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;}
|
||||
.show_btn span { display:none;}
|
||||
.close_btn{width:24px;height:24px;cursor:pointer;}
|
||||
.side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; }
|
||||
|
@ -714,20 +723,21 @@ html{ overflow-x:hidden;}
|
|||
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
|
||||
.close_btn span { display:none;}
|
||||
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
|
||||
.msgserver { margin-top:5px;}
|
||||
.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }
|
||||
.msgserver { margin:10px 0 0px 5px;}
|
||||
.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; }
|
||||
.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
|
||||
a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
|
||||
a:hover.opnionButton{background: #0fa9bb; }
|
||||
a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;}
|
||||
a.opnionButton:hover{background: #297fb8; }
|
||||
/* blue skin as the default skin */
|
||||
.side_title {background-position:-195px 0;}
|
||||
.side_center {background:url(../images/blue_line.png) repeat-y center; }
|
||||
.side_bottom {background-position:-195px -50px;}
|
||||
a.close_btn {background-position:-44px 0;}
|
||||
a:hover.close_btn {background-position:-66px 0;}
|
||||
.close_btn {background-position:-44px 0;}
|
||||
.close_btn:hover {background-position:-66px 0;}
|
||||
.show_btn {background-position:-119px 0;}
|
||||
.msgserver a {color:#15bccf; }
|
||||
.msgserver a {color:#269ac9; }
|
||||
.msgserver a:hover { text-decoration:underline; }
|
||||
.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;}
|
||||
|
||||
|
||||
/***** Ajax indicator ******/
|
||||
|
@ -768,9 +778,6 @@ div.modal {
|
|||
.ui-widget {
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 1.1em;
|
||||
width: 200px;
|
||||
height: 14px;
|
||||
background: #e2e2e2;
|
||||
}
|
||||
.ui-dialog .ui-dialog-content {
|
||||
position: relative;
|
||||
|
@ -973,6 +980,7 @@ img.ui-datepicker-trigger {
|
|||
}
|
||||
/*消息*/
|
||||
.homepageNewsTypeNotRead {width:100px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;}
|
||||
.homepageNewsTypeNotReadHomework {width:170px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;overflow:hidden; height:49px; word-break:break-all; word-wrap:break-word;text-overflow:ellipsis;}
|
||||
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
|
||||
.calendar_div{border: 1px solid #d9d9d9;}
|
||||
/*缺陷更新动态在消息中显示样式*/
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
.project_content{ width:940px; margin:10px auto;}
|
||||
.project_left{ float:left;}
|
||||
.project_right{ width:670px; float:left;background:#fff; padding:10px;}
|
||||
.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||
|
||||
/*简介*/
|
||||
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d;}
|
||||
|
|
|
@ -714,7 +714,7 @@ html{ overflow-x:hidden;}
|
|||
.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; }
|
||||
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
||||
.side_content .side_list {width:154px;overflow:hidden;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;}
|
||||
.show_btn span { display:none;}
|
||||
.close_btn{width:24px;height:24px;cursor:pointer;}
|
||||
.side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; }
|
||||
|
@ -724,21 +724,21 @@ html{ overflow-x:hidden;}
|
|||
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
|
||||
.close_btn span { display:none;}
|
||||
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
|
||||
.msgserver { margin-top:5px;}
|
||||
/*.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }*/
|
||||
.msgserver a { padding-left:4px; height:21px; display:block; }
|
||||
.msgserver { margin:10px 0 0px 5px;}
|
||||
.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; }
|
||||
.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
|
||||
a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
|
||||
a:hover.opnionButton{background: #0fa9bb; }
|
||||
a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;}
|
||||
a.opnionButton:hover{background: #297fb8; }
|
||||
/* blue skin as the default skin */
|
||||
.side_title {background-position:-195px 0;}
|
||||
.side_center {background:url(../images/blue_line.png) repeat-y center; }
|
||||
.side_bottom {background-position:-195px -50px;}
|
||||
a.close_btn {background-position:-44px 0;}
|
||||
a:hover.close_btn {background-position:-66px 0;}
|
||||
.close_btn {background-position:-44px 0;}
|
||||
.close_btn:hover {background-position:-66px 0;}
|
||||
.show_btn {background-position:-119px 0;}
|
||||
.msgserver a {color:#15bccf; }
|
||||
.msgserver a {color:#269ac9; }
|
||||
.msgserver a:hover { text-decoration:underline; }
|
||||
.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;}
|
||||
|
||||
|
||||
.hiddent{ overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
|
@ -858,7 +858,7 @@ div.flash.warning, .conflict {
|
|||
/*弹出框*/
|
||||
.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);}
|
||||
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content02{display:none;position:fixed;top:15%;left:30%;width:310px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content02{display:none;position:fixed;top:15%;left:30%;width:450px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;}
|
||||
a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
|
||||
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
||||
|
|
Loading…
Reference in New Issue