Merge branch 'szzh' into ouyangxuhua

This commit is contained in:
ouyangxuhua 2015-08-01 15:49:39 +08:00
commit 893e7ae99d
91 changed files with 1561 additions and 1346 deletions

View File

@ -337,6 +337,19 @@ class AdminController < ApplicationController
format.html format.html
end end
end end
#学校列表
def schools
@school_name = params[:school_name]
if @school_name
@schools = School.where("name like '%#{@school_name}%'")
else
@schools = School.all
end
respond_to do |format|
format.html
end
end
#移动端版本管理 #移动端版本管理
def mobile_version def mobile_version
@versions = PhoneAppVersion.reorder('created_at desc') @versions = PhoneAppVersion.reorder('created_at desc')

View File

@ -1,6 +1,7 @@
class HomeworkCommonController < ApplicationController class HomeworkCommonController < ApplicationController
require 'net/http' require 'net/http'
require 'json' require 'json'
require "base64"
layout "base_courses" layout "base_courses"
before_filter :find_course, :only => [:index,:new,:create,:next_step] 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 :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
@ -18,28 +19,28 @@ class HomeworkCommonController < ApplicationController
end end
def new def new
@homework_type = "1" # @homework_type = "1"
#
@homework = HomeworkCommon.new # @homework = HomeworkCommon.new
@homework.safe_attributes = params[:homework_common] # @homework.safe_attributes = params[:homework_common]
@homework.late_penalty = 0 # @homework.late_penalty = 0
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') # @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
@homework.publish_time = Time.now.strftime('%Y-%m-%d') # @homework.publish_time = Time.now.strftime('%Y-%m-%d')
#
if @homework_type == "1" # if @homework_type == "1"
#匿评作业相关属性 # #匿评作业相关属性
@homework_detail_manual = HomeworkDetailManual.new # @homework_detail_manual = HomeworkDetailManual.new
@homework_detail_manual.ta_proportion = 0.6 # @homework_detail_manual.ta_proportion = 0.6
@homework_detail_manual.absence_penalty = 0 # @homework_detail_manual.absence_penalty = 0
@homework_detail_manual.evaluation_num = 3 # @homework_detail_manual.evaluation_num = 3
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d') # @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_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
@homework.homework_detail_manual = @homework_detail_manual # @homework.homework_detail_manual = @homework_detail_manual
elsif @homework_type == "2" # elsif @homework_type == "2"
#编程作业相关属性 # #编程作业相关属性
@homework_detail_programing = HomeworkDetailPrograming.new # @homework_detail_programing = HomeworkDetailPrograming.new
@homework.homework_detail_programing = @homework_detail_programing # @homework.homework_detail_programing = @homework_detail_programing
end # end
respond_to do |format| respond_to do |format|
format.html format.html
end end
@ -99,12 +100,13 @@ class HomeworkCommonController < ApplicationController
question = {title:homework.name,content:homework.description} question = {title:homework.name,content:homework.description}
question[:input] = [] question[:input] = []
question[:output] = [] question[:output] = []
if params[:input] && params[:output] if params[:input] && params[:output] && params[:result]
params[:input].each do |k,v| params[:input].each do |k,v|
if params[:output].include? k if params[:output].include? k
homework_test = HomeworkTest.new homework_test = HomeworkTest.new
homework_test.input = v homework_test.input = v
homework_test.output = params[:output][k] homework_test.output = params[:output][k]
homework_test.result = params[:result][k]
homework.homework_tests << homework_test homework.homework_tests << homework_test
question[:input] << homework_test.input question[:input] << homework_test.input
question[:output] << homework_test.output question[:output] << homework_test.output
@ -221,17 +223,19 @@ class HomeworkCommonController < ApplicationController
homework_test = HomeworkTest.find id homework_test = HomeworkTest.find id
homework_test.destroy if homework_test homework_test.destroy if homework_test
end end
if params[:input] && params[:output] if params[:input] && params[:output] && params[:result]
params[:input].each do |k,v| params[:input].each do |k,v|
if params[:output].include? k if params[:output].include? k
homework_test = HomeworkTest.find_by_id k homework_test = HomeworkTest.find_by_id k
if homework_test #已存在的测试,修改 if homework_test #已存在的测试,修改
homework_test.input = v homework_test.input = v
homework_test.output = params[:output][k] homework_test.output = params[:output][k]
homework_test.result = params[:result][k]
else #不存在的测试,增加 else #不存在的测试,增加
homework_test = HomeworkTest.new homework_test = HomeworkTest.new
homework_test.input = v homework_test.input = v
homework_test.output = params[:output][k] homework_test.output = params[:output][k]
homework_test.result = params[:result][k]
homework_test.homework_common = @homework homework_test.homework_common = @homework
end end
homework_test.save homework_test.save
@ -351,6 +355,23 @@ class HomeworkCommonController < ApplicationController
end end
end end
def programing_test
test = {language:params[:language],src:Base64.encode64(params[:src]),input:[params[:input]],output:[params[:output]]}
@index = params[:index]
uri = URI('http://192.168.80.21:8080/api/realtime.json')
body = test.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)
result["results"].each do |re|
@result = re["status"]
end
end
private private
#获取课程 #获取课程
def find_course def find_course

View File

@ -136,12 +136,20 @@ class PollController < ApplicationController
} }
@poll_questions.poll_answers.new question_option @poll_questions.poll_answers.new question_option
end end
end
# 如果是插入的话那么从插入的这个id以后的question_num都将要+1
if params[:quest_id]
@is_insert = true
@poll.poll_questions.where("question_number > #{params[:quest_num].to_i}").update_all(" question_number = question_number + 1")
@poll_question_num = params[:quest_num].to_i
@poll_questions.question_number = params[:quest_num].to_i + 1
end end
if @poll_questions.save if @poll_questions.save
respond_to do |format| respond_to do |format|
format.js format.js
end end
end end
end end
#修改题目 #修改题目
@ -328,6 +336,37 @@ class PollController < ApplicationController
end end
end end
def import_poll
@poll = Poll.find(params[:to_id])
question_num = @poll.poll_questions.select("max(question_number) question_number").first.question_number
import_poll = Poll.find(params[:import_id])
import_poll.poll_questions.each_with_index do |question,index|
option = {
:is_necessary => question.is_necessary,
:question_title => question.question_title,
:question_type => question.question_type,
:question_number => question_num + index+1
}
poll_questions = @poll.poll_questions.new option
for i in 1..question.poll_answers.count
answer = question.poll_answers[i-1][:answer_text]
question_option = {
:answer_position => i,
:answer_text => answer
}
poll_questions.poll_answers.new question_option
end
@poll.poll_questions << poll_questions
end
if @poll.save
@poll = Poll.find(params[:to_id])
respond_to do |format|
format.js
end
end
end
#重新发布问卷 #重新发布问卷
def republish_poll def republish_poll
@poll.poll_questions.each do |poll_question| @poll.poll_questions.each do |poll_question|

View File

@ -369,37 +369,6 @@ class ProjectsController < ApplicationController
end end
end end
# dts测试工具
def dts_dep
render_403 unless User.current.admin?
@dts = Dts.all
end
# dts云部署
def yun_dep
render_403 unless User.current.admin?
end
# 软件知识库
def soft_knowledge
render_403 unless User.current.admin?
end
# 在线开发平台
def online_dev
render_403 unless User.current.admin?
end
# 软件资源库
def soft_file
render_403 unless User.current.admin?
end
# 软件服务
def soft_service
render_403 unless User.current.admin?
end
#发送邮件邀请新用户 #发送邮件邀请新用户
def invite_members_by_mail def invite_members_by_mail
if User.current.member_of?(@project) || User.current.admin? if User.current.member_of?(@project) || User.current.admin?

View File

@ -4,28 +4,21 @@ class SchoolController < ApplicationController
def upload def upload
uploaded_io = params[:logo] uploaded_io = params[:logo]
school_id = 0 school_id ||= params[:id]
schools = School.where("name = ?", params[:school])
schools.each do |s|
school_id = s.id
end
unless uploaded_io.nil? unless uploaded_io.nil?
File.open(Rails.root.join('public', 'images', 'school', school_id.to_s+'.png'), 'wb') do |file| File.open(Rails.root.join('public', 'images', 'school', school_id.to_s+'.png'), 'wb') do |file|
file.write(uploaded_io.read) file.write(uploaded_io.read)
end end
s1 = School.find(school_id) s1 = School.find(school_id)
s1.logo_link = '/images/school/'+school_id.to_s+'.png' s1.logo_link = '/images/school/'+school_id.to_s+'.png'
s1.save s1.save
end end
redirect_to admin_schools_url(:school_name => params[:school_name])
end end
def upload_logo def upload_logo
@school = School.find params[:id]
@school_name = params[:school_name]
end end
#获取制定学校开设的课程数 #获取制定学校开设的课程数

View File

@ -112,39 +112,20 @@ class UsersController < ApplicationController
#added by young #added by young
def user_projects def user_projects
#add by huang
unless User.current.admin? unless User.current.admin?
if !@user.active? #|| (@user != User.current && @memberships.empty? && events.empty?) if !@user.active? #|| (@user != User.current && @memberships.empty? && events.empty?)
render_404 render_404
return return
end end
end end
#end projects = @user.projects.visible.order("updated_on desc")
# if User.current.admin?
# @memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}")
# else
# cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
# @memberships = @user.memberships.all(:conditions => cond)
# end
#events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20)
#@events_by_day = events.group_by(&:event_date)
# @state = 0
limit = 10;
query = Project.joins("join members m on #{Project.table_name}.id=m.project_id")
query = query.where("m.user_id = ? and #{Project.table_name}.project_type=?",@user.id,Project::ProjectType_project)
if(params[:status] == '1') if(params[:status] == '1')
query = query.where("#{Project.table_name}.user_id = ?",@user.id); projects = projects.where("projects.user_id = ?",@user.id)
elsif(params[:status] == '2') elsif(params[:status] == '2')
query = query.where("#{Project.table_name}.user_id <> ?",@user.id); projects = projects.where("projects.user_id <> ?",@user.id)
end end
@obj_count = query.count(); @list = paginateHelper projects,10
@params = params[:status]
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Project.table_name}.updated_on desc,#{Project.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@params = params
respond_to do |format| respond_to do |format|
format.html{render :layout=>'base_users_new'} format.html{render :layout=>'base_users_new'}
format.api format.api
@ -262,75 +243,33 @@ class UsersController < ApplicationController
def user_courses def user_courses
unless User.current.admin? unless User.current.admin?
if !@user.active? #|| (@user != User.current && @memberships.empty? && events.empty?) if !@user.active?
render_404 render_404
return return
end end
end end
courses = @user.courses.visible.order("created_at desc")
#@user.coursememberships.all(:conditions => Course.visible_condition(User.current))
limit = 10;
query = Course.joins("join members m on #{Course.table_name}.id=m.course_id")
query = query.where("m.user_id = ?",@user.id)
if(params[:status] == '1') if(params[:status] == '1')
query = query.where("endup_time >= ? or endup_time is null or endup_time=''",Time.now); courses = courses.where("endup_time >= ? or endup_time is null or endup_time=''",Time.now)
elsif(params[:status] == '2') elsif(params[:status] == '2')
query = query.where("endup_time < ?",Time.now); courses = courses.where("endup_time < ?",Time.now)
end end
@obj_count = query.count(); @list = paginateHelper courses,10
@params = params[:status]
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Course.table_name}.updated_at desc,#{Course.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@params = params
render :layout=>'base_users_new' render :layout=>'base_users_new'
# if User.current == @user || User.current.admin?
# membership = @user.coursememberships.all
# else
# membership = @user.coursememberships.all(:conditions => Course.visible_condition(User.current))
# end
#
# membership.sort! {|older, newer| newer.created_on <=> older.created_on }
# @memberships = []
# membership.collect { |e|
# @memberships.push(e)
# }
# ## 判断课程是否过期 [需封装]
# @memberships_doing = []
# @memberships_done = []
# #now_time = Time.now.year
# @memberships.map { |e|
# #end_time = e.course.get_time.year
# isDone = course_endTime_timeout?(e.course)
# if isDone
# @memberships_done.push e
# else
# @memberships_doing.push e
# end
# }
# respond_to do |format|
# format.html
# format.api
# end
end end
# modified by fq # modified by fq
def user_newfeedback def user_newfeedback
@jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
@jours.update_all(:is_readed => true, :status => false) jours.update_all(:is_readed => true, :status => false)
@jours.each do |journal| jours.each do |journal|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false) fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
end end
@jour = paginateHelper jours,10
#@limit = 10
#@feedback_count = @jours.count
#@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
#@offset ||= @feedback_pages.offset
@jour = paginateHelper @jours,10
@state = false @state = false
render :layout=>'base_users_new'
end end
# end
def user_comments def user_comments
@ -482,95 +421,6 @@ class UsersController < ApplicationController
render :layout=>nil render :layout=>nil
end end
# def user_course_activities
# @list = []
# lastid = nil
# if params[:lastid]!=nil && !params[:lastid].empty?
# lastid = params[:lastid];
# end
#
# user_ids = []
# if @user == User.current
# watcher = User.watched_by(@user)
# watcher.push(User.current)
# user_ids = watcher.map{|x| x.id}
# else
# user_ids << @user.id
# end
#
# query_rec_count = 8
# query_times = 10 #query_times次没查到query_rec_count条记录就不查了
# query_i = 0;
# while( true )
# query_i = query_i+1
# if(query_i>query_times)
# break
# end
# query = Activity.where(user_id: user_ids)
# if(lastid != nil)
# query = query.where("id < ?",lastid)
# end
# lastid,item_list = query_activities(query,'course');
# for item in item_list
# @list << item
# if @list.count() >= query_rec_count
# break
# end
# end
# if @list.count() >= query_rec_count
# break
# end
# if lastid == nil
# break
# end
# end
# render :layout=>nil
# end
#
# def user_project_activities
# @list = []
# lastid = nil
# if params[:lastid]!=nil && !params[:lastid].empty?
# lastid = params[:lastid];
# end
#
# user_ids = []
# if @user == User.current
# watcher = User.watched_by(@user)
# watcher.push(User.current)
# user_ids = watcher.map{|x| x.id}
# else
# user_ids << @user.id
# end
#
# query_rec_count = 8
# query_times = 10 #query_times次没查到query_rec_count条记录就不查了
# query_i = 0;
# while( true )
# query_i = query_i+1
# if(query_i>query_times)
# break
# end
# query = Activity.where(user_id: user_ids)
# if(lastid != nil)
# query = query.where("id < ?",lastid)
# end
# lastid,item_list = query_activities(query,'project');
# for item in item_list
# @list << item
# if @list.count() >= query_rec_count
# break
# end
# end
# if @list.count() >= query_rec_count
# break
# end
# if lastid == nil
# break
# end
# end
# render :action=>'user_course_activities',:layout=>nil
# end
def user_course_activities def user_course_activities
lastid = nil lastid = nil
if params[:lastid]!=nil && !params[:lastid].empty? if params[:lastid]!=nil && !params[:lastid].empty?
@ -629,7 +479,7 @@ class UsersController < ApplicationController
query = query.where("#{Activity.table_name}.id < ?",lastid) query = query.where("#{Activity.table_name}.id < ?",lastid)
end end
query = query.order("#{Activity.table_name}.id desc") query = query.order("#{Activity.table_name}.id desc")
@list = query_activities(query); @list = query_activities(query)
render :action=>'user_course_activities',:layout=>nil render :action=>'user_course_activities',:layout=>nil
end end

