新版个人首页

This commit is contained in:
cxt 2017-04-20 17:17:02 +08:00
parent c49191b70f
commit 046f73d2c6
46 changed files with 4842 additions and 958 deletions

View File

@ -426,6 +426,10 @@ class AccountController < ApplicationController
render :json => req
end
def security_settings
end
def bind_email_or_phone
@user = User.current
if params[:type] == 1

View File

@ -43,6 +43,7 @@ class BlogCommentsController < ApplicationController
update_messsages_to_viewed("BlogMessage", params[:blog_id])
@article = BlogComment.find(params[:id])
update_visiti_count @article
@replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc")
@reply_count = @replies.count
@replies = get_no_children_comments_all @replies

View File

@ -2097,147 +2097,161 @@ class UsersController < ApplicationController
end
def show
if User.current == @user
# 点击小铃铛,更新点击时间
update_onclick_time if params[:click_user_message] == 'true'
# 全部设为已读
# 自己的主页显示消息
messages_all = MessageAll.where(:user_id => @user.id)
@message_count = messages_all.count
# REDO:已删除的内容应该在页面中显示不点击
@message_all_pages = Paginator.new @message_count, per_page_option, params['page']
@message_alls = messages_all.includes(:message).
limit(@message_all_pages.per_page).
offset(@message_all_pages.offset).
reorder("#{MessageAll.table_name}.created_at desc")
@unsolved_issues_count = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]).includes(:author, :project).count
my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).
where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
# 用户待完成的作业
homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Time.now}'")
homework_ids = homeworks.blank? ? "(-1)" : "(" + homeworks.map{|homework| homework.id}.join(",") + ")"
student_works = StudentWork.where("user_id = #{@user.id} and homework_common_id in #{homework_ids} and work_status != 0")
@unfinished_homework_count = homeworks.count - student_works.count
# 用户待完成的测验
exercises = Exercise.where("course_id in #{my_course_ids} and exercise_status = 2")
exercise_users = ExerciseUser.where(:user_id => @user.id, :exercise_id => exercises.map{|ex| ex.id})
@unfinished_test_count = exercises.count - exercise_users.count
# 用户待完成的问卷
polls = Poll.where("polls_type = 'Course' and polls_group_id in #{my_course_ids} and polls_status = 2")
poll_users = PollUser.where(:user_id => @user.id, :poll_id => polls.map{|poll| poll.id})
@unfinished_poll_count = polls.count - poll_users.count
# 用户待匿评的作品
homeworks = HomeworkCommon.includes(:homework_detail_manual).where("homework_commons.course_id in #{my_course_ids} and homework_detail_manuals.comment_status = 2")
student_work_scores = @user.student_works_scores.where("reviewer_role = 3")
anonymous_evaluation_ids = student_work_scores.blank? ? "(-1)" : "(" + student_work_scores.map{|st| st.student_work_id}.join(",") + ")"
unfinished_evaluations = @user.student_works_evaluation_distributions.where("student_work_id not in #{anonymous_evaluation_ids}")
@anonymous_evaluation_count = StudentWork.where(:id => unfinished_evaluations.map{|ev| ev.student_work_id}, :homework_common_id => homeworks.map{|hw| hw.id}).count
# 待评阅的作业 暂不做
# @unreview_homework = 1
# 待审批的申请
#applied_message_count = AppliedMessage.where(:applied_type => ["Organization", "AppliedContest", "StudentWorksScoresAppeal", "AppliedProject", "ApplyAddSchools"], :user_id => User.current.id, :status => 0).count
#applied_course_message_count = CourseMessage.where(:user_id => User.current.id, :course_message_type => "JoinCourseRequest", :status => 0).count
# applied_pull_request_message_count = ForgeMessage.where(:user_id => User.current.id, :forge_message_type => "PullRequest", :status => [1,3]).count
# @applied_message_alls_count = applied_message_count + applied_course_message_count + applied_pull_request_message_count
user_id = User.current.id
sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
left join `course_messages` cm on ma.message_id=cm.id left join `applied_messages` apm on ma.message_id=apm.id
where (ma.user_id =#{user_id} and ma.message_type = 'ForgeMessage' and fm.forge_message_type='PullRequest' and fm.status=0 and fm.user_id=#{user_id} ) or
(ma.user_id=#{user_id} and ma.message_type='AppliedMessage' and apm.applied_type in ('Organization', 'AppliedContest', 'StudentWorksScoresAppeal', 'AppliedProject', 'ApplyAddSchools') and apm.user_id =#{user_id} and apm.status =0 ) or
(ma.user_id=#{user_id} and ma.message_type='CourseMessage' and cm.course_message_type='JoinCourseRequest' and cm.status=0 and cm.user_id=#{user_id} );"
message_alls = MessageAll.find_by_sql(sql)
@applied_message_alls_count = message_alls.count
else
# 看别人的主页显示动态
#更新用户申请成为课程老师或教辅消息的状态
if params[:course_id] != nil
join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?",
params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false)
join_course_messages.update_all(:viewed => true)
end
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
@page = params[:page] ? params[:page].to_i + 1 : 0
user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
user_course_ids = (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
project_types = "('Message','Issue','Project')"
principal_types = "JournalsForMessage"
container_type = ''
act_type = ''
# 他的动态
sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
if params[:type].present?
case params[:type]
when "course_homework"
container_type = 'Course'
act_type = 'HomeworkCommon'
when "course_news"
container_type = 'Course'
act_type = 'News'
when "course_message"
container_type = 'Course'
act_type = 'Message'
when "course_poll"
container_type = 'Course'
act_type = 'Poll'
when "course_journals"
container_type = 'Course'
act_type = 'JournalsForMessage'
when "project_issue"
container_type = 'Project'
act_type = 'Issue'
when "project_message"
container_type = 'Project'
act_type = 'Message'
when "user_journals"
container_type = 'Principal'
act_type = 'JournalsForMessage'
when "current_user"
container_type = 'Principal'
act_type = 'Principal'
when "all"
container_type = 'all'
act_type = 'all'
end
end
if container_type != '' && container_type != 'all'
if container_type == 'Course'
sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'"
elsif container_type == 'Project'
sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'"
elsif container_type == 'Principal' && act_type == 'JournalsForMessage'
sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}"
elsif container_type == 'Principal' && act_type == 'Principal'
sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
end
if User.current != @user
sql += " and user_id = #{@user.id}"
end
else
if User.current != @user
blog_ids = "("+@user.blog.id.to_s+")"
else
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
end
sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
if container_type != 'all' && User.current != @user
sql = "user_id = #{@user.id} and(" + sql + ")"
end
end
@user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count
@user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10)
@type = params[:type]
end
@blog_list = @user.blog.articles.reorder("#{BlogComment.table_name}.sticky desc,#{BlogComment.table_name}.created_at desc")
@blog_count = @blog_list.count
@blog_list = @blog_list.limit(3)
watch_query = User.watched_by(@user.id);
@user_watchlist_count = watch_query.count();
@user_watchlist = watch_query.order("#{Watcher.table_name}.id desc").limit(12);
fan_query = @user.watcher_users;
@user_fanlist_count = fan_query.count();
@user_fanlist = fan_query.order("#{Watcher.table_name}.id desc").limit(12);
@courses = @user.courses.visible.not_deleted
@courses_count = @courses.count
@courses = @courses.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc").limit(8)
@shixuns = []
@shixuns_count = 0
# if User.current == @user
# # 点击小铃铛,更新点击时间
# update_onclick_time if params[:click_user_message] == 'true'
# # 全部设为已读
# # 自己的主页显示消息
# messages_all = MessageAll.where(:user_id => @user.id)
# @message_count = messages_all.count
# # REDO:已删除的内容应该在页面中显示不点击
# @message_all_pages = Paginator.new @message_count, per_page_option, params['page']
# @message_alls = messages_all.includes(:message).
# limit(@message_all_pages.per_page).
# offset(@message_all_pages.offset).
# reorder("#{MessageAll.table_name}.created_at desc")
#
# @unsolved_issues_count = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]).includes(:author, :project).count
#
# my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).
# where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
# # 用户待完成的作业
# homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Time.now}'")
# homework_ids = homeworks.blank? ? "(-1)" : "(" + homeworks.map{|homework| homework.id}.join(",") + ")"
# student_works = StudentWork.where("user_id = #{@user.id} and homework_common_id in #{homework_ids} and work_status != 0")
# @unfinished_homework_count = homeworks.count - student_works.count
# # 用户待完成的测验
# exercises = Exercise.where("course_id in #{my_course_ids} and exercise_status = 2")
# exercise_users = ExerciseUser.where(:user_id => @user.id, :exercise_id => exercises.map{|ex| ex.id})
# @unfinished_test_count = exercises.count - exercise_users.count
# # 用户待完成的问卷
# polls = Poll.where("polls_type = 'Course' and polls_group_id in #{my_course_ids} and polls_status = 2")
# poll_users = PollUser.where(:user_id => @user.id, :poll_id => polls.map{|poll| poll.id})
# @unfinished_poll_count = polls.count - poll_users.count
# # 用户待匿评的作品
# homeworks = HomeworkCommon.includes(:homework_detail_manual).where("homework_commons.course_id in #{my_course_ids} and homework_detail_manuals.comment_status = 2")
# student_work_scores = @user.student_works_scores.where("reviewer_role = 3")
# anonymous_evaluation_ids = student_work_scores.blank? ? "(-1)" : "(" + student_work_scores.map{|st| st.student_work_id}.join(",") + ")"
# unfinished_evaluations = @user.student_works_evaluation_distributions.where("student_work_id not in #{anonymous_evaluation_ids}")
# @anonymous_evaluation_count = StudentWork.where(:id => unfinished_evaluations.map{|ev| ev.student_work_id}, :homework_common_id => homeworks.map{|hw| hw.id}).count
# # 待评阅的作业 暂不做
# # @unreview_homework = 1
#
# # 待审批的申请
# #applied_message_count = AppliedMessage.where(:applied_type => ["Organization", "AppliedContest", "StudentWorksScoresAppeal", "AppliedProject", "ApplyAddSchools"], :user_id => User.current.id, :status => 0).count
# #applied_course_message_count = CourseMessage.where(:user_id => User.current.id, :course_message_type => "JoinCourseRequest", :status => 0).count
# # applied_pull_request_message_count = ForgeMessage.where(:user_id => User.current.id, :forge_message_type => "PullRequest", :status => [1,3]).count
# # @applied_message_alls_count = applied_message_count + applied_course_message_count + applied_pull_request_message_count
# user_id = User.current.id
# sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
# left join `course_messages` cm on ma.message_id=cm.id left join `applied_messages` apm on ma.message_id=apm.id
# where (ma.user_id =#{user_id} and ma.message_type = 'ForgeMessage' and fm.forge_message_type='PullRequest' and fm.status=0 and fm.user_id=#{user_id} ) or
# (ma.user_id=#{user_id} and ma.message_type='AppliedMessage' and apm.applied_type in ('Organization', 'AppliedContest', 'StudentWorksScoresAppeal', 'AppliedProject', 'ApplyAddSchools') and apm.user_id =#{user_id} and apm.status =0 ) or
# (ma.user_id=#{user_id} and ma.message_type='CourseMessage' and cm.course_message_type='JoinCourseRequest' and cm.status=0 and cm.user_id=#{user_id} );"
# message_alls = MessageAll.find_by_sql(sql)
# @applied_message_alls_count = message_alls.count
# else
# # 看别人的主页显示动态
# #更新用户申请成为课程老师或教辅消息的状态
# if params[:course_id] != nil
# join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?",
# params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false)
# join_course_messages.update_all(:viewed => true)
# end
# shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
# shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
# @page = params[:page] ? params[:page].to_i + 1 : 0
# user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
# user_course_ids = (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
# course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
# project_types = "('Message','Issue','Project')"
# principal_types = "JournalsForMessage"
# container_type = ''
# act_type = ''
# # 他的动态
# sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
# if params[:type].present?
# case params[:type]
# when "course_homework"
# container_type = 'Course'
# act_type = 'HomeworkCommon'
# when "course_news"
# container_type = 'Course'
# act_type = 'News'
# when "course_message"
# container_type = 'Course'
# act_type = 'Message'
# when "course_poll"
# container_type = 'Course'
# act_type = 'Poll'
# when "course_journals"
# container_type = 'Course'
# act_type = 'JournalsForMessage'
# when "project_issue"
# container_type = 'Project'
# act_type = 'Issue'
# when "project_message"
# container_type = 'Project'
# act_type = 'Message'
# when "user_journals"
# container_type = 'Principal'
# act_type = 'JournalsForMessage'
# when "current_user"
# container_type = 'Principal'
# act_type = 'Principal'
# when "all"
# container_type = 'all'
# act_type = 'all'
# end
# end
# if container_type != '' && container_type != 'all'
# if container_type == 'Course'
# sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'"
# elsif container_type == 'Project'
# sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'"
# elsif container_type == 'Principal' && act_type == 'JournalsForMessage'
# sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}"
# elsif container_type == 'Principal' && act_type == 'Principal'
# sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
# end
# if User.current != @user
# sql += " and user_id = #{@user.id}"
# end
# else
# if User.current != @user
# blog_ids = "("+@user.blog.id.to_s+")"
# else
# blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
# end
# sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
# "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
# "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
# "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
# if container_type != 'all' && User.current != @user
# sql = "user_id = #{@user.id} and(" + sql + ")"
# end
# end
# @user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count
# @user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10)
# @type = params[:type]
# end
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
format.html {render :layout => 'base_edu_user'}
end
end

View File

@ -39,6 +39,12 @@ class WatchersController < ApplicationController
else
if params[:target_id]
@user = User.find(params[:target_id])
watch_query = User.watched_by(@user.id);
@user_watchlist_count = watch_query.count();
@user_watchlist = watch_query.order("#{Watcher.table_name}.id desc").limit(12);
fan_query = @user.watcher_users;
@user_fanlist_count = fan_query.count();
@user_fanlist = fan_query.order("#{Watcher.table_name}.id desc").limit(12);
end
end
@ -82,6 +88,12 @@ class WatchersController < ApplicationController
else
if params[:target_id]
@user = User.find(params[:target_id])
watch_query = User.watched_by(@user.id);
@user_watchlist_count = watch_query.count();
@user_watchlist = watch_query.order("#{Watcher.table_name}.id desc").limit(12);
fan_query = @user.watcher_users;
@user_fanlist_count = fan_query.count();
@user_fanlist = fan_query.order("#{Watcher.table_name}.id desc").limit(12);
end
end
if params[:object_type] == 'project'

View File

@ -262,11 +262,25 @@ module WatchersHelper
content.present? ? content_tag('ul', content, :class => 'watchers') : content
end
#用户关注、取消关注
def watcher_link_for_user(target, user)
return '' unless user && user.logged?
watched = target.watched_by?(user)
text = watched ? '已关注' : '添加关注'
url = watch_path(:object_type => 'user',
:object_id => target.id,
:target_id => target.id)
method = watched ? 'delete' : 'post'
id = watched ? 'cancel_watch' : ''
title = watched ? '取消关注' : '添加关注'
if target != user
link_to text, url, :remote => true, :method => method, :remote => true,
:class => "fl font-14 user_watch",:id => id, :title => title
else
link_to "关注", "javascript:void(0)", :remote => true, :method => method,
:class => "fl font-14 user_watch", :id => id, :title => title
end
end
# 缺陷跟踪者列表复选框生成
def watchers_checkboxes(object, users, checked=nil)

View File

@ -2,8 +2,8 @@ class Blog < ActiveRecord::Base
# attr_accessible :title, :body
include Redmine::SafeAttributes
belongs_to :user
has_many :articles, :class_name => 'BlogComment', :conditions => "#{BlogComment.table_name}.parent_id IS NULL ", :order => "#{BlogComment.table_name}.created_on DESC"
has_many :blog_comments, :dependent => :destroy, :order => "#{BlogComment.table_name}.created_on DESC"
has_many :articles, :class_name => 'BlogComment', :conditions => "#{BlogComment.table_name}.parent_id IS NULL ", :order => "#{BlogComment.table_name}.created_at DESC"
has_many :blog_comments, :dependent => :destroy, :order => "#{BlogComment.table_name}.created_at DESC"
belongs_to :last_comment, :class_name => 'BlogComment', :foreign_key => :last_comment_id
acts_as_tree :dependent => :nullify
#acts_as_list :scope => '(user_id = #{user_id} AND parent_id #{user_id ? = "#{parent_id}" : "IS NULL"})'

View File

@ -20,7 +20,7 @@ class BlogComment < ActiveRecord::Base
validates_presence_of :title, :content
validates_length_of :title, :maximum => 255
#validate :cannot_reply_to_locked_comment, :on => :create
safe_attributes 'title', 'content',"sticky", "locked", "root_id"
safe_attributes 'title', 'content',"sticky", "locked", "root_id", 'visits'
after_save :add_user_activity
after_update :update_activity

View File

@ -1198,7 +1198,9 @@ class User < Principal
'language',
'custom_field_values',
'custom_fields',
'identity_url'
'identity_url',
'phone',
'authentication'
safe_attributes 'status',
'auth_source_id',

View File

@ -1,35 +1,33 @@
<div id="sy_popup_box" style="width:460px;">
<div class="sy_popup_top">
<h3 class="fl">欢迎加入班级</h3>
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
<div class="cl"></div>
<div class="task-popup" style="width:460px;">
<div class=" task-popup-title clearfix task-popup-bggrey">
<h3 class="fl ">欢迎加入班级</h3>
<a href="javascript:void(0);" onclick="hideModal()"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="sy_popup_con">
<%= form_tag({:controller => 'courses', :action => 'join_course_multi_role'}, :remote => true, :method => :post, :id => 'new-watcher-form') do %>
<ul class="sy_popup_add ">
<li>
<label>班级邀请码:</label>
<input class=" sy_input_txt fl" name="invite_code" placeholder="请输入五位班级邀请码">
<div class="cl"></div>
</li>
<li>
<label>身份:</label>
<input type="checkbox" name="role[]" value="9" id="join_course_role_9" class="ml5 mr5 "/><span class="mr10">教师</span>
<input type="checkbox" name="role[]" value="7" id="join_course_role_7" class="ml5 mr5"/><span class="mr10">助教</span>
<input type="checkbox" name="role[]" value="10" id="join_course_role_10" class="ml5 mr5"/><span class="mr10">学生</span>
<div class="cl"></div>
</li>
<p id="none_checked_notice" class="c_red none f12" style="margin-left: 42px;">请至少选择一个身份</p>
<li class="mt10">
<label>&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_blue fl" onclick="submit_join_course();">确&nbsp;&nbsp;定</a>
<a href="javascript:void(0);" class="sy_btn_grey fl ml20" onclick="hideModal()">取&nbsp;&nbsp;消</a>
<div class="cl"></div>
</li>
</ul>
<% end %>
<div class="task_popup_con mt15 ml30">
<div class="panel-form mr15">
<%= form_tag({:controller => 'courses', :action => 'join_course_multi_role'}, :remote => true, :method => :post, :id => 'new-watcher-form') do %>
<ul>
<li class="clearfix">
<label class="panel-form-label fl">班级邀请码:</label>
<input type="text" class="task-form-60 task-height-40 panel-box-sizing fl" name="invite_code" placeholder="请输入五位班级邀请码">
</li>
<li class="clearfix">
<label class="panel-form-label">身份:</label>
<input type="checkbox" name="role[]" value="9" id="join_course_role_9" class="ml-3 mr5 "/><span class="mr10">教师</span>
<input type="checkbox" name="role[]" value="7" id="join_course_role_7" class="ml5 mr5"/><span class="mr10">助教</span>
<input type="checkbox" name="role[]" value="10" id="join_course_role_10" class="ml5 mr5"/><span class="mr10">学生</span>
</li>
<p id="none_checked_notice" class="color-red none f12" style="margin-left: 54px;">请至少选择一个身份</p>
<li class="clearfix mt10">
<a href="javascript:void(0);" class="task-btn task-btn-blue fr mr60" onclick="submit_join_course();">确定</a>
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="hideModal()">取消</a>
</li>
</ul>
<% end %>
</div>
</div>
</div>
<script>
function submit_join_course(){
if ($("input[name='role[]']:checked").length >= 1){

View File

@ -3,90 +3,36 @@
<%# end %>
<% if @state %>
<% if @state == 0 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">加入成功</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box_redirect("<%=course_path(@course.id) %>", "加入成功");
<% elsif @state == 1 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">密码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("确定");
<% elsif @state == 2 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">班级已过期<br/>请联系班级管理员重启班级。(在配置班级处)</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("班级已过期<br/>请联系班级管理员重启班级。(在配置班级处)");
<% elsif @state == 3 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经加入了班级</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box_redirect("<%=course_path(@course.id) %>", "您已经加入了班级");
<% elsif @state == 4 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您输入的邀请码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("您输入的邀请码错误");
<% elsif @state == 5 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您还未登录</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("您还未登录");
<% elsif @state == 6 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("申请成功,请等待审核");
<% elsif @state == 7%>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("您已经发送过申请了,请耐心等待");
<% elsif @state == 8%>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的教师了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box_redirect("<%=course_path(@course.id) %>", "您已经是该班级的教师了");
<% elsif @state == 9%>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的教辅了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box_redirect("<%=course_path(@course.id) %>", "您已经是该班级的教辅了");
<% elsif @state == 10%>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的管理员了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box_redirect("<%=course_path(@course.id) %>", "您已经是该班级的管理员了");
<% elsif @state == 11%>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">该班级已归档,请联系老师</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("该班级已归档,请联系老师");
<% elsif @state == 12 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("您已经发送过申请了,请耐心等待");
<% elsif @state == 13 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("申请成功,请等待审核");
<% elsif @state == 14 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">此邀请码已停用,请与老师联系</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("此邀请码已停用,请与老师联系");
<% else %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">未知错误,请稍后再试</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
notice_box("未知错误,请稍后再试");
<% end %>
<% end %>
function refresh_current_course(){
hideModal();
<% if @course %>
window.location.href= "<%=course_path(@course.id) %>";
<% end %>
}
<% end %>

View File

@ -1,161 +1,95 @@
<div class="header_con">
<div class="header_con clearfix">
<div class="fl clearfix new-logo">
<%= link_to image_tag("../images/bigdata/new-logo.png",width:"51px", height: "45px", alt:"高校教育大数据服务平台", class:"fl "), home_path %>
<%= link_to image_tag("../images/bigdata/new-logo.png",width:"45px", height: "45px", alt:"高校教育大数据服务平台", class:"fl "), home_path %>
</div>
<ul class="fr inner-nav-user" id="my_account_info">
<li>
<img src="/images/inner/male.jpg" width="45" height="45" class="inner-nav-user-img"alt="高校教育大数据服务平台"></a>
<font></font>
<ul class="my_account_info" id="my_account_info_ul">
<font></font>
<ul class="mt5 mb5">
<li class="li_bottom_border hidden" style="max-width: 150px;"><span style="color: #888;">当前账号:<span style="font-weight: bold;color: #888;"><%= User.current.show_name %></span></span></li>
<li><%= link_to "我 的 主 页", user_path(User.current), :class => "menuGreyNew" %></li>
<li><%= link_to '我 的 课 程',{:controller => "users", :action => "user_courselist", :id => User.current}, :class => "menuGreyNew" %></li>
<li><%= link_to '我 的 项 目', {:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list', :class => "menuGreyNew" %></li>
<li class="li_bottom_border"><%= link_to '我 的 竞 赛', {:controller => "users", :action => "user_contestlist", :id => @user}, :id => 'user_contest_list', :class => "menuGreyNew" %></li>
<li><%= link_to "修 改 资 料", my_account_path, :class => "menuGreyNew"%></li>
<li><%= link_to "退 出",logout_url_without_domain,:class => "menuGreyNew",:method => "post", :id => "logout_trustie" %></li>
</ul>
<div class="header-search fl mt10 ml15 mr15">
<dropdown class="fl">
<input id="toggle2" type="checkbox" name="search_type" value="1">
<label for="toggle2" class="animate" id="all_status_show"><font id="all_status_show_value">课程</font><i class="fa fa-sort-down fr mt3"></i></label>
<ul class="animate" id="all_status" style="display: none;">
<li class="animate">课程</li>
<li class="animate">班级</li>
<li class="animate">实训</li>
<li class="animate">问答</li>
<li class="animate">用户</li>
<li class="animate">资源</li>
</ul>
</li>
</dropdown>
</ul>
<ul class="fr inner-nav-mes" id="user_messages">
<li>
<i class="fa fa-bell" onclick="window.location.href='<%= user_path(User.current) %>'" style="cursor: pointer;"></i>
<% new_message_count = User.current.count_new_message.to_i %>
<% if new_message_count > 0 %>
<span class="inner-nav-cir"><%= new_message_count %></span>
<% end %>
<div class="shadowbox_news" id="user_messages_list">
<%= render :partial => 'layouts/message_loading' %>
</div>
</li>
</ul>
<div id="navHomepageSearch">
<% name = name%>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<input type="text" name="q" value="<%= name.nil? ? "" : name %>" id="navHomepageSearchInput" class="new-search fl ml10 mr10" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
<input type="hidden" name="search_type" id="type" value="all"/>
<input type="text" style="display: none;"/>
<!--<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>-->
<% end %>
<input type="text" placeholder="请输入关键词进行搜索" class="header-search-input fl">
<a href="#"><i class="fa fa-search font-16 mt8 mr10"></i></a>
</div>
<!--<input type="text" placeholder="请输入关键词进行搜索" class="new-search fl ml15 mr10">-->
<ul class="fl innner-nav">
<li>
<%= link_to "课程", user_course_community_path(User.current), :class => "new-nav-a", :target => "_blank" %>
</li>
<li>
<%= link_to "项目", user_project_community_path(User.current), :class => "new-nav-a", :target => "_blank" %>
</li>
<li>
<%= link_to "竞赛", user_contest_community_path(User.current), :class => "new-nav-a", :target => "_blank" %>
</li>
<!--<li>-->
<!--<%#= link_to "智能实训", user_shixuns_user_path(User.current), :class => "new-nav-a", :target => "_blank" %>-->
<!--</li>-->
<li>
<%= link_to "问吧", forums_path, :class =>"new-nav-a", :target => "_blank" %>
</li>
<li><%= link_to "智能课堂", user_course_community_path(User.current), :class => "new-nav-a", :target => "_blank" %></li>
<li><%= link_to "游戏实训", user_project_community_path(User.current), :class => "new-nav-a", :target => "_blank" %></li>
<li><%= link_to "有问有答", forums_path, :class =>"new-nav-a", :target => "_blank" %></li>
<li><%= link_to "帮助中心", "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "new-nav-a", :target=>"_blank" %></li>
<div class="cl"></div>
</ul>
</div>
<ul class="fr inner-nav-user">
<li>
<%= link_to image_tag(url_to_avatar(User.current), :width =>"45", :height => "45", :class => "inner-nav-user-img fl", :alt=>"头像", :id => "nh_user_logo"),user_path(User.current)%>
<i class="fa fa-sort-down fl color_white mt10 ml5"></i>
<div class="cl"></div>
</li>
<div class="task-user-dropdown">
<font></font>
<ul class="task-user-dropdown-nav">
<li><%= link_to User.current.show_name, user_path(User.current), :class => "task-index-name task-hide" %></li>
<li class="task-line"></li>
<li><%= link_to '我的主页', user_path(User.current) %></li>
<li><%= link_to '我的课程', {:controller => "users", :action => "user_courselist", :id => User.current} %></li>
<li><%= link_to '我的实训', {:controller => "users", :action => "user_projectlist", :id => @user} %></li>
<li><%= link_to '待办任务', "" %></li>
<li class="task-line"></li>
<li><%= link_to '修改资料', my_account_path %></li>
<li><%= link_to '退出', logout_url_without_domain %></li>
</ul>
</div>
</ul>
<a href="#" class="fr inner-nav-mes mt10" style="color:#fff;">
<li class="fl">
<i class="fa fa-bell "></i>
<span class="inner-nav-cir">0</span>
</li>
</a>
</div>
<script type="text/javascript">
$(function(){
$("#navHomepageSearchInput").keypress(function(e){
var name = $.trim($('#navHomepageSearchInput').val());
if (e.keyCode == '13' && name != "" && name.length != 0) {
//$('#type').val($('input[type=radio]:checked').val());
$(this).parent().submit();
}
})
});
function search_in_header(obj){
var name = $.trim($('#navHomepageSearchInput').val());
if (name != "" && name.length != 0) {
//$('#type').val($('input[type=radio]:checked').val());
obj.parent().submit();
}
}
var onUserMessages = false;
var onNotice = false;
//搜索相关
$("#navHomepageSearch").mouseover(function(){
$("#navHomepageSearchType").show();
}).mouseout(function(){
$("#navHomepageSearchType").hide();
});
<% unless @force %>
$("#user_messages").mouseenter(function(){
onNotice = true;
$("#user_messages_list").show();
if($("#message_list_detail").length == 0){
$.get('<%=user_messages_unviewed_users_path %>');
$("#ajax-indicator").hide();
<script>
$(function() {
var oUl = document.getElementById("all_status");
var oUt = document.getElementById("all_status_show");
oUl.onclick = function (ev) {
var ev = ev || window.event;
var target = ev.target || ev.srcElement;
if (target.nodeName.toLowerCase() == 'li') {
$("#all_status_show_value").html($(target).html());
$(oUl).hide();
switch ($(target).html()){
case '课程':
$("#toggle2").val('1');
break;
case '班级':
$("#toggle2").val('2');
break;
case '实训':
$("#toggle2").val('3');
break;
case '问答':
$("#toggle2").val('4');
break;
case '用户':
$("#toggle2").val('5');
break;
case '资源':
$("#toggle2").val('6');
break;
}
}
}
oUt.onclick = function (ev) {
$(oUl).toggle();
}
var obj = $("#user_messages_list");
clearTimeout(obj.timer);
}).mouseleave(function(){
onNotice = false;
var obj = $("#user_messages_list");
setTimeout(function(){
if(!onNotice && !onUserMessages) {
obj.hide();
obj.html("<%=escape_javascript(render :partial => 'layouts/message_loading') %>");
} }, 500);
});
<% end %>
$("#message_list_detail").mouseenter(function(event){
event.stopPropagation();
onUserMessages = true;
}).mouseleave(function(){
onUserMessages = false;
});
var onUserAccount = false;
var onNoticeAccount = false;
$("#my_account_info").mouseenter(function(){
onNoticeAccount = true;
$("#my_account_info_ul").show();
var obj = $("#my_account_info_ul");
clearTimeout(obj.timer);
}).mouseleave(function(){
onNoticeAccount = false;
var obj = $("#my_account_info_ul");
setTimeout(function(){
if(!onNoticeAccount && !onUserAccount) {
obj.hide();
} }, 500);
});
$("#my_account_info_ul").mouseenter(function(event){
event.stopPropagation();
onUserAccount = true;
}).mouseleave(function(){
onUserAccount = false;
});
$("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
$("#topnav_login_list").show();
});
$("#navHomepageProfile").mouseleave(function(){
$("#homepageProfileMenuIcon").removeClass("homepageProfileMenuIconhover");
$("#topnav_login_list").hide();
});
function signout(){
$.post(
'<%= signout_path%>',
{}
);
}
</script>
</script>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','css/syllabus','css/moduel', 'css/user', 'css/font-awesome', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/bigdata-popup','css/bigdata-common', "css/bigdata-public",'css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','css/syllabus','css/moduel', 'css/user', 'css/font-awesome', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>

View File

@ -19,7 +19,7 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','css/syllabus', 'css/moduel', 'css/font-awesome','css/contest' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/bigdata-popup','css/bigdata-common', "css/bigdata-public",'css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','css/syllabus', 'css/moduel', 'css/font-awesome','css/contest' %>
<%= javascript_include_tag "course","avatars","header","attachments",'prettify' %>
<!-- page specific tags -->
<%= yield :header_tags -%>

View File

@ -0,0 +1,51 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/font-awesome', 'css/bigdata-common', "css/bigdata-public", "css/bigdata-user", 'css/bigdata-popup', :media => 'all' %>
<%= javascript_heads %>
<%= javascript_include_tag "bigdata/application","bigdata/user"%>
<%= yield :header_tags -%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- 配置 在生成的公式图片上去掉Math定义的右键菜单$$ $$ \( \) \[ \] 中的公式给予显示-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showMathMenu: false,
showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
</head>
<body onload="prettyPrint();">
<div class="header">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div id="Container">
<%= yield %>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
<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;">
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @user} %>
</div>
</body>
</html>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public','css/structure','css/courses','css/popup','prettify','css/syllabus','sy_public','css/moduel', 'css/font-awesome',:media => 'all'%>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/bigdata-popup','css/bigdata-common', "css/bigdata-public",'css/common','css/public','css/structure','css/courses','css/popup','prettify','css/syllabus','css/sy_public','css/moduel', 'css/font-awesome',:media => 'all'%>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus','cookie'%>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','css/syllabus','css/moduel', 'css/user','css/font-awesome', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/bigdata-popup','css/bigdata-common', "css/bigdata-public",'css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','css/syllabus','css/moduel', 'css/user','css/font-awesome', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>

View File

@ -0,0 +1,61 @@
<% str = current_user ? '我' : 'TA' %>
<p class="p1">
<span class="span1 font-14" id="my_watchlist_span">
<%= str %>的关注
<i class="color-grey" id="follow"><%= @user_watchlist_count %></i>
</span>
<span class="font-14" id="my_fanlist_span">
<%= str %>的粉丝
<i class="color-grey" id="fens"><%= @user_fanlist_count %></i>
</span>
</p>
<div id="my_watchlist">
<% if @user_watchlist_count == 0 %>
<p class="p2 font-16">
<% if current_user %>
<span>你还没有关注任何人,</span>
<a href="javascript:void(0);" class="changecolor">去找找感兴趣的用户</a>
<% else %>
<span>TA还没有关注任何人</span>
<% end %>
</p>
<% else %>
<div class="fens clearfix">
<% @user_watchlist.each do |user| %>
<dl class="list fl">
<dt><%= link_to image_tag(url_to_avatar(user), width: "56", height: "56", :alt => "头像"), user_path(user), :target => '_blank' %></dt>
<dd class="mb10"><%= link_to user.show_name, user_path(user), :target => '_blank' %></dd>
</dl>
<% end %>
<% if @user_watchlist_count > 12 %>
<%= link_to '查看更多', user_watchlist_user_path(@user), :target => '_blank', :class => 'color-grey' %>
<% end %>
</div>
<% end %>
</div>
<div id="my_fanlist" class="none">
<% if @user_fanlist_count == 0 %>
<p class="p2 font-16">
<% if current_user %>
<span>还没有人关注你,</span>
<a href="javascript:void(0);" class="changecolor">去让大家认识下你吧</a>
<% else %>
<span>TA还没有粉丝</span>
<% end %>
</p>
<% else %>
<div class="fens clearfix">
<% @user_fanlist.each do |user| %>
<dl class="list fl">
<dt><%= link_to image_tag(url_to_avatar(user), width: "56", height: "56", :alt => "头像"), user_path(user), :target => '_blank' %></dt>
<dd class="mb10"><%= link_to user.show_name, user_path(user), :target => '_blank' %></dd>
</dl>
<% end %>
<% if @user_fanlist_count > 12 %>
<%= link_to '查看更多', user_fanslist_user_path(@user), :target => '_blank', :class => 'color-grey' %>
<% end %>
</div>
<% end %>
</div>

View File

@ -1,4 +1 @@
$("#user_brief_introduction_show").html("<%= escape_javascript render(:partial => "layouts/user_brief_introduction", :locals => {:user => @user}) %>");
$("#user_brief_introduction_show").show();
$("#user_brief_introduction_edit").hide();
autoUrl("user_brief_introduction_show");

View File

@ -1,48 +1,234 @@
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
<input type="hidden" value="<%= @type %>" name="type" id="user_activities_type">
<script>
$(function(){
$($(".homepage_tab_div")[$(".homepage_tab_div").length - 1]).css("border", "none");
});
// 个人主页的tab
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
// g('message_all_list').className='undis';
//如果有N个标签,就将i<=N;
for(var i = 1; i <= 6; i++){
if (g('user_homepage_tab_'+i) != null)
g('user_homepage_tab_'+i).className='flex-cell_homepage';
// if(g('message_list_content_'+i) != null)
// g('message_list_content_'+i).className='undis';
}
// g('message_list_content_'+n).className='dis';
g('user_homepage_tab_'+n).className='homepageClickBackground';
}
</script>
<% if is_current_user %>
<% if task_count(@unsolved_issues_count, @unfinished_homework_count, @unfinished_test_count, @unfinished_poll_count, @anonymous_evaluation_count, @applied_message_alls_count) > 0 %>
<div class="homepagetopBanner mb10" style="width:748px;">
<div class="flex-container_homepage">
<%= render :partial => "users/task_tip" %>
<% current_user = @user == User.current %>
<% str = current_user ? '我' : 'TA' %>
<div class="-task-con">
<div class="-task-con-per cl">
<div class="photo fl">
<%= image_tag(url_to_avatar(@user), :class => "person", :alt => "头像") %>
<% if current_user %>
<div class="changephoto font-14">更换头像</div>
<% end %>
</div>
<div class="-task-con-data fl">
<div class="top cl">
<div class="top-left fl">
<p class="p1 mt20 mb20 font-16">
<span><%= @user.login %></span>
<i class="fa fa-venus" aria-hidden="true"></i>
</p>
<p class="p2 font-16">
<span class="wordbold">
<%= @user.show_name %>
<% if @user.user_extensions && @user.user_extensions.identity %>
(<%= get_user_roll @user %>)
<% end %>
</span>
<span class="pl20 pr20">
<% if !@user.user_extensions.school_id.blank? && @user.user_extensions.school %>
<%= @user.user_extensions.school.name %>
<% end %>
</span>
<% if @user.authentication %>
<span class="color-green">
<i class="fa fa-check-circle-o" aria-hidden="true"></i>
已认证
</span>
<% else %>
<span class="color-grey">
<i class="fa fa-times-circle-o" aria-hidden="true"></i>
未认证
</span>
<% end %>
</p>
</div>
<div class="top-right fr font-16 mt15 mr10">
<% if current_user %>
<div class="mynew">
<p>
<%= link_to '编辑我的资料', my_account_path %>
</p>
<p class="p2 font-14">
<i class="fa fa-eye" aria-hidden="true"></i>
<% update_visiti_count @user %>
<span><%= @user.visits.to_i %></span> 次访问
</p>
<p class="font-14">帐户安全:
<a class="<%= @user.phone.blank? ? 'color-grey' : 'color-green' %>" href="<%= security_settings_path %>">
<i class="fa fa-mobile pr10" aria-hidden="true"></i>
</a>
<a class="<%= @user.mail.blank? ? 'color-grey' : 'color-green' %>" href="<%= security_settings_path %>">
<i class="fa fa-envelope-o pr10" aria-hidden="true"></i>
</a>
</p>
</div>
<% else %>
<div class="itnew">
<p class="p2 font-14 color-grey">
<i class="fa fa-eye" aria-hidden="true"></i>
<span><%= @user.visits.to_i %></span> 次访问
</p>
<p class="sub clearfix">
<% if(@user.watched_by?(User.current)) %>
<%= link_to "已关注",
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
:class => "fl font-14 user_watch",
:id => "cancel_watch",
:method => "delete",
:remote => "true",
:title => "取消关注" %>
<% else %>
<%= link_to "添加关注",
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
:class => "fl font-14 user_watch",
:method => "post",
:remote => "true",
:title => "添加关注" %>
<% end %>
<a href="<%= feedback_path(@user, :host=> Setting.host_user) %>" class="fr font-14">给ta留言</a>
</p>
<!--<div class="alert">-->
<!--<p>你确定不再关注<span>kosasa</span>?</p>-->
<!--<p><span>确定</span><span>取消</span></p>-->
<!--</div>-->
</div>
<% end %>
</div>
</div>
<div class="bot">
<% if current_user %>
<input type="hidden" id="current_user_id" value="<%= @user.id %>">
<input type="text" class="font-14 task-hide" id="user_breif_introduction" placeholder="一句话介绍一下自己吧~" value="<%= @user.user_extensions.brief_introduction %>"/>
<% else %>
<p class="font-14 task-hide" title="<%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %>">
<%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %>
</p>
<% end %>
</div>
</div>
</div>
<div class="-task-con-int">
<div class="blog">
<p class="p1 font-14 "><%= str %>的博客
<span class="font-12 color-grey" id="blog"><%= @blog_count %></span>
</p>
<% if @blog_count == 0 %>
<p class="p2 font-16 ">
<% if current_user %>
<span>你一篇博客也没写过,</span>
<a href="<%= user_blogs_path(:user_id => @user) %>" target="_blank" class="changecolor">现在写博客</a>
<% else %>
<span><%= @user.show_name %>很懒,一篇博客也没写过</span>
<% end %>
</p>
<% else %>
<div class="p3 clearfix">
<% if @blog_count > 3 %>
<%= link_to '查看更多', user_blogs_path(:user_id => @user), :target => '_blank', :class => 'check color-grey' %>
<% end %>
<% @blog_list.each_with_index do |blog, index| %>
<div class="blognew fl pl10 <%= index == 0 ? '' : 'hasborder' %>">
<%= link_to blog.title.to_s.html_safe, user_blog_blog_comment_path(:user_id => blog.author, :blog_id => blog.blog.id, :id => blog), :class => "font-14" %>
<p>
<span calss="font-12 color-grey pr10"><%= format_time blog.created_at %>&nbsp;发布</span>
<i class="fa fa-eye font-12 color-grey" aria-hidden="true"></i>
<span class="font-12 color-grey"><%= blog.visits %></span>
</p>
</div>
<% end %>
</div>
<% end %>
</div>
<div class="favour" id="watcher_fan_list">
<%= render :partial => 'edu_user_watch_fan_list', :locals => {:current_user => current_user} %>
</div>
<div class="passageway mt15">
<div class="hint">
<div class="pr10 color-blue play">
<i class="fa fa-sort-down zhuan mr5" aria-hidden="true"></i>开始
</div>
<ul class="list">
<li><%= link_to '创建课程', new_syllabus_path(:host => Setting.host_course), :target => "_blank" %></li>
<li><%= link_to '创建班级', new_course_path(:host => Setting.host_course), :target => "_blank" %></li>
<li><%= link_to "加入班级", join_private_courses_courses_path, :remote => true, :method => "post" %></li>
<li><%= link_to "发现实训", '', :target => "_blank" %></li>
<li><%= link_to '发起求助', new_forum_memo_path(:forum_id => Forum.first.id, :forum_index => true), :target => "_blank" %></li>
</ul>
</div>
<% if @courses_count == 0 && @shixuns_count == 0 %>
<div class="kong">
<p class="p1 font-14 cl color-grey">
<span class="fl">快速入口</span>
</p>
<div class="p2 font-14 color-grey">
<img src="../images/edu_user/logo1.jpg"/>
<p>显示你常用的课堂社区、实训社区列表</p>
<p class="pb20 font-14">你还没有参与任何社区</p>
</div>
</div>
<% else %>
<div class="hascon">
<p class="title">
<% if @courses_count == 0 %>
<span class="font-14" id="my_shixuns_span">实训<i class="ml10"><%= @shixuns_count %></i></span>
<% elsif @shixuns_count == 0 %>
<span class="font-14" id="my_courses_span">课堂<i class="ml10"><%= @courses_count %></i></span>
<% else %>
<span class="font-14" id="my_courses_span">课堂<i class="ml10"><%= @courses_count %></i></span>
<span class="font-14" id="my_shixuns_span">实训<i class="ml10"><%= @shixuns_count %></i></span>
<% end %>
</p>
<div class="lesson ml10 mr10" id="my_courses_list">
<% @courses.each do |course| %>
<p>
<a href="<%= course_path(course) %>" target="_blank" class="font-16"><i class="fa fa-dot-circle-o color-grey" aria-hidden="true"></i>&nbsp;&nbsp;<%= course.name %></a>
<span class="font-14 hasmargin">课程:<a href="<%= syllabus_path(course.syllabus) %>" target="_blank"><%= course.syllabus.title %></a></span>
<span class="font-14 haspadding">更新时间:<%= format_time course.updatetime %></span>
<span class="font-14">分享<i class="fa fa-weixin font-14" aria-hidden="true"></i></span>
</p>
<% end %>
<% if @courses_count > 8 %>
<a href="<%= user_course_community_path(@user) %>" target="_blank" class="font-18 color-grey expand">点击查看全部</a>
<% end %>
</div>
<div class="train ml10 mr10 none" id="my_shixuns_list">
<% @shixuns.each do |shixun| %>
<p>
<span class="font-16"><i class="fa fa-dot-circle-o color-grey" aria-hidden="true"></i>&nbsp;&nbsp;胡莎莎/Helloword:java实训入门</span>
<span class="hasmargin font-14">已解锁第<i>2</i>关/共<i>8</i>关</span>
<span class="font-14">上次离开时间2017-02-09 15:21</span>
</p>
<% end %>
<% if @shixuns_count > 8 %>
<a href="<%= user_course_community_path(@user) %>" target="_blank" class="font-18 color-grey expand">点击查看全部</a>
<% end %>
</div>
</div>
<% end %>
<div id="user_homepage_message_list">
<%= render :partial => 'users/user_message_list'%>
</div>
<% else %>
<div class="homepageRightBanner">
<div class="NewsBannerName">Ta的动态</div>
</div>
<!--显示个人主页-->
<% if @user_activities_count > 0 %>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} %>
<% else %>
<div class="mb10">
<%= render :partial => 'users/no_data' %>
</div>
<% end %>
<% end %>
</div>
</div>
</div>
<!-------------------侧边提示区域-------------------------->
<div class="-task-sidebar">
<div class="feedback" tooltips="意见反馈">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</div>
<div class="scan" tooltips="快来扫一扫">
<i class="fa fa-qrcode" aria-hidden="true"></i>
</div>
<div class="consult" tooltips="在线咨询">
<a target="_blank" class="color_white" href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
<div class="gotop" tooltips="返回顶部">
<i class="fa fa-arrow-up" aria-hidden="true"></i>
</div>
</div>

View File

@ -2,7 +2,8 @@
//点击头像下面的添加关注按钮
<% if( params[:target_id] == params[:object_id] ) %>
<% if @user %>
$("#watch_user_btn_div").html("<%= escape_javascript render(:partial => "layouts/user_watch_btn", :locals => {:target => watched.first}) %>");
$(".user_watch").replaceWith("<%= escape_javascript watcher_link_for_user(@user, User.current)%>");
$("#watcher_fan_list").html("<%= escape_javascript(render :partial => 'users/edu_user_watch_fan_list', :locals => {:current_user => (@user == User.current)}) %>");
<% end %>
$("#user_fans_number").html("<%= watched.first.watcher_users.count.to_s%>");
$(".add_cancel_watch_<%= watched.first.id %>").html("<%= escape_javascript (render :partial => 'users/watch_btn_for_picture', :locals => {:user => watched.first}) %>");

View File

@ -3,5 +3,6 @@
// $('#project-'+'<%=@project.id%>'+'-watcher').html('取消关注');
$('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>");
<% else %>
$('#fans_num').html('<%= j(@user.watcher_users.count) %>');
$(".user_watch").replaceWith("<%= escape_javascript watcher_link_for_user(@users, User.current)%>");
$("#watcher_fan_list").html("<%= escape_javascript(render :partial => 'edu_user_watch_fan_list', :locals => {:current_user => (@user == User.current)}) %>");
<% end %>

View File

@ -604,6 +604,7 @@ RedmineApp::Application.routes.draw do
match 'account/reset_psd', :via => [:get, :post]
match 'account/email_valid', :to => 'account#email_valid', :via => :get
match 'account/resendmail', :to => 'account#resendmail', :via=> :get, :as => 'resendmail'
match 'account/security_settings', :to => 'account#security_settings', :via => :get, :as => "security_settings"
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
@ -825,7 +826,7 @@ RedmineApp::Application.routes.draw do
match 'sort_syllabus_list', :to => 'users#sort_syllabus_list', :via => :get, :as => "sort_syllabus_list"
match 'sort_project_list', :to => 'users#sort_project_list', :via => :get, :as => "sort_project_list"
get 'edit_brief_introduction'
post 'edit_brief_introduction'
get "user_resource"
match "user_issues", :to => 'users#user_issues', :via => [:get, :post], :as => "user_issues"
match "user_manage_issues", :to => 'users#user_manage_issues', :via => [:get, :post], :as => "user_manage_issues"

View File

@ -0,0 +1,6 @@
class AddColumnToUsers < ActiveRecord::Migration
def change
add_column :users, :authentication, :boolean, :default => 0
add_column :blog_comments, :visits, :integer, :default => 0
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -0,0 +1,182 @@
/**
* Created by cxt on 2017/4/18.
*/
//---------------侧边固定提示功能---------------//
$(function(){
var $desc = $("<div class='-task-desc'></div>").appendTo("body");
$(".-task-sidebar>div").hover(function(){
var $tool = $(this).attr("tooltips");
$desc.html($tool+"<div><img src='../images/edu_user/jt.png'></div>");
$desc.css({
left:$(this).offset().left - $desc.width()-30,
opacity:0,
top:$(this).offset().top
}).stop().animate({
left:$(this).offset().left - $desc.width()-5,
opacity:1
},400);
},function(){
$desc.stop().animate({
left:$(this).offset().left - $desc.width()-30,
opacity:0
},200);
});
$(".gotop").click(function(){
$("html,body").scrollTop(0);
});
});
//------------------弹框相关--------------------//
function hideModal(el) {
if($("#popupWrap").length > 0){
$("#popupWrap").remove();
}
else{
var modal;
if (el) {
modal = $(el).parents('.ui-dialog-content');
} else {
modal = $('#ajax-modal');
}
modal.dialog("close");
}
}
// 公共弹框样式
// 建议左右栏的Width460Height190
// 建议宽屏对应值Width760Height500
function pop_box_new(value, Width, Height){
w = ($(window).width() - Width)/2;
h = ($(window).height() - Height)/2;
var container =$('<div></div>');
container.attr('id','popupWrap');
$(document.body).append(container);
$("#popupWrap").html(value);
$("#popupWrap").show();
$('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"99999","background-color":"#fff"});
$('#popupWrap').find("a[class*='close']").click(function(){
$("#popupWrap").hide();
});
// w = ($(window).width() - Width)/2;
// h = ($(window).height() - Height)/2;
// $("#ajax-modal").html(value);
// showModal('ajax-modal', Width + 'px');
// $('#ajax-modal').siblings().remove();
// $('#ajax-modal').parent().css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed"});
// $('#ajax-modal').parent().removeClass("resourceUploadPopup popbox_polls popbox");
// $('#ajax-modal').css({"padding":"0","overflow":"hidden"});
// $('#ajax-modal').parent().attr("id","popupWrap");
//拖拽
function Drag(id) {
this.div = document.getElementById(id);
if (this.div) {
this.div.style.cursor = "move";
this.div.style.position = "fixed";
}
this.disX = 0;
this.disY = 0;
var _this = this;
this.div.onmousedown = function (evt) {
_this.getDistance(evt);
document.onmousemove = function (evt) {
_this.setPosition(evt);
};
_this.div.onmouseup = function () {
_this.clearEvent();
}
}
}
Drag.prototype.getDistance = function (evt) {
var oEvent = evt || event;
this.disX = oEvent.clientX - this.div.offsetLeft;
this.disY = oEvent.clientY - this.div.offsetTop;
};
Drag.prototype.setPosition = function (evt) {
var oEvent = evt || event;
var l = oEvent.clientX - this.disX;
var t = oEvent.clientY - this.disY;
if (l <= 0) {
l = 0;
}
else if (l >= document.documentElement.clientWidth - this.div.offsetWidth) {
l = document.documentElement.clientWidth - this.div.offsetWidth;
}
if (t <= 0) {
t = 0;
}
else if (t >= document.documentElement.clientHeight - this.div.offsetHeight) {
t = document.documentElement.clientHeight - this.div.offsetHeight;
}
this.div.style.left = l + "px";
this.div.style.top = t + "px";
};
Drag.prototype.clearEvent = function () {
this.div.onmouseup = null;
document.onmousemove = null;
};
new Drag("popupWrap");
$("#popupWrap input, #popupWrap textarea, #popupWrap ul, #popupWrap a").mousedown(function(event){
event.stopPropagation();
new Drag("popupWrap");
});
}
//点击删除时的确认弹框: 不走destroy方法
function delete_confirm_box(url, str){
var htmlvalue = '<div class="task-popup" style="width:300px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
'<a href="'+ url +'" class="task-btn task-btn-blue fr" data-remote="true">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
//点击删除时的确认弹框: 走destroy方法,remote为true
function delete_confirm_box_2(url, str){
var htmlvalue = '<div class="task-popup" style="width:300px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
'<a href="'+ url +'" class="task-btn task-btn-blue fr" data-method="delete" data-remote="true">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
//点击删除时的确认弹框: 走destroy方法
function delete_confirm_box_3(url, str){
var htmlvalue = '<div class="task-popup" style="width:300px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
'<a href="'+ url +'" class="task-btn task-btn-blue fr" data-method="delete">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
//提示框:只有一个按钮,点击关闭弹框
function notice_sure_box(str){
var htmlvalue = '<div class="task-popup" style="width:350px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">知道了</a></div></div>';
pop_box_new(htmlvalue, 350, 140);
}
//提示框:只有一个确定按钮,点击关闭弹框
function notice_box(str){
var htmlvalue = '<div class="task-popup" style="width:300px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
// 长提示框:只有一个确定按钮,点击关闭弹框
function long_notice_box(str){
var htmlvalue = '<div class="task-popup" style="width:380px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">确定</a></div></div>';
pop_box_new(htmlvalue, 380, 140);
}
//提示框:只有一个确定按钮,点击跳转
function notice_box_redirect(url, str){
var htmlvalue = '<div class="task-popup" style="width:300px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey">提示</h3><a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
'<a href="'+ url +'" class="task-btn task-btn-blue">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}

View File

@ -0,0 +1,70 @@
/**
* Created by cxt on 2017/4/18.
*/
//-------------------浮动“开始”出现增加课程列表----------------//
$(function(){
$(".-task-con-int .passageway .hint ").mouseenter(function(){
$(".-task-con-int .passageway .hint .list").show();
$(".-task-con-int .passageway .hint .list").css({
opacity:0,
}).stop().animate({
opacity:1
},1000);
});
$(".-task-con-int .passageway .hint .list li").hover(function(e){
$(e.target).css({
background:"#e6e6e6"
})
},function(e){
$(e.target).css({
background:"#fff"
})
});
$(".-task-con-int .passageway .hint").mouseleave(function(){
$(".-task-con-int .passageway .hint .list").hide();
$(".-task-con-int .passageway .hint .list").css({
opacity:1,
}).stop().animate({
opacity:0
},1000);
});
});
//---------------------------我的关注-----------------------------//
$(function(){
$("#my_watchlist_span").live('click', function(){
$("#my_fanlist_span").removeClass('span1');
$("#my_watchlist_span").addClass('span1');
$("#my_fanlist").hide();
$("#my_watchlist").show();
});
$("#my_fanlist_span").live('click', function(){
$("#my_watchlist_span").removeClass('span1');
$("#my_fanlist_span").addClass('span1');
$("#my_watchlist").hide();
$("#my_fanlist").show();
});
});
//---------------------------修改个人简介-----------------------------//
$(function(){
$("#user_breif_introduction").on('blur', function(){
$.post(
'/users/' + $("#current_user_id").val() + '/edit_brief_introduction',
{ brief_introduction: $("#user_breif_introduction").val() },
function (data) {
}
);
});
});
//---------------------------取消关注/关注-----------------------------//
$(function(){
$("#cancel_watch").live('mouseenter',function(){
$("#cancel_watch").html("取消关注");
});
$("#cancel_watch").live('mouseleave',function(){
$("#cancel_watch").html("已关注");
});
});

View File

@ -25,16 +25,18 @@ input,textarea,select{ background: #fff; border:1px solid #ccc; color:#666;}
.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.hide-text {overflow:hidden; white-space:nowrap;}
/*隐藏*/
.none{display: none;}
/*通用文字功能样式*/
.font-bd{ font-weight: bold;}
.color-red{ color:#d2322d;}
.color-green{color:#51a74f;}
.color-green{color:#51a74f !important;}
.color-light-green{color:#29bd8b;}
.color-blue{color:#3498db;}
.color-orange{color:#ee4a1f;}
.color-yellow{color:#f0ad4e;}
.color-grey{color:#888;}
.color_white{ color:#fff;}
.color-grey{color:#888 !important;}
.color_white{ color:#fff !important;}
a.link-color-grey{color:#888;}
a:hover.link-color-grey{color:#29bd8b;}
a.link-color-green{color:#29bd8b;}
@ -53,8 +55,8 @@ a:hover.link-color-grey02{ color:red;}
/*通用内外边距*/
.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}
.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}
.ml5{ margin-left: 5px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml50{ margin-left: 50px;}.ml230{ margin-left: 230px;}
.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}
.ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml50{ margin-left: 50px;}.ml230{ margin-left: 230px;}
.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr60{ margin-right:60px;}
.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}
.pb5{ padding-bottom:5px;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}
.pl5{ padding-left:5px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}
@ -112,6 +114,7 @@ a:hover.task-btn-ver{background:#5f7cab;}
.tag-border-grey{ background-color: #fff;border-color: #e2e2e2; color: #888;}
.cir-orange{background: #ff6530;color: #fff; border-radius: 15px; padding: 0 5px; display: inline-block; font-size: 12px; height: 16px;line-height: 16px; }
.cir-red{background: red;color: #fff; border-radius: 15px; padding: 0 5px; display: inline-block; font-size: 12px; height: 16px;line-height: 16px; }
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
/****************************/
/* 页面结构*/
.task-pm-content{ width: 1000px; margin: 0 auto; }

View File

@ -99,7 +99,7 @@ a:hover.btn-blue-line{background: #3b94d6; color:#fff;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
.inner-nav-mes{ font-size:28px; color: #fff; position: relative; margin-top:3px; margin-right:35px;}
.inner-nav-cir{ position: absolute; top:0px; left:15px; background:#3b94d6; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size: 10px;}
.inner-nav-user{ width: 40px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
.inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);}
/*消息弹框*/
@ -146,10 +146,3 @@ a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px;
.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}
.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;}
.drag_slider .drag_text{ position: absolute; top: 0px; width: 350px; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;}
/*头像下拉弹框*/
.my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;}
.my_account_info li a{ color: #888;}
.my_account_info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.my_account_info li{ padding-left: 5px; line-height: 1.5;}
.li_bottom_border{ border-bottom:1px solid #eee;}

View File

@ -1,11 +1,12 @@
/* 修改密码成功弹框 */
.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:3px; -webkit-box-shadow:0 0 10px #ccc; -moz-box-shadow:0 0 10px #ccc; box-shadow:0 0 10px #ccc; margin: 50px auto;}
.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:3px; -webkit-box-shadow:0 0 10px #ccc; -moz-box-shadow:0 0 10px #ccc; box-shadow:0 0 10px #ccc;}
.task-popup-text-center{ text-align: center; color: #666;}
.task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; }
.task-popup-content{ padding:15px;}
.task-popup-submit{ margin:15px auto; width: 200px;}
.task-popup-sure{ margin:15px auto; width: 94px;}
.task-popup-bggrey{ background:#ccc; color:#333;}
/************实训弹窗****************/
.task-popup-warp{ width: 100%; height:100%; background:black; position:fixed;}
.task-popup-box{ position: relative; margin:150px auto; }
@ -18,4 +19,12 @@ a:hover.task-popup-close{background:url(/images/task/task-close.png) -40px 0px n
a.task-su-btn{display: block;background:url(/images/task/task-su-btn.png) 0px -64px no-repeat; width: 138px; height: 57px;color:#ee4a1f; line-height: 50px; text-align: center; font-size: 16px; margin:20px auto;}
a:hover.task-su-btn{background:url(/images/task/task-su-btn.png) 0px 0px no-repeat; }
a.task-su-btn-white{ display: inline-block; padding:8px 25px; border:1px solid #fff; color:#fff; text-align: center; border-radius:5px; font-size:14px;}
a:hover.task-su-btn-white{ color: #ee4a1f; border:1px solid #ee4a1f; }
a:hover.task-su-btn-white{ color: #ee4a1f; border:1px solid #ee4a1f; }
/* 模板弹框 20170407byLB */
#task_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
.task_popup_top{background:#ccc;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;}
.task_popup_top h3{ font-size:14px; color:#333; line-height:40px; padding-left:10px; }
a.task_icons_close{width:20px; height:20px;display:block;background: url(../images/popup/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40px 0px no-repeat;}
.task_popup_con{ padding:20px;}

View File

@ -7,15 +7,16 @@ a.new-nav-a{ display: block; font-size: 14px; line-height: 50px; color:#fff;}
a:hover.new-nav-a{ color:#3b94d6; text-decoration: none;}
.header-search{border-radius:3px; background:#fff;}
.header-search a:hover,a:link, a:visited{ text-decoration: none; color:#666;}
input.header-search-input{ width:200px; height:30px; padding:0 5px; border-style: none; border: none;outline:none;}
input.header-search-input{ width:135px; height:30px; padding:0 5px; border-style: none; border: none;outline:none;}
.innner-nav li{float:left;}
.innner-nav li a{margin-right: 25px; display: block; color:#fff; padding:0 10px; }
.innner-nav li a{ display: block; color:#fff; padding:0 10px; }
.inner-btnbox02{ width:270px; margin: 30px auto 0;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
.inner-nav-mes{ font-size:20px; color:#fff; position: relative; margin-right:35px;}
.inner-nav-cir{ position: absolute; top:0px; left:15px; background:#ff6530; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size:10px; height:16px; line-height:16px;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
select.header-search-select{ border:none; font-size:14px; padding:5px; background: none;}
.task-user-dropdown{width:120px; background-color:#fff; border-radius:3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:relative; top:10px; right:45px; display: none; z-index:999;}
.task-user-dropdown font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left:60px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
@ -24,6 +25,31 @@ input.header-search-input{ width:200px; height:30px; padding:0 5px; border-style
.task-user-dropdown-nav li:hover{ background:#eee;}
li.task-line{ height: 1px; line-height: 1px; border-bottom:1px solid #eee;}
.inner-nav-user:hover .task-user-dropdown{ display:block;}
dropdown{display: inline-block; height:30px; }
dropdown label, dropdown ul li{ display: block; width:35px; padding:4px 10px;}
dropdown label:hover, dropdown ul li:hover{background: #eee; color:#666;cursor: pointer;}
dropdown label{color: #666;border-radius: 3px 0 0 3px; position: relative; z-index: 2;}
dropdown input{display: none;}
dropdown input:checked + label{ background: #fff;color:#666;}
dropdown ul{ position: absolute; visibility: visible; opacity: 1; top: 38px; background: #fff; z-index: 99;}
$colors: #fff, #0072B5, #2C3E50;
@for $i from 1 through length($colors) {
dropdown ul li:nth-child(#{$i}) {
border-left: 4px solid nth($colors, $i);
.fa{
color: nth($colors, $i);
}
&:hover {
background: nth($colors, $i);
color: white;
.fa{
color: white;
}
}
}
}
.animate{ -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -ms-transition: all .3s;
transition: all .3s; backface-visibility:hidden; -webkit-backface-visibility:hidden; /* Chrome and Safari */ -moz-backface-visibility:hidden; /* Firefox */ -ms-backface-visibility:hidden; /* Internet Explorer */}
/* 底部 */
.footer{width:100%; height:100px; background-color:#fff; }
.footer_con{ width:1200px; height:100px; margin:0 auto; text-align: center; padding:20px 0; }
@ -156,3 +182,10 @@ input.task-form-100,textarea.task-form-100,select.task-form-100,.task-form-100{p
input.task-height-40,textarea.task-height-40,.task-height-40,select.task-height-40{height:40px;}
input.task-height-150,textarea.task-height-150,.task-height-150{height:150px;}
input.task-height-150,textarea.task-height-150,.task-height-100{height:100px;}
/*头像下拉弹框*/
.my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;}
.my_account_info li a{ color: #888;}
.my_account_info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.my_account_info li{ padding-left: 5px; line-height: 1.5;}
.li_bottom_border{ border-bottom:1px solid #eee;}

View File

@ -36,7 +36,7 @@ a:hover.btn-blue-line{background: #3b94d6; color:#fff;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
.inner-nav-mes{ font-size:28px; color: #fff; position: relative; margin-top:3px; margin-right:35px;}
.inner-nav-cir{ position: absolute; top:0px; left:15px; background:#3b94d6; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size: 10px;}
.inner-nav-user{ width: 40px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
.inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);}
/*消息弹框*/

View File

@ -0,0 +1,109 @@
/* 个人主页 20170411byWang */
.-task-con{width:1200px;margin:20px auto;}
/*个人信息*/
.-task-con-per{width:100%;background:#fff;}
.-task-con-per .photo{width:150px;position:relative;margin:1%;}
.-task-con-per .photo .person{width:150px;height:150px;}
.-task-con-per .photo .changephoto{width:100%;text-align:center;line-height:38px;color:#fff;background:black;opacity:0.4;filter: alpha(opacity=40);position:absolute;bottom:0;left:0;cursor: pointer;}
.-task-con-data{width:85%;}
.-task-con-data .top{width:100%;}
.-task-con-data .top .top-left{width:46%;}
.-task-con-data .top .top-right{width:20%;text-align: right;}
.-task-con-data .top .top-right .mynew{display:block;width:100%;}
.-task-con-data .top .top-right .mynew p a{color:#5789c8;}
.-task-con-data .top .top-right .mynew .p2{line-height:50px;color:#ccc;}
.-task-con-data .top .top-right .mynew p .fa{position:relative;}
.-task-con-data .top .top-right .mynew p .fa .fa-check,.fa-close{position:absolute;left:8px;bottom:0;display:none;}
.-task-con-data .bot{width:100%;}
.-task-con-data .top .top-right .itnew .p2{padding:20px 0 10px 0}
.-task-con-data .top .top-right .itnew .sub a{border:1px solid #eee;display:inline-block;padding:2px 10px;text-align:center;width: 57px;}
.-task-con-data .top .top-right .itnew .sub{width:100%;}
.-task-con-data .bot input{width:100%;height:60px;line-height:60px;border:none;outline:none;background:#fff;}
.-task-con-data .bot p{width: 100%; height: 45px; padding-top: 33px; background: #fff;}
/*-----------------博客------------------------*/
.-task-con-int .blog,.favour{width:100%;margin-top:15px;background:#fff;}
.-task-con-int .blog .p1{width:100%;height:40px;background:#f2f2f2;line-height:40px;text-indent:10px;}
.-task-con-int .blog .p1 span{padding:0 5px;border-radius:8px;background:#bdbdbd;line-height:14px;}
.-task-con-int .blog .p2{line-height:90px;text-align:center;}
.-task-con-int .blog .p2:hover .changecolor{color:#29bd8b;}
.-task-con-int .blog .p3{height:90px;position:relative;}
.-task-con-int .blog .p3 .check{position:absolute;right:10px;top:-27px;}
.-task-con-int .blog .p3 .blognew{width:32%;}
.-task-con-int .blog .p3 .hasborder{border-left:1px solid #eee;}
.-task-con-int .blog .p3 .blognew .font-14{height:60px;display:flex;align-items: center;color:#333;}
.-task-con-int .blog .p3 .blognew p span{height:30px;padding-right:10px;display:inline-block;}
/*-------------------交流-------------------------*/
.-task-con-int .favour .p1{background:#f2f2f2;}
.-task-con-int .favour .p1 span{width:10%;display:inline-block;line-height:40px;text-indent:10px;cursor: pointer;}
.-task-con-int .favour .p1 span i{font-size:12px;font-style:normal;padding:0 5px;border-radius:8px;background:#ddd;line-height:14px;}
.-task-con-int .favour .p1 .span1{background:#fefefe;}
.-task-con-int .favour .p2{line-height:90px;text-align:center;}
.-task-con-int .favour .p2:hover .changecolor{color:#29bd8b;}
/*.-task-con-int .favour .fens{position:relative;}*/
/*.-task-con-int .favour .fens a{position:absolute;right:10px;top:10px;}*/
.-task-con-int .favour .fens .list{width:100px;text-align:center;}
.-task-con-int .favour .fens .list dt{margin:20px;}
/*-----------------------入口------------------------*/
.-task-con-int .passageway{width:100%;background:#fff;position:relative;}
.-task-con-int .passageway .hint{position:absolute;top:0;right:0;width:80px;text-align:center;}
.-task-con-int .passageway .hint .play{display:block;line-height:40px;}
.-task-con-int .passageway .hint .list{-webkit-box-shadow: 0 0 3px #999; -moz-box-shadow: 0 0 3px #999; box-shadow: 0 0 3px #999;cursor:pointer;display:none;opacity:0;}
.-task-con-int .passageway .hint .list li{border-radius:2px; padding-top:1px;}
.-task-con-int .passageway .kong .p1{background:#f2f2f2;line-height:40px;}
.-task-con-int .passageway .kong .p1 span{text-indent:10px;}
.-task-con-int .passageway .kong .p2{width:100%;position:relative;}
.-task-con-int .passageway .kong .p2 img{ padding:100px 0 30px 500px;}
.-task-con-int .passageway .kong .p2 p{text-align:center;width:100%;line-height:30px;}
.-task-con-int .passageway .hint .list{width:80px;text-align:center;-webkit-box-shadow: 0 0 3px #999; -moz-box-shadow: 0 0 3px #999; box-shadow: 0 0 3px #999;cursor:pointer; }
.-task-con-int .passageway .hint .list li{border-radius:2px; padding-top:1px;}
.-task-con-int .passageway .hascon i{font-style:normal;}
.-task-con-int .passageway .hascon .title{background:#f2f2f2;line-height:40px;}
.-task-con-int .passageway .hascon .title span{width:10%;display:inline-block;line-height:40px;text-indent:10px;}
.-task-con-int .passageway .hascon .title span i{font-size:12px;font-style:normal;padding:0 5px;border-radius:8px;background:#ddd;line-height:14px;}
.-task-con-int .passageway .hascon .lesson p{height:70px;line-height:70px;border-bottom:1px dotted #eee;}
.-task-con-int .passageway .hascon .train p{height:70px;line-height:70px;border-bottom:1px dotted #eee;}
.-task-con-int .passageway .hascon .lesson p .hasmargin{margin: 0 4.2% 0 21.7%;}
.-task-con-int .passageway .hascon .lesson p .haspadding{margin: 0 8.3%;}
.-task-con-int .passageway .hascon .train p .hasmargin{margin: 0 12.5% 0 25%;}
.-task-con-int .passageway .hascon .expand{display:block;;height:70px;line-height:70px;text-align:center;;border-bottom:1px dotted #eee;}
/*--------------------------------------箭头动画效果-----------------------------------*/
.-task-con-int .passageway .hint .zhuan{
-moz-transform-origin:center center;
-moz-transform:rotate(-90deg);
-moz-transition:all .5s ease-in .1s;
-webkit-transform-origin:center center;
-webkit-transform:rotate(-90deg);
-webkit-transition:all .5s ease-in .1s;
-o-transform-origin:center center;
-o-transform:rotate(-90deg);
-o-transition:all .5s ease-in .1s;
-ms-transform-origin:center center;
-ms-transform:rotate(-90deg);
-ms-transition:all .5s ease-in .1s;
transform-origin:center center;
transform:rotate(-90deg);
transition:all .5s ease-in .1s;
}
.-task-con-int .passageway .hint:hover .zhuan{
padding:0px 5px 0 0px ;
-moz-transform:rotate(0deg);
-moz-transition:all .5s ease-in .1s;
-webkit-transform:rotate(0deg);
-webkit-transition:all .5s ease-in .1s;
-o-transform:rotate(-0deg);
-o-transition:all .5s ease-in .1s;
-ms-transform:rotate(-0deg);
-ms-transition:all .5s ease-in .1s;
transform:rotate(-0deg);
transition:all .5s ease-in .1s;
}
/*-------------------侧边提示区域--------------------------*/
.-task-sidebar{position:fixed;width:35px;height:20%;right:5%;bottom:5%;z-index: 10;}
.-task-sidebar div{width:35px;height:28px;margin-bottom:3px;background:cornflowerblue;color:#fff;font-size:20px;text-align:center;padding-top:7px;}
.-task-sidebar div:hover {background:#ccc;}
.-task-desc{background:#494949;width:90px;height:35px;line-height: 35px;text-align: center;
position: absolute;color: #fff;font-size: 13px;z-index: 10;opacity: 0;}
.-task-desc div{position: absolute;top: 10px;right: -7px;}

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ a:hover.btn-blue-line{background: #3b94d6; color:#fff;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
.inner-nav-mes{ font-size:28px; color: #fff; position: relative; margin-top:3px; margin-right:35px;}
.inner-nav-cir{ position: absolute; top:0px; left:15px; background:#3b94d6; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size: 10px;}
.inner-nav-user{ width: 40px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
.inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);}
/*消息弹框*/

View File

@ -534,7 +534,7 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
a.new-nav-a{ display: block; font-size: 14px; line-height: 50px; color:#fff;}
a:hover.new-nav-a{ color:#3b94d6;}
input.new-search{border-radius:3px; width:300px; height:30px; margin-top: 10px; padding:0 5px; border-style: none; border: solid 1px #ccc;}
.inner-nav-user{ width: 40px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
.inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);}
.innner-nav li{ float: left; margin-right: 25px;}
@ -546,7 +546,7 @@ input.new-search{border-radius:3px; width:300px; height:30px; margin-top: 10px;
.inner-nav-mes{ font-size:28px; color: #fff; position: relative; margin-top:3px; margin-right:35px;}
.inner-nav-mes li:hover ul{ display: block;}
.inner-nav-cir{ position: absolute; top:0px; left:15px; background:#3b94d6; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size: 10px;}
.inner-nav-user{ width: 40px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
.inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);}
.my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;}

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.