View File

@ -100,44 +100,6 @@ class WelcomeController < ApplicationController
@course_page = FirstPage.find_by_page_type('course') @course_page = FirstPage.find_by_page_type('course')
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117 @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
@logoLink ||= logolink() @logoLink ||= logolink()
##3-8月份为查找春季课程9-2月份为查找秋季课程
#month_now = Time.now.strftime("%m").to_i
#year_now = Time.new.strftime("%Y").to_i
#(month_now >= 3 && month_now < 9) ? course_term = l(:label_spring) : course_term = l(:label_autumn)
##year_now -= 1 if year_now < 3
#@school_id.nil? ? @cur_school_course = [] : @cur_school_course = find_miracle_course(10,7,@school_id, year_now, course_term)
##未登录或者当前学校未开设课程
#if @cur_school_course.empty?
# @has_course = false
# User.current.logged? ? course_count = 9 : course_count = 10
# @cur_school_course += find_all_new_hot_course(course_count, @school_id, year_now, course_term)
# while @cur_school_course.count < 9 do
# if course_term == l(:label_spring)
# course_term = l(:label_autumn)
# year_now -= 1
# else
# course_term = l(:label_spring)
# end
# @cur_school_course += find_all_new_hot_course((10-@cur_school_course.count), nil, year_now, course_term)
# end
#else
# if @cur_school_course.count < 9
# @has_course = false
# @cur_school_course += find_all_new_hot_course(9-@cur_school_course.count, @school_id, year_now, course_term)
# if @cur_school_course.count < 9
# if course_term == l(:label_spring)
# course_term = l(:label_autumn)
# year_now -= 1
# else
# course_term = l(:label_spring)
# end
# @cur_school_course += find_all_new_hot_course(9-@cur_school_course.count, nil, year_now, course_term)
# end
# else
# @has_course = true
# end
#end
end end
def logolink() def logolink()

View File

@ -4,7 +4,7 @@ class WordsController < ApplicationController
include ApplicationHelper include ApplicationHelper
before_filter :find_user, :only => [:new, :create, :destroy, :more, :back] before_filter :find_user, :only => [:new, :create, :destroy, :more, :back]
def create def create
if params[:new_form][:user_message].size>0 if params[:new_form][:user_message].size>0 && User.current.logged?
unless params[:user_id].nil? unless params[:user_id].nil?
if params[:reference_content] if params[:reference_content]
message = params[:new_form][:user_message] + "\n" + params[:reference_content] message = params[:new_form][:user_message] + "\n" + params[:reference_content]
@ -18,22 +18,13 @@ class WordsController < ApplicationController
list = User.find(refer_user_id).add_jour(User.current, message, refer_user_id) list = User.find(refer_user_id).add_jour(User.current, message, refer_user_id)
end end
@jour = list.last @jour = list.last
# @user.count_new_jour
# if a_message.size > 5
# @message = a_message[-5, 5]
# else
# @message = a_message
# end
# @message_count = a_message.count
end end
end end
# @jours = @user.journals_for_messages.where('m_parent_id IS NULL').reverse jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
# @jour = paginateHelper @jours,10 @jour = paginateHelper jours,10
respond_to do |format| respond_to do |format|
# format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
format.js format.js
#format.api { render_api_ok }
end end
end end
@ -93,7 +84,6 @@ class WordsController < ApplicationController
end end
respond_to do |format| respond_to do |format|
format.js format.js
#format.api { render_api_ok }
end end
end end
@ -206,7 +196,15 @@ class WordsController < ApplicationController
flash[:error] = feedback.errors.full_messages[0] flash[:error] = feedback.errors.full_messages[0]
redirect_to project_feedback_url(params[:id]) redirect_to project_feedback_url(params[:id])
end end
end
#给用户留言
def leave_user_message
@user = User.find(params[:id])
if params[:new_form][:user_message].size>0 && User.current.logged? && @user
@user.add_jour(User.current, params[:new_form][:user_message])
end
redirect_to feedback_path(@user)
end end
# add by nwb # add by nwb

View File

@ -321,6 +321,7 @@ module UsersHelper
list = obj.watcher_users.order("#{Watcher.table_name}.id desc").limit(10).all list = obj.watcher_users.order("#{Watcher.table_name}.id desc").limit(10).all
return [count,list]; return [count,list];
end end
def get_visitor_users(obj) def get_visitor_users(obj)
query = Visitor.where("master_id=?",obj.id) query = Visitor.where("master_id=?",obj.id)
count = query.count count = query.count
@ -332,46 +333,59 @@ module UsersHelper
end end
def get_create_course_count(user) def get_create_course_count(user)
if user == User.current user.courses.visible.where("tea_id = ?",user.id).count
user.courses.count
else
user.courses.where("is_public = 1").count
end
end end
#获取加入课程数
def get_join_course_count(user) def get_join_course_count(user)
user.coursememberships.count - get_create_course_count(user) user.courses.visible.count - get_create_course_count(user)
end end
#发布作业数
def get_homework_commons_count(user) def get_homework_commons_count(user)
HomeworkCommon.where("user_id = ?",user.id).count HomeworkCommon.where("user_id = ?",user.id).count
end end
#资源数
def get_projectandcourse_attachment_count(user) def get_projectandcourse_attachment_count(user)
Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count
end end
#创建项目数
def get_create_project_count(user) def get_create_project_count(user)
Project.where("user_id = ? and project_type = ?",user.id,Project::ProjectType_project).count user.projects.visible.where("projects.user_id=#{user.id}").count
end end
#加入项目数
def get_join_project_count(user) def get_join_project_count(user)
user.memberships.count(conditions: "projects.project_type = #{Project::ProjectType_project}") - get_create_project_count(user) user.projects.visible.count - get_create_project_count(user)
end end
#创建缺陷数
def get_create_issue_count(user) def get_create_issue_count(user)
Issue.where("author_id = ?",user.id).count Issue.where("author_id = ?",user.id).count
end end
#解决缺陷数
def get_resolve_issue_count(user) def get_resolve_issue_count(user)
Issue.where("assigned_to_id = ? and status_id=3",user.id).count Issue.where("assigned_to_id = ? and status_id=3",user.id).count
end end
#参与匿评数
def get_anonymous_evaluation_count(user) def get_anonymous_evaluation_count(user)
StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count
end end
def query_activities(query) def query_activities(query)
list = query.limit(8).all list = query.limit(13).all
result = []; result = []
for item in list for item in list
container = get_activity_container(item) container = get_activity_container(item)
result << { :item=>item,:e=>container } result << { :item=>item,:e=>container }
end end
return result result
end end
def get_activity_container activity def get_activity_container activity
return activity.activity_container return activity.activity_container
end end
@ -387,6 +401,7 @@ module UsersHelper
end end
return str.html_safe return str.html_safe
end end
def get_activity_act_showname(activity) def get_activity_act_showname(activity)
case activity.act_type case activity.act_type
when "HomeworkCommon" when "HomeworkCommon"
@ -417,6 +432,7 @@ module UsersHelper
return activity.act_type return activity.act_type
end end
end end
def get_activity_act_createtime(activity) def get_activity_act_createtime(activity)
case activity.act_type case activity.act_type
when "HomeworkCommon" when "HomeworkCommon"
@ -427,6 +443,7 @@ module UsersHelper
return activity.act.created_on return activity.act.created_on
end end
end end
def get_activity_container_url e def get_activity_container_url e
if !e.visible? if !e.visible?
return "javascript:;" return "javascript:;"
@ -437,6 +454,7 @@ module UsersHelper
end end
return url_for(:controller => 'projects', :action=>"show", :id=>e.id, :host=>Setting.host_name) return url_for(:controller => 'projects', :action=>"show", :id=>e.id, :host=>Setting.host_name)
end end
def get_activity_url(activity,e) def get_activity_url(activity,e)
if !e.visible? if !e.visible?
return "javascript:;" return "javascript:;"
@ -465,6 +483,7 @@ module UsersHelper
return 'javascript:;' return 'javascript:;'
end end
end end
def get_activity_opt(activity,e) def get_activity_opt(activity,e)
case activity.act_type case activity.act_type
when "HomeworkCommon" when "HomeworkCommon"
@ -474,14 +493,14 @@ module UsersHelper
when "Issue" when "Issue"
return '发表了问题' return '发表了问题'
when "Journal" when "Journal"
return '回复了问题' return '更新了问题'
when "JournalsForMessage" when "JournalsForMessage"
return e.class.to_s == 'Course' ? '发表了留言' : '提交了反馈' return e.class.to_s == 'Course' ? '发表了留言' : '提交了反馈'
#return ( activity.act.reply_id == nil || activity.act.reply_id == 0 ) ? '' : '' #return ( activity.act.reply_id == nil || activity.act.reply_id == 0 ) ? '' : ''
when "Message" when "Message"
return ( activity.act.parent_id == nil || activity.act.parent_id == '' ) ? '发布了帖子' : '回复了帖子' return ( activity.act.parent_id == nil || activity.act.parent_id == '' ) ? '发布了帖子' : '回复了帖子'
when "Poll" when "Poll"
return '发布了问卷' return '创建了问卷'
else else
return '有了新动态' return '有了新动态'
end end

View File

@ -1,5 +1,5 @@
class HomeworkTest < ActiveRecord::Base class HomeworkTest < ActiveRecord::Base
attr_accessible :input, :output, :homework_common_id attr_accessible :input, :output, :homework_common_id,:result,:error_msg
belongs_to :homework_common belongs_to :homework_common
has_many :student_work_test has_many :student_work_test

View File

@ -235,9 +235,10 @@ class Issue < ActiveRecord::Base
base_reload(*args) base_reload(*args)
end end
def to_param # 之所以注释是以为最终以id形式显示另外如果项目名称带点号或者纯数字会出现问题
@to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize # def to_param
end # @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
# end
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
def available_custom_fields def available_custom_fields

View File

@ -418,7 +418,7 @@ class User < Principal
end end
def nickname(formatter = nil) def nickname(formatter = nil)
login login.nil? || (login && login.empty?) ? "AnonymousUser" : login
end end
def name(formatter = nil) def name(formatter = nil)

View File

@ -0,0 +1,50 @@
<h3 style="float: left">
<%=l(:label_school_plural)%>
</h3>
<%= form_tag({:controller => 'admin', :action => 'schools' }, :method => :get,:id=>"search_course_form") do %>
<%= submit_tag "搜索",:style => "float: right;margin-right: 15px;"%>
<input style="float: right;margin-right: 10px;" id="v_subject" placeholder="学校名称" type="text" name="school_name" value="<%= @school_name%>">
<% end %>
<div class="cl"></div>
<div class="autoscroll" style="margin-top: 40px;">
<table class="list" style="width: 100%;table-layout: fixed">
<thead>
<tr>
<th style="width: 50px;">
序号
</th>
<th style="width: 100px;">
LOGO
</th>
<th>
学校名称
</th>
<th style="width: 100px;"></th>
</tr>
</thead>
<tbody>
<% @schools.each do |school|%>
<tr class="<%= cycle("odd", "even") %>">
<td style="text-align:center;vertical-align: middle;">
<%= school.id %>
</td>
<td align="center">
<%= image_tag(school.logo_link,width:40,height:40) %>
</td>
<td style="text-align:center;vertical-align: middle;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=school.name%>'>
<span>
<%= link_to school.name,"http://#{Setting.host_course}/?school_id=#{school.id}" %>
</span>
</td>
<td class="buttons" style="vertical-align: middle;">
<%= link_to("修改", upload_logo_school_path(school.id,:school_name => @school_name), :class => 'icon icon-copy') %>
<%#= link_to(l(:button_delete), organization_path(school.id), :method => :delete,:confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
</td>
</tr>
<% end%>
</tbody>
</table>
</div>
<% html_title(l(:label_project_plural)) -%>

View File

@ -17,6 +17,8 @@ if (window.Messenger) {
Messenger().post({ Messenger().post({
id: "label_apply_project_waiting", id: "label_apply_project_waiting",
message: "<%= l(:label_apply_project_waiting) %>", message: "<%= l(:label_apply_project_waiting) %>",
showCloseButton: true, showCloseButton: true
}); });
}; };
$("#applied_project_link_<%= @project.id%>").replaceWith("<%= escape_javascript(link_to "加入项目",appliedproject_path(:user_id => User.current.id,:project_id => @project.id,:project_join => true),:class => "blue_n_btn fr mt20", :remote => "true",:method => "post",:id => "applied_project_link_#{@project.id}") %>");

View File

@ -6,6 +6,7 @@
<% elsif @status == 2%> <% elsif @status == 2%>
alert("<%= l('project.join.tips.success') %>"); alert("<%= l('project.join.tips.success') %>");
hideModal($("#popbox")); hideModal($("#popbox"));
$("#applied_project_link_<%= @project.id%>").replaceWith("<%=escape_javascript(link_to '取消申请',appliedproject_applied_path(:project_id => @project.id,:user_id => User.current.id),:class => "blue_n_btn fr mt20", :remote => "true",:method => "delete",:id => "applied_project_link_#{@project.id}")%>");
<% elsif @status == 3%> <% elsif @status == 3%>
alert("<%= l('project.join.tips.has') %>"); alert("<%= l('project.join.tips.has') %>");
<%else%> <%else%>

View File

@ -37,7 +37,7 @@
<% if options[:length] %> <% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%> <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %> <% else %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
<% end %> <% end %>
</span> </span>
<%if is_float%> <%if is_float%>

View File

@ -61,7 +61,7 @@
<!--gcm--> <!--gcm-->
<p class="stats"> <p class="stats">
<%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %> <%= content_tag('span', link_to("#{course_activity_count @course}", course_path(@course)), :class => "info") %>
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %> <%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
</p> </p>
<!--gcm--> <!--gcm-->

View File

@ -4,7 +4,8 @@
<% if @state %> <% if @state %>
<% if @state == 0 %> <% if @state == 0 %>
alert("加入成功"); alert("加入成功");
hideModal($("#popbox")); hideModal($("#popbox02"));
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>");
<% elsif @state == 1 %> <% elsif @state == 1 %>
alert("密码错误"); alert("密码错误");
<% elsif @state == 2 %> <% elsif @state == 2 %>

View File

@ -24,6 +24,8 @@ $('#upload_file_div').slideToggle('slow');
<% if @project %> <% if @project %>
closeModal(); closeModal();
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
$("#project_files_count_info").html("<%= @all_attachments.count%>");
$("#project_files_count_nav").html("(<%= @all_attachments.count%>)")
// 添加文件上传成功提示 // 添加文件上传成功提示
<% unless params[:attachments].nil? %> <% unless params[:attachments].nil? %>
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>'); var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');

View File

@ -78,7 +78,7 @@
<li > <li >
<label class="label02">&nbsp;标准代码:&nbsp;</label> <label class="label02">&nbsp;标准代码:&nbsp;</label>
<textarea name="standard_code" class=" w547 h150 mb10 fl"><%= homework.homework_detail_programing.standard_code%></textarea> <textarea name="standard_code" class=" w547 h150 mb10 fl" oninput="init_programing_test();" onpropertychange="init_programing_test()"><%= homework.homework_detail_programing.standard_code%></textarea>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
@ -87,16 +87,25 @@
<div> <div>
<li> <li>
<label class="label02">&nbsp;测试输入:&nbsp;</label> <label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/> <input type="text" class="fl h26 w190 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
</li> </li>
<li > <li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label> <label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/> <input type="text" class="fl h26 w190 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
</li> </li>
<li> <li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a> <a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a> <a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<!--span class="green_btn fl ml5 mt1">测试</span--> <% if homework_test.result && !homework_test.result.to_s.empty?%>
<% if homework_test.result == 0%>
<a class="green_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">成功</a>
<% else%>
<a class="red_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">错误</a>
<% end%>
<% else%>
<a class="blue_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">测试</a>
<% end%>
<input type="hidden" id="test_result_<%= homework_test.id%>" name="result[<%= homework_test.id%>]" value="<%= homework_test.result%>"/>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -105,19 +114,48 @@
<div> <div>
<li> <li>
<label class="label02">&nbsp;测试输入:&nbsp;</label> <label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="input[0]" /> <input type="text" class="fl h26 w190 mb10" name="input[0]" />
</li> </li>
<li > <li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label> <label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="output[0]" /> <input type="text" class="fl h26 w190 mb10" name="output[0]" />
</li> </li>
<li> <li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a> <a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a> <a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<!--span class="green_btn fl ml5 mt1">测试</span--> <a class="blue_btn fl ml5 mt programing_test" onclick="programing_test('0')" id="test_send_0">测试</a>
<input type="hidden" id="test_result_0" name="result[0]" />
</li> </li>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<script type="text/javascript">
//点击测试,发送
function programing_test(obj) {
$.post(
'<%= programing_test_homework_common_index_path%>',
{
src: $("textarea[name='standard_code']").val(),
input: $("input[name='input[" + obj +"]']").val(),
output: $("input[name='output[" + obj + "]']").val(),
language: $("select[name='language']").val(),
index: obj
},
function (data) {
}
);
}
function init_programing_test()
{
$(".programing_test").each(function(){
$(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试");
$(this).next("input").val("");
});
}
</script>

View File

@ -49,6 +49,7 @@
<div class="cl"></div> <div class="cl"></div>
<% if homework.homework_type == 2 && homework.homework_detail_programing%> <% if homework.homework_type == 2 && homework.homework_detail_programing%>
<% if @is_teacher%>
<table class="border_ce" cellpadding="0" cellspacing="0"> <table class="border_ce" cellpadding="0" cellspacing="0">
<tbody> <tbody>
<tr class="<%= cycle("", "b_grey") %>"> <tr class="<%= cycle("", "b_grey") %>">
@ -72,6 +73,7 @@
</tbody> </tbody>
</table> </table>
<div class="cl"></div> <div class="cl"></div>
<% end%>
<div class="mt5"> <div class="mt5">
<span class="tit_fb" style="width: auto;"> 开发语言:</span> <span class="tit_fb" style="width: auto;"> 开发语言:</span>

View File

@ -1,17 +1,27 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<%= error_messages_for 'homework_common' %>
<div class="project_r_h"> <div class="project_r_h">
<h2 class="project_h2"> <h2 class="project_h2">
<%= l(:label_course_homework_new)%> <%= l(:label_course_homework_new)%>
</h2> </h2>
</div> </div>
<div class="hwork_new"> <div class="hwork_new" id="hwork_new">
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %> <%= form_for("new_homework_common",:url => next_step_homework_common_index_path) do |f|%>
<%= hidden_field_tag "course",@course.id%> <input type="hidden" name="course" value="<%= @course.id%>">
<%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %> <h3 class="c_blue f16 mb10">
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a> 请选择将要发布的作业类型
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%> </h3>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%> <input type="radio" class="mb10 fl" name="homework_common_type" value="1" id="homework_detail_manual_radio" checked/>
<span class="ml5 fl">
人工评分的作业(支持匿名互评、灵活设置评分比例)
</span>
<div class="cl"></div>
<input type="radio" class="mb20 fl" name="homework_common_type" value="2" id="homework_detail_programing_radio"/>
<span class="ml5 fl">
自动评测的编程作业支持C/C++程序的自动评分)
</span>
<div class="cl"></div>
<a href="javascript:void(0);" class=" orange_btn" onclick="$(this).parent().submit();">
下一步
</a>
<% end%> <% end%>
</div><!--hwork_new end--> </div><!--hwork_new end-->
<div class="cl"></div> <div class="cl"></div>

View File

@ -11,7 +11,7 @@
<%= hidden_field_tag "course",@course.id%> <%= hidden_field_tag "course",@course.id%>
<%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %> <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a> <a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
<%= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%> <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%> <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<% end%> <% end%>
</div><!--hwork_new end--> </div><!--hwork_new end-->
@ -22,7 +22,7 @@
<%= hidden_field_tag "homework_common[homework_type]","2"%> <%= hidden_field_tag "homework_common[homework_type]","2"%>
<%= render :partial => 'homework_common/homework_detail_programing_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %> <%= render :partial => 'homework_common/homework_detail_programing_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a> <a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
<%= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%> <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%> <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<% end%> <% end%>
</div><!--hwork_new end--> </div><!--hwork_new end-->

View File

@ -0,0 +1,2 @@
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
$("#test_result_<%= @index%>").val("<%= @result%>");

View File

@ -1,8 +1,11 @@
<% if(User.current.logged? && User.current!=target)%> <% if User.current.logged?%>
<% if User.current == target%>
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class="fr gz_btn mr10 ">编辑资料</a>
<%else%>
<%if(target.watched_by?(User.current))%> <%if(target.watched_by?(User.current))%>
<a id="user_watch_id" href="<%= watch_path(:object_type=> <a id="user_watch_id" href="<%= watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<% else %> <% else %>
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">关注</a> <a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<% end %> <% end %>
<% end%>
<% end %> <% end %>

View File

@ -1,5 +1,5 @@
<% watcher_count,watcher_list = get_watcher_users(user) %> <% watcher_count,watcher_list = get_watcher_users(user) %>
<div id="watcher_nav_list" class="leftbox mt10" style="display:<%= watcher_count==0 ? 'none' : 'block' %>"> <div id="watcher_nav_list" class="leftbox" style="display:<%= watcher_count==0 ? 'none' : 'block' %>">
<h4 class="fl">关注</h4><a href="<%=url_for(:controller => 'users', :action => 'user_watchlist', :id=>user.id)%>" data-count="<%= watcher_count %>" style="display:<%= watcher_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a> <h4 class="fl">关注</h4><a href="<%=url_for(:controller => 'users', :action => 'user_watchlist', :id=>user.id)%>" data-count="<%= watcher_count %>" style="display:<%= watcher_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
<div class="cl"></div> <div class="cl"></div>
<div class="mt5"> <div class="mt5">

View File

@ -100,7 +100,7 @@
<span>|&nbsp;</span> <span>|&nbsp;</span>
<%= l(:project_module_attachments) %> <%= l(:project_module_attachments) %>
<% attaments_num %> <% attaments_num %>
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %></span> <%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue', :id=>'project_files_count_info' %></span>
<% end %> <% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -17,6 +17,7 @@
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','users', :media => 'all' %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','users', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %> <%= javascript_heads %>
<%= javascript_include_tag "avatars"%>
<%= heads_for_theme %> <%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %> <%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%> <%= yield :header_tags -%>
@ -69,7 +70,7 @@
<% end %> <% end %>
</div><!--uers_info end--> </div><!--uers_info end-->
<div class="leftbox mt10"> <div class="leftbox">
<ul class="leftbox_ul_left"> <ul class="leftbox_ul_left">
<li>最近登录&nbsp;:</li> <!--加入时间修改为最近登录 --> <li>最近登录&nbsp;:</li> <!--加入时间修改为最近登录 -->
<% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %> <% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %>
@ -126,40 +127,62 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% if @center_flag %>
<div class="subNavBox "> <div class="subNavBox ">
<div class="subNav "><a href="<%=url_for(:controller => 'users', :action => 'show',:id=>@user.id)%>" class=" f14 c_blue02">动态</a></div> <div class="subNav ">
<div class="subNav subNav_jiantou"> <a href="<%=url_for(:controller => 'users', :action => 'show',:id=>@user.id)%>" class=" f14 c_blue02">
动态
</a>
</div>
<% if @center_flag %>
<div class="subNav">
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02"> <a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
我的课程 我的课程
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span> <span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
</a> </a>
</div> </div>
<div class="subNav subNav_jiantou"> <div class="subNav">
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02"> <a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
我的项目 我的项目
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span> <span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
</a> </a>
</div> </div>
<div class="subNav "><a href="<%= url_for(:controller => 'my', :action => 'account') %>" class=" f14 c_blue02">编辑资料</a></div>
</div><!--侧导航 end--> <% else%>
<div class="subNav">
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
TA的课程
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.visible.count%>)</span>
</a>
</div>
<div class="subNav">
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
TA的项目
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.visible.count%>)</span>
</a>
</div>
<% end %> <% end %>
<div class="subNav ">
<%= link_to "留言",feedback_path(@user),:class => "f14 c_blue02"%>
</div>
</div><!--侧导航 end-->
<div class="cl"></div> <div class="cl"></div>
<div class="leftbox mt10"> <div class="leftbox">
<ul class="leftbox_ul_left"> <ul class="leftbox_ul_left">
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %> <% if @user.user_extensions && @user.user_extensions.identity == 0 %>
<% if(get_create_course_count(@user)) == 0 %> <% if(get_create_course_count(@user)) != 0 %>
<li>创建课程&nbsp;:</li> <li>创建课程&nbsp;:</li>
<% end %> <% end %>
<% if(get_homework_commons_count(@user)) == 0 %> <% if(get_homework_commons_count(@user)) != 0 %>
<li>发布作业&nbsp;:</li> <li>发布作业&nbsp;:</li>
<% end %> <% end %>
<% end %> <% end %>
<% if (get_join_course_count(@user) != 0) %> <% if (get_join_course_count(@user) != 0) %>
<li>加入课程&nbsp;:</li> <li>加入课程&nbsp;:</li>
<% end %> <% end %>
<% if @user.user_extensions.identity == 0 %> <% if @user.user_extensions.identity == 1 %>
<li>参加匿评&nbsp;:</li> <li>参加匿评&nbsp;:</li>
<% end %> <% end %>
<% if (get_projectandcourse_attachment_count(@user) != 0) %> <% if (get_projectandcourse_attachment_count(@user) != 0) %>
@ -179,18 +202,18 @@
<% end %> <% end %>
</ul> </ul>
<ul class="leftbox_ul_right c_dgrey"> <ul class="leftbox_ul_right c_dgrey">
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %> <% if @user.user_extensions && @user.user_extensions.identity == 0 %>
<% if(get_create_course_count(@user)) == 0 %> <% if(get_create_course_count(@user)) != 0 %>
<li><%= get_create_course_count(@user) %></li> <li><%= get_create_course_count(@user) %></li>
<% end %> <% end %>
<% if(get_homework_commons_count(@user)) == 0 %> <% if(get_homework_commons_count(@user)) != 0 %>
<li><%= get_homework_commons_count(@user) %></li> <li><%= get_homework_commons_count(@user) %></li>
<% end %> <% end %>
<% end %> <% end %>
<% if (get_join_course_count(@user) != 0) %> <% if (get_join_course_count(@user) != 0) %>
<li><%= get_join_course_count(@user) %></li> <li><%= get_join_course_count(@user) %></li>
<% end %> <% end %>
<% if @user.user_extensions.identity == 0 %> <% if @user.user_extensions.identity == 1 %>
<li><%= get_anonymous_evaluation_count(@user) %></li> <li><%= get_anonymous_evaluation_count(@user) %></li>
<% end %> <% end %>
<% if (get_projectandcourse_attachment_count(@user) != 0) %> <% if (get_projectandcourse_attachment_count(@user) != 0) %>
@ -214,11 +237,22 @@
<div class="cl"></div> <div class="cl"></div>
<!-- tag模块 -->
<div class="project_Label">
<h4 class="mb5"><%= l(:label_tag)%>:</h4>
<div class="tag_h">
<div id="tags">
<%= render :partial => 'tags/project_tag', :locals => {:obj => @user,:object_flag => "1"}%>
</div>
</div>
<div class="cl"></div>
</div><!--项目标签 end-->
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %> <%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %> <%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
<% visitor_count,visitor_list = get_visitor_users(@user) %> <% visitor_count,visitor_list = get_visitor_users(@user) %>
<% if(User.current.admin?) %> <% if(User.current.admin?) %>
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>"> <div class="leftbox" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a> <h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
<div class="cl"></div> <div class="cl"></div>
<div class="mt5"> <div class="mt5">
@ -244,7 +278,9 @@
<%= render :partial => 'layouts/new_feedback' %> <%= render :partial => 'layouts/new_feedback' %>
<div id="ajax-modal" style="display:none;"></div> <div id="ajax-modal" style="display:none;"></div>
<%= javascript_include_tag '/javascripts/avatars.js' %> <div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="nh_tx_dialog_html" class="white_content" style="display:none;"> <div id="nh_tx_dialog_html" class="white_content" style="display:none;">
<div> <div>
<div><a href="javascript:hideModal();" class="box_close"></a></div> <div><a href="javascript:hideModal();" class="box_close"></a></div>
@ -291,5 +327,17 @@
</div><!--floatbox end--> </div><!--floatbox end-->
</div> </div>
<script type="text/javascript">
$(function(){
if($(".top_new").length==0){
$("#RSide").css("min-height",$("#LSide").height()-30);
}
else{
$("#RSide").css("min-height",$("#LSide").height()-87);
}
});
</script>
</body> </body>
</html> </html>

View File

@ -225,10 +225,10 @@
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span> <span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %> <% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
<%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), <%= link_to truncate(issues_journal.issue.subject.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% else %> <% else %>
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), <%= link_to truncate(issues_journal.notes.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %> <% end %>
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span> <span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>

View File

@ -1,5 +1,6 @@
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%> <%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
<!--新建单选start--> <!--新建单选start-->
<% insert_begin = insert_begin %>
<div class="ur_editor radio"> <div class="ur_editor radio">
<div class="ur_editor_title"> <div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label> <label>问题:&nbsp;&nbsp;</label>

View File

@ -2,27 +2,262 @@
<script type="text/javascript"> <script type="text/javascript">
//编辑问卷描述之后 //编辑问卷描述之后
var popWindow ; //弹出框的引用
var importPollPopWindow; //选择导入的弹出框引用
function edit_head(){ function edit_head(){
$("#polls_description").val($("#polls_description_div").html()); $("#polls_description").val($("#polls_description_div").html());
} }
$(function(){
//点击空白处
$(document).bind('click',function(e){
//弹出框非空 不是a标签 点击的不是弹出框 ,那么弹出框就会隐藏
if(popWindow && e.target.nodeName != 'A' && !popWindow.is(e.target) && popWindow.has(e.target).length === 0){ // Mark 1
popWindow.css('display', 'none');
}
if(importPollPopWindow && e.target.nodeName != 'A' && !importPollPopWindow.is(e.target) && importPollPopWindow.has(e.target).length === 0){
importPollPopWindow.css('display', 'none');
}
});
})
function add_MC(){ function dismiss(quest_type,quest_id){
popWindow = $("#div_"+quest_type+"_"+quest_id);
if(popWindow){
popWindow.css('display', 'none');
}
}
function chooseQuestionType(quest_type,quest_id){
//quest_type 分为 mc mcq single multi
//quest_id 是quetion的id 下同
if(popWindow){
popWindow.css('display', 'none');
}
popWindow = $("#div_"+quest_type+"_"+quest_id);
$("#div_"+quest_type+"_"+quest_id).click(function(e){
e.stopPropagation(); //组织冒泡到document.body中去
});
$("#div_"+quest_type+"_"+quest_id).css("position", "absolute");
$("#div_"+quest_type+"_"+quest_id).css("top", $("#add_"+quest_type+"_"+quest_id).offset().top+30);
$("#div_"+quest_type+"_"+quest_id).css("left", $("#add_"+quest_type+"_"+quest_id).offset().left-10);
if( $("#div_"+quest_type+"_"+quest_id).css('display') == 'block') {
$("#div_"+quest_type+"_"+quest_id).css('display', 'none');
}
else{
$("#div_"+quest_type+"_"+quest_id).css('display', 'block');
}
}
function add_MC(){
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MC') %>"); $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MC') %>");
$("#poll_questions_title").focus(); $("#poll_questions_title").focus();
} }
function add_MCQ(){
function insert_MC(quest_type,quest_num,quest_id){
$("#insert_new_poll_question_"+quest_type+"_"+quest_id).html(
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
' <div class="ur_editor radio"> '+
'<div class="ur_editor_title"> '+
'<label>问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="1"/>'+
'<input maxlength="250" class="ur_question_title" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入单选题标题"/>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label>必答</label>'+
'</div>'+
'<div class="ur_editor_content">'+
'<ul>'+
'<li class="ur_item">'+
'<label>选项<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="新建选项"/>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'</li>'+
'<div class="cl"></div>'+
'<li class="ur_item">'+
'<label>选项<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="新建选项"/>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'</li>'+
'<div class="cl"></div>'+
'<li class="ur_item">'+
'<label>选项<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="新建选项"/>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'</li>'+
'<div class="cl"></div>'+
'</ul>'+
'</div>'+
'<div class="ur_editor_footer">'+
'<a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="add_poll_question($(this));">'+
'<%= l(:label_button_ok)%>'+
'</a>'+
'<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">'+
'<%= l(:button_cancel)%>'+
'</a>'+
'</div>'+
'<div class="cl"></div>'+
'</div>'+
'<% end%>'
);
$("#poll_questions_title").focus();
}
function add_MCQ(){
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MCQ') %>"); $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MCQ') %>");
$("#poll_questions_title").focus(); $("#poll_questions_title").focus();
}
function insert_MCQ(quest_type,quest_num,quest_id){
$("#insert_new_poll_question_"+quest_type+"_"+quest_id).html(
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
'<div class="ur_editor checkbox">'+
'<div class="ur_editor_title">'+
'<label>问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="2"/>'+
'<input maxlength="250" class="ur_question_title" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入多选题标题"/>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label>必答</label>'+
'</div>'+
'<div class="ur_editor_content">'+
'<ul>'+
'<li class="ur_item">'+
'<label>选项<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="新建选项"/>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<a class="icon_remove" title="删除"" onclick="remove_single_answer($(this))"></a>'+
'</li>'+
'<div class="cl"></div>'+
'<li class="ur_item">'+
'<label>选项<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="新建选项"/>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'</li>'+
'<div class="cl"></div>'+
'<li class="ur_item">'+
'<label>选项<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="新建选项"/>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'</li>'+
'<div class="cl"></div>'+
'</ul>'+
'</div>'+
'<div class="ur_editor_footer">'+
'<a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="add_poll_question($(this));">'+
'<%= l(:label_button_ok)%>'+
'</a>'+
'<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">'+
'<%= l(:button_cancel)%>'+
'</a>'+
'</div>'+
'<div class="cl"></div>'+
'</div>'+
'<% end%>'
);
$("#poll_questions_title").focus();
} }
function add_single(){ function add_single(){
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_single') %>"); $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_single') %>");
$("#poll_questions_title").focus(); $("#poll_questions_title").focus();
} }
function insert_SINGLE(quest_type,quest_num,quest_id){
$("#insert_new_poll_question_"+quest_type+"_"+quest_id).html(
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
'<div class="ur_editor text ">'+
'<div class="ur_editor_title">'+
'<label for="ur_question_title">问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="3"/>'+
'<input maxlength="250" id="poll_questions_title" class="ur_question_title" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入单行主观标题"/>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label for="ur_question_require">必答</label>'+
'</div>'+
'<div class="ur_editor_footer">'+
'<a class="btn_submit c_white" data-button="ok" onclick="add_poll_question($(this));">'+
'<%= l(:label_button_ok)%>'+
'</a>'+
'<a class="btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">'+
'<%= l(:button_cancel)%>'+
'</a>'+
'</div>'+
'<div class="cl"></div>'+
'</div>'+
'<% end%>'
);
$("#poll_questions_title").focus();
}
function add_mulit(){ function add_mulit(){
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_mulit') %>"); $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_mulit') %>");
$("#poll_questions_title").focus(); $("#poll_questions_title").focus();
} }
function insert_MULIT(quest_type,quest_num,quest_id){
$("#insert_new_poll_question_"+quest_type+"_"+quest_id).html(
'<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>'+
'<div class="ur_editor textarea">'+
'<div class="ur_editor_title">'+
'<label for="ur_question_title">问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="4"/>'+
'<input maxlength="250" id="poll_questions_title" class="ur_question_title" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入多行主观标题"/>'+
'<input type="checkbox" name="is_necessary" value="true" checked/>'+
'<label>必答</label>'+
'</div>'+
'<div class="ur_editor_toolbar">'+
'</div>'+
'<div class="ur_editor_footer">'+
'<a class="btn_submit c_white" data-button="ok" onclick="add_poll_question($(this));">'+
'<%= l(:label_button_ok)%>'+
'</a>'+
'<a class="btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">'+
'<%= l(:button_cancel)%>'+
'</a>'+
'</div>'+
'<div class="cl"></div>'+
'</div>'+
'<% end%>'
);
$("#poll_questions_title").focus();
}
//选择导入调查问卷
function importPoll(){
importPollPopWindow = $("#import_poll");
$("#import_poll").css("position", "absolute");
$("#import_poll").css("top", $("#import_btn").offset().top+30);
$("#import_poll").css("left", $("#import_btn").offset().left-65);
$("#import_poll").css("display","block")
}
function remote_import(){
importPollPopWindow.css('display', 'none');
if($("#import_poll").val() === 0){
return;
}else{
if(confirm("确认导入问卷"+$("#import_poll").find("option:selected").text()+"?")){
$("#import_form").submit();
}else{
return;
}
}
}
//添加标题时确定按钮 //添加标题时确定按钮
function add_poll_question(doc) function add_poll_question(doc)
{ {
@ -147,5 +382,16 @@ function edit_head(){
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<!-- 新增问题 -->
<div id="import_poll" style="display: none">
<%= form_tag({:controller => 'poll', :action => 'import_poll', :to_id => @poll.id},:remote=>'true', :method => :get,:id=>"import_form") do %>
<%= select( :poll, :id, Poll.where("polls_group_id = #{@poll.polls_group_id} and polls_type='course' and id != #{@poll.id}").map{|c| [c.polls_name, c.id]}.unshift(["选择要导入的问卷",0]),
{ :include_blank => false,:selected=> 0,:class=>"w90"
},
{:onchange=>"remote_import();",:id=>"import_id",:name=>"import_id"}
)
%>
<% end%>
</select>
</div>
</div><!--编辑end--> </div><!--编辑end-->

View File

@ -1,3 +1,6 @@
<script>
</script>
<div class="ur_question_item radio ur_editor02"> <div class="ur_question_item radio ur_editor02">
<div class="ur_title"> <div class="ur_title">
<span class="title_index"> <span class="title_index">
@ -9,9 +12,11 @@
<span class="ur_required" title="必答">*</span> <span class="ur_required" title="必答">*</span>
<%end%> <%end%>
</div> </div>
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<a class='ur_icon_add' title='向下插入' id="add_mc_<%=poll_question.id%>" onclick="chooseQuestionType('mc',<%=poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">
<table class="ur_table" > <table class="ur_table" >
@ -30,3 +35,14 @@
</table> </table>
</div> </div>
</div><!--单选题显示 end--> </div><!--单选题显示 end-->
<!-- 新增问题 -->
<div id="insert_new_poll_question_mc_<%=poll_question.id%>">
</div>
<div id="div_mc_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
<ul>
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MC('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MCQ('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_SINGLE('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MULIT('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
</ul>
</div>

View File

@ -12,6 +12,7 @@
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<a class='ur_icon_add' title='向下插入' id="add_mcq_<%=poll_question.id%>" onclick="chooseQuestionType('mcq',<%=poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">
<table class="ur_table"> <table class="ur_table">
@ -30,3 +31,14 @@
</table> </table>
</div> </div>
</div><!--多选题显示 end--> </div><!--多选题显示 end-->
<!-- 新增问题 -->
<div id="insert_new_poll_question_mcq_<%=poll_question.id%>">
</div>
<div id="div_mcq_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
<ul>
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_MC('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_MCQ('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_SINGLE('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_MULIT('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
</ul>
</div>

View File

@ -1,5 +1,8 @@
<div class="ur_page_head ur_editor02" ><!--头部显示 start--> <div class="ur_page_head ur_editor02" ><!--头部显示 start-->
<a href="javascript:" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a> <a href="javascript:" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a>
<!-- <a class='ur_icon_add' title='导入' id="import_btn" onclick="importPoll();"></a> -->
<h1 class="ur_page_title" id="polls_name_h"><%= poll.polls_name%></h1> <h1 class="ur_page_title" id="polls_name_h"><%= poll.polls_name%></h1>
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%> <%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
<div class="cl"></div> <div class="cl"></div>

View File

@ -13,9 +13,21 @@
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<a class='ur_icon_add' title='向下插入' id="add_mulit_<%=poll_question.id%>" onclick="chooseQuestionType('mulit',<%=poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">
<textarea class="ur_textbox" rows="5" cols="60"></textarea> <textarea class="ur_textbox" rows="5" cols="60"></textarea>
</div> </div>
</div> </div>
</div><!--多行展示 end--> </div><!--多行展示 end-->
<!-- 新增问题 -->
<div id="insert_new_poll_question_mulit_<%=poll_question.id%>">
</div>
<div id="div_mulit_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
<ul>
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_MC('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_MCQ('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_SINGLE('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_MULIT('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
</ul>
</div>

View File

@ -12,8 +12,20 @@
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<a class='ur_icon_add' title='向下插入' id="add_single_<%=poll_question.id%>" onclick="chooseQuestionType('single',<%=poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">
<input class="ur_text ur_textbox" type="text" size="" maxlength=""value=""> <input class="ur_text ur_textbox" type="text" size="" maxlength=""value="">
</div> </div>
</div><!--单行文字展示 end--> </div><!--单行文字展示 end-->
<!-- 新增问题 -->
<div id="insert_new_poll_question_single_<%=poll_question.id%>">
</div>
<div id="div_single_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
<ul>
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_MC('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_MCQ('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_SINGLE('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_MULIT('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
</ul>
</div>

View File

@ -1,4 +1,8 @@
<% if @is_insert %>
$("#poll_content").html('<%= escape_javascript(render :partial => 'poll_content', :locals => {:poll => @poll})%>');
<% else %>
$("#new_poll_question").html(""); $("#new_poll_question").html("");
$("#poll_content").append("<div id='poll_questions_<%= @poll_questions.id%>'>" + $("#poll_content").append("<div id='poll_questions_<%= @poll_questions.id%>'>" +
"<div id='show_poll_questions_<%= @poll_questions.id %>'>" + "<div id='show_poll_questions_<%= @poll_questions.id %>'>" +
"<% if @poll_questions.question_type == 1%>" + "<% if @poll_questions.question_type == 1%>" +
@ -23,4 +27,4 @@ $("#poll_content").append("<div id='poll_questions_<%= @poll_questions.id%>'>" +
"<% end%>" + "<% end%>" +
"</div>" + "</div>" +
"</div>"); "</div>");
<% end %>

View File

@ -0,0 +1,4 @@
/**
* Created by lizanle on 2015/7/29.
*/
$("#poll_content").html('<%= escape_javascript(render :partial => 'poll_content', :locals => {:poll => @poll})%>');

View File

@ -31,7 +31,7 @@
<div class="subNav"> <div class="subNav">
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %> <%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
<% unless attaments_num == 0 %> <% unless attaments_num == 0 %>
<a class="subnav_num">(<%= attaments_num %>)</a> <%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %> <% end %>
<% if User.current.member_of?(@project) %> <% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> <%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>

View File

@ -19,7 +19,7 @@
<div class="subNav"> <div class="subNav">
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %> <%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
<% unless attaments_num == 0 %> <% unless attaments_num == 0 %>
<a class="subnav_num">(<%= attaments_num %>)</a> <%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %> <% end %>
<% if User.current.member_of?(@project) %> <% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> <%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>

View File

@ -22,14 +22,14 @@
<hr/> <hr/>
</div> </div>
<% else %> <% else %>
<%= form_for('new_form', :method => :post, :html => {:id => 'project_feedback_form', :multipart => true},
<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%> :url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
<%= f.text_area 'project_message', :rows => 3, :cols => 65, <%= f.text_area 'project_message', :rows => 3, :cols => 65,
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %> :placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
<p nhname="contentmsg"></p> <p nhname="contentmsg"></p>
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div> <div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %> <%#= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
<%= link_to l(:button_leave_meassge), "javascript:void(0)", :onclick => 'submitProjectFeedback();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fr mt10 mb10' %>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -30,7 +30,7 @@
<div class="subNav"> <div class="subNav">
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %> <%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
<% unless attaments_num == 0 %> <% unless attaments_num == 0 %>
<a class="subnav_num">(<%= attaments_num %>)</a> <%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %> <% end %>
<% if User.current.member_of?(@project) %> <% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> <%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>

View File

@ -36,74 +36,6 @@
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%> <%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
</li> </li>
<li>
<% if User.current.admin? %>
<%= link_to l(:label_project_dts_yun) ,yun_dep_project_path(@project), data: { confirm:'你确定要对本项目进行云化部署吗?' } %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS评估工具</a>
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据采集工具</a>
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据评估统计分析工具</a>
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<%= link_to "代码缺陷测试工具(DTS)" ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.seforge.org/sase/" target="_Blank">软工服务平台(SASSP)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://tsr.sei.pku.edu.cn/home.action" target="_Blank">软件知识库(KnowledgeBase)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">可信评估工具(Evaluator)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">在线验证工具(BACH-Online)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">软件测试工具(SSCC-Web)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.service4all.org.cn/servicexchange/" target="_Blank">服务资源共享平台(ServiceXchange)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.service4all.org.cn/repository/ServiceCloud/MyServiceContainer.jsp" target="_Blank">在线服务开发平台(ServiceFoundry)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.service4all.org.cn" target="_Blank">组合开发和运行演化平台(Service4All)</a>
<% end %>
</li>

View File

@ -1,77 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_dts_new) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
td.redBox {border:1px solid #b0b0b0; width:80px; background-color:#EAEAEA; }
td.redBox2 {border:1px solid #b0b0b0; width:120px; }
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">代码上传分析中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">1%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",70);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="fr f14 " style="padding-right: 32px;padding-bottom: 10px;">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
<% @dts.each do |dt| %>
<div style="padding-left: 35px;padding-top: 10px;">
<table width="600" border="0" style="padding-left: 30px;padding-top: 100px; border-spacing:0; border-collapse:collapse; border: 1px solid #b0b0b0;">
<tr>
<td align="center" class="redBox">错误变量</td>
<td class="redBox2"> &nbsp;<%= dt.Variable %></td>
<td align="center" class="redBox">起始行</td>
<td class="redBox2"> &nbsp;<%= dt.StartLine %></td>
<td align="center" class="redBox">IP行</td>
<td class="redBox2"> &nbsp;<%= dt.IPLine %></td>
</tr>
<tr>
<td align="center" class="redBox">缺陷代码</td>
<td colspan="5" class="redBox2"> &nbsp;<%= dt.IPLineCode %></td>
</tr>
<tr>
<td align="center" class="redBox">错误描述</td>
<td colspan="5" class="redBox2">&nbsp;<%= dt.Description %></td>
</tr>
<tr>
<td align="center" class="redBox">文件</td>
<td colspan="5" class="redBox2"> &nbsp;<%= dt.File %></td>
</tr>
</table>
</div>
<% end %>
</div>

View File

@ -1,3 +0,0 @@
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_project_dts) %></h2>
</div>

View File

@ -68,20 +68,20 @@
<label class="label02"><%=l(:field_status)%></label> <label class="label02"><%=l(:field_status)%></label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %> <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
</li> </li>
<li > <!--<li >-->
<label class="label02"><%=l(:label_wiki_page)%></label> <!--<label class="label02"><%#=l(:label_wiki_page)%></label>-->
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %> <!--<%#= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>-->
</li> <!--</li>-->
<li > <li >
<label class="label02"><%=l(:label_date)%></label> <label class="label02"><%=l(:label_date)%></label>
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %> <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
<%= calendar_for('version_effective_date') %> <%= calendar_for('version_effective_date') %>
</li> </li>
<div class="cl mb10"></div> <div class="cl mb10"></div>
<li > <!--<li >-->
<label class="label02"><%=l(:field_sharing)%></label> <!--<label class="label02"><%#=l(:field_sharing)%></label>-->
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %> <!--<%#= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>-->
</li> <!--</li>-->
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a> <a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
</ul> </ul>

View File

@ -1,46 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_soft_file) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">软件资源库部署中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">0%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
</div>

View File

@ -1,46 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_soft_knowledge) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">0%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
</div>

View File

@ -1,46 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_soft_service) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">0%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
</div>

View File

@ -1,47 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_dts_yun) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;padding-top: 10px;">云化部署中....</p>
<div>
<div id="in" style="width:0%"></div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",60);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width="";
document.getElementById("in").innerHTML="";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px; ">
<p class="pl10 f14 "><span style="color: #7f7f7f;font-size: 14px; ">所部署服务的网址:</span>
<span><a href="http://rubyblog.forge.trustie.net/accounts/login" target="_Blank" style="color: #15BCCF;font-size: 14px;">http://rubyblog.forge.trustie.net/accounts/login</a></span></p>
</div>

View File

@ -1,5 +1,28 @@
<%= form_tag({action: :upload},method: "post", multipart: true) do %> <script>
<%= text_field_tag 'school'%> function showPreview(source) {
<%= file_field_tag 'logo' %> var file = source.files[0];
<%= submit_tag('Upload') %> if(window.FileReader) {
var fr = new FileReader();
fr.onloadend = function(e) {
document.getElementById("avatar_image").src = e.target.result;
};
fr.readAsDataURL(file);
}
}
</script>
<%= form_tag(upload_school_path(@school.id),method: "post", multipart: true) do %>
<%#= text_field_tag 'school'%>
<div style="margin: 20px;">
<input type="hidden" value="<%= @school_name%>" name="school_name">
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar")%>
<a type="button" onclick="$('#file').click();" style="margin: 90px 0 0 10px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 55px;">上传图片</a>
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
<div style="clear: both;"></div>
<div style="margin-top: 10px;">
<%= submit_tag('上传') %>
<%= submit_tag('取消') %>
</div>
</div>
<% end %> <% end %>

View File

@ -24,6 +24,7 @@
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% if @is_teacher%>
<li ><span class="tit_fb ">测试结果:</span> <li ><span class="tit_fb ">测试结果:</span>
<table class="border_ce" cellpadding="0" cellspacing="0"> <table class="border_ce" cellpadding="0" cellspacing="0">
<tbody> <tbody>
@ -58,8 +59,6 @@
</table> </table>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% if @is_teacher%>
<!-- 编程作业老师才可以评分 --> <!-- 编程作业老师才可以评分 -->
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation"> <div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%> <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>

View File

@ -137,6 +137,7 @@
<div class="cl"></div> <div class="cl"></div>
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%> <% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
<% if @is_teacher%>
<table class="border_ce" cellpadding="0" cellspacing="0"> <table class="border_ce" cellpadding="0" cellspacing="0">
<tbody> <tbody>
<tr class="<%= cycle("", "b_grey") %>"> <tr class="<%= cycle("", "b_grey") %>">
@ -147,7 +148,7 @@
输出 输出
</td> </td>
</tr> </tr>
<% @homework.homework_tests.each do |test|%> <% homework.homework_tests.each do |test|%>
<tr class="<%= cycle("", "b_grey") %>"> <tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit"> <td class="td_tit">
<%=test.input%> <%=test.input%>
@ -160,6 +161,7 @@
</tbody> </tbody>
</table> </table>
<div class="cl"></div> <div class="cl"></div>
<% end%>
<div class="mt5"> <div class="mt5">
<span class="tit_fb" style="width: auto;"> 开发语言:</span> <span class="tit_fb" style="width: auto;"> 开发语言:</span>

View File

@ -1,15 +1,6 @@
<div id="tags_show"> <div id="tags">
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> <div id="tags_show">
<%= render :partial => "tags/tag_project_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div>
</div> </div>
<% if User.current.logged?%>
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();"><%= l(:label_add_tag)%></a>
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
<%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
<%= f.text_field :name ,:id => "tags_name",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<input type="button" class="submit f_l" onclick="$('#tags_name').parent().submit();" />
<% end %>
</span>
<% end%>

View File

@ -42,7 +42,7 @@
</span> </span>
<% else %> <% else %>
<div id="tag"> <div id="tag">
<span class="tag_show"> <span class="re_tag f_l">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 --> <!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %> <% case object_flag %>

View File

@ -0,0 +1,30 @@
<% @tags = obj.reload.tag_list %>
<% if non_list_all && @tags.size > 0 %>
<% else %>
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
<span class="re_tag f_l " id="tag">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
<span class="del">
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
</span>
</span>
<% end %>
<% end %>
<% end %>
<% if User.current.logged?%>
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag02').slideToggle();"><%= l(:label_add_tag)%></a>
<span id="add_tag02" style="display:none; vertical-align: middle;" class="ml10 f_l">
<%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
<%= f.text_field :name ,:id => "tags_name2",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<input type="button" class="submit f_l" onclick="$('#tags_name2').parent().submit();" />
<% end %>
</span>
<% end%>

View File

@ -2,6 +2,9 @@
<% if @object_flag == '3'%> <% if @object_flag == '3'%>
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
<% elsif @object_flag == '2'%>
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
<% elsif @object_flag == '6'%> <% elsif @object_flag == '6'%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',

View File

@ -4,6 +4,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
//$('#put-tag-form-issue').hide(); //$('#put-tag-form-issue').hide();
$('#name-issue').val(""); $('#name-issue').val("");
<% elsif @obj_flag == '2'%>
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$('#tags_name2').val("");
<% elsif @obj_flag == '6'%> <% elsif @obj_flag == '6'%>
<%if @course%> <%if @course%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();

View File

@ -30,7 +30,10 @@
<td>学生人数:</td> <td>学生人数:</td>
<td><a href="<%= url_for(:controller => 'courses', :action=>"member", :id=>item.id,:role=>2, :host=>Setting.host_course) %>"><%= studentCount(item) %></a></td> <td><a href="<%= url_for(:controller => 'courses', :action=>"member", :id=>item.id,:role=>2, :host=>Setting.host_course) %>"><%= studentCount(item) %></a></td>
<td>开课学期:</td> <td>开课学期:</td>
<td><%= item.time %><%= get_course_term_locales item %></td> <td>
<%= item.time %>
<%= get_course_term_locales item %>
</td>
</tr> </tr>
</tbody></table> </tbody></table>
</div> </div>
@ -39,8 +42,10 @@
<span class="grey_n_btn fr mt20">课程结束</span> <span class="grey_n_btn fr mt20">课程结束</span>
<% elsif(can_edit_flag) %> <% elsif(can_edit_flag) %>
<a href="<%=url_for(:controller => 'homework_common', :action => 'new',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">发布作业</a> <a href="<%=url_for(:controller => 'homework_common', :action => 'new',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">发布作业</a>
<% else %> <% elsif User.current.member_of_course? item %>
<a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">提交作品</a> <a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">提交作品</a>
<% elsif User.current.logged?%>
<%= link_to "加入课程",try_join_path(:object_id => item.id), :class => "blue_n_btn fr mt20", :remote => "true",:id => "try_join_course_link"%>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

View File

@ -0,0 +1,40 @@
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
<% if parent_jour%>
<div class="mes_box02" id = '<%= reply.id %>'>
<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
<div class=" mes_box02_info fl">
<%= link_to "#{reply.user.nickname}&nbsp;".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
<span class="fl c_grey">&nbsp;回复&nbsp;</span>
<%= link_to "#{parent_jour.user.nickname}&nbsp;:&nbsp;".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
<div class="cl">
<%= reply.notes.html_safe %>
</div>
</div>
<span class="c_grey fr">
<%= time_tag(reply.created_on).html_safe%>
</span>
<div class="fr cr">
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
<% if User.current.admin? || reply.user == User.current%>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
<% end %>
</div>
<div class="cl"></div>
<div nhname='sub_div_form' class="mt10 ml40" style="display:none;">
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
<input id="reference_id" name="reference_id" type="hidden" value="<%= (reply.m_parent_id.nil? || reply.m_parent_id==0 ) ? reply.id : reply.m_parent_id %>">
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= reply.user.id %>">
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= reply.id %>">
<input id="show_name" name="show_name" type="hidden" value="true">
<textarea name='user_notes' style="display:none;"></textarea>
<p nhname='sub_contentmsg'></p>
<div nhname='sub_toolbar_container' style="float:left;padding-top:3px;"></div>
<a nhname="sub_cancel_btn" href="javascript:void(0);" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
<a nhname="sub_submit_btn" href="javascript:void(0);" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
</form>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div><!--mes_box02 end-->
<% end%>

View File

@ -0,0 +1,44 @@
<div class="message_list break_word" id="<%= jour.id %>" nhname="rec" data-id="<%= jour.id %>">
<%= link_to image_tag(url_to_avatar(jour.user),:width => '46',:height => '46'), user_path(jour.user),:class => "users_pic fl" %>
<div class="fl ml5 mes_box mb10" >
<div>
<%= link_to "#{jour.user.nickname}&nbsp;:&nbsp;".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
</div>
<div class="cl"></div>
<div>
<%= jour.notes.html_safe %>
</div>
</div><!--mes_box end-->
<span class="c_grey fr mb10">
<%= time_tag(jour.created_on).html_safe %>
</span>
<div class="fr cr">
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
<% if User.current.admin? || jour.user == User.current%>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => jour, :user_id => jour.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "ml5 c_purple", :title => l(:button_delete)) %>
<% end %>
</div>
<div class="cl"></div>
<div nhname='div_form' class="mt10 ml80" style="display:none;">
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
<input id="reference_id" name="reference_id" type="hidden" value="<%= (jour.m_parent_id.nil? || jour.m_parent_id==0 ) ? jour.id : jour.m_parent_id %>">
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= jour.user.id %>">
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= jour.id %>">
<input id="show_name" name="show_name" type="hidden" value="true">
<textarea name='user_notes' style="display:none;"></textarea>
<p nhname='contentmsg'></p>
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
<a nhname="cancel_btn" href="javascript:;" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
<a nhname="submit_btn" href="javascript:;" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
</form>
<div class="cl"></div>
</div>
<div class="cl"></div>
<div nhname="reply_list">
<% fetch_user_leaveWord_reply(jour).each do |reply|%>
<%= render :partial => 'user_jour_reply', :locals => {:reply => reply} %>
<% end %>
</div>
</div><!--message_list end-->

View File

@ -1,15 +1,5 @@
<style type="text/css"> <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
</style>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<% @center_flag = (User.current == @user) %> <% @center_flag = (User.current == @user) %>
<% if @center_flag %>
<div class="top_new"> <div class="top_new">
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span> <span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
<% if @user.allowed_to?(:add_project, nil, :global => true) %> <% if @user.allowed_to?(:add_project, nil, :global => true) %>
@ -26,52 +16,8 @@
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %>
<div id="RSide" class="fl"> <div id="RSide" class="fl">
<div class="message_box mb10">
<div nhname='new_message' style="display:none;">
<form action="<%= url_for(:controller => 'words', :action => 'create', :user_id => @user.id) %>" data-remote="true" method="post">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
<p nhname='contentmsg'></p>
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">留言</a>
</form>
</div>
<div class="cl"></div>
<div class="message_list_box" nhname="list_more_div" id="nh_messages" style="display:none;">
<div nhname="container" data-nodatamsg="暂无留言" data-pagesize="3" data-url="<%= url_for(:controller => 'users', :action => 'user_feedback4show') %>" data-isclose="0" data-currpage="0" data-hasmore="1"></div>
<div class="message_list_more" style="width:700px">
<a nhname="expand" href="javascript:void(0)" class="c_blue02">点击展开更多</a> <a nhname="close" style="display:none" href="javascript:void(0)" class="c_lgrey fr mr10">收起</a>
<div class="cl"></div>
</div>
</div>
</div>
<% if !@center_flag %>
<div class="users_courses_box line_box mb10" nhname="list_more_div" style="display:none;">
<div class="users_top">
<a href="<%=url_for(:controller => 'users', :action => 'user_courses')%>" class="f14 fb fl c_dark ml10 mt8"><%= @center_flag ? '我的课程' : 'TA的课程' %></a>
<% if @center_flag %>
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
<a href="<%= url_for(:controller => 'courses', :action => 'new',:host=>Setting.host_course) %>" class=" green_u_btn fr mt8 mr8" target="_blank">新建课程</a>
<% else %>
<a href="<%= join_private_courses_courses_path %>" data-remote ="true" class=" green_u_btn fr mt8 mr8">加入课程</a>
<% end %>
<% end %>
</div>
<div class="cl"></div>
<div nhname="container" data-nodatamsg="暂无课程" data-url="<%= url_for(:controller => 'users', :action => 'user_courses4show') %>" data-isclose="0" data-currpage="0" data-hasmore="1"></div>
<div class="cl"></div>
<div class="message_list_more mt10">
<a nhname="expand" href="javascript:void(0)" class="c_blue02">点击展开更多</a> <a nhname="close" style="display:none" href="javascript:void(0)" class="c_lgrey fr">收起</a>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
<% end %>
<div class="users_courses_box line_box mb10" nhname="list_more_div" style="display:none;"> <div class="users_courses_box line_box mb10" nhname="list_more_div" style="display:none;">
<h4 class="users_h4">课程动态</h4> <h4 class="users_h4">课程动态</h4>
@ -82,29 +28,6 @@
</div> </div>
</div> </div>
<% if !@center_flag %>
<div class="users_courses_box line_box mb10" nhname="list_more_div" style="display:none;">
<div class=" users_top">
<a href="<%=url_for(:controller => 'users', :action => 'user_projects')%>" class="f14 fb fl c_dark ml10 mt8"><%= @center_flag ? '我的项目' : 'TA的项目' %></a>
<% if @center_flag %>
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
<a href="<%= url_for(:controller => 'projects', :action => 'new',:host=>Setting.host_name) %>" class=" green_u_btn fr mt8 mr8" target="_blank">新建项目</a>
<% else %>
<a href="<%= join_project_projects_path %>" data-remote ="true" class=" green_u_btn fr mt8 mr8">加入项目</a>
<% end %>
<% end %>
</div>
<div class="cl"></div>
<div nhname="container" data-nodatamsg="暂无项目" data-url="<%= url_for(:controller => 'users', :action => 'user_projects4show') %>" data-isclose="0" data-currpage="0" data-hasmore="1"></div>
<div class="cl"></div>
<div class="message_list_more mt10">
<a nhname="expand" href="javascript:void(0)" class="c_blue02">点击展开更多</a> <a nhname="close" style="display:none" href="javascript:void(0)" class="c_lgrey fr">收起</a>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
<% end %>
<div class="users_courses_box line_box mb10" nhname="list_more_div" style="display:none;"> <div class="users_courses_box line_box mb10" nhname="list_more_div" style="display:none;">
<h4 class="users_h4">项目动态</h4> <h4 class="users_h4">项目动态</h4>
<div nhname="container" data-nodatamsg="暂无动态" data-url="<%= url_for(:controller => 'users', :action => 'user_project_activities') %>" data-isclose="0" data-currpage="0" data-hasmore="1"></div> <div nhname="container" data-nodatamsg="暂无动态" data-url="<%= url_for(:controller => 'users', :action => 'user_project_activities') %>" data-isclose="0" data-currpage="0" data-hasmore="1"></div>
@ -115,233 +38,3 @@
</div> </div>
</div> </div>
<script type="text/javascript">
$(function(){
function init_editor(params){
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent('div');
params.div_form = $("div[nhname='div_form']",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
toggleAndSettingWordsVal(params.div_form, params.textarea);
});
params.submit_btn.click(function(){
params.form.submit();
});
params.textarea.data('init',1);
}
params.cancel_btn.click();
setTimeout(function(){
if(!params.div_form.is(':hidden')){
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
}
},300);
});
$("div[nhname='new_message']").each(function(){
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form",params.div_form);
if(params.form==undefined || params.form.length==0){
return;
}
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("#new_message_cancel_btn");
params.submit_btn = $("#new_message_submit_btn");
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
});
params.submit_btn.click(function(){
params.form.submit();
});
params.textarea.data('init',1);
$(this).show();
}
});
});
});
</script>
<script type="text/javascript">
function init_list_more_div(params){
var p=params;
p.exbtn.click(function(){
var isclose = p.container.data('isclose');
var hasmore = p.container.data('hasmore');
if(isclose == '1'){
$("div[nhname='rec']",p.container).show();
p.container.data('isclose','0');
change_status_4_list_more_div(params);
return;
}
if(hasmore == '0'){
change_status_4_list_more_div(params,'get');
return;
}
var url = p.container.data('url');
if($("div[nhname='rec']",p.container).length > 0){
var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
url += "?lastid="+lastid;
var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
if(lasttime != undefined){
url += "&lasttime="+lasttime;
}
}
$.ajax( {url:url,dataType:'text',success:function(data){
var html = $("<div>"+data+"</div>");
var lens = $("div[nhname='rec']",html).length;
if(lens < p.size){
p.container.data('hasmore','0');
}
if(lens>0){
var currpage = parseInt(p.container.data('currpage'))+1;
p.container.data('currpage',currpage);
p.container.append(html.html())
}
change_status_4_list_more_div(params,'get');
p.div.show();
}} );
});
p.clbtn.click(function(){
var i=0;
$("div[nhname='rec']",p.container).each(function(){
i++;
if(i> p.size){
$(this).hide();
}
});
p.container.data('isclose','1');
change_status_4_list_more_div(params);
});
p.exbtn.click();
}
function change_status_4_list_more_div(params,opt){
var p=params;
if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
p.exbtn.click();
return;
}
var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
if( show_lens > p.size ){
p.clbtn.show();
}else{
p.clbtn.hide();
}
if($("div[nhname='rec']",p.container).length == 0){
p.exbtn.html(p.nodatamsg);
}else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
p.exbtn.html('点击展开更多');
}else{
p.exbtn.html('没有更多了');
}
}
function init_list_more_div_params(div){
var params = {};
params.div = div;
params.container = $("div[nhname='container']",div);
params.exbtn = $("a[nhname='expand']",div);
params.clbtn = $("a[nhname='close']",div);
params.size = params.container.data('pagesize');
params.nodatamsg = params.container.data('nodatamsg');
if( params.size == undefined ){
params.size = 8;
}
return params;
}
$(function(){
$("div[nhname='list_more_div']").each(function(){
var params = init_list_more_div_params($(this));
init_list_more_div(params)
});
});
</script>

View File

@ -2,8 +2,6 @@
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span> <span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %> <% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a> <a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
<% else %>
<a href="<%= join_private_courses_courses_path %>" data-remote ="true" class="green_n_btn fr mt2">加入课程</a>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -13,9 +11,9 @@
<div class="courses_top mb10"> <div class="courses_top mb10">
<h2 class="courses_h2 fl">所有课程</h2> <h2 class="courses_h2 fl">所有课程</h2>
<div class="courses_select fr"> <div class="courses_select fr">
<a href="<%= url_for(:controller => 'users', :action => 'user_courses')%>" class="select_btn <%= (@params['status']!='1' && @params['status']!='2') ? 'select_btn_select' : '' %> fl "> 全部</a> <a href="<%= url_for(:controller => 'users', :action => 'user_courses')%>" class="select_btn <%= (@params!='1' && @params!='2') ? 'select_btn_select' : '' %> fl "> 全部</a>
<a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'1')%>" class="select_btn <%= (@params['status']=='1') ? 'select_btn_select' : '' %> fl ">正在进行</a> <a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'1')%>" class="select_btn <%= (@params=='1') ? 'select_btn_select' : '' %> fl ">正在进行</a>
<a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'2')%>" class="select_btn <%= (@params['status']=='2') ? 'select_btn_select' : '' %> fl "> 已经结束</a> <a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'2')%>" class="select_btn <%= (@params=='2') ? 'select_btn_select' : '' %> fl "> 已经结束</a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

View File

@ -1,7 +1,40 @@
<% reply_allow = JournalsForMessage.create_by_user? User.current %> <div class="top_new">
<%= stylesheet_link_tag 'css', :media => 'all' %> <span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
<% end %>
<div class="cl"></div>
</div>
<%= render :partial => 'user_jours', <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
:locals => { :journals => @jour, :state => false} <div id="RSide" class="fl">
%> <!--<div class="users_r_top">-->
<% html_title(l(:label_responses)) -%> <!--<h2 class="users_r_h2">用户留言</h2>-->
<!--</div>-->
<div class="message_box mb10">
<div nhname='new_message' style="display:none;">
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
<p nhname='contentmsg'></p>
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">留言</a>
<% end%>
</div>
<div class="cl"></div>
<div class="message_list_box " id="user_jour_list">
<%if @jour%>
<% @jour.each do |jour|%>
<%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<%end%>
<% end%>
<ul class="wlist" style=" border:none;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div><!--message_box end-->
</div>

View File

@ -2,8 +2,6 @@
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span> <span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
<% if @user.allowed_to?(:add_project, nil, :global => true) %> <% if @user.allowed_to?(:add_project, nil, :global => true) %>
<a href="<%= url_for(:controller => 'projects', :action => 'new') %>" class="bgreen_n_btn fr ml10 mt2" target="_blank">新建项目</a> <a href="<%= url_for(:controller => 'projects', :action => 'new') %>" class="bgreen_n_btn fr ml10 mt2" target="_blank">新建项目</a>
<% else %>
<a href="<%= join_project_projects_path %>" data-remote ="true" class="green_n_btn fr mt2">加入项目</a>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -13,9 +11,16 @@
<div class="courses_top mb10"> <div class="courses_top mb10">
<h2 class="courses_h2 fl">全部项目</h2> <h2 class="courses_h2 fl">全部项目</h2>
<div class="courses_select fr"> <div class="courses_select fr">
<a href="<%= url_for(:controller => 'users', :action => 'user_projects')%>" class="select_btn <%= (@params['status']!='1' && @params['status']!='2') ? 'select_btn_select' : '' %> fl "> 全部</a> <a href="<%= url_for(:controller => 'users', :action => 'user_projects')%>" class="select_btn <%= (@params!='1' && @params!='2') ? 'select_btn_select' : '' %> fl ">
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'1')%>" class="select_btn <%= (@params['status']=='1') ? 'select_btn_select' : '' %> fl ">我创建</a> 全部
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'2')%>" class="select_btn <%= (@params['status']=='2') ? 'select_btn_select' : '' %> fl "> 我参与</a> </a>
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'1')%>" class="select_btn <%= (@params=='1') ? 'select_btn_select' : '' %> fl ">
<%= User.current == @user ? "我创建" : "TA创建"%>
</a>
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'2')%>" class="select_btn <%= (@params=='2') ? 'select_btn_select' : '' %> fl ">
<%= User.current == @user ? "我参与" : "TA参与"%>
</a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -43,7 +48,16 @@
</tbody></table> </tbody></table>
</div> </div>
</div> </div>
<% if User.current.member_of? item%>
<a href="<%= url_for(:controller => 'issues', :action=>"new", :project_id=>item.id, :host=>Setting.host_name) %>" target="_blank" class="blue_n_btn fr mt20">发布问题</a> <a href="<%= url_for(:controller => 'issues', :action=>"new", :project_id=>item.id, :host=>Setting.host_name) %>" target="_blank" class="blue_n_btn fr mt20">发布问题</a>
<% elsif User.current.logged?%>
<% if item.applied_projects.find_by_user_id(User.current.id)%>
<%= link_to '取消申请',appliedproject_applied_path(:project_id => item.id,:user_id => User.current.id),:class => "blue_n_btn fr mt20", :remote => "true",:method => "delete",:id => "applied_project_link_#{item.id}"%>
<% else%>
<%= link_to "加入项目",appliedproject_path(:user_id => User.current.id,:project_id => item.id,:project_join => true),:class => "blue_n_btn fr mt20", :remote => "true",:method => "post",:id => "applied_project_link_#{item.id}" %>
<% end%>
<% end%>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>

View File

@ -14,20 +14,20 @@
<label class="label02"><%=l(:field_status)%></label> <label class="label02"><%=l(:field_status)%></label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %> <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
</li> </li>
<li > <!--<li >-->
<label class="label02"><%=l(:label_wiki_page)%></label> <!--<label class="label02"><%#=l(:label_wiki_page)%></label>-->
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %> <!--<%#= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>-->
</li> <!--</li>-->
<li > <li >
<label class="label02"><%=l(:label_date)%></label> <label class="label02"><%=l(:label_date)%></label>
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%> <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
<%= calendar_for('version_effective_date') %> <%= calendar_for('version_effective_date') %>
</li> </li>
<div class="cl mb10"></div> <div class="cl mb10"></div>
<li > <!--<li >-->
<label class="label02"><%=l(:field_sharing)%></label> <!--<label class="label02"><%#=l(:field_sharing)%></label>-->
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %> <!--<%#= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>-->
</li> <!--</li>-->
</ul> </ul>
<% @version.custom_field_values.each do |value| %> <% @version.custom_field_values.each do |value| %>

View File

@ -13,5 +13,5 @@
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>) project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>)
</p> </p>
<% else %> <% else %>
<p><%= l(:label_roadmap_no_issues) %></p> <div class="flash error"><%= l(:label_roadmap_no_issues) %></div>
<% end %> <% end %>

View File

@ -4,7 +4,7 @@
</div> </div>
<div class="contextual" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"> <div class="contextual" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %> <%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, <%#= link_to_if_authorized(l(:button_edit_associated_wikipage,
:page_title => @version.wiki_page_title.truncate(30, omission: '...')), :page_title => @version.wiki_page_title.truncate(30, omission: '...')),
{:controller => 'wiki', {:controller => 'wiki',
:action => 'edit', :action => 'edit',
@ -17,7 +17,7 @@
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %> <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div> </div>
<h3 style="word-break: break-all;word-wrap: break-word;"> <h3 style="word-break: break-all;word-wrap: break-word;color: #64BDD9;">
<%= h(@version.name) %> <%= h(@version.name) %>
</h3> </h3>
@ -27,11 +27,11 @@
<div class="splitcontent"> <div class="splitcontent">
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %> <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend> <fieldset class="time_tracter f14"><legend><%= l(:label_time_tracking) %></legend>
<table> <table>
<tr> <tr>
<th> <th>
<p class="fl c_blue f14 fb"><%= l(:field_estimated_hours) %></p> <p class="fl c_grey f12"><%= l(:field_estimated_hours) %></p>
</th> </th>
<td class="total-hours"> <td class="total-hours">
<%= html_hours(l_hours(@version.estimated_hours)) %> <%= html_hours(l_hours(@version.estimated_hours)) %>
@ -40,7 +40,7 @@
<% if User.current.allowed_to?(:view_time_entries, @project) %> <% if User.current.allowed_to?(:view_time_entries, @project) %>
<tr> <tr>
<th> <th>
<p class="fr c_blue f14 fb"><%= l(:label_spent_time) %></p> <p class="fr c_grey f12"><%= l(:label_spent_time) %></p>
</th> </th>
<td class="total-hours"> <td class="total-hours">
<%= html_hours(l_hours(@version.spent_hours)) %> <%= html_hours(l_hours(@version.spent_hours)) %>

View File

@ -56,21 +56,11 @@
<% end %> <% end %>
</span> </span>
<span class="font_welcome_trustie"> <span class="font_welcome_trustie">
<!--
@course_page.title存储在first_page表中的title字段
原本代码
<%= @course_page.title %>
!-->
<%= l(:label_welcome_trustie_course) %> <%= l(:label_welcome_trustie_course) %>
</span> </span>
<% else %> <% else %>
<% unless @course_page.nil? %> <% unless @course_page.nil? %>
<span class="font_welcome_trustie"> <span class="font_welcome_trustie">
<!--
@course_page.title存储在first_page表中的title字段
原本代码
<%= @course_page.title %>
!-->
<%= l(:label_welcome_trustie_course) %> <%= l(:label_welcome_trustie_course) %>
</span> </span>
<span class="font_welcome_tdescription">, <span class="font_welcome_tdescription">,
@ -112,7 +102,6 @@
course_term = "春季学期" course_term = "春季学期"
end end
%> %>
<%# (month_now >= 3 && month_now < 9) ? course_term = "春季学期" : course_term = "秋季学期" %>
<% cur_school_course = @school_id.nil? ? [] : find_miracle_course(10,7,@school_id, year_now, course_term) %> <% cur_school_course = @school_id.nil? ? [] : find_miracle_course(10,7,@school_id, year_now, course_term) %>
<% if cur_school_course.count == 0 %> <% if cur_school_course.count == 0 %>

View File

@ -1,11 +1,10 @@
<% if @save_succ %> <% if @save_succ %>
<% if !@jfm.nil? && @jfm.jour_type == 'Principal' %> <% if !@jfm.nil? && @jfm.jour_type == 'Principal' %>
var html = $("<div>"+"<%= escape_javascript( render(:template => 'users/user_feedback4show',:locals => {:feed_list=>[@jfm]} )) %>"+"</div>"); $("#<%= @jfm.m_parent_id%>").children("div[nhname='reply_list']").prepend("<%= escape_javascript( render(:partial => 'users/user_jour_reply',:locals => {:reply=>@jfm} )) %>");
$("div[nhname='container']",$("#nh_messages")).prepend(html.html()); div_1 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='div_form']");
// $('#new_message_cancel_btn').click(); div_1.hide();
$("a[nhname='reply_btn']",$("#nh_jours_<%= @jfm.m_reply_id %>")).click(); div_2 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='sub_div_form']");
var params = init_list_more_div_params($("#nh_messages")); div_2.hide();
change_status_4_list_more_div(params);
<% else %> <% else %>
var pre_append = $('<%= j( var pre_append = $('<%= j(

View File

@ -2,9 +2,10 @@
alert('<%=l(:notice_failed_delete)%>'); alert('<%=l(:notice_failed_delete)%>');
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%> <% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
<% if @is_user%> <% if @is_user%>
$("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove(); var destroyedItem = $('#<%=@journal_destroyed.id%>');
var params = init_list_more_div_params($("#nh_messages")); destroyedItem.fadeOut(600,function(){
change_status_4_list_more_div(params); destroyedItem.remove();
});
<% else %> <% else %>
<% if @bid && @jours_count %> <% if @bid && @jours_count %>
$('#jours_count').html("<%= @jours_count %>"); $('#jours_count').html("<%= @jours_count %>");

View File

@ -37,7 +37,7 @@ zh:
label_password_lost: "忘记密码?" label_password_lost: "忘记密码?"
button_login: 登录 button_login: 登录
# account_controller中判断用户名或密码输入有误的提示信息 # account_controller中判断用户名或密码输入有误的提示信息
notice_account_invalid_creditentials: "无效的用户名或密码" notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写,谢谢!"
# account_controller中判断未激活的提示信息 # account_controller中判断未激活的提示信息
notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。" notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"

View File

@ -381,6 +381,7 @@ zh:
label_organization_choose: --请选择组织-- label_organization_choose: --请选择组织--
label_organization_name: 组织名称 label_organization_name: 组织名称
label_organization_list: 组织列表 label_organization_list: 组织列表
label_school_plural: 学校列表
label_organization_new: 新建组织 label_organization_new: 新建组织
label_organization_edit: 修改组织 label_organization_edit: 修改组织
label_project_plural: 项目列表 label_project_plural: 项目列表
@ -689,7 +690,7 @@ zh:
label_sort_lowest: 置底 label_sort_lowest: 置底
label_roadmap_due_in: "截止日期到 %{value}" label_roadmap_due_in: "截止日期到 %{value}"
label_roadmap_overdue: "%{value} 延期" label_roadmap_overdue: "%{value} 延期"
label_roadmap_no_issues: 该版本没有问题 label_roadmap_no_issues: 该版本没有对应的缺陷,可以在“发布问题”的“目标版本”中设置!
label_user_search_type: 搜索类型 label_user_search_type: 搜索类型
label_search_by_login: 登录名 label_search_by_login: 登录名
label_search_by_name: 名字 label_search_by_name: 名字

View File

@ -39,6 +39,17 @@ RedmineApp::Application.routes.draw do
end end
resources :school do
collection do
end
member do
get 'upload_logo'
post 'upload'
end
end
resources :homework_attach do resources :homework_attach do
collection do collection do
get 'get_homework_member_list' get 'get_homework_member_list'
@ -71,6 +82,7 @@ RedmineApp::Application.routes.draw do
get 'poll_result' get 'poll_result'
get 'close_poll' get 'close_poll'
get 'export_poll' get 'export_poll'
get 'import_poll'
end end
collection do collection do
delete 'delete_poll_question' delete 'delete_poll_question'
@ -86,6 +98,7 @@ RedmineApp::Application.routes.draw do
end end
collection do collection do
post 'next_step' post 'next_step'
post 'programing_test'
end end
end end
@ -293,7 +306,7 @@ RedmineApp::Application.routes.draw do
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
match 'user_projects', :to => 'users#user_projects', :via => :get match 'user_projects', :to => 'users#user_projects', :via => :get
match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities" match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities"
match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback" # match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info' match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info'
match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang
match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang
@ -386,14 +399,6 @@ RedmineApp::Application.routes.draw do
get 'feedback', :action => 'feedback', :as => 'project_feedback' get 'feedback', :action => 'feedback', :as => 'project_feedback'
get 'watcherlist', :action=> 'watcherlist' get 'watcherlist', :action=> 'watcherlist'
# 添加dts测试工具
get 'dts_dep', :action=> 'dts_dep'
get 'yun_dep', :action=> 'yun_dep'
get 'soft_knowledge', :action=> 'soft_knowledge'
get 'soft_file', :action=> 'soft_file'
get 'online_dev', :action=> 'online_dev'
get 'soft_service', :action=> 'soft_service'
get 'invite_members', :action=> 'invite_members' get 'invite_members', :action=> 'invite_members'
get 'invite_members_by_mail', :action=> 'invite_members_by_mail' get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
# get 'dts_repos', :aciton => 'dts_repos' # get 'dts_repos', :aciton => 'dts_repos'
@ -670,6 +675,7 @@ RedmineApp::Application.routes.draw do
match 'admin/test_email', :via => :get match 'admin/test_email', :via => :get
match 'admin/default_configuration', :via => :post match 'admin/default_configuration', :via => :post
get 'admin/organization' get 'admin/organization'
get 'admin/schools'
resources :auth_sources do resources :auth_sources do
member do member do
@ -779,6 +785,7 @@ RedmineApp::Application.routes.draw do
match 'words/:id/leave_project_message', :to => 'words#leave_project_message' match 'words/:id/leave_project_message', :to => 'words#leave_project_message'
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback' match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
post 'words/:id/leave_user_message', :to => 'words#leave_user_message', :as => "leave_user_message"
post 'join_in/join', :to => 'courses#join', :as => 'join' post 'join_in/join', :to => 'courses#join', :as => 'join'
delete 'join_in/join', :to => 'courses#unjoin' delete 'join_in/join', :to => 'courses#unjoin'
@ -808,9 +815,6 @@ RedmineApp::Application.routes.draw do
post 'school/search_school/', :to => 'school#search_school' post 'school/search_school/', :to => 'school#search_school'
get 'school/search_school/', :to => 'school#search_school' get 'school/search_school/', :to => 'school#search_school'
post 'school/upload', :to => 'school#upload'
get 'school/upload_logo', :to => 'school#upload_logo'
######added by nie ######added by nie
match 'tags/show_projects_tags' match 'tags/show_projects_tags'
########### added by liuping ########### added by liuping

View File

@ -0,0 +1,9 @@
class AddResultToTest < ActiveRecord::Migration
def up
add_column :homework_tests, :result, :integer,default: 0
end
def down
remove_column :homework_tests,:result
end
end

View File

@ -0,0 +1,9 @@
class AddErrormsgToTest < ActiveRecord::Migration
def up
add_column :homework_tests,:error_msg,:text
end
def down
remove_column :homework_tests,:error_msg
end
end

View File

@ -0,0 +1,9 @@
class ChangeResultDefault < ActiveRecord::Migration
def up
change_column :homework_tests,:result,:integer,:default => nil
end
def down
change_column :homework_tests,:result,:integer,:default => 0
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150722015428) do ActiveRecord::Schema.define(:version => 20150801034945) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -454,6 +454,13 @@ ActiveRecord::Schema.define(:version => 20150722015428) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
create_table "discuss_demos", :force => true do |t|
t.string "title"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "documents", :force => true do |t| create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false t.integer "category_id", :default => 0, :null => false
@ -627,6 +634,8 @@ ActiveRecord::Schema.define(:version => 20150722015428) do
t.integer "homework_common_id" t.integer "homework_common_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.integer "result"
t.text "error_msg"
end end
create_table "homework_users", :force => true do |t| create_table "homework_users", :force => true do |t|
@ -737,16 +746,6 @@ ActiveRecord::Schema.define(:version => 20150722015428) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_details_copy", :force => true do |t|
t.integer "journal_id", :default => 0, :null => false
t.string "property", :limit => 30, :default => "", :null => false
t.string "prop_key", :limit => 30, :default => "", :null => false
t.text "old_value"
t.text "value"
end
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_replies", :id => false, :force => true do |t| create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id" t.integer "journal_id"
t.integer "user_id" t.integer "user_id"
@ -864,7 +863,6 @@ ActiveRecord::Schema.define(:version => 20150722015428) do
t.datetime "created_on" t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false t.integer "comments_count", :default => 0, :null => false
t.integer "course_id" t.integer "course_id"
t.datetime "updated_on"
end end
add_index "news", ["author_id"], :name => "index_news_on_author_id" add_index "news", ["author_id"], :name => "index_news_on_author_id"

View File

@ -369,6 +369,7 @@ Redmine::MenuManager.map :admin_menu do |menu|
menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural
menu.push :courses, {:controller => 'admin', :action => 'courses'}, :caption => :label_course_all menu.push :courses, {:controller => 'admin', :action => 'courses'}, :caption => :label_course_all
menu.push :users, {:controller => 'admin', :action => 'users'}, :caption => :label_user_plural menu.push :users, {:controller => 'admin', :action => 'users'}, :caption => :label_user_plural
menu.push :schools, {:controller => 'admin', :action => 'schools'}, :caption => :label_school_plural
menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made
menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version
menu.push :groups, {:controller => 'groups'}, :caption => :label_group_plural menu.push :groups, {:controller => 'groups'}, :caption => :label_group_plural

View File

@ -546,10 +546,12 @@ function submit_homework_form(){if(regexHomeworkCommonName()&&regexHomeworkCommo
//增加测试结果 //增加测试结果
function add_programing_test(obj) { function add_programing_test(obj) {
var now = new Date().getTime(); var now = new Date().getTime();
obj.after("<div><li><label class='label02'>&nbsp;测试输入:&nbsp;</label><input type='text' class='fl h26 w200 mb10' name='input[" + now +"]'' />" + obj.after("<div><li><label class='label02'>&nbsp;测试输入:&nbsp;</label><input type='text' class='fl h26 w190 mb10' name='input[" + now +"]'' />" +
"</li><li ><label class='fl f14 ml10'>&nbsp;输出:&nbsp;</label><input type='text' class='fl h26 w200 mb10' name='output[" + now +"]' />" + "</li><li ><label class='fl f14 ml10'>&nbsp;输出:&nbsp;</label><input type='text' class='fl h26 w190 mb10' name='output[" + now +"]' />" +
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" + "</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" + "<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
"<a class='blue_btn fl ml5 mt1 programing_test' onclick='programing_test("+ now +")' id='test_send_" + now + "'>测试</a>" +
"<input type='hidden' id='test_result_" + now +"' name='result[" + now +"]'/>" +
"</li><div class='cl'></div></div>"); "</li><div class='cl'></div></div>");
} }
//删除测试结果 //删除测试结果

View File

@ -491,3 +491,8 @@ function judgeprojectname(){
} }
}); });
} }
//用户反馈
function submitProjectFeedback() {
$("#project_feedback_form").submit();
}

261
public/javascripts/user.js Normal file
View File

@ -0,0 +1,261 @@
//个人动态
$(function(){
function init_editor(params){
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent().parent('div');
params.div_form = $("div[nhname='div_form']",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
params.textarea.prev('div').css("height","60px");
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
toggleAndSettingWordsVal(params.div_form, params.textarea);
});
params.submit_btn.click(function(){
params.form.submit();
});
params.textarea.data('init',1);
}
params.cancel_btn.click();
setTimeout(function(){
if(!params.div_form.is(':hidden')){
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
}
},300);
});
$("a[nhname='sub_reply_btn']").live('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent().parent('div');
params.div_form = $("div[nhname='sub_div_form']",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
params.textarea.prev('div').css("height","60px");
params.contentmsg = $("p[nhname='sub_contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='sub_toolbar_container']",params.div_form);
params.cancel_btn = $("a[nhname='sub_cancel_btn']",params.div_form);
params.submit_btn = $("a[nhname='sub_submit_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
toggleAndSettingWordsVal(params.div_form, params.textarea);
});
params.submit_btn.click(function(){
params.form.submit();
});
params.textarea.data('init',1);
}
params.cancel_btn.click();
setTimeout(function(){
if(!params.div_form.is(':hidden')){
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
}
},300);
});
$("div[nhname='new_message']").each(function(){
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form",params.div_form);
if(params.form==undefined || params.form.length==0){
return;
}
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("#new_message_cancel_btn");
params.submit_btn = $("#new_message_submit_btn");
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
});
params.submit_btn.click(function(){
params.form.submit();
});
params.textarea.data('init',1);
$(this).show();
}
});
});
});
function init_list_more_div(params){
var p=params;
p.exbtn.click(function(){
var isclose = p.container.data('isclose');
var hasmore = p.container.data('hasmore');
if(isclose == '1'){
$("div[nhname='rec']",p.container).show();
p.container.data('isclose','0');
change_status_4_list_more_div(params);
return;
}
if(hasmore == '0'){
change_status_4_list_more_div(params,'get');
return;
}
var url = p.container.data('url');
if($("div[nhname='rec']",p.container).length > 0){
var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
url += "?lastid="+lastid;
var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
if(lasttime != undefined){
url += "&lasttime="+lasttime;
}
}
$.ajax( {url:url,dataType:'text',success:function(data){
var html = $("<div>"+data+"</div>");
var lens = $("div[nhname='rec']",html).length;
if(lens < p.size){
p.container.data('hasmore','0');
}
if(lens>0){
var currpage = parseInt(p.container.data('currpage'))+1;
p.container.data('currpage',currpage);
p.container.append(html.html())
}
change_status_4_list_more_div(params,'get');
p.div.show();
}} );
});
p.clbtn.click(function(){
var i=0;
$("div[nhname='rec']",p.container).each(function(){
i++;
if(i> p.size){
$(this).hide();
}
});
p.container.data('isclose','1');
change_status_4_list_more_div(params);
});
p.exbtn.click();
}
function change_status_4_list_more_div(params,opt){
var p=params;
if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
p.exbtn.click();
return;
}
var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
if( show_lens > p.size ){
p.clbtn.show();
}else{
p.clbtn.hide();
}
if($("div[nhname='rec']",p.container).length == 0){
p.exbtn.html(p.nodatamsg);
}else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
p.exbtn.html('点击展开更多');
}else{
p.exbtn.html('没有更多了');
}
}
function init_list_more_div_params(div){
var params = {};
params.div = div;
params.container = $("div[nhname='container']",div);
params.exbtn = $("a[nhname='expand']",div);
params.clbtn = $("a[nhname='close']",div);
params.size = params.container.data('pagesize');
params.nodatamsg = params.container.data('nodatamsg');
if( params.size == undefined ){
params.size = 13;
}
return params;
}
$(function(){
$("div[nhname='list_more_div']").each(function(){
var params = init_list_more_div_params($(this));
init_list_more_div(params)
});
});
//个人动态 end

View File

@ -2797,3 +2797,14 @@ div.repos_explain{
#activity .upload_img img{max-width: 580px;} #activity .upload_img img{max-width: 580px;}
img,embed{max-width: 100%;} img,embed{max-width: 100%;}
img.school_avatar {
background: rgb(245, 245, 245);
padding: 4px;
border: 1px solid #e5dfc7;
float: left;
display: block;
width: 100px;
height: 100px;
max-width: none;
}

View File

@ -88,8 +88,6 @@ a:hover.talk_edit{ color:#ff5722;}
.talk_text{ border:1px solid #64bdd9; height:100px;width:550px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} .talk_text{ border:1px solid #64bdd9; height:100px;width:550px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
.talk_new ul li{ } .talk_new ul li{ }
.sb{width:70px; height:26px; color:#606060; cursor:pointer;} .sb{width:70px; height:26px; color:#606060; cursor:pointer;}
a.blue_btn{ background:#64bdd9; display:block; font-size:14px;color:#fff; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
a:hover.blue_btn{ background:#329cbd;}
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;} a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
a:hover.grey_btn{ background:#717171; color:#fff;} a:hover.grey_btn{ background:#717171; color:#fff;}
/****资源库***/ /****资源库***/
@ -609,6 +607,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.w547{ width:544px;} .w547{ width:544px;}
.w196{ width:196px;} .w196{ width:196px;}
.w186{ width:186px;} .w186{ width:186px;}
.w190{width: 190px;}
.w200{width: 200px;} .w200{width: 200px;}
.w459{ width:459px;} .w459{ width:459px;}
.hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;} .hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;}
@ -665,7 +664,6 @@ a:hover.ping_pic{border:1px solid #64bdd9;}
.ping_back_tit{ float:left; width:523px; margin-left:10px; } .ping_back_tit{ float:left; width:523px; margin-left:10px; }
a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;} a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;}
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;} a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
.fr{ float:right;}
.min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; } .min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; }
.li_min_search{ float:right; margin-right:-10px;} .li_min_search{ float:right; margin-right:-10px;}
.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;} .info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}

View File

@ -31,7 +31,7 @@ a:hover.pr_join_a{ background:#41a8c8;}
/*左侧导航*/ /*左侧导航*/
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;} .subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;} .subNav{border-bottom:solid 1px #e5e3da;cursor:auto;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;} .subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
.subNav_jiantou:hover{color:#0781b4; } .subNav_jiantou:hover{color:#0781b4; }
.currentDd{color:#0781b4;} .currentDd{color:#0781b4;}

View File

@ -28,7 +28,7 @@ a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;}
#polls div{word-break: break-all;word-wrap: break-word;} #polls div{word-break: break-all;word-wrap: break-word;}
.ur_prefix_content{ color:#656565; text-indent:30px; margin-top:10px; } .ur_prefix_content{ color:#656565; text-indent:30px; margin-top:10px; }
.ur_card{border-top:1px solid #dcdcdc;margin-top:20px; color:#3a3a3a;} .ur_card{border-top:1px solid #dcdcdc;margin-top:20px; color:#3a3a3a;}
.ur_title{ padding:20px 0px ; float:left; width:604px; } .ur_title{ padding:20px 0px ; float:left; width:564px; }
.ur_required{ font-weight: bold; color:red;} .ur_required{ font-weight: bold; color:red;}
.ur_inputs{ color:#666;} .ur_inputs{ color:#666;}
.ur_table{border-top:1px solid #dcdcdc; background:#fff;} .ur_table{border-top:1px solid #dcdcdc; background:#fff;}
@ -101,10 +101,13 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
.ur_editor02{width:648px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px;} .ur_editor02{width:648px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px;}
a.ur_button_submit{ display:block; width:106px; height:31px; margin:0 auto; background:#15bccf; color:#fff; font-size:16px; text-align:center; padding-top:4px; margin-bottom:10px; } a.ur_button_submit{ display:block; width:106px; height:31px; margin:0 auto; background:#15bccf; color:#fff; font-size:16px; text-align:center; padding-top:4px; margin-bottom:10px; }
a:hover.ur_button_submit{ background:#0fa9bb; text-decoration:none;} a:hover.ur_button_submit{ background:#0fa9bb; text-decoration:none;}
a.ur_icon_de{ background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:right; margin-top:15px;} a.ur_icon_de{ background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:right; margin-top:15px;}
a:hover.ur_icon_de{ background:url(images/icons.png) -20px -338px no-repeat;} a:hover.ur_icon_de{ background:url(images/icons.png) -20px -338px no-repeat;}
.ur_icon_edit{ background:url(images/icons.png) 0px -272px no-repeat; width:16px; height:27px; display:block;float:right; margin-top:15px; margin-right:10px;} .ur_icon_edit{ background:url(images/icons.png) 0px -272px no-repeat; width:16px; height:27px; display:block;float:right; margin-top:15px; margin-right:10px;}
a:hover.ur_icon_edit{ background:url(images/icons.png) -21px -272px no-repeat;} a:hover.ur_icon_edit{ background:url(images/icons.png) -21px -272px no-repeat;}
.ur_icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:right; margin-top:15px; margin-right:10px;}
a:hover.ur_icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
/***弹框***/ /***弹框***/
.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} .popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}

View File

@ -74,7 +74,11 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;} .issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;}
.problem_txt{ width:600px; margin-left:10px; color:#777777; } .problem_txt{ width:600px; margin-left:10px; color:#777777; }
.pro_txt_w{width:610px;} .pro_txt_w{width:610px;}
a.problem_name{ color:#ff5722; } a.problem_name{ color:#ff5722;max-width: 80px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
a:hover.problem_name{ color:#d33503;} a:hover.problem_name{ color:#d33503;}
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;} a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
@ -690,9 +694,10 @@ table.list thead th
tr.changeset { height: 20px } tr.changeset { height: 20px }
tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; } tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
tr.changeset td.revision_graph { width: 15%; background-color: #fffffb; } tr.changeset td.revision_graph { width: 1%; background-color: #fffffb; }
tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;} tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;}
tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;} tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;}
tr.changeset td.comments { text-align: center; word-break:break-all; word-wrap: break-word;;}
div.changeset { padding: 4px;} div.changeset { padding: 4px;}
div.changeset { border-bottom: 1px solid #ddd; } div.changeset { border-bottom: 1px solid #ddd; }
@ -770,4 +775,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
#about_newtalk{ display:none;} #about_newtalk{ display:none;}
/*version*/
.time_tracter{color: #64BDD9;padding: 5px;}

View File

@ -87,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mt10{ margin-top:10px;} .mt10{ margin-top:10px;}
.mt30{ margin-top: 30px;} .mt30{ margin-top: 30px;}
.mb5{ margin-bottom:5px;} .mb5{ margin-bottom:5px;}
.mb8{ margin-bottom:8px;}
.mb10{ margin-bottom:10px;} .mb10{ margin-bottom:10px;}
.mb20{ margin-bottom:20px;} .mb20{ margin-bottom:20px;}
.pl15{ padding-left:15px;} .pl15{ padding-left:15px;}
@ -165,11 +166,13 @@ a.c_green{ color:#28be6c;}
.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} .grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
a:hover.grey_btn{ background:#717171; color:#fff;} a:hover.grey_btn{ background:#717171; color:#fff;}
.green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;} .green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
a:hover.green_btn{ background:#14ad5a;} a:hover.green_btn{ background:#14ad5a;}
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;} .blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
.red_btn{ background:red; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
a:hover.blue_btn{ background:#329cbd;cursor: pointer;} a:hover.blue_btn{ background:#329cbd;cursor: pointer;}
a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; } a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; }

View File

@ -7,6 +7,7 @@ table,tr,td{border:0;cellspacing:0; cellpadding:0;}
ol,ul,li{ list-style-type:none} ol,ul,li{ list-style-type:none}
a:link,a:visited{color:#7f7f7f;text-decoration:none;} a:link,a:visited{color:#7f7f7f;text-decoration:none;}
a:hover,a:active{color:#000;} a:hover,a:active{color:#000;}
img{max-width: 100%;}
/*常用*/ /*常用*/
select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; } select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; }

View File

@ -8,7 +8,7 @@
.icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;} .icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;}
.pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; } .pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; }
.leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;} .leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;}
.pic_members{ background:url(../images/pic_users.jpg) 0 0 no-repeat; display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;} .pic_members{ display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;}
.pic_members:hover{border:1px solid #c9c9c9;} .pic_members:hover{border:1px solid #c9c9c9;}
/*新建*/ /*新建*/
.top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; } .top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; }
@ -24,12 +24,14 @@ a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; dis
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; } a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;} .inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; } .inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
.message_list_box{ background:#f5f5f5; padding:10px;} .message_list_box{ background:#f5f5f5; padding:10px;margin-top: 10px;}
.users_pic{ width:27px; height:27px; border:1px solid #e3e3e3;} .users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;}
.users_pic:hover{ border:1px solid #a5a5a5;} .users_pic:hover{ border:1px solid #a5a5a5;}
.users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;}
.users_pic_sub:hover{ border:1px solid #a5a5a5;}
.massage_txt{ max-width:360px; color: #666;word-break:break-all;} .massage_txt{ max-width:360px; color: #666;word-break:break-all;}
.massage_time{ color:#8d8d8d; margin-top:5px;} .massage_time{ color:#8d8d8d; margin-top:5px;}
.message_list{ border-bottom:1px dashed #c9c9c9; padding-bottom:10px; margin-bottom:10px;} .message_list{ border-bottom:1px dashed #c9c9c9; margin-bottom:10px;color: #5f5f5f;}
.message_list_more{ text-align:center; width:720px;} .message_list_more{ text-align:center; width:720px;}
/*课程动态*/ /*课程动态*/
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;} .line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
@ -89,13 +91,15 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
.users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;} .users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;}
.users_ctt input,.users_ctt select,.users_ctt option{ height:26px;} .users_ctt input,.users_ctt select,.users_ctt option{ height:26px;}
.users_ctt input,.users_ctt textarea{ margin-left:2px;} .users_ctt input,.users_ctt textarea{ margin-left:2px;}
.users_ctt textarea{ margin-bottom:none;} /*.users_ctt textarea{ margin-bottom:nor;}*/
.w450{ width:450px;} .w450{ width:450px;}
.w210{ width:200px;} .w210{ width:200px;}
.w70{ width:70px;} .w70{ width:70px;}
.h200{ height:200px;} .h200{ height:200px;}
/* 个人主页*/ /* 个人主页*/
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} a.edit_btn{display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.edit_btn{ color:#ff5722;}
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.gz_btn{ color:#ff5722;} a:hover.gz_btn{ color:#ff5722;}
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.qx_btn{color:#64bdd9;} a:hover.qx_btn{color:#64bdd9;}
@ -123,5 +127,21 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; } .newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; }
.newhwork_div textarea{border:1px solid #CCC;} .newhwork_div textarea{border:1px solid #CCC;}
.w460{ width:460px;} .w460{ width:460px;}
/* 留言新增*/
.mes_box{ width:580px;}
.mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;}
.mes_box02_info{ width:540px; margin-left:5px;}
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
a.hidepic>img{display:none;} a.hidepic>img{display:none;}
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
.cr{clear: right;}

View File

@ -443,7 +443,6 @@ color: #000000;
width:auto; width:auto;
/*float:center;*/ /*float:center;*/
min-height:800px; min-height:800px;
border: 1px solid #ffffff;
} }
/*by huang*/ /*by huang*/
@ -1122,6 +1121,11 @@ a.root {
line-height: 1; line-height: 1;
} }
.courses{
margin:0px;
padding-left: 0em;
}
.project-table { .project-table {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;