diff --git a/app/controllers/org_document_comments_controller.rb b/app/controllers/org_document_comments_controller.rb
index 2e63a1589..c938a2d4b 100644
--- a/app/controllers/org_document_comments_controller.rb
+++ b/app/controllers/org_document_comments_controller.rb
@@ -13,6 +13,7 @@ class OrgDocumentCommentsController < ApplicationController
@org_document_comment = OrgDocumentComment.new(:organization_id => @organization.id, :creator_id => User.current.id)
@org_document_comment.title = params[:org_document_comment][:title]
@org_document_comment.content = params[:org_document_comment][:content]
+ @org_document_comment.status = params[:org_document_comment][:status] == "on" ? 1 : 0
@org_document_comment.save_attachments(params[:attachments])
if params[:field_id]
@org_document_comment.org_subfield_id = params[:field_id].to_i
diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb
index c628b25fc..159648f34 100644
--- a/app/controllers/org_subfields_controller.rb
+++ b/app/controllers/org_subfields_controller.rb
@@ -6,7 +6,7 @@ class OrgSubfieldsController < ApplicationController
if OrgSubfield.where("organization_id=#{params[:organization_id]} and name=?",params[:name]).count == 0
@res = true
@organization = Organization.find(params[:organization_id])
- @subfield = OrgSubfield.create(:name => params[:name], :organization_id => params[:organization_id],:priority => @organization.org_subfields.order("priority").last.priority + 1)
+ @subfield = OrgSubfield.create(:name => params[:name], :organization_id => params[:organization_id], :priority => @organization.org_subfields.order("priority").last.priority + 1)
if !params[:sub_dir].blank?
sql = "select subfield_subdomain_dirs.* from subfield_subdomain_dirs, org_subfields where subfield_subdomain_dirs.org_subfield_id = org_subfields.id "+
"and org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir]}'"
@@ -15,17 +15,31 @@ class OrgSubfieldsController < ApplicationController
end
end
@subfield.update_attributes(:field_type => params[:field_type])
- # 如果栏目是教师,不参入类型的配置,定义为右三模式
- # 新增模块命名规则,左边1开头,右边2开头,以前的不变
- # eg:23 右三
- if params[:field_type] == "Comptec"
- @subfield.update_attributes(:status => 23)
- end
+ # admin配置的类型
+ update_status_by_type(@subfield, params[:field_type])
else
@res = false
end
end
+ # status类型说明,详见SubField
+ def update_status_by_type subfield, type
+ case type
+ when "Resource"
+ subfield.update_attribute(:status, 6)
+ when "Comptec"
+ subfield.update_attribute(:status, 6)
+ when "Compstu"
+ subfield.update_attribute(:status, 7)
+ when "Comppro"
+ subfield.update_attribute(:status, 5)
+ when "Compcou"
+ subfield.update_attribute(:status, 2)
+ when "Compact"
+ subfield.update_attribute(:status, 4)
+ end
+ end
+
def show
@flag = params[:flag] || false
sort = ""
diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb
index 3ab62bbea..3cbfc8466 100644
--- a/app/controllers/organizations_controller.rb
+++ b/app/controllers/organizations_controller.rb
@@ -28,7 +28,8 @@ class OrganizationsController < ApplicationController
helper :project_score
helper :issues
include UsersHelper
- before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers]
+ before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses]
+ before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
layout 'base_org'
def index
@@ -76,22 +77,34 @@ class OrganizationsController < ApplicationController
def show
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
- if @organization.show_mode.to_i == 1 && params[:org_subfield_id].nil? && params[:list] .nil?
+ if @organization.switch_type && params[:org_subfield_id].nil? && params[:list] .nil?
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
- # REDO:时间紧,暂时先这样
- @org_logo_attchment = Attachment.find_by_sql("SELECT * from attachments WHERE container_id = #{@organization.id} and container_type = 'Organization' and attachtype = 0 and filename REGEXP '(.jpg|.png|.bmp|.gif|.jpeg)' ORDER BY created_on desc limit 1").first
- @org_banner_attchment = Attachment.find_by_sql("SELECT * from attachments WHERE container_id = #{@organization.id} and container_type = 'Organization' and attachtype = 1 and filename REGEXP '(.jpg|.png|.bmp|.gif|.jpeg)' ORDER BY created_on desc limit 1").first
-
@subfield_content = @organization.org_subfields.order("priority")
- @organization = Organization.find(params[:id])
- shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
- shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
- project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0
- course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0
- course_types = "('Message','News','HomeworkCommon','Poll','Course')"
- @project_acts = get_project_activities_org @organization, project_ids
- @course_acts = get_course_activities_org @organization, course_ids
- render :layout => 'base_org2'
+ shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
+ shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
+ project_ids = (@organization.projects.map(&:id) - shield_project_ids) << 0
+ course_ids = (@organization.courses.map(&:id) - shield_course_ids) << 0
+ course_types = "('Message','News','HomeworkCommon','Poll','Course')"
+ @project_acts = get_project_activities_org @organization, project_ids
+ @course_acts = get_course_activities_org @organization, course_ids
+ # 精品课程, 不符合条件的组织则不查询
+ if @organization.org_subfields.where(:field_type => "Compcou", :hide => 0).count > 0
+ @excellent_courses = Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count
+ from courses c where c.is_delete =0 and c.is_public =1 and is_excellent =1 order by course_count desc limit 5;")
+ end
+ # 热门项目
+ if @organization.org_subfields.where(:field_type => "Comppro", :hide => 0).count > 0
+ # @excellent_projects = Project.where(:is_public => true, :status => true, :hot => true).order("project_score")
+ @excellent_projects = Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
+ from projects p where p.status =1 and p.is_public =1 and hot =1 order by project_count desc limit 5;")
+ end
+ # 最新动态, 来自我关联的项目和课程
+ if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
+ @acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
+ ((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
+ order by created_at desc limit 6;")
+ end
+ render :layout => 'base_org_custom'
else
render_403
end
@@ -159,22 +172,12 @@ class OrganizationsController < ApplicationController
end
def teachers
- unless @organization.allow_set_teachers
- render_403
- return
- end
q = params[:search].nil? ? "" : "#{params[:search].strip}"
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comptec").first : OrgSubfield.find(params[:org_subfield_id])
@type = params[:type]
if @type == "courses" || @type.nil?
@org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
- elsif @type == "students"
- @org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
- from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
- elsif @type == "resources"
- @org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from attachments where attachments.author_id = u.id) as course_count
- from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
elsif @type == "famous"
@org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and u.excellent_teacher =1 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
@@ -192,6 +195,73 @@ class OrganizationsController < ApplicationController
end
end
+ def students
+ q = params[:search].nil? ? "" : "#{params[:search].strip}"
+ @field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
+ @type = params[:type]
+ if @type == "courses" || @type.nil?
+ @org_students = User.find_by_sql("select u.*, ue.student_id, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
+ from users u, user_extensions ue where u.id = ue.user_id and ue.identity= 1 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
+ elsif @type == "famous"
+ @org_students = User.find_by_sql("select u.*, ue.student_id, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
+ from users u, user_extensions ue where u.id = ue.user_id and ue.identity= 1 and u.excellent_student =1 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
+ end
+ limit = 10
+ # @is_remote = true
+ @students_count = @org_students.count
+ @atta_pages = Paginator.new @students_count, limit, params['page'] || 1
+ @offset ||= @atta_pages.offset
+ #@curse_attachments_all = @all_attachments[@offset, @limit]
+ @org_students = paginateHelper @org_students, limit
+ respond_to do |format|
+ format.html
+ format.js
+ end
+ end
+
+ def atta_page_public container
+ limit = 10
+ @containers_count = container.count
+ @atta_pages = Paginator.new @containers_count, limit, params['page'] || 1
+ @offset ||= @atta_pages.offset
+ @containers = paginateHelper container, limit
+ respond_to do |format|
+ format.html
+ format.js
+ end
+ end
+
+ def projects
+ q = params[:search].nil? ? "" : "#{params[:search].strip}"
+ @field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comppro").first : OrgSubfield.find(params[:org_subfield_id])
+ @type = params[:type]
+ if @type.nil?
+ @containers = Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
+ from projects p where p.status =1 and p.is_public =1 and name like '%#{q}%' order by project_count desc;")
+ elsif @type == "famous"
+ @containers = Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
+ from projects p where p.status =1 and p.is_public =1 and hot =1 and name like '%#{q}%' order by project_count desc;")
+ end
+ atta_page_public @containers
+ end
+
+ def courses
+ q = params[:search].nil? ? "" : "#{params[:search].strip}"
+ @field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
+ @type = params[:type]
+ if @type.nil?
+ @containers = Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count
+ from courses c where c.is_delete =0 and c.is_public =1 and name like '%#{q}%' order by course_count desc;")
+ elsif @type == "famous"
+ @containers = Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count
+ from courses c where c.is_delete =0 and c.is_public =1 and is_excellent = 1 and name like '%#{q}%' order by course_count desc;")
+ end
+ atta_page_public @containers
+ end
+
+ def acts
+ end
+
def searchmember_by_name members, name
#searchPeopleByRoles(project, StudentRoles)
mems = []
@@ -322,6 +392,13 @@ class OrganizationsController < ApplicationController
@organization = Organization.find(params[:id])
end
+ def allow_as_admin
+ unless User.current.admin?
+ render_403
+ return
+ end
+ end
+
def setting
@organization = Organization.find(params[:id])
@@ -471,16 +548,28 @@ class OrganizationsController < ApplicationController
end
end
+ def update_field_by_admin
+ @type = params[:type]
+ @status = params[:status]
+ if @type == "project"
+ @container = Project.find(params[:container])
+ @status == "reset" ? @container.update_column(:hot, 0) : @container.update_column(:hot, 1)
+ else
+ @container = Course.find(params[:container])
+ @status == "reset" ? @container.update_column(:is_excellent, 0) : @container.update_column(:is_excellent, 1)
+ end
+ end
+
# 设置为名师
def set_excellent_teacher
@ex_teacher = User.find(params[:user])
- @ex_teacher.update_column(:excellent_teacher, 1)
+ params[:type] == "student" ? @ex_teacher.update_column(:excellent_student, 1) : @ex_teacher.update_column(:excellent_teacher, 1)
end
# 取消名师
def reset_excellent_teacher
@ex_teacher = User.find(params[:user])
- @ex_teacher.update_column(:excellent_teacher, 0)
+ params[:type] == "student" ? @ex_teacher.update_column(:excellent_student, 0) : @ex_teacher.update_column(:excellent_teacher, 0)
end
def hide_org_subfield
diff --git a/app/controllers/sub_domains_controller.rb b/app/controllers/sub_domains_controller.rb
index e32935789..438b67eec 100644
--- a/app/controllers/sub_domains_controller.rb
+++ b/app/controllers/sub_domains_controller.rb
@@ -18,6 +18,9 @@ class SubDomainsController < ApplicationController
else
@res = false
end
+ respond_to do |format|
+ format.js
+ end
end
def update
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index e201d8611..9933e6c19 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -457,12 +457,7 @@ class UsersController < ApplicationController
# 资源分享请求弹框
def apply_resource
- if User.current.logged?
- @attachment = Attachment.find params[:attachment_id]
- @state = 2
- else
- @state = 1
- end
+ @attachment = Attachment.find params[:attachment_id]
respond_to do |format|
format.js
end
@@ -2050,7 +2045,7 @@ class UsersController < ApplicationController
@score = @b_sort == "desc" ? "asc" : "desc"
user_project_ids = User.current.projects.map {|p| p.id}
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
- if(params[:type].blank? || params[:type] == "1") # 我的资源
+ if(params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
if params[:status] == "2"
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
@@ -2064,7 +2059,7 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
end
- elsif params[:type] == "6" # 公共资源
+ elsif (params[:type].blank? || params[:type] == "6") # 公共资源
if params[:status] == "2"
@attachments = get_course_resources_public( user_course_ids, @order, @score)
elsif params[:status] == "3"
@@ -2204,7 +2199,7 @@ class UsersController < ApplicationController
@score = @b_sort == "desc" ? "asc" : "desc"
user_project_ids = User.current.projects.map {|p| p.id}
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
- if(params[:type].blank? || params[:type] == "1") # 我的资源
+ if(params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
if params[:status] == "2"
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
@@ -2218,7 +2213,7 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
end
- elsif params[:type] == "6" # 公共资源
+ elsif (params[:type].blank? || params[:type] == "6") # 公共资源
if params[:status] == "2"
@attachments = get_course_resources_public( user_course_ids, @order, @score)
elsif params[:status] == "3"
@@ -2345,7 +2340,7 @@ class UsersController < ApplicationController
@score = @b_sort == "desc" ? "asc" : "desc"
user_project_ids = User.current.projects.map {|p| p.id}
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
- if(params[:type].blank? || params[:type] == "1") # 我的资源
+ if(params[:type] == "1") # 我的资源
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
if params[:status] == "2"
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
@@ -2359,7 +2354,7 @@ class UsersController < ApplicationController
# 公共资源库:所有公开资源或者我上传的私有资源
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
end
- elsif params[:type] == "6" # 公共资源
+ elsif (params[:type].blank? || params[:type] == "6") # 公共资源
if params[:status] == "2"
@attachments = get_course_resources_public( user_course_ids, @order, @score)
elsif params[:status] == "3"
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 691c2b0ad..3aa7d8a4a 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -70,7 +70,6 @@ module ApplicationHelper
attach = Attachment.find(attachment_id)
# 条件取否,result结果为true则不能下载
result = attach.is_public == 0 && attach.author != User.current && !attach.get_apply_resource_status(attach.id, User.current.id) && !attach_show_allow(attach)
- return result
end
# Time 2015-03-24 15:27:29
@@ -3104,9 +3103,10 @@ def named_attachment_url_without_domain(id, filename, option={})
attachment_id = (Attachment === id ? id.id : id)
Setting.protocol + "://" + Setting.host_name + "/attachments/" + attachment_id.to_s + "/" + filename
end
+
#判断是否为默认的组织栏目
def is_default_field? field
- (field.name == 'activity' || field.name == 'course' || field.name == 'project') && field.field_type == 'default'
+ (field.name == 'activity' || field.name == 'course' || field.name == 'project' ) && field.field_type == 'default'
end
def host_with_protocol
diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb
index cba4fa210..fa0d33f6e 100644
--- a/app/helpers/organizations_helper.rb
+++ b/app/helpers/organizations_helper.rb
@@ -42,11 +42,15 @@ module OrganizationsHelper
Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;")
end
+ # 获取两种类型的隐藏状态,数量大于0说明是可见
+ def double_field_show org
+ OrgSubfield.find_by_sql("SELECT * FROM `org_subfields` where organization_id = #{org.id} and (field_type = 'Compstu' or field_type = 'Comptec') and hide = 0;").count
+ end
+
def get_attach_org2(field)
org_attachments = field.attachments
- attachments = User.current.admin? ? org_attachments : visable_attachemnts(org_attachments)
- return attachments.sort_by{|x| x.created_on}.reverse.first(6)
- # Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;")
+ attachments = User.current.admin? ? org_attachments.first(5) : visable_attachemnts(org_attachments).first(5)
+ attachments.sort_by{|x| x.created_on}.reverse
end
# 从内容中获取路径
@@ -59,6 +63,58 @@ module OrganizationsHelper
end
end
+ def org_user_by_type obj
+ case obj.act_type
+ when "Message"
+ user = obj.act.author
+ when "News"
+ user = obj.act.author
+ when "HomeworkCommon"
+ user = obj.act.user
+ when "Issue"
+ user = obj.act.author
+ end
+ end
+
+ def org_title_by_type obj
+ case obj.act_type
+ when "Message"
+ user = obj.act.parent_id.nil? ? obj.act.subject : obj.act.parent.subject
+ when "News"
+ user = obj.act.title
+ when "HomeworkCommon"
+ user = obj.act.name
+ when "Issue"
+ user = obj.act.subject
+ end
+ end
+
+ def org_content_by_type obj
+ case obj.act_type
+ when "Message"
+ user = obj.act.parent_id.nil? ? obj.act.content : obj.act.parent.content
+ when "News"
+ user = obj.act.description
+ when "HomeworkCommon"
+ user = obj.act.description
+ when "Issue"
+ user = obj.act.description
+ end
+ end
+
+ def org_time_by_type obj
+ case obj.act_type
+ when "Message"
+ time = obj.act.updated_on
+ when "News"
+ user = obj.act.created_on
+ when "HomeworkCommon"
+ user = obj.act.updated_at
+ when "Issue"
+ user = obj.act.updated_on
+ end
+ end
+
#排列下拉框
def subfield_status_option
type = []
@@ -66,34 +122,14 @@ module OrganizationsHelper
option1 << "左一"
option1 << "1"
type << option1
- # option2 = []
- # option2 << "中一"
- # option2 << "2"
- # type << option2
+ option2 = []
+ option2 << "左二"
+ option2 << "2"
+ type << option2
option3 = []
- option3 << "左二"
+ option3 << "左三"
option3 << "3"
type << option3
- option4 = []
- option4 << "左三"
- option4 << "4"
- type << option4
- option5 = []
- option5 << "左四"
- option5 << "5"
- type << option5
- option6 = []
- option6 << "右一"
- option6 << "6"
- type << option6
- option7 = []
- option7 << "右二"
- option7 << "7"
- type << option7
- option8 = []
- option8 << "右三"
- option8 << "8"
- type << option8
type
end
@@ -104,18 +140,22 @@ module OrganizationsHelper
option1 << "左一"
option1 << "1"
type << option1
+ option2 = []
+ option2 << "左二"
+ option2 << "2"
+ type << option2
option3 = []
- option3 << "左二"
- option3 << "3"
+ option3 << "左三"
+ option3 << "2"
type << option3
option4 = []
- option4 << "左三"
- option4 << "4"
+ option4 << "右一"
+ option4 << "3"
type << option4
- option6 = []
- option6 << "右一"
- option6 << "6"
- type << option6
+ option5 = []
+ option5 << "右二"
+ option5 << "5"
+ type << option5
type
end
@@ -128,30 +168,36 @@ module OrganizationsHelper
when 3
resulet = "左二"
when 4
- resulet = "左三"
- when 5
- resulet = "左四"
- when 6
resulet = "右一"
- when 7
+ when 5
resulet = "右二"
- when 8
+ when 6
resulet = "右三"
end
end
+ # 系统栏目只有管理员才能看到
+ def subfield_to_addmin?(org)
+ if User.current.admin?
+ @organization.org_subfields.order("priority")
+ else
+ @organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu" && os.field_type != "Comppro" && os.field_type != "Compcou" && os.field_type != "Compact") }.sort_by {|os| os.priority}
+ end
+ end
def get_subfield_acts field
org_subfield = OrgSubfield.find(field.id)
org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0
org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc')
- org_acts
+ end
+
+ def allow_to_create?(org, type)
+ !org_subfield_had_created?(org, type) && User.current.admin?
end
def org_subfield_had_created?(org, type)
sub_field = org.org_subfields.select{|subfield| subfield.field_type == type}
result = sub_field.length > 0 ? true : false
- result
end
def org_subfield_type(field)
@@ -166,9 +212,20 @@ module OrganizationsHelper
result = "教师"
when "Complex"
result = "综合"
+ when "Compcou"
+ result = "课程"
+ when "Comppro"
+ result = "项目"
+ when "Compact"
+ result = "动态"
end
end
+ # 获取最新动态
+ # def get_latest_acts
+ # acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'news', 'message', 'Issue') and (container_type = 'Course' or container_type = 'Project') order by created_at limit 10;")
+ # end
+
def org_teacher_resource_count user
results = Attachment.find_by_sql("SELECT * FROM attachments where author_id = #{user.id};").count
end
@@ -187,4 +244,33 @@ module OrganizationsHelper
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and u.excellent_teacher =1 order by course_count desc").first(5)
end
+ def excellent_students
+ User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
+ from users u, user_extensions ue where u.id = ue.user_id and ue.identity = 1 and u.excellent_student = 1 order by course_count desc").first(5)
+ end
+
+ def excellent_teachers_hide? org
+ org.org_subfields.where(:field_type => "Comptec").first.hide
+ end
+
+ def excellent_students_hide? org
+ org.org_subfields.where(:field_type => "Compstu").first.hide
+ end
+
+ #当前学期(2015春季学期)
+ def current_time_and_term course
+ str = ""
+ term = cur_course_term
+ if (course.time == course.end_time && course.term == course.end_term) || (course.end_term.nil? && course.end_time.nil?) || course.time > Time.now.year
+ str = course.time.to_s + course.term.to_s
+ elsif course.time == Time.now.year && set_term_value(cur_course_term) <= set_term_value(course.term)
+ str = course.time.to_s + course.term.to_s
+ elsif course.end_time < Time.now.year || (course.end_time == Time.now.year && set_term_value(cur_course_term) >= set_term_value(course.term))
+ str = course.end_time.to_s + course.end_term.to_s
+ else
+ str = Time.now.year.to_s + cur_course_term.to_s
+ end
+ str
+ end
+
end
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 8f9ee2d85..aa4ef8670 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -143,7 +143,7 @@ class Attachment < ActiveRecord::Base
def get_apply_resource_status attachment_id, author_id
status = ApplyResource.where("attachment_id =? and user_id =?", attachment_id, author_id).first.try(:status)
- status == 2 ? true :false
+ status == 2
end
# add by nwb
diff --git a/app/models/org_document_comment.rb b/app/models/org_document_comment.rb
index 5aa3c1dab..dd070c825 100644
--- a/app/models/org_document_comment.rb
+++ b/app/models/org_document_comment.rb
@@ -1,5 +1,6 @@
class OrgDocumentComment < ActiveRecord::Base
- attr_accessible :content, :creator_id, :organization_id, :parent_id, :reply_id, :title,:sticky,:locked
+ # status: 1 模式二中置顶 0:模式二中正常显示
+ attr_accessible :content, :creator_id, :organization_id, :parent_id, :reply_id, :title, :sticky, :locked, :status
include Redmine::SafeAttributes
include ApplicationHelper
belongs_to :organization
diff --git a/app/models/org_subfield.rb b/app/models/org_subfield.rb
index 1151426e3..32212a0e8 100644
--- a/app/models/org_subfield.rb
+++ b/app/models/org_subfield.rb
@@ -11,6 +11,8 @@ class OrgSubfield < ActiveRecord::Base
acts_as_attachable
after_create :create_board_sync
after_destroy :update_priority
+ # status 为栏目定制决定参数,1 左一 2 左二 3 左三 4 右一 5 右二 6 右三 默认的 7 学霸 8 热门项目 9 精品课程 10 最新动态
+
# 创建资源栏目讨论区
def create_board_sync
@board = self.boards.build
diff --git a/app/models/organization.rb b/app/models/organization.rb
index c35d0591d..50f62ea11 100644
--- a/app/models/organization.rb
+++ b/app/models/organization.rb
@@ -18,17 +18,17 @@ class Organization < ActiveRecord::Base
end
def add_default_subfields
- OrgSubfield.create(:organization_id => self.id, :name => 'activity', :field_type => 'default', :priority => 1)
- OrgSubfield.create(:organization_id => self.id, :name => 'course', :field_type => 'default', :priority => 2)
- OrgSubfield.create(:organization_id => self.id, :name => 'project', :field_type => 'default', :priority => 3)
+ OrgSubfield.create(:organization_id => self.id, :name => 'activity', :field_type => 'default', :priority => 1, :status => 0)
+ OrgSubfield.create(:organization_id => self.id, :name => 'course', :field_type => 'default', :priority => 2, :status => 2)
+ OrgSubfield.create(:organization_id => self.id, :name => 'project', :field_type => 'default', :priority => 3, :status => 2)
end
def switch_type
- self.show_mode.to_i == 1 ? true : false
+ self.show_mode.to_i == 1
end
def allow_set_teachers
- self.allow_teacher.to_i == 1 ? true : false
+ self.allow_teacher.to_i == 1
end
def secdomain_name
diff --git a/app/views/layouts/_org_custom_footer.html.erb b/app/views/layouts/_org_custom_footer.html.erb
new file mode 100644
index 000000000..a9c4a7e36
--- /dev/null
+++ b/app/views/layouts/_org_custom_footer.html.erb
@@ -0,0 +1,10 @@
+
diff --git a/app/views/layouts/base_org_custom.html.erb b/app/views/layouts/base_org_custom.html.erb
new file mode 100644
index 000000000..bfa76a221
--- /dev/null
+++ b/app/views/layouts/base_org_custom.html.erb
@@ -0,0 +1,43 @@
+
+
+
+
+ <%= h html_title %>
+
+
+ <%= csrf_meta_tag %>
+ <%= favicon %>
+ <%= javascript_heads %>
+ <%= heads_for_theme %>
+ <%= stylesheet_link_tag 'new_user', 'public', 'org_custom','jquery/jquery-ui-1.9.2' %>
+ <%= call_hook :view_layouts_base_html_head %>
+ <%= yield :header_tags -%>
+
+ <%=render :partial => "math_js" %>
+
+
+<% update_visiti_count @organization %>
+
+
+<%# 内容开始 %>
+
+ <%= render_flash_messages %>
+ <%= yield %>
+ <%= call_hook :view_layouts_base_content %>
+
+<%# 内容结束 %>
+<%# 页面底部 %>
+
+
+<%# 弹框 %>
+
+<%= l(:label_loading) %>
+<%= call_hook :view_layouts_base_body_bottom %>
+<%# JS提前加载 %>
+<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
+<%= javascript_include_tag 'attachments' %>
+
+
+
diff --git a/app/views/org_document_comments/_form.html.erb b/app/views/org_document_comments/_form.html.erb
new file mode 100644
index 000000000..51400f3cd
--- /dev/null
+++ b/app/views/org_document_comments/_form.html.erb
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+ <%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
+
+
+
+
+
+
+
+
+ <%= render :partial => 'org_document_comments/attachment', :locals => {:container => nil} %>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/org_document_comments/edit.html.erb b/app/views/org_document_comments/edit.html.erb
index 5997482fb..fc3410eb0 100644
--- a/app/views/org_document_comments/edit.html.erb
+++ b/app/views/org_document_comments/edit.html.erb
@@ -27,37 +27,37 @@
- <%= form_tag url_for(:controller => 'org_document_comments',:action => 'update', :id => @org_document.id, :flag => @flag, :org_subfield_id => params[:org_subfield_id]),:method => 'put', :id => 'new_org_document_form' do |f| %>
-
-
-
-
-
-
-
-
- <%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
+ <%= form_tag url_for(:controller => 'org_document_comments',:action => 'update', :id => @org_document.id, :flag => @flag, :org_subfield_id => params[:org_subfield_id]),:method => 'put', :id => 'new_org_document_form' do |f| %>
+
+
+
+
+
+
+ <%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
+
+
-
-
-
-
+
+
+
+
-
-
- <%= render :partial => 'org_document_comments/attachment', :locals => {:container => @org_document} %>
+
+
+ <%= render :partial => 'org_document_comments/attachment', :locals => {:container => @org_document} %>
+
-
-
-
-
<% end %>
-
+
\ No newline at end of file
diff --git a/app/views/org_document_comments/new.html.erb b/app/views/org_document_comments/new.html.erb
index cf4ffddcf..ed327dece 100644
--- a/app/views/org_document_comments/new.html.erb
+++ b/app/views/org_document_comments/new.html.erb
@@ -37,35 +37,6 @@
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
-
-
-
-
-
-
-
-
-
- <%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
-
-
-
-
-
-
-
-
- <%= render :partial => 'org_document_comments/attachment', :locals => {:container => nil} %>
-
-
-
-
-
-
+ <%= render :partial => "form" %>
<% end %>
diff --git a/app/views/org_subfields/create.js.erb b/app/views/org_subfields/create.js.erb
index 5cc6d5c91..952ed7b2c 100644
--- a/app/views/org_subfields/create.js.erb
+++ b/app/views/org_subfields/create.js.erb
@@ -1,10 +1,9 @@
<% if @res %>
$("#org_subfield_list").html("");
- $("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
- :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
+ $("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
- $("#org_excellent_teachers").html("<%= escape_javascript(render :partial => 'organizations/setting_excellent_teachers') %>");
+ $("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
<% end %>
$("#subfield_name").val("");
$("#sub_dir").val("");
\ No newline at end of file
diff --git a/app/views/org_subfields/destroy.js.erb b/app/views/org_subfields/destroy.js.erb
index c14eeae8f..f61e1c100 100644
--- a/app/views/org_subfields/destroy.js.erb
+++ b/app/views/org_subfields/destroy.js.erb
@@ -1,6 +1,5 @@
$("#org_subfield_list").html("");
-$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
- :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
-$("#org_excellent_teachers").html("<%= escape_javascript(render :partial => 'organizations/setting_excellent_teachers') %>");
\ No newline at end of file
+$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
diff --git a/app/views/org_subfields/update.js.erb b/app/views/org_subfields/update.js.erb
index 06982ccfc..c030b7767 100644
--- a/app/views/org_subfields/update.js.erb
+++ b/app/views/org_subfields/update.js.erb
@@ -1,3 +1,4 @@
$("#subfield_show_<%= @subfield.id %>").html("<%= @subfield.name %>");
$("#sub_field_left_lists").html("");
-$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
\ No newline at end of file
+$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
\ No newline at end of file
diff --git a/app/views/org_subfields/update_priority.js.erb b/app/views/org_subfields/update_priority.js.erb
index 475649aac..043e8acbd 100644
--- a/app/views/org_subfields/update_priority.js.erb
+++ b/app/views/org_subfields/update_priority.js.erb
@@ -1,2 +1,2 @@
-$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',:locals => {:subfields => @organization.org_subfields.order("priority")}) %>");
-$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
\ No newline at end of file
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
+$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
diff --git a/app/views/organizations/_link_subfield_more.html.erb b/app/views/organizations/_link_subfield_more.html.erb
index cb4a82ed1..0bf6cb530 100644
--- a/app/views/organizations/_link_subfield_more.html.erb
+++ b/app/views/organizations/_link_subfield_more.html.erb
@@ -1,9 +1,9 @@
<% if !field.subfield_subdomain_dir.nil? %>
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "更多", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more" , :target => "_blank" %>
+ <%= link_to "更多", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "f12 fontGrey2 fr" , :target => "_blank" %>
<% else %>
- <%= link_to "更多", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more" , :target => "_blank" %>
+ <%= link_to "更多", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "f12 fontGrey2 fr" , :target => "_blank" %>
<% end %>
<% else %>
- <%= link_to "更多", organization_path(@organization, :org_subfield_id => field.id), :class => "more" , :target => "_blank" %>
+ <%= link_to "更多", organization_path(@organization, :org_subfield_id => field.id), :class => "f12 fontGrey2 fr" , :target => "_blank" %>
<% end %>
\ No newline at end of file
diff --git a/app/views/organizations/_math_js.html.erb b/app/views/organizations/_math_js.html.erb
new file mode 100644
index 000000000..7ac522061
--- /dev/null
+++ b/app/views/organizations/_math_js.html.erb
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/app/views/organizations/_org2_footer.html.erb b/app/views/organizations/_org2_footer.html.erb
new file mode 100644
index 000000000..9ff7051c1
--- /dev/null
+++ b/app/views/organizations/_org2_footer.html.erb
@@ -0,0 +1,12 @@
+
+
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_avater_swap.html.erb b/app/views/organizations/_org_avater_swap.html.erb
new file mode 100644
index 000000000..70bdf3b1b
--- /dev/null
+++ b/app/views/organizations/_org_avater_swap.html.erb
@@ -0,0 +1,8 @@
+<% if @org_logo_attchment.blank? || !User.current.logged? %>
+
+<% else %>
+
+<% end %>
+<% if User.current.admin_of_org?(@organization) %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/organizations/_org_container.html.erb b/app/views/organizations/_org_container.html.erb
new file mode 100644
index 000000000..59ac4d95c
--- /dev/null
+++ b/app/views/organizations/_org_container.html.erb
@@ -0,0 +1,24 @@
+<% containers.each do |container| %>
+
+<% end %>
+
diff --git a/app/views/organizations/_org_custom_admin.html.erb b/app/views/organizations/_org_custom_admin.html.erb
new file mode 100644
index 000000000..2f454819c
--- /dev/null
+++ b/app/views/organizations/_org_custom_admin.html.erb
@@ -0,0 +1,30 @@
+<% if allow_to_create?(@organization, "Comptec") %>
+
+
+ 教师
+
+<% end %>
+<% if allow_to_create?(@organization, "Compstu") %>
+
+
+ 学生
+
+<% end %>
+<% if allow_to_create?(@organization, "Comppro") %>
+
+
+ 热门项目
+
+<% end %>
+<% if allow_to_create?(@organization, "Compcou") %>
+
+
+ 精品课程
+
+<% end %>
+<% if allow_to_create?(@organization, "Compact") %>
+
+
+ 最新动态
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/organizations/_org_custom_header.html.erb b/app/views/organizations/_org_custom_header.html.erb
new file mode 100644
index 000000000..cc6920f33
--- /dev/null
+++ b/app/views/organizations/_org_custom_header.html.erb
@@ -0,0 +1,96 @@
+
+
+
+
+ <% subfield_content.each do |field| %>
+ <% if is_default_field?(field) %>
+ <% case field.name %>
+ <% when 'activity' %>
+
+ <%= link_to "首页", organization_path(@organization), :class => "por_index_act" %>
+
+ <% when 'course' %>
+ <% when 'project' %>
+ <% end %>
+
+ <% else %>
+ <% if field.field_type == "Post" && field.hide == 0 %>
+
+ <% if !field.subfield_subdomain_dir.nil? %>
+ <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
+ <%= link_to field.name, show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "sn-link-white", :target => "_blank" %>
+ <% else %>
+ <%= link_to field.name, show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "sn-link-white", :target => "_blank" %>
+ <% end %>
+ <% else %>
+ <%= link_to field.name, organization_path(@organization, :org_subfield_id => field.id), :class => "sn-link-white", :target => "_blank" %>
+ <% end %>
+
+
+
+
+ <% field.sub_domains.each do |subdomain| %>
+ <%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %>
+ |
+ <% end %>
+
+
+ <% elsif field.field_type == "Resource" && field.hide == 0 %>
+
+ <%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% if User.current.admin_of_org?(@organization) %>
+
配置
+ <% end %>
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_custom_left1.html.erb b/app/views/organizations/_org_custom_left1.html.erb
new file mode 100644
index 000000000..335ed1b2c
--- /dev/null
+++ b/app/views/organizations/_org_custom_left1.html.erb
@@ -0,0 +1,170 @@
+
+ <% if acts.blank? %>
+
<%= field.name %>
+
该模块暂时没有相关内容
+ <% else %>
+
<%= field.name %>
+ <%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
+
+
+ <% if acts.count > 1 %>
+ <% acts[1..2].each do |activity| %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+
+ <%= link_to "热门推荐 #{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
+ <%= time_from_now(document.created_at) %>
+ <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% else activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = activity.org_act %>
+ <% content = message.parent_id.nil? ? message.content : message.parent.content %>
+ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
+ <% if message.board.org_subfield_id %>
+
+ <%= link_to "热门推荐 #{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
+ <%= time_from_now(message.created_on) %>
+ <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% else %>
+
+ <%= link_to "热门推荐 #{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
+ <%= time_from_now(message.created_on) %>
+ <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = activity.org_act %>
+
+ <%= link_to "热门推荐 #{news.title}".html_safe, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
+ <%= time_from_now(news.created_on) %>
+ <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% if acts.count > 3 %>
+ <% activity = acts[3] %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
+ <%= time_from_now(document.created_at) %>
+ <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% else activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = activity.org_act %>
+ <% content = message.parent_id.nil? ? message.content : message.parent.content %>
+ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
+ <% if message.board.org_subfield_id %>
+
+ <%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
+ <%= time_from_now(message.created_on) %>
+ <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% else %>
+
+ <%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
+ <%= time_from_now(message.created_on) %>
+ <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = activity.org_act %>
+
+ <%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
+ <%= time_from_now(news.created_on) %>
+ <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+
+
+ <%# if acts.count > 3 %>
+ <% activity = acts.first %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+
+ <% if get_image_path_from_content(document.content).nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
+ <% end %>
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
+
<%= time_from_now(document.created_at) %> <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
+
+ <% else activity.container_type == 'OrgSubfield' %>
+
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = activity.org_act %>
+ <% content = message.parent_id.nil? ? message.content : message.parent.content %>
+ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
+ <% if message.board.org_subfield_id %>
+
+ <% if get_image_path_from_content(content).nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), board_message_url_in_org(message.board.id, message.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id, message.id), :target => "_blank" %>
+ <% end %>
+ <%= link_to title, board_message_url_in_org(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => title %>
+
<%= time_from_now(message.created_on) %> <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_title_r link-blue", :target => "_blank" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
+
+ <% else %>
+
+ <% if get_image_path_from_content(document.content).nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
+ <% end %>
+ <%= link_to title, board_message_path(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => title %>
+
<%= time_from_now(message.created_on) %> <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
+
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = activity.org_act %>
+ <% path = get_image_path_from_content(news.description) %>
+
+ <% if path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
+ <% end %>
+ <%= link_to news.title, news_path(news), :class => 'por_hot_title_r link-black', :target => "_blank", :title => news.title %>
+
<%= time_from_now(news.created_on) %> <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <%# end %>
+
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_custom_left2.html.erb b/app/views/organizations/_org_custom_left2.html.erb
new file mode 100644
index 000000000..53169506e
--- /dev/null
+++ b/app/views/organizations/_org_custom_left2.html.erb
@@ -0,0 +1,212 @@
+
+<% if is_default_field?(field) %>
+ <% case field.name %>
+ <% when 'course' %>
+
课程动态
+ <% if @course_acts.blank? %>
+
该模块暂时没有相关内容
+ <% else %>
+ <% @course_acts.first(4).each do |act| %>
+ <% if act.org_act_type == "HomeworkCommon" %>
+ <% activity = act.org_act %>
+ <% iamge_path = get_image_path_from_content(activity.description) %>
+
+ <%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.name.to_s %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now(activity.updated_at) %>
+
+ <% elsif act.org_act_type == "Message" %>
+ <% activity = act.org_act %>
+ <% iamge_path = get_image_path_from_content(activity.content) %>
+
+ <%= link_to activity.parent_id.nil? ? activity.subject : activity.parent.subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.parent_id.nil? ? activity.subject : activity.parent.subject %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now activity.updated_on %>
+
+ <% elsif act.org_act_type == "News" %>
+ <% activity = News.find(act.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(activity.description) %>
+
+ <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.title %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now activity.created_on %>
+
+ <% elsif act.org_act_type == "Poll" %>
+ <% activity = act.org_act %>
+ <% has_commit = has_commit_poll?(activity.id ,User.current)%>
+ <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
+ <% iamge_path = get_image_path_from_content(activity.polls_description) %>
+ <% if ( activity.polls_status==2) %>
+
+ <% if has_commit %>
+ <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "por_course_title link-black", :title => poll_name %>
+ <% else %>
+ <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "por_course_title link-black", :title => poll_name %>
+ <% end %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.polls_description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now activity.published_at %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% when 'project' %>
+
项目动态
+ <% if @project_acts.blank? %>
+
该模块暂时没有相关内容
+ <% else %>
+ <% @project_acts.first(4).each do |act| %>
+ <% if act.org_act_type == "Issue" %>
+ <% activity = act.org_act %>
+ <% iamge_path = get_image_path_from_content(activity.description) %>
+
+ <%= link_to activity.subject, issue_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.subject %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), issue_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), issue_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now activity.updated_on %>
+
+ <% elsif act.org_act_type == "Message" %>
+ <% activity = act.org_act %>
+ <% iamge_path = get_image_path_from_content(activity.content) %>
+ <% subject = activity.parent_id.nil? ? activity.subject : activity.parent.subject %>
+
+ <%= link_to subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "por_course_title link-black", :title => subject %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now activity.updated_on %>
+
+ <% elsif act.org_act_type == "News" %>
+ <% activity = act.org_act %>
+ <% iamge_path = get_image_path_from_content(activity.description) %>
+
+ <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.title %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now activity.created_on %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+<% else %>
+ <% if field.field_type == "Post" %>
+ <% org_acts = get_subfield_acts field %>
+ <% if org_acts.blank? %>
+
<%= field.name %>
+
该模块暂时没有相关内容
+ <% else %>
+
<%= field.name %>
+ <%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
+
+ <% org_acts.first(4).each do |activity| %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+ <% org_subfield_id = params[:org_subfield_id] %>
+ <% iamge_path = get_image_path_from_content(document.content) %>
+
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "por_course_title link-black", :title => document.title %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now document.created_at %>
+
+ <% else activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where(:id => activity.org_act_id).count > 0 %>
+ <% message = activity.org_act %>
+ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
+ <% content = message.parent_id.nil? ? message.content : message.parent.content%>
+ <% iamge_path = get_image_path_from_content(content) %>
+ <% if message.board.org_subfield_id %>
+
+ <%= link_to title, board_message_url_in_org(message.board.id, message.id), :target => '_blank', :class => "por_course_title link-black", :title => title %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_url_in_org(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now message.created_on %>
+
+ <% else %>
+
+ <%= link_to title, board_message_path(message.board, message.id), :target => '_blank', :class => "por_course_title link-black", :title => title %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_path(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_path(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now message.created_on %>
+
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where(:id => activity.org_act_id).count > 0 %>
+ <% news = activity.org_act %>
+ <% iamge_path = get_image_path_from_content(news.description) %>
+
+ <%= link_to news.title, news_path(news), :target => '_blank', :class => "por_course_title link-black", :title => news.title %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), news_path(news), :target => "_blank", :class =>"fl" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_path(news), :target => "_blank", :class =>"fl" %>
+ <% end %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= time_from_now news.created_on %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% elsif 'Compcou' %>
+
<%= field.name %>
+ <% if @excellent_courses.blank? %>
+
该模块暂时没有相关内容
+ <% else %>
+ <% @excellent_courses.first(4).each do |course| %>
+
+ <%= link_to course.name, course_path(course.id), :target => '_blank', :class => "por_course_title link-black", :title => course.name %>
+ <%= link_to image_tag(url_to_avatar(course),:width => "140", :height => "100"), course_path(course), :target => "_blank", :class => "fl" %>
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => course.id, :content=> course.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
+ <%= current_time_and_term course %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+<% end %>
+
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_custom_left3.html.erb b/app/views/organizations/_org_custom_left3.html.erb
new file mode 100644
index 000000000..bcfac4933
--- /dev/null
+++ b/app/views/organizations/_org_custom_left3.html.erb
@@ -0,0 +1,150 @@
+
+ <% if acts.blank? %>
+
<%= field.name %>
+
该模块暂时没有相关内容
+ <% else %>
+
<%= field.name %>
+ <%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
+
+
+
+ <% activity = acts.first %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+ <% if get_image_path_from_content(document.content).nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
+ <% end %>
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "por_post_title link-black", :title => document.title %>
+
+ <%= time_from_now(document.created_at) %>
+ <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => acts.first.org_act.id, :content=> acts.first.org_act.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
+ <% else activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = activity.org_act %>
+ <% content = message.parent_id.nil? ? message.content : message.parent.content %>
+ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
+ <% iamge_path = get_image_path_from_content(content) %>
+ <% if message.board.org_subfield_id %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
+ <% end %>
+ <%= link_to title, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "por_post_title link-black", :title => title %>
+
+ <%= time_from_now(message.created_on) %>
+ <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> message.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
+ <% else %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
+ <% end %>
+ <%= link_to title, board_message_path(message.board, message), :target => '_blank', :class => "por_post_title link-black", :title => title %>
+
+ <%= time_from_now(message.created_on) %>
+ <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> message.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = News.find(activity.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(news.description) %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
+ <% end %>
+ <%= link_to news.title, news_path(news), :target => '_blank', :class => "por_post_title link-black", :title => news.title %>
+
+ <%= time_from_now(news.created_on) %>
+ <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
+ <% end %>
+ <% end %>
+
+ <% unless acts[1..5].nil? %>
+ <% acts[1..5].each do |activity| %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+
+ <%= link_to " #{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w390 link-black', :target => "_blank" %>
+
+ <% else activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = Message.find(activity.org_act_id) %>
+ <% if message.board.org_subfield_id %>
+
+ <% if message.parent_id.nil? %>
+ <%= link_to " #{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %>
+ <% else %>
+ <%= link_to " #{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %>
+ <% end %>
+
+ <% else %>
+
+ <% if message.parent_id.nil? %>
+ <%= link_to " #{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w390 link-black', :target => "_blank" %>
+ <% else %>
+ <%= link_to " #{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w390 link-black', :target => "_blank" %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = News.find(activity.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(news.description) %>
+
+ <%= link_to " #{news.title}".html_safe, news_path(news), class: 'por_hidden_w390 link-black', :target => "_blank" %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+
+ <% unless acts[6..19].nil? %>
+
+
+ <% acts[6..19].each do |activity| %>
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+ <%= link_to " #{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %>
+ <% else activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = Message.find(activity.org_act_id) %>
+ <% if message.board.org_subfield_id %>
+ <% if message.parent_id.nil? %>
+ <%= link_to " #{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w270 link-black', :target => "_blank" %>
+ <% else %>
+ <%= link_to " #{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w270 link-black', :target => "_blank" %>
+ <% end %>
+ <% else %>
+ <% if message.parent_id.nil? %>
+ <%= link_to " #{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w270 link-black', :target => "_blank" %>
+ <% else %>
+ <%= link_to " #{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w270 link-black', :target => "_blank" %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = News.find(activity.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(news.description) %>
+ <%= link_to " #{news.title}".html_safe, news_path(news), class: 'por_hidden_w270 link-black', :target => "_blank" %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+
+ <% end %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_custom_right1.html.erb b/app/views/organizations/_org_custom_right1.html.erb
new file mode 100644
index 000000000..9d710ba54
--- /dev/null
+++ b/app/views/organizations/_org_custom_right1.html.erb
@@ -0,0 +1,37 @@
+
+
<%= field.name %>
+ <% if @acts.blank? %>
+
该模块暂时没有相关内容
+ <% else %>
+
+ <% @acts.each do |obj| %>
+ <% user = org_user_by_type(obj) %>
+ <% title = org_title_by_type(obj) %>
+ <% content = org_content_by_type(obj) %>
+ <% time = org_time_by_type(obj) %>
+
+ <%= link_to image_tag(url_to_avatar(user),:width => "43", :height => "43", :class => "por_users_img"), user_path(user), :target => "_blank", :class => "fl" %>
+
+
+ <%= link_to user.show_name, user_path(user), :class => "por_hot_name link-blue fl", :target => "_blank" %>
+ :
+ <% if obj.act_type == "Message" %>
+ <%= link_to title, board_message_path(obj.act.board.id, obj.act.id) %>
+ <% elsif obj.act_type == "News" %>
+ <%= link_to title, news_path(obj.act.id) %>
+ <% elsif obj.act_type == "HomeworkCommon" %>
+ <%= link_to title, student_work_index_url_in_org(obj.act.id) %>
+ <% elsif obj.act_type == "Issue" %>
+ <%= link_to title, issue_path(obj.act.id) %>
+ <% end %>
+
+
<%= time_from_now(time) %>
+
+
+
+
+
+ <% end %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_custom_right2.html.erb b/app/views/organizations/_org_custom_right2.html.erb
new file mode 100644
index 000000000..2555372df
--- /dev/null
+++ b/app/views/organizations/_org_custom_right2.html.erb
@@ -0,0 +1,22 @@
+
+
热点项目
+ <% if containers.blank? %>
+
该模块暂时没有相关内容
+ <% else %>
+ <% container = containers.first %>
+
+ <%= link_to " #{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
+ 活跃度<%= static_project_score(container.project_score) %>
+
+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => container.id, :content=> container.description, :maxheight => 40, :maxwordsnum => 48, :maxwidth => 0, :cl => "por_project_p"} %>
+
+
+ <% containers[1..4].each do |container| %>
+
+ <%= link_to " #{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
+ 活跃度<%= static_project_score(container.project_score) %>
+
+
+ <% end %>
+ <% end %>
+
diff --git a/app/views/organizations/_org_custom_right3.html.erb b/app/views/organizations/_org_custom_right3.html.erb
new file mode 100644
index 000000000..a461a38dc
--- /dev/null
+++ b/app/views/organizations/_org_custom_right3.html.erb
@@ -0,0 +1,105 @@
+<% if field.field_type == "Resource" %>
+
+
<%= field.name %><%= link_to "更多>", org_subfield_files_path(field), :target => "_blank", :class => "f12 fontGrey2 fr" %>
+
+
+ <% get_attach_org2(field).each do |attach| %>
+
+ <%= link_to image_tag(url_to_avatar(attach.author),:width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(attach.author), :target => "_blank", :class => "fl" %>
+
+
+ <%= link_to attach.author, user_path(attach.author), :class => " por_teachers_name link-black fl", :target => "_blank" %>
+
+ <%= link_to truncate(attach.filename,length: 20, omission: '...'),
+ download_named_attachment_path(attach.id, attach.filename),
+ :title => attach.filename+"\n"+attach.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %>
+
+
+
+ 类型:<%= attach.tag_list[0] %>
+ 下载:<%= attach.downloads %>
+ 引用:<%= attach.quotes.nil? ? 0 : attach.quotes %>
+
+
+
+
+ <% end %>
+
+
+
+<% elsif field.field_type == "Comptec" || field.field_type == "Compstu" %>
+
+
+
+
+ <% excellent_teachers.each do |teacher| %>
+
+ <%= link_to image_tag(url_to_avatar(teacher), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(teacher), :alt => "用户头像", :target => '_blank', :class => "fl" %>
+
+ <%=link_to teacher.try(:realname) ? teacher.try(:realname) :teacher.try(:login), user_path(teacher), :class => "por_teachers_name link-black fl", :target => '_blank' %>
+
<%= teacher.my_workplace %>
+
+
+ <% unless teacher.my_blogs_count == 0 %>
+ 博客 <%= teacher.my_blogs_count %>
+ <% end %>
+ <% unless teacher.courses.count == 0 %>
+ 课程 <%= teacher.courses.count %>
+ <% end %>
+ <% unless teacher.my_students == 0 %>
+ 学生 <%= teacher.my_students %>
+ <% end %>
+
+
+
+
+ <% end %>
+
+
+
+
+ <% excellent_students.each do |student| %>
+
+ <%= link_to image_tag(url_to_avatar(student), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(student), :alt => "用户头像", :target => '_blank', :class => "fl" %>
+
+ <%=link_to student.try(:realname) ? student.try(:realname) :student.try(:login), user_path(student), :class => "por_teachers_name link-black fl", :target => '_blank' %>
+
<%= student.my_workplace %>
+
+
+ <% unless student.my_blogs_count == 0 %>
+ 博客 <%= student.my_blogs_count %>
+ <% end %>
+ <% unless student.courses.count == 0 %>
+ 课程 <%= student.courses.count %>
+ <% end %>
+
+
+
+
+ <% end %>
+
+
+
+
+
+<% end %>
diff --git a/app/views/organizations/_org_field_menu.html.erb b/app/views/organizations/_org_field_menu.html.erb
new file mode 100644
index 000000000..792bea87e
--- /dev/null
+++ b/app/views/organizations/_org_field_menu.html.erb
@@ -0,0 +1,44 @@
+
+ <% subfield_content.each do |field| %>
+ <% if is_default_field?(field) %>
+ <% case field.name %>
+ <% when 'activity' %>
+
+ <%= link_to "首页", organization_path(@organization), :class => "sn-link-white" %>
+
+ <% when 'course' %>
+
+ 课程动态
+
+ <% when 'project' %>
+
+ 项目动态
+
+ <% end %>
+ <% else %>
+ <% if field.field_type == "Post" && field.hide == 0 %>
+
+ <%= field.name %>
+
+
+
+
+ <% field.sub_domains.each do |subdomain| %>
+ <%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %>
+ |
+ <% end %>
+
+
+ <% elsif field.field_type == "Resource" && field.hide == 0 %>
+
+ <%= field.name %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+ <% if User.current.admin_of_org?(@organization) %>
+
+ 配置
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index 4340213a4..30234c300 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -91,7 +91,7 @@
<% end %>
<% else %>
- <% if field.field_type == "Post" || field.field_type == "Complex" || field.field_type == "Compstu" || field.field_type == "Comptec" %>
+ <% if field.field_type == "Post" || field.field_type == "Complex" %>
- <%= render :partial => 'organizations/org_subdomain',:locals=>{:subdomains => field.sub_domains.reorder('priority').uniq.limit(5), :org_subfield_id => field.id} %>
+ <%= render :partial => 'organizations/org_subdomain',:locals=>{:subdomains => field.sub_domains.reorder('priority').uniq, :org_subfield_id => field.id} %>
-
<% unless (field.sub_domains.count == 0 || !if_hidden_subdomain(field)) %>
<% end %>
- <% else %>
+ <% elsif field.field_type == "Comptec" && User.current.admin? %>
+
+ <% elsif field.field_type == "Compstu" && User.current.admin? %>
+
+ <% elsif field.field_type == "Compstu" && User.current.admin? %>
+
+ <% elsif field.field_type == "Comppro" && User.current.admin? %>
+
+ <% elsif field.field_type == "Compcou" && User.current.admin? %>
+
+ <% elsif field.field_type == "Compact" && User.current.admin? %>
+
+ <% elsif field.field_type == "Resource" %>
- <% if User.current.admin? %>
-
允许设置名师榜 :
- class="ml3" />
-
- <% end %>
+
+
+
+
+
保存
<% end %>
@@ -162,8 +162,8 @@
资源
-
- <%= render :partial => 'organizations/setting_excellent_teachers' %>
+
+ <%= render :partial => 'organizations/org_custom_admin' %>
新增
@@ -172,7 +172,7 @@
- <%= render :partial => 'organizations/subfield_list', :locals => {:subfields => @organization.org_subfields.order("priority")} %>
+ <%= render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)} %>
@@ -184,7 +184,7 @@
function add_org_subfield_subdomain(){
if ($("#subfield_name_subdomain").val().trim() != "")
$("#add_subfield_form_subdomain").submit();
- $("#org_subfield_list").html('<%= escape_javascript(render(:partial => 'organizations/subfield_list', :locals => {:subfields => @organization.org_subfields.order("priority")} )) %>');
+ $("#org_subfield_list").html('<%= escape_javascript(render(:partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)})) %>');
}
var $is_exist = false;
function apply_subdomain(id, domain){
diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb
index d93ead84b..72e95ded9 100644
--- a/app/views/organizations/show.html.erb
+++ b/app/views/organizations/show.html.erb
@@ -1,66 +1,71 @@
-<%= javascript_include_tag "jquery.infinitescroll.js" %>
+<%# 区分两种模式 params[:org_subfield_id] 不为空的时候则跳到栏目%>
+<% if @organization.switch_type && params[:org_subfield_id].nil? %>
+ <%= render :partial => 'show_custom' %>
+<% else %>
+ <%= javascript_include_tag "jquery.infinitescroll.js" %>
-<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
-<% end %>
+ <%= content_for(:header_tags) do %>
+ <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
+ <% end %>
-<% if params[:show_homepage].nil? and User.current.logged? %>
-
+ <% end %>
+ <% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 and params[:org_subfield_id].nil? %>
+
+ <% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %>
+ <%= render :partial => 'show_home_page', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id, :act => act} %>
+ <% end %>
+ <% if @org_activities %>
+ <%= render :partial => 'organizations/org_activities',
+ :locals => {:org_activities => @org_activities,
+ :page=> @page,
+ :org => @organization,
+ :org_act_count=> @org_activities.count} %>
+ <% end %>
<% end %>
@@ -70,3 +75,4 @@
+
diff --git a/app/views/organizations/students.html.erb b/app/views/organizations/students.html.erb
new file mode 100644
index 000000000..770967210
--- /dev/null
+++ b/app/views/organizations/students.html.erb
@@ -0,0 +1,30 @@
+
+
+
+ <%= form_tag(url_for(:controller => 'organizations', :action => 'students', :type => @type), :remote => true , :method => 'get', :id => 'resource_search_form') do %>
+
+ <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
+
+ <% end %>
+
+ <%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
+
+
+
+
+ <%=render 'organizations/org_students_list', :org_students => @org_students %>
+
+
+
+ <%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :flag => true %>
+
+
+
\ No newline at end of file
diff --git a/app/views/organizations/students.js.erb b/app/views/organizations/students.js.erb
new file mode 100644
index 000000000..c65f8f861
--- /dev/null
+++ b/app/views/organizations/students.js.erb
@@ -0,0 +1,3 @@
+$("#org_students_list").html('<%= escape_javascript( render :partial => 'organizations/org_students_list', :locals => {:org_students => @org_students})%>');
+$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
+$("#org_student_search").attr('href','<%= students_organization_path(@organization, :type => @type) %>');
\ No newline at end of file
diff --git a/app/views/organizations/update_field_by_admin.js.erb b/app/views/organizations/update_field_by_admin.js.erb
new file mode 100644
index 000000000..ba218c746
--- /dev/null
+++ b/app/views/organizations/update_field_by_admin.js.erb
@@ -0,0 +1,5 @@
+<% if @type == "course" %>
+$("#hide_<%= @container.id %>").text("<%= (@status == 'reset' ? '设为精品' : '取消精品') %>");
+<% elsif @type == "project" %>
+$("#hide_<%= @container.id %>").text("<%= (@status == 'reset' ? '设为热门' : '取消热门') %>");
+<% end %>
diff --git a/app/views/sub_domains/_new.html.erb b/app/views/sub_domains/_new.html.erb
index 25b660750..865eae785 100644
--- a/app/views/sub_domains/_new.html.erb
+++ b/app/views/sub_domains/_new.html.erb
@@ -9,10 +9,6 @@
帖子
-
-
-
-
@@ -20,8 +16,3 @@
<% end %>
-
-
-
\ No newline at end of file
diff --git a/app/views/sub_domains/create.js.erb b/app/views/sub_domains/create.js.erb
index 0990e35de..8c7b7f64a 100644
--- a/app/views/sub_domains/create.js.erb
+++ b/app/views/sub_domains/create.js.erb
@@ -1,8 +1,5 @@
<% if @res %>
-$("#org_subfield_list").html("");
-$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
<% end %>
-$("#subfield_name").val("");
-$("#sub_dir").val("");
\ No newline at end of file
diff --git a/app/views/sub_domains/destroy.js.erb b/app/views/sub_domains/destroy.js.erb
index 913c400f7..4d8ef21de 100644
--- a/app/views/sub_domains/destroy.js.erb
+++ b/app/views/sub_domains/destroy.js.erb
@@ -1,4 +1,4 @@
$("#org_subfield_list").html("");
-$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
\ No newline at end of file
diff --git a/app/views/sub_domains/domain_update_priority.js.erb b/app/views/sub_domains/domain_update_priority.js.erb
index 475649aac..e4de7c931 100644
--- a/app/views/sub_domains/domain_update_priority.js.erb
+++ b/app/views/sub_domains/domain_update_priority.js.erb
@@ -1,2 +1,2 @@
-$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',:locals => {:subfields => @organization.org_subfields.order("priority")}) %>");
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
\ No newline at end of file
diff --git a/app/views/sub_domains/update.js.erb b/app/views/sub_domains/update.js.erb
index 02810eee7..2c0af9c42 100644
--- a/app/views/sub_domains/update.js.erb
+++ b/app/views/sub_domains/update.js.erb
@@ -1,3 +1,4 @@
$("#subsubdomain_show_<%= @subdomain.id %>").html("<%= @subdomain.name %>");
$("#sub_field_left_lists").html("");
-$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
\ No newline at end of file
+$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
+$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
\ No newline at end of file
diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb
index cdd270a56..3f5138107 100644
--- a/app/views/users/_resources_list.html.erb
+++ b/app/views/users/_resources_list.html.erb
@@ -49,8 +49,6 @@
alert("您只能删除没有历史记录的资源,请重新选择后再删除。");
return;
}
-
-
if(data != "" && confirm('确认要删除这些资源吗?')) {
$.post(
'<%= user_resource_delete_user_path(User.current.id,:type=>@type,:status=>@status)%>',
@@ -62,8 +60,6 @@
}
}
-
-
function show_send(){
$("#contextMenu").hide();
document.oncontextmenu = function() {return true;}
diff --git a/app/views/users/_show_new_upload.html.erb b/app/views/users/_show_new_upload.html.erb
index b343aeae1..e63cf2af9 100644
--- a/app/views/users/_show_new_upload.html.erb
+++ b/app/views/users/_show_new_upload.html.erb
@@ -1,3 +1 @@
-<% if @type != "2" %>
-
-<% end %>
+
diff --git a/app/views/users/apply_resource.js.erb b/app/views/users/apply_resource.js.erb
index 14a795fe5..601cafa11 100644
--- a/app/views/users/apply_resource.js.erb
+++ b/app/views/users/apply_resource.js.erb
@@ -1,6 +1,6 @@
-<% if @state == 1 %>
+<% if !User.current.logged? %>
alert("您还未登录");
-<% elsif @state == 2 %>
+<% else %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_resource', :locals => {:attachment => @attachment}) %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml
index d65606678..70236d9ba 100644
--- a/config/locales/commons/zh.yml
+++ b/config/locales/commons/zh.yml
@@ -358,7 +358,7 @@ zh:
# 意见反馈
#
label_feedback: 意见反馈
- label_feedback_tips: "请在此提问平台问题,或直接加入师姐答疑群,谢谢!"
+ label_feedback_tips: "请在此发布平台问题和建议,或直接加入答疑群,谢谢!"
label_technical_support: "QQ 在线支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "该帖来自用户反馈:)"
diff --git a/config/routes.rb b/config/routes.rb
index ed936115a..3a34f0a6b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -77,6 +77,10 @@ RedmineApp::Application.routes.draw do
get 'more_org_courses'
get 'search_courses'
get 'teachers'
+ get 'students'
+ get 'projects'
+ get 'courses'
+ get 'acts'
post 'join_course_menu'
post 'join_courses'
get 'search_projects'
@@ -94,8 +98,12 @@ RedmineApp::Application.routes.draw do
post 'hide_org_subfield'
post 'show_org_subfield'
post 'set_excellent_teacher'
+ post 'set_excellent_student'
post 'reset_excellent_teacher'
+ post 'reset_excellent_student'
post 'agree_apply_subdomain'
+ post 'update_field_by_admin'
+ post 'reset_update_field_by_admin'
end
end
diff --git a/db/migrate/20160523085440_add_status_to_org_document_comment.rb b/db/migrate/20160523085440_add_status_to_org_document_comment.rb
new file mode 100644
index 000000000..e29426450
--- /dev/null
+++ b/db/migrate/20160523085440_add_status_to_org_document_comment.rb
@@ -0,0 +1,5 @@
+class AddStatusToOrgDocumentComment < ActiveRecord::Migration
+ def change
+ add_column :org_document_comments, :status, :integer, :default => false
+ end
+end
diff --git a/db/migrate/20160531021244_add_excellent_student_to_user.rb b/db/migrate/20160531021244_add_excellent_student_to_user.rb
new file mode 100644
index 000000000..08378bca5
--- /dev/null
+++ b/db/migrate/20160531021244_add_excellent_student_to_user.rb
@@ -0,0 +1,5 @@
+class AddExcellentStudentToUser < ActiveRecord::Migration
+ def change
+ add_column :users, :excellent_student, :integer, :default => false
+ end
+end
diff --git a/db/migrate/20160601073753_add_hot_to_project.rb b/db/migrate/20160601073753_add_hot_to_project.rb
new file mode 100644
index 000000000..f35afa97f
--- /dev/null
+++ b/db/migrate/20160601073753_add_hot_to_project.rb
@@ -0,0 +1,5 @@
+class AddHotToProject < ActiveRecord::Migration
+ def change
+ add_column :projects, :hot, :integer, :default => false
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 8911cefef..05a6f4e22 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20160526093715) do
+ActiveRecord::Schema.define(:version => 20160601073753) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -52,6 +52,28 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
+ create_table "application_settings", :force => true do |t|
+ t.integer "default_projects_limit"
+ t.boolean "signup_enabled"
+ t.boolean "signin_enabled"
+ t.boolean "gravatar_enabled"
+ t.text "sign_in_text"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "home_page_url"
+ t.integer "default_branch_protection", :default => 2
+ t.boolean "twitter_sharing_enabled", :default => true
+ t.text "restricted_visibility_levels"
+ t.boolean "version_check_enabled", :default => true
+ t.integer "max_attachment_size", :default => 10, :null => false
+ t.integer "default_project_visibility"
+ t.integer "default_snippet_visibility"
+ t.text "restricted_signup_domains"
+ t.boolean "user_oauth_applications", :default => true
+ t.string "after_sign_out_path"
+ t.integer "session_expire_delay", :default => 10080, :null => false
+ end
+
create_table "applied_projects", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false
@@ -156,6 +178,20 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.string "typeName", :limit => 50
end
+ create_table "audit_events", :force => true do |t|
+ t.integer "author_id", :null => false
+ t.string "type", :null => false
+ t.integer "entity_id", :null => false
+ t.string "entity_type", :null => false
+ t.text "details"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id"
+ add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type"
+ add_index "audit_events", ["type"], :name => "index_audit_events_on_type"
+
create_table "auth_sources", :force => true do |t|
t.string "type", :limit => 30, :default => "", :null => false
t.string "name", :limit => 60, :default => "", :null => false
@@ -253,6 +289,17 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
add_index "boards", ["project_id"], :name => "boards_project_id"
+ create_table "broadcast_messages", :force => true do |t|
+ t.text "message", :null => false
+ t.datetime "starts_at"
+ t.datetime "ends_at"
+ t.integer "alert_type"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "color"
+ t.string "font"
+ end
+
create_table "bug_to_osps", :force => true do |t|
t.integer "osp_id"
t.integer "relative_memo_id"
@@ -552,6 +599,10 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "visits", :default => 0
end
+ add_index "courses", ["id"], :name => "id", :unique => true
+ add_index "courses", ["tea_id"], :name => "tea_id"
+ add_index "courses", ["visits"], :name => "visits"
+
create_table "custom_fields", :force => true do |t|
t.string "type", :limit => 30, :default => "", :null => false
t.string "name", :limit => 30, :default => "", :null => false
@@ -613,6 +664,15 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
+ create_table "deploy_keys_projects", :force => true do |t|
+ t.integer "deploy_key_id", :null => false
+ t.integer "project_id", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id"
+
create_table "discuss_demos", :force => true do |t|
t.string "title"
t.text "body"
@@ -662,6 +722,16 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "created_at"
end
+ create_table "emails", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.string "email", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true
+ add_index "emails", ["user_id"], :name => "index_emails_on_user_id"
+
create_table "enabled_modules", :force => true do |t|
t.integer "project_id"
t.string "name", :null => false
@@ -684,6 +754,25 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
+ create_table "events", :force => true do |t|
+ t.string "target_type"
+ t.integer "target_id"
+ t.string "title"
+ t.text "data"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "action"
+ t.integer "author_id"
+ end
+
+ add_index "events", ["action"], :name => "index_events_on_action"
+ add_index "events", ["author_id"], :name => "index_events_on_author_id"
+ add_index "events", ["created_at"], :name => "index_events_on_created_at"
+ add_index "events", ["project_id"], :name => "index_events_on_project_id"
+ add_index "events", ["target_id"], :name => "index_events_on_target_id"
+ add_index "events", ["target_type"], :name => "index_events_on_target_type"
+
create_table "exercise_answers", :force => true do |t|
t.integer "user_id"
t.integer "exercise_question_id"
@@ -786,6 +875,15 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type"
add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at"
+ create_table "forked_project_links", :force => true do |t|
+ t.integer "forked_to_project_id", :null => false
+ t.integer "forked_from_project_id", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true
+
create_table "forums", :force => true do |t|
t.string "name", :null => false
t.text "description"
@@ -915,6 +1013,17 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "identities", :force => true do |t|
+ t.string "extern_uid"
+ t.string "provider"
+ t.integer "user_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id"
+ add_index "identities", ["user_id"], :name => "index_identities_on_user_id"
+
create_table "invite_lists", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
@@ -1058,6 +1167,20 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "private", :default => 0
end
+ create_table "keys", :force => true do |t|
+ t.integer "user_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.text "key"
+ t.string "title"
+ t.string "type"
+ t.string "fingerprint"
+ t.boolean "public", :default => false, :null => false
+ end
+
+ add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id"
+ add_index "keys", ["user_id"], :name => "index_keys_on_user_id"
+
create_table "kindeditor_assets", :force => true do |t|
t.string "asset"
t.integer "file_size"
@@ -1069,6 +1192,27 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "owner_type", :default => 0
end
+ create_table "label_links", :force => true do |t|
+ t.integer "label_id"
+ t.integer "target_id"
+ t.string "target_type"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id"
+ add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type"
+
+ create_table "labels", :force => true do |t|
+ t.string "title"
+ t.string "color"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "labels", ["project_id"], :name => "index_labels_on_project_id"
+
create_table "member_roles", :force => true do |t|
t.integer "member_id", :null => false
t.integer "role_id", :null => false
@@ -1119,6 +1263,47 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "viewed_count", :default => 0
end
+ create_table "merge_request_diffs", :force => true do |t|
+ t.string "state"
+ t.text "st_commits", :limit => 2147483647
+ t.text "st_diffs", :limit => 2147483647
+ t.integer "merge_request_id", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true
+
+ create_table "merge_requests", :force => true do |t|
+ t.string "target_branch", :null => false
+ t.string "source_branch", :null => false
+ t.integer "source_project_id", :null => false
+ t.integer "author_id"
+ t.integer "assignee_id"
+ t.string "title"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "milestone_id"
+ t.string "state"
+ t.string "merge_status"
+ t.integer "target_project_id", :null => false
+ t.integer "iid"
+ t.text "description"
+ t.integer "position", :default => 0
+ t.datetime "locked_at"
+ end
+
+ add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id"
+ add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id"
+ add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id"
+ add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at"
+ add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id"
+ add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch"
+ add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id"
+ add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch"
+ add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true
+ add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title"
+
create_table "message_alls", :force => true do |t|
t.integer "user_id"
t.integer "message_id"
@@ -1153,6 +1338,39 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
add_index "messages", ["parent_id"], :name => "messages_parent_id"
+ create_table "milestones", :force => true do |t|
+ t.string "title", :null => false
+ t.integer "project_id", :null => false
+ t.text "description"
+ t.date "due_date"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "state"
+ t.integer "iid"
+ end
+
+ add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id"
+ add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date"
+ add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true
+ add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id"
+
+ create_table "namespaces", :force => true do |t|
+ t.string "name", :null => false
+ t.string "path", :null => false
+ t.integer "owner_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "type"
+ t.string "description", :default => "", :null => false
+ t.string "avatar"
+ end
+
+ add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id"
+ add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true
+ add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id"
+ add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true
+ add_index "namespaces", ["type"], :name => "index_namespaces_on_type"
+
create_table "news", :force => true do |t|
t.integer "project_id"
t.string "title", :limit => 60, :default => "", :null => false
@@ -1178,6 +1396,31 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "notes", :force => true do |t|
+ t.text "note"
+ t.string "noteable_type"
+ t.integer "author_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "project_id"
+ t.string "attachment"
+ t.string "line_code"
+ t.string "commit_id"
+ t.integer "noteable_id"
+ t.boolean "system", :default => false, :null => false
+ t.text "st_diff", :limit => 2147483647
+ end
+
+ add_index "notes", ["author_id"], :name => "index_notes_on_author_id"
+ add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id"
+ add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id"
+ add_index "notes", ["created_at"], :name => "index_notes_on_created_at"
+ add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type"
+ add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type"
+ add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type"
+ add_index "notes", ["project_id"], :name => "index_notes_on_project_id"
+ add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at"
+
create_table "notificationcomments", :force => true do |t|
t.string "notificationcommented_type"
t.integer "notificationcommented_id"
@@ -1187,6 +1430,49 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "oauth_access_grants", :force => true do |t|
+ t.integer "resource_owner_id", :null => false
+ t.integer "application_id", :null => false
+ t.string "token", :null => false
+ t.integer "expires_in", :null => false
+ t.text "redirect_uri", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "revoked_at"
+ t.string "scopes"
+ end
+
+ add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true
+
+ create_table "oauth_access_tokens", :force => true do |t|
+ t.integer "resource_owner_id"
+ t.integer "application_id"
+ t.string "token", :null => false
+ t.string "refresh_token"
+ t.integer "expires_in"
+ t.datetime "revoked_at"
+ t.datetime "created_at", :null => false
+ t.string "scopes"
+ end
+
+ add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true
+ add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id"
+ add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true
+
+ create_table "oauth_applications", :force => true do |t|
+ t.string "name", :null => false
+ t.string "uid", :null => false
+ t.string "secret", :null => false
+ t.text "redirect_uri", :null => false
+ t.string "scopes", :default => "", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "owner_id"
+ t.string "owner_type"
+ end
+
+ add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type"
+ add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true
+
create_table "onclick_times", :force => true do |t|
t.integer "user_id"
t.datetime "onclick_time"
@@ -1277,6 +1563,7 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.boolean "locked", :default => false
t.integer "sticky", :default => 0
t.integer "org_subfield_id"
+ t.integer "status", :default => 0
end
create_table "org_member_roles", :force => true do |t|
@@ -1343,6 +1630,23 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "allow_teacher", :default => 0
end
+ create_table "permissions", :force => true do |t|
+ t.string "controller", :limit => 30, :default => "", :null => false
+ t.string "action", :limit => 30, :default => "", :null => false
+ t.string "description", :limit => 60, :default => "", :null => false
+ t.boolean "is_public", :default => false, :null => false
+ t.integer "sort", :default => 0, :null => false
+ t.boolean "mail_option", :default => false, :null => false
+ t.boolean "mail_enabled", :default => false, :null => false
+ end
+
+ create_table "permissions_roles", :id => false, :force => true do |t|
+ t.integer "permission_id", :default => 0, :null => false
+ t.integer "role_id", :default => 0, :null => false
+ end
+
+ add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
+
create_table "phone_app_versions", :force => true do |t|
t.string "version"
t.text "description"
@@ -1425,6 +1729,11 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "project_import_data", :force => true do |t|
+ t.integer "project_id"
+ t.text "data"
+ end
+
create_table "project_infos", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
@@ -1501,6 +1810,7 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "journals_count", :default => 0
t.integer "boards_reply_count", :default => 0
t.integer "visits", :default => 0
+ t.integer "hot", :default => 0
end
add_index "projects", ["lft"], :name => "index_projects_on_lft"
@@ -1514,6 +1824,16 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
+ create_table "protected_branches", :force => true do |t|
+ t.integer "project_id", :null => false
+ t.string "name", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "developers_can_push", :default => false, :null => false
+ end
+
+ add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id"
+
create_table "queries", :force => true do |t|
t.integer "project_id"
t.string "name", :default => "", :null => false
@@ -1648,6 +1968,25 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "is_teacher_score", :default => 0
end
+ create_table "services", :force => true do |t|
+ t.string "type"
+ t.string "title"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "active", :default => false, :null => false
+ t.text "properties"
+ t.boolean "template", :default => false
+ t.boolean "push_events", :default => true
+ t.boolean "issues_events", :default => true
+ t.boolean "merge_requests_events", :default => true
+ t.boolean "tag_push_events", :default => true
+ t.boolean "note_events", :default => true, :null => false
+ end
+
+ add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id"
+ add_index "services", ["project_id"], :name => "index_services_on_project_id"
+
create_table "settings", :force => true do |t|
t.string "name", :default => "", :null => false
t.text "value"
@@ -1686,6 +2025,26 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "snippets", :force => true do |t|
+ t.string "title"
+ t.text "content", :limit => 2147483647
+ t.integer "author_id", :null => false
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "file_name"
+ t.datetime "expires_at"
+ t.string "type"
+ t.integer "visibility_level", :default => 0, :null => false
+ end
+
+ add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id"
+ add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id"
+ add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at"
+ add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at"
+ add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id"
+ add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level"
+
create_table "softapplications", :force => true do |t|
t.string "name"
t.text "description"
@@ -1758,9 +2117,9 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "absence_penalty", :default => 0
t.float "system_score", :default => 0.0
t.boolean "is_test", :default => false
+ t.float "work_score"
t.integer "simi_id"
t.integer "simi_value"
- t.float "work_score"
end
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
@@ -1808,13 +2167,13 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
create_table "sub_domains", :force => true do |t|
t.integer "org_subfield_id"
- t.integer "priority", :default => 0
+ t.integer "priority"
t.string "name"
t.string "field_type"
- t.integer "hide", :default => 0
- t.integer "status", :default => 0
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.integer "hide"
+ t.integer "status"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "subfield_subdomain_dirs", :force => true do |t|
@@ -1824,6 +2183,17 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "subscriptions", :force => true do |t|
+ t.integer "user_id"
+ t.integer "subscribable_id"
+ t.string "subscribable_type"
+ t.boolean "subscribed"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true
+
create_table "system_messages", :force => true do |t|
t.integer "user_id"
t.string "content"
@@ -2057,12 +2427,24 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.integer "gid"
t.integer "visits", :default => 0
t.integer "excellent_teacher", :default => 0
+ t.integer "excellent_student", :default => 0
end
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
add_index "users", ["type"], :name => "index_users_on_type"
+ create_table "users_star_projects", :force => true do |t|
+ t.integer "project_id", :null => false
+ t.integer "user_id", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id"
+ add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true
+ add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id"
+
create_table "versions", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.string "name", :default => "", :null => false
@@ -2114,6 +2496,23 @@ ActiveRecord::Schema.define(:version => 20160526093715) do
t.datetime "updated_at", :null => false
end
+ create_table "web_hooks", :force => true do |t|
+ t.string "url"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "type", :default => "ProjectHook"
+ t.integer "service_id"
+ t.boolean "push_events", :default => true, :null => false
+ t.boolean "issues_events", :default => false, :null => false
+ t.boolean "merge_requests_events", :default => false, :null => false
+ t.boolean "tag_push_events", :default => false
+ t.boolean "note_events", :default => false, :null => false
+ end
+
+ add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id"
+ add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id"
+
create_table "wechat_logs", :force => true do |t|
t.string "openid", :null => false
t.text "request_raw"
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 6b0f1621b..5503af1fe 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -83,7 +83,8 @@ function _inString(val, str, delimiter) {
}
function _addUnit(val, unit) {
unit = unit || 'px';
- return val && /^\d+$/.test(val) ? val + unit : val;
+ //return val && /^\d+$/.test(val) ? val + unit : val;
+ return val && /^-?\d+(?:\.\d+)?$/.test(val) ? val + unit : val;
}
function _removeUnit(val) {
var match;
@@ -304,7 +305,7 @@ K.options = {
img : ['id', 'class', 'src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'],
'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [
'id', 'class', 'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background',
- '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'
+ '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left', '.margin', '.border', '.padding'
],
pre : ['id', 'class'],
hr : ['id', 'class', '.page-break-after'],
@@ -597,7 +598,7 @@ function _ready(fn) {
}
_bind(window, 'load', readyFunc);
}
-if (_IE) {
+if (window.attachEvent) {
window.attachEvent('onunload', function() {
_each(_eventData, function(key, events) {
if (events.el) {
@@ -2531,6 +2532,7 @@ K.START_TO_START = _START_TO_START;
K.START_TO_END = _START_TO_END;
K.END_TO_END = _END_TO_END;
K.END_TO_START = _END_TO_START;
+
function _nativeCommand(doc, key, val) {
try {
doc.execCommand(key, false, val);
@@ -3361,6 +3363,10 @@ function _drag(options) {
});
}
clickEl.mousedown(function(e) {
+ //新加的
+ if(e.button !== 0 && e.button !== 1) {
+ return;
+ }
e.stopPropagation();
var self = clickEl.get(),
x = _removeUnit(moveEl.css('left')),
@@ -3681,13 +3687,20 @@ _extend(KEdit, KWidget, {
if (isDocumentDomain) {
doc.domain = document.domain;
}
+
doc.write(_getInitHtml(themesPath, bodyClass, cssPath, cssData));
doc.close();
self.win = self.iframe[0].contentWindow;
self.doc = doc;
var cmd = _cmd(doc);
self.afterChange(function(e) {
- cmd.selection();
+// if (e.which == 8) {
+// var range = cmd.range
+// var bookmark = range.createBookmark();
+// cmd.doc.body.innerHTML = cmd.doc.body.innerHTML.replace(/\s*<\/p>/g,"");
+// range.moveToBookmark(bookmark);
+// }
+ cmd.selection();
});
if (_WEBKIT) {
K(doc).click(function(e) {
@@ -3824,9 +3837,20 @@ _extend(KEdit, KWidget, {
if (!self.designMode) {
val = self.html();
self.designMode = true;
- self.html(val);
+
+ //self.html(val);
+ //self.textarea.hide();
+ //self.iframe.show();
+ //新加
self.textarea.hide();
- self.iframe.show();
+ self.html(val);
+ var iframe = self.iframe;
+ var height = _removeUnit(self.height);
+ iframe.height(height - 2);
+ iframe.show();
+ setTimeout(function() {
+ iframe.height(height);
+ }, 0);
}
} else {
if (self.designMode) {
@@ -3958,7 +3982,7 @@ _extend(KToolbar, KWidget, {
}else if(!$("#full",container).is(':hidden')){
pdiv = $("#full",container);
}
- return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
+ return (this._itemMap[name] = K('span.ke-icon-' + name, this.div).parent());
},
select : function(name) {
_selectToolbar.call(this, name, function(knode) {
@@ -4864,6 +4888,11 @@ KEditor.prototype = {
},
loadPlugin : function(name, fn) {
var self = this;
+ //新加
+ var _pluginStatus = this._pluginStatus;
+ if (!_pluginStatus) {
+ _pluginStatus = this._pluginStatus = {};
+ }
if (_plugins[name]) {
if (!_isFunction(_plugins[name])) {
setTimeout(function() {
@@ -4871,7 +4900,12 @@ KEditor.prototype = {
}, 100);
return self;
}
- _plugins[name].call(self, KindEditor);
+ //_plugins[name].call(self, KindEditor);
+ //新加
+ if(!_pluginStatus[name]) {
+ _plugins[name].call(self, KindEditor);
+ _pluginStatus[name] = 'inited';
+ }
if (fn) {
fn.call(self);
}
@@ -5510,6 +5544,11 @@ function _create(expr, options) {
_each(_plugins, function(name, fn) {
if (_isFunction(fn)) {
fn.call(editor, KindEditor);
+ //新加
+ if (!editor._pluginStatus) {
+ editor._pluginStatus = {};
+ }
+ editor._pluginStatus[name] = 'inited';
}
});
return editor.create();
@@ -5772,13 +5811,14 @@ _plugin('core', function(K) {
click : function() {
self.select().exec('formatblock', '<' + key + '>').hideMenu();
//by yk利用html的特性使h1 h2 h3 h4标签之间不能相互包含 并将空的标签去掉
- if (key != "p"){
+// if (key != "p"){
var val = self.select().html();
self.select().html(val);
+ self.cmd.doc.body.innerHTML = self.cmd.doc.body.innerHTML.replace(/
\s*<\/p>/g,"");
val = self.select().html().replace(/(
\s*<\/h1>)|(\s*<\/h2>)|(\s*<\/h3>)|(\s*<\/h4>)/g,"");
self.select().html(val);
self.select();
- }
+// }
}
});
});
@@ -6059,6 +6099,9 @@ _plugin('core', function(K) {
} else {
cmd.range.selectNodeContents(div[0]);
cmd.select();
+ //新加
+ div[0].tabIndex = -1;
+ div[0].focus();
}
setTimeout(function() {
movePastedData();
diff --git a/public/assets/kindeditor/plugins/autoheight/autoheight.js b/public/assets/kindeditor/plugins/autoheight/autoheight.js
index cdd3f94f8..1a067e134 100644
--- a/public/assets/kindeditor/plugins/autoheight/autoheight.js
+++ b/public/assets/kindeditor/plugins/autoheight/autoheight.js
@@ -27,9 +27,19 @@ KindEditor.plugin('autoheight', function(K) {
var edit = self.edit;
var body = edit.doc.body;
edit.iframe.height(minHeight);
+
+ //最高418 超过用滚动条
self.resize(null, Math.max(
- (K.IE ? body.scrollHeight : body.offsetHeight)
+ (K.IE ? body.scrollHeight : body.offsetHeight) > 385 ? 385+33 : (K.IE ? body.scrollHeight : body.offsetHeight)
+ 33, minHeight));
+
+ if( self.height == "418px" ){
+ edit.iframe[0].scroll = 'yes';
+ body.style.overflowY = 'auto';
+ }
+ else{
+ hideScroll();
+ }
}
function init() {
diff --git a/public/assets/kindeditor/plugins/code/code.js b/public/assets/kindeditor/plugins/code/code.js
index 760f20bc7..3a3a982ea 100644
--- a/public/assets/kindeditor/plugins/code/code.js
+++ b/public/assets/kindeditor/plugins/code/code.js
@@ -42,6 +42,9 @@ KindEditor.plugin('code', function(K) {
yesBtn : {
name : self.lang('yes'),
click : function(e) {
+ if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
+ self.edit.html('');
+ }
var type = K('.ke-code-type', dialog.div).val(),
code = textarea.val(),
cls = type === '' ? '' : ' lang-' + type,
diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css
index cf9c219e9..f9f7c4b78 100644
--- a/public/assets/kindeditor/plugins/code/previewcode.css
+++ b/public/assets/kindeditor/plugins/code/previewcode.css
@@ -46,7 +46,7 @@
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
-.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
+.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;}
span.at {color:#269ac9;}
span.at a{color:#269ac9;text-decoration: none;}
@@ -54,5 +54,5 @@ span.at a{color:#269ac9;text-decoration: none;}
.ke-content ol li{list-style-type: decimal;}
.ke-content ul li{list-style-type: disc;}
.ke-content ol,.ke-content ul,.ke-content h1,.ke-content h2,.ke-content h3,.ke-content h4{margin-top:0;margin-bottom: 0;}
-.ke-content a{color: #15bccf;}
+.ke-content a{color: #136ec2;}
.ke-content a:link,.ke-content a:visited{text-decoration:none;}
diff --git a/public/images/default_blank/mo-1.jpg b/public/images/default_blank/mo-1.jpg
new file mode 100644
index 000000000..fb6152611
Binary files /dev/null and b/public/images/default_blank/mo-1.jpg differ
diff --git a/public/images/default_blank/mo-2.jpg b/public/images/default_blank/mo-2.jpg
new file mode 100644
index 000000000..9bd406d30
Binary files /dev/null and b/public/images/default_blank/mo-2.jpg differ
diff --git a/public/images/default_blank/mo-3.jpg b/public/images/default_blank/mo-3.jpg
new file mode 100644
index 000000000..b0b961ab9
Binary files /dev/null and b/public/images/default_blank/mo-3.jpg differ
diff --git a/public/images/org_custom/homepageImage.jpg b/public/images/org_custom/homepageImage.jpg
new file mode 100644
index 000000000..bd2597dd2
Binary files /dev/null and b/public/images/org_custom/homepageImage.jpg differ
diff --git a/public/images/org_custom/icons_por.png b/public/images/org_custom/icons_por.png
new file mode 100644
index 000000000..952ea0194
Binary files /dev/null and b/public/images/org_custom/icons_por.png differ
diff --git a/public/images/org_custom/por_img.jpg b/public/images/org_custom/por_img.jpg
new file mode 100644
index 000000000..f76ab94c2
Binary files /dev/null and b/public/images/org_custom/por_img.jpg differ
diff --git a/public/images/org_custom/porlogo.png b/public/images/org_custom/porlogo.png
new file mode 100644
index 000000000..b9c7a2f0b
Binary files /dev/null and b/public/images/org_custom/porlogo.png differ
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 96dd99ed2..468bf64e9 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1353,7 +1353,7 @@ function autoUrl(id){
$("#"+id+" p,#"+ id +" span,#"+id+" em,#"+id+" h1,#"+id+" h2,#"+id+" h3,#"+id+" h4,#"+id+" strong,#"+id+" b,#"+id+" font,#"+id+" i").each(function(){
if ($(this).children().length == 0){
var html = $(this).text();
- html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
+ html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|cn)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[A-Za-z0-9_\-\.~]+)*(\?[A-Za-z0-9+_\-\.%=&]*)?(\/([A-Za-z0-9_\-\.]*)(\?[A-Za-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
@@ -1372,7 +1372,7 @@ function autoUrl(id){
}
else{
var html = $("#"+id).text();
- html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
+ html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|cn)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[A-Za-z0-9_\-\.~]+)*(\?[A-Za-z0-9+_\-\.%=&]*)?(\/([A-Za-z0-9_\-\.]*)(\?[A-Za-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
diff --git a/public/javascripts/org.js b/public/javascripts/org.js
index 5b18372ed..a2b2bd361 100644
--- a/public/javascripts/org.js
+++ b/public/javascripts/org.js
@@ -108,4 +108,32 @@ function chooseTeacherType(org_id){
}
}
lastSendType = sendType;
+}
+
+//修改状态
+function admin_hide_org(content, id){
+ if (content.text() == '设为热门'){
+ $.ajax({
+ url: "/organizations/update_field_by_admin?container=" + id + "&type=project",
+ type: "post"
+ });
+ }
+ else if (content.text() == '设为精品'){
+ $.ajax({
+ url: "/organizations/update_field_by_admin?container=" + id + "&type=course",
+ type: "post"
+ });
+ }
+ else if (content.text() == '取消热门'){
+ $.ajax({
+ url: "/organizations/update_field_by_admin?container=" + id + "&type=project" + "&status=reset",
+ type: "post"
+ });
+ }
+ else if (content.text() == '取消精品'){
+ $.ajax({
+ url: "/organizations/update_field_by_admin?container=" + id + "&type=course" + "&status=reset",
+ type: "post"
+ });
+ }
}
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/javascripts/code_review.js b/public/plugin_assets/redmine_code_review/javascripts/code_review.js
index 625f376c9..4f4d81691 100644
--- a/public/plugin_assets/redmine_code_review/javascripts/code_review.js
+++ b/public/plugin_assets/redmine_code_review/javascripts/code_review.js
@@ -1,354 +1,354 @@
-/*
-# Code Review plugin for Redmine
-# Copyright (C) 2009-2013 Haruyuki Iida
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-var topZindex = 1000;
-var action_type = '';
-var rev = '';
-var rev_to = '';
-var path = '';
-var urlprefix = '';
-var review_form_dialog = null;
-var add_form_title = null;
-var review_dialog_title = null;
-var repository_id = null;
-var filenames = [];
-
-var ReviewCount = function(total, open, progress){
- this.total = total;
- this.open = open;
- this.closed = total - open;
- this.progress = progress
-};
-
-var CodeReview = function(id) {
- this.id = id;
- this.path = '';
- this.line = 0;
- this.url = '';
- this.is_closed = false;
-};
-
-var review_counts = new Array();
-var code_reviews_map = new Array();
-var code_reviews_dialog_map = new Array();
-
-function UpdateRepositoryView(title) {
- var header = $("table.changesets thead tr:first");
- var th = $(' ');
- th.html(title);
- header.append(th);
- $('tr.changeset td.id a').each(function(i){
- var revision = this.getAttribute("href");
- revision = revision.substr(revision.lastIndexOf("/") + 1);
- var review = review_counts['revision_' + revision];
- var td = $(' ',{
- 'class':'progress'
- });
- td.html(review.progress);
- $(this.parentNode.parentNode).append(td);
- });
- }
-//add function $.down
-if(! $.fn.down)
-(function($) {
- $.fn.down = function() {
- var el = this[0] && this[0].firstChild;
- while (el && el.nodeType != 1)
- el = el.nextSibling;
- return $(el);
- };
-})(jQuery);
-
-function UpdateRevisionView() {
- $('li.change').each(function(){
- var li = $(this);
- if (li.hasClass('folder')) return;
-
- var a = li.down('a');
- if (a.size() == 0) return;
- var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, '');
-
- var reviewlist = code_reviews_map[path];
- if (reviewlist == null) return;
-
- var ul = $('');
- for (var j = 0; j < reviewlist.length; j++) {
- var review = reviewlist[j];
- var icon = review.is_closed? 'icon-closed-review': 'icon-review';
- var item = $(' ', {
- 'class': 'icon ' + icon + ' code_review_summary'
- });
- item.html(review.url);
- ul.append(item);
- }
- li.append(ul);
- });
-}
-
-function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){
- var filetables = [];
- var j = 0;
- $('table').each(function(){
- if($(this).hasClass('filecontent')){
- filetables[j++] = this;
- }
- });
- j = 0;
- $('table.filecontent th.filename').each(function(){
- filenames[j] = $.trim($(this).text());
- j++;
- });
- addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type +
- '&rev=' + rev + '&rev_to=' + rev_to +
- '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id);
- if (path != null && path.length > 0) {
- addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path);
- }
- var num = 0;
- if (is_diff) {
- num = 1;
- }
- var i, l, tl;
- for (i = 0, tl = filetables.length; i < tl; i++) {
- var table = filetables[i];
- var trs = table.getElementsByTagName('tr');
-
- for (j = 0,l = trs.length; j < l; j++) {
- var tr = trs[j];
- var ths = tr.getElementsByTagName('th');
-
- var th = ths[num];
- if (th == null) {
- continue;
- }
-
- var th_html = th.innerHTML;
-
- var line = th_html.match(/[0-9]+/);
- if (line == null) {
- continue;
- }
-
- var span_html = '';
-
- if (!is_readonly) {
- span_html += image_tag;
- }
- span_html += ' ';
- th.innerHTML = th_html + span_html;
-
- var img = th.getElementsByTagName('img')[0];
- if (img != null ) {
- img.id = 'add_revew_img_' + line + '_' + i;
- $(img).click(clickPencil);
- }
- }
- }
-
-
-}
-
-function clickPencil(e)
-{
-// alert('$(e.target).attr("id") = ' + $(e.target).attr("id"));
- var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/);
- var line = result[1];
- var file_count = eval(result[2]);
- var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count;
-
- if (path == null || path.length == 0) {
- url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true';
- }
- addReview(url);
- formPopup(e.pageX, e.pageY);
- e.preventDefault();
-}
-var addReviewUrl = null;
-var showReviewUrl = null;
-var showReviewImageTag = null;
-var showClosedReviewImageTag = null;
-
-function setShowReviewButton(line, review_id, is_closed, file_count) {
- //alert('file_count = ' + file_count);
- var span = $('#review_span_' + line + '_' + file_count);
- if (span.size() == 0) {
- return;
- }
- var innerSpan = $(' ',{id: 'review_' + review_id});
- span.append(innerSpan);
- innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag);
- var div = $('
', {
- 'class':'draggable',
- id: 'show_review_' + review_id
- });
- $('#code_review').append(div);
- innerSpan.down('img').click(function(e) {
- var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0];
- var span = $('#review_' + review_id); // span element of view review button
- var pos = span.offset();
- showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25);
- });
-}
-
-function popupReview(review_id) {
- var span = $('#review_' + review_id); // span element of view review button
- var pos = span.offset();
- $('html,body').animate({ scrollTop: pos.top },
- {duration: 'fast',
- complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}});
- // position and show popup dialog
- // create popup dialog
- //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top);
-// win.toFront();
-}
-
-function showReview(url, review_id, x, y) {
- if (code_reviews_dialog_map[review_id] != null) {
- var cur_win = code_reviews_dialog_map[review_id];
- cur_win.hide();
- code_reviews_dialog_map[review_id] = null;
- }
- $('#show_review_' + review_id).load(url, {review_id: review_id});
- var review = getReviewObjById(review_id);
-
- var win = $('#show_review_' + review_id).dialog({
- show: {effect:'scale'},// ? 'top-left'
- //position: [x, y + 5],
- width:640,
- zIndex: topZindex,
- title: review_dialog_title
- });
-// win.getContent().style.color = "#484848";
-// win.getContent().style.background = "#ffffff";
- topZindex++;
- code_reviews_dialog_map[review_id] = win;
- return win
-}
-
-function getReviewObjById(review_id) {
- for (var reviewlist in code_reviews_map) {
- for (var i = 0; i < reviewlist.length; i++) {
- var review = reviewlist[i];
- if (review.id == review_id) {
- return review;
- }
- }
- }
- return null;
-}
-
-function formPopup(x, y){
- //@see http://docs.jquery.com/UI/Effects/Scale
- var win = $('#review-form-frame').dialog({
- show: {effect:'scale', direction: 'both'},// ? 'top-left'
-// position: [x, y + 5],
- width:640,
- zIndex: topZindex,
- title: add_form_title
- });
-// win.getContent().style.background = "#ffffff";
- if (review_form_dialog != null) {
- review_form_dialog.destroy();
- review_form_dialog = null;
- }
- review_form_dialog = win;
- topZindex += 10;
- return false;
-}
-
-function hideForm() {
- if (review_form_dialog == null) {
- return;
- }
- review_form_dialog.dialog('close');
- review_form_dialog = null;
- $('#review-form').html('');
-}
-function addReview(url) {
- $('#review-form').load(url);
-}
-
-function deleteReview(review_id) {
- $('show_review_' + review_id).remove();
- $('review_' + review_id).remove();
-
-}
-
-function changeImage(review_id, is_closed) {
- var span = $('review_' + review_id);
- var new_image = null;
- var dummy = new Element('span');
- if (is_closed) {
- dummy.insert(showClosedReviewImageTag);
- }
- else {
- dummy.insert(showReviewImageTag);
- }
- new_image = dummy.down().getAttribute('src');
- //alert(new_image);
- span.down('img').setAttribute('src', new_image);
-
-}
-
-function make_addreview_link(project, link) {
- var alist = $('#content p a');
- if (alist == null) {
- return;
- }
- var a = alist[0];
- var p = a.parentNode;
- p.innerHTML = p.innerHTML + " | " + link;
-}
-
-function call_update_revisions(url) {
- var changeset_ids = '';
- var links = $$('table.changesets tbody tr.changeset td.id a');
- for (var i = 0; i < links.length; i++) {
- var link = links[i];
- var href = link.getAttribute('href');
- var id = href.replace(/^.*\/revisions\//, '');
- if (i > 0) {
- changeset_ids += ',';
- }
- changeset_ids += id;
- }
- new Ajax.Updater('code_review_revisions', url,
- {
- evalScripts:true,
- method:'get',
- parameters: 'changeset_ids=' + encodeURI(changeset_ids)
- });
-}
-
-$.fn.serialize2json = function()
-{
- var o = {};
- var a = this.serializeArray();
- $.each(a, function() {
- if (o[this.name]) {
- if (!o[this.name].push) {
- o[this.name] = [o[this.name]];
- }
- o[this.name].push(this.value || '');
- } else {
- o[this.name] = this.value || '';
- }
- });
- return o;
+/*
+# Code Review plugin for Redmine
+# Copyright (C) 2009-2013 Haruyuki Iida
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+var topZindex = 1000;
+var action_type = '';
+var rev = '';
+var rev_to = '';
+var path = '';
+var urlprefix = '';
+var review_form_dialog = null;
+var add_form_title = null;
+var review_dialog_title = null;
+var repository_id = null;
+var filenames = [];
+
+var ReviewCount = function(total, open, progress){
+ this.total = total;
+ this.open = open;
+ this.closed = total - open;
+ this.progress = progress
+};
+
+var CodeReview = function(id) {
+ this.id = id;
+ this.path = '';
+ this.line = 0;
+ this.url = '';
+ this.is_closed = false;
+};
+
+var review_counts = new Array();
+var code_reviews_map = new Array();
+var code_reviews_dialog_map = new Array();
+
+function UpdateRepositoryView(title) {
+ var header = $("table.changesets thead tr:first");
+ var th = $(' ');
+ th.html(title);
+ header.append(th);
+ $('tr.changeset td.id a').each(function(i){
+ var revision = this.getAttribute("href");
+ revision = revision.substr(revision.lastIndexOf("/") + 1);
+ var review = review_counts['revision_' + revision];
+ var td = $(' ',{
+ 'class':'progress'
+ });
+ td.html(review.progress);
+ $(this.parentNode.parentNode).append(td);
+ });
+ }
+//add function $.down
+if(! $.fn.down)
+(function($) {
+ $.fn.down = function() {
+ var el = this[0] && this[0].firstChild;
+ while (el && el.nodeType != 1)
+ el = el.nextSibling;
+ return $(el);
+ };
+})(jQuery);
+
+function UpdateRevisionView() {
+ $('li.change').each(function(){
+ var li = $(this);
+ if (li.hasClass('folder')) return;
+
+ var a = li.down('a');
+ if (a.size() == 0) return;
+ var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, '');
+
+ var reviewlist = code_reviews_map[path];
+ if (reviewlist == null) return;
+
+ var ul = $('');
+ for (var j = 0; j < reviewlist.length; j++) {
+ var review = reviewlist[j];
+ var icon = review.is_closed? 'icon-closed-review': 'icon-review';
+ var item = $(' ', {
+ 'class': 'icon ' + icon + ' code_review_summary'
+ });
+ item.html(review.url);
+ ul.append(item);
+ }
+ li.append(ul);
+ });
+}
+
+function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){
+ var filetables = [];
+ var j = 0;
+ $('table').each(function(){
+ if($(this).hasClass('filecontent')){
+ filetables[j++] = this;
+ }
+ });
+ j = 0;
+ $('table.filecontent th.filename').each(function(){
+ filenames[j] = $.trim($(this).text());
+ j++;
+ });
+ addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type +
+ '&rev=' + rev + '&rev_to=' + rev_to +
+ '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id);
+ if (path != null && path.length > 0) {
+ addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path);
+ }
+ var num = 0;
+ if (is_diff) {
+ num = 1;
+ }
+ var i, l, tl;
+ for (i = 0, tl = filetables.length; i < tl; i++) {
+ var table = filetables[i];
+ var trs = table.getElementsByTagName('tr');
+
+ for (j = 0,l = trs.length; j < l; j++) {
+ var tr = trs[j];
+ var ths = tr.getElementsByTagName('th');
+
+ var th = ths[num];
+ if (th == null) {
+ continue;
+ }
+
+ var th_html = th.innerHTML;
+
+ var line = th_html.match(/[0-9]+/);
+ if (line == null) {
+ continue;
+ }
+
+ var span_html = '';
+
+ if (!is_readonly) {
+ span_html += image_tag;
+ }
+ span_html += ' ';
+ th.innerHTML = th_html + span_html;
+
+ var img = th.getElementsByTagName('img')[0];
+ if (img != null ) {
+ img.id = 'add_revew_img_' + line + '_' + i;
+ $(img).click(clickPencil);
+ }
+ }
+ }
+
+
+}
+
+function clickPencil(e)
+{
+// alert('$(e.target).attr("id") = ' + $(e.target).attr("id"));
+ var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/);
+ var line = result[1];
+ var file_count = eval(result[2]);
+ var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count;
+
+ if (path == null || path.length == 0) {
+ url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true';
+ }
+ addReview(url);
+ formPopup(e.pageX, e.pageY);
+ e.preventDefault();
+}
+var addReviewUrl = null;
+var showReviewUrl = null;
+var showReviewImageTag = null;
+var showClosedReviewImageTag = null;
+
+function setShowReviewButton(line, review_id, is_closed, file_count) {
+ //alert('file_count = ' + file_count);
+ var span = $('#review_span_' + line + '_' + file_count);
+ if (span.size() == 0) {
+ return;
+ }
+ var innerSpan = $(' ',{id: 'review_' + review_id});
+ span.append(innerSpan);
+ innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag);
+ var div = $('
', {
+ 'class':'draggable',
+ id: 'show_review_' + review_id
+ });
+ $('#code_review').append(div);
+ innerSpan.down('img').click(function(e) {
+ var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0];
+ var span = $('#review_' + review_id); // span element of view review button
+ var pos = span.offset();
+ showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25);
+ });
+}
+
+function popupReview(review_id) {
+ var span = $('#review_' + review_id); // span element of view review button
+ var pos = span.offset();
+ $('html,body').animate({ scrollTop: pos.top },
+ {duration: 'fast',
+ complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}});
+ // position and show popup dialog
+ // create popup dialog
+ //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top);
+// win.toFront();
+}
+
+function showReview(url, review_id, x, y) {
+ if (code_reviews_dialog_map[review_id] != null) {
+ var cur_win = code_reviews_dialog_map[review_id];
+ cur_win.hide();
+ code_reviews_dialog_map[review_id] = null;
+ }
+ $('#show_review_' + review_id).load(url, {review_id: review_id});
+ var review = getReviewObjById(review_id);
+
+ var win = $('#show_review_' + review_id).dialog({
+ show: {effect:'scale'},// ? 'top-left'
+ //position: [x, y + 5],
+ width:640,
+ zIndex: topZindex,
+ title: review_dialog_title
+ });
+// win.getContent().style.color = "#484848";
+// win.getContent().style.background = "#ffffff";
+ topZindex++;
+ code_reviews_dialog_map[review_id] = win;
+ return win
+}
+
+function getReviewObjById(review_id) {
+ for (var reviewlist in code_reviews_map) {
+ for (var i = 0; i < reviewlist.length; i++) {
+ var review = reviewlist[i];
+ if (review.id == review_id) {
+ return review;
+ }
+ }
+ }
+ return null;
+}
+
+function formPopup(x, y){
+ //@see http://docs.jquery.com/UI/Effects/Scale
+ var win = $('#review-form-frame').dialog({
+ show: {effect:'scale', direction: 'both'},// ? 'top-left'
+// position: [x, y + 5],
+ width:640,
+ zIndex: topZindex,
+ title: add_form_title
+ });
+// win.getContent().style.background = "#ffffff";
+ if (review_form_dialog != null) {
+ review_form_dialog.destroy();
+ review_form_dialog = null;
+ }
+ review_form_dialog = win;
+ topZindex += 10;
+ return false;
+}
+
+function hideForm() {
+ if (review_form_dialog == null) {
+ return;
+ }
+ review_form_dialog.dialog('close');
+ review_form_dialog = null;
+ $('#review-form').html('');
+}
+function addReview(url) {
+ $('#review-form').load(url);
+}
+
+function deleteReview(review_id) {
+ $('show_review_' + review_id).remove();
+ $('review_' + review_id).remove();
+
+}
+
+function changeImage(review_id, is_closed) {
+ var span = $('review_' + review_id);
+ var new_image = null;
+ var dummy = new Element('span');
+ if (is_closed) {
+ dummy.insert(showClosedReviewImageTag);
+ }
+ else {
+ dummy.insert(showReviewImageTag);
+ }
+ new_image = dummy.down().getAttribute('src');
+ //alert(new_image);
+ span.down('img').setAttribute('src', new_image);
+
+}
+
+function make_addreview_link(project, link) {
+ var alist = $('#content p a');
+ if (alist == null) {
+ return;
+ }
+ var a = alist[0];
+ var p = a.parentNode;
+ p.innerHTML = p.innerHTML + " | " + link;
+}
+
+function call_update_revisions(url) {
+ var changeset_ids = '';
+ var links = $$('table.changesets tbody tr.changeset td.id a');
+ for (var i = 0; i < links.length; i++) {
+ var link = links[i];
+ var href = link.getAttribute('href');
+ var id = href.replace(/^.*\/revisions\//, '');
+ if (i > 0) {
+ changeset_ids += ',';
+ }
+ changeset_ids += id;
+ }
+ new Ajax.Updater('code_review_revisions', url,
+ {
+ evalScripts:true,
+ method:'get',
+ parameters: 'changeset_ids=' + encodeURI(changeset_ids)
+ });
+}
+
+$.fn.serialize2json = function()
+{
+ var o = {};
+ var a = this.serializeArray();
+ $.each(a, function() {
+ if (o[this.name]) {
+ if (!o[this.name].push) {
+ o[this.name] = [o[this.name]];
+ }
+ o[this.name].push(this.value || '');
+ } else {
+ o[this.name] = this.value || '';
+ }
+ });
+ return o;
};
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/activity.css b/public/plugin_assets/redmine_code_review/stylesheets/activity.css
index e3cdc3d55..202ed54e3 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/activity.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/activity.css
@@ -1,4 +1,4 @@
-
-dt.code_review {
- background-image: url(../images/review.png);
+
+dt.code_review {
+ background-image: url(../images/review.png);
}
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/code_review.css b/public/plugin_assets/redmine_code_review/stylesheets/code_review.css
index 11939ae79..e25dc6d72 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/code_review.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/code_review.css
@@ -1,97 +1,97 @@
-/*
-# Code Review plugin for Redmine
-# Copyright (C) 2009 Haruyuki Iida
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-#review-form-frame {
-height: 100%;
-}
-
-.autoscroll table.filecontent th.line-num {
- white-space: nowrap;
- vertical-align: bottom;
- padding-top: 0;
- padding-bottom: 0;
- text-align:left;
-}
-
-table.filecontent th.line-num img{
- padding: 0;
- margin: 0;
- cursor: pointer;
-}
-
-
-.code-review-form-title {
- background-color: #002059;
- color: white;
- padding-left: 2px;
- padding-right: 2px;
- cursor: default;
-}
-
-
-.code_review_viewer {
-
- min-width: 300px;
- /*
- max-width: 60%;
- */
- /* max-height: 400px; */
-}
-
-.code_review_viewer .issue{
-
-}
-
-.code_review_body {
- background-color: white;
-
- padding:2px;
-
-}
-
-#code_review_list table.list td {
- text-align: center;
-}
-
-#code_review_list table.list td.path {
- text-align: left;
-}
-
-#code_review_list table.list td.subject {
- text-align: left;
-}
-
-.icon-review {
- background-image: url(../images/review.png);
- background-repeat: no-repeat;
-}
-
-.icon-closed-review {
- background-image: url(../images/closed_review.png);
- background-repeat: no-repeat;
-}
-
-.icon-settings {
- background-image: url(../../../images/changeset.png);
- background-repeat: no-repeat;
-}
-
-
-li.code_review_summary {
- list-style-type: none;
+/*
+# Code Review plugin for Redmine
+# Copyright (C) 2009 Haruyuki Iida
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+#review-form-frame {
+height: 100%;
+}
+
+.autoscroll table.filecontent th.line-num {
+ white-space: nowrap;
+ vertical-align: bottom;
+ padding-top: 0;
+ padding-bottom: 0;
+ text-align:left;
+}
+
+table.filecontent th.line-num img{
+ padding: 0;
+ margin: 0;
+ cursor: pointer;
+}
+
+
+.code-review-form-title {
+ background-color: #002059;
+ color: white;
+ padding-left: 2px;
+ padding-right: 2px;
+ cursor: default;
+}
+
+
+.code_review_viewer {
+
+ min-width: 300px;
+ /*
+ max-width: 60%;
+ */
+ /* max-height: 400px; */
+}
+
+.code_review_viewer .issue{
+
+}
+
+.code_review_body {
+ background-color: white;
+
+ padding:2px;
+
+}
+
+#code_review_list table.list td {
+ text-align: center;
+}
+
+#code_review_list table.list td.path {
+ text-align: left;
+}
+
+#code_review_list table.list td.subject {
+ text-align: left;
+}
+
+.icon-review {
+ background-image: url(../images/review.png);
+ background-repeat: no-repeat;
+}
+
+.icon-closed-review {
+ background-image: url(../images/closed_review.png);
+ background-repeat: no-repeat;
+}
+
+.icon-settings {
+ background-image: url(../../../images/changeset.png);
+ background-repeat: no-repeat;
+}
+
+
+li.code_review_summary {
+ list-style-type: none;
}
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE b/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE
index 5bcdad1bd..0a7cf9ad1 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE
@@ -1,19 +1,19 @@
-Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css
index 432d14e36..4846e6185 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css
@@ -1,119 +1,119 @@
-.overlay_alert {
- background-color: #85BBEF;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-.alert_nw {
- width: 5px;
- height: 5px;
- background: transparent url(alert/top_left.gif) no-repeat bottom left;
-}
-
-.alert_n {
- height: 5px;
- background: transparent url(alert/top.gif) repeat-x bottom left;
-}
-
-.alert_ne {
- width: 5px;
- height: 5px;
- background: transparent url(alert/top_right.gif) no-repeat bottom left
-}
-
-.alert_e {
- width: 5px;
- background: transparent url(alert/right.gif) repeat-y 0 0;
-}
-
-.alert_w {
- width: 5px;
- background: transparent url(alert/left.gif) repeat-y 0 0;
-}
-
-.alert_sw {
- width: 5px;
- height: 5px;
- background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
-}
-
-.alert_s {
- height: 5px;
- background: transparent url(alert/bottom.gif) repeat-x 0 0;
-}
-
-.alert_se, .alert_sizer {
- width: 5px;
- height: 5px;
- background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
-}
-
-.alert_close {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_minimize {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_maximize {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_title {
- float:left;
- height:1px;
- width:100%;
-}
-
-.alert_content {
- overflow:visible;
- color: #000;
- font-family: Tahoma, Arial, sans-serif;
- font: 12px arial;
- background: #FFF;
-}
-
-/* For alert/confirm dialog */
-.alert_window {
- background: #FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.alert_message {
- font: 12px arial;
- width:100%;
- color:#F00;
- padding-bottom:10px;
-}
-
-.alert_buttons {
- text-align:center;
- width:100%;
-}
-
-.alert_buttons input {
- width:20%;
- margin:10px;
-}
-
-.alert_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background: #FFF url('alert/progress.gif') no-repeat center center
-}
-
-
+.overlay_alert {
+ background-color: #85BBEF;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+.alert_nw {
+ width: 5px;
+ height: 5px;
+ background: transparent url(alert/top_left.gif) no-repeat bottom left;
+}
+
+.alert_n {
+ height: 5px;
+ background: transparent url(alert/top.gif) repeat-x bottom left;
+}
+
+.alert_ne {
+ width: 5px;
+ height: 5px;
+ background: transparent url(alert/top_right.gif) no-repeat bottom left
+}
+
+.alert_e {
+ width: 5px;
+ background: transparent url(alert/right.gif) repeat-y 0 0;
+}
+
+.alert_w {
+ width: 5px;
+ background: transparent url(alert/left.gif) repeat-y 0 0;
+}
+
+.alert_sw {
+ width: 5px;
+ height: 5px;
+ background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
+}
+
+.alert_s {
+ height: 5px;
+ background: transparent url(alert/bottom.gif) repeat-x 0 0;
+}
+
+.alert_se, .alert_sizer {
+ width: 5px;
+ height: 5px;
+ background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
+}
+
+.alert_close {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_minimize {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_maximize {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_title {
+ float:left;
+ height:1px;
+ width:100%;
+}
+
+.alert_content {
+ overflow:visible;
+ color: #000;
+ font-family: Tahoma, Arial, sans-serif;
+ font: 12px arial;
+ background: #FFF;
+}
+
+/* For alert/confirm dialog */
+.alert_window {
+ background: #FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.alert_message {
+ font: 12px arial;
+ width:100%;
+ color:#F00;
+ padding-bottom:10px;
+}
+
+.alert_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.alert_buttons input {
+ width:20%;
+ margin:10px;
+}
+
+.alert_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background: #FFF url('alert/progress.gif') no-repeat center center
+}
+
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css
index c2ad538ca..a74fc71c3 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css
@@ -1,88 +1,88 @@
-.overlay_alert_lite {
- background-color: #85BBEF;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-.alert_lite_sizer {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_lite_close {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_lite_minimize {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_lite_maximize {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_lite_title {
- width:0px;
- height:0px;
- display:none;
-}
-
-.alert_lite_content {
- overflow:auto;
- color: #000;
- font-family: Tahoma, Arial, sans-serif;
- font-size: 10px;
- background: #FFF;
-}
-
-
-/* For alert/confirm dialog */
-.alert_lite_window {
- border:1px solid #F00;
- background: #FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.alert_lite_message {
- font-size:16px;
- text-align:center;
- width:100%;
- color:#F00;
- padding-bottom:10px;
-}
-
-.alert_lite_buttons {
- text-align:center;
- width:100%;
-}
-
-.alert_lite_buttons input {
- width:20%;
- margin:10px;
-}
-
-.alert_lite_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background: #FFF url('alert/progress.gif') no-repeat center center
-}
-
-table.alert_lite_header {
- border:1px solid #F00;
- background:#FFF
-}
-
+.overlay_alert_lite {
+ background-color: #85BBEF;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+.alert_lite_sizer {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_lite_close {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_lite_minimize {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_lite_maximize {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_lite_title {
+ width:0px;
+ height:0px;
+ display:none;
+}
+
+.alert_lite_content {
+ overflow:auto;
+ color: #000;
+ font-family: Tahoma, Arial, sans-serif;
+ font-size: 10px;
+ background: #FFF;
+}
+
+
+/* For alert/confirm dialog */
+.alert_lite_window {
+ border:1px solid #F00;
+ background: #FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.alert_lite_message {
+ font-size:16px;
+ text-align:center;
+ width:100%;
+ color:#F00;
+ padding-bottom:10px;
+}
+
+.alert_lite_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.alert_lite_buttons input {
+ width:20%;
+ margin:10px;
+}
+
+.alert_lite_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background: #FFF url('alert/progress.gif') no-repeat center center
+}
+
+table.alert_lite_header {
+ border:1px solid #F00;
+ background:#FFF
+}
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css
index 7d2790e75..6d2862c0e 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css
@@ -1,150 +1,150 @@
-.overlay_alphacube {
- background-color: #85BBEF;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-.alphacube_nw {
- background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
- width:10px;
- height:25px;
-}
-
-.alphacube_n {
- background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
- height:25px;
-}
-
-.alphacube_ne {
- background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
- width:10px;
- height:25px;
-}
-
-.alphacube_w {
- background: transparent url(alphacube/frame-left.gif) repeat-y top left;
- width:7px;
-}
-
-.alphacube_e {
- background: transparent url(alphacube/frame-right.gif) repeat-y top right;
- width:7px;
-}
-
-.alphacube_sw {
- background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
- width:7px;
- height:7px;
-}
-
-.alphacube_s {
- background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
- height:7px;
-}
-
-.alphacube_se, .alphacube_sizer {
- background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
- width:7px;
- height:7px;
-}
-
-.alphacube_sizer {
- cursor:se-resize;
-}
-
-.alphacube_close {
- width: 23px;
- height: 23px;
- background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
- position:absolute;
- top:0px;
- right:11px;
- cursor:pointer;
- z-index:1000;
-}
-
-.alphacube_minimize {
- width: 23px;
- height: 23px;
- background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
- position:absolute;
- top:0px;
- right:55px;
- cursor:pointer;
- z-index:1000;
-}
-
-.alphacube_maximize {
- width: 23px;
- height: 23px;
- background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
- position:absolute;
- top:0px;
- right:33px;
- cursor:pointer;
- z-index:1000;
-}
-
-.alphacube_title {
- float:left;
- height:14px;
- font-size:14px;
- text-align:center;
- margin-top:2px;
- width:100%;
- color:#123456;
-}
-
-.alphacube_content {
- overflow:auto;
- color: #000;
- font-family: Tahoma, Arial, sans-serif;
- font: 12px arial;
- background:#FDFDFD;
-}
-
-/* For alert/confirm dialog */
-.alphacube_window {
- border:1px solid #F00;
- background: #FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.alphacube_message {
- font: 12px arial;
- text-align:center;
- width:100%;
- padding-bottom:10px;
-}
-
-.alphacube_buttons {
- text-align:center;
- width:100%;
-}
-
-.alphacube_buttons input {
- width:20%;
- margin:10px;
-}
-
-.alphacube_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background: #FFF url('alert/progress.gif') no-repeat center center
-}
-
-.alphacube_wired_frame {
- background: #FFF;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-
+.overlay_alphacube {
+ background-color: #85BBEF;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+.alphacube_nw {
+ background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
+ width:10px;
+ height:25px;
+}
+
+.alphacube_n {
+ background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
+ height:25px;
+}
+
+.alphacube_ne {
+ background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
+ width:10px;
+ height:25px;
+}
+
+.alphacube_w {
+ background: transparent url(alphacube/frame-left.gif) repeat-y top left;
+ width:7px;
+}
+
+.alphacube_e {
+ background: transparent url(alphacube/frame-right.gif) repeat-y top right;
+ width:7px;
+}
+
+.alphacube_sw {
+ background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
+ width:7px;
+ height:7px;
+}
+
+.alphacube_s {
+ background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
+ height:7px;
+}
+
+.alphacube_se, .alphacube_sizer {
+ background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
+ width:7px;
+ height:7px;
+}
+
+.alphacube_sizer {
+ cursor:se-resize;
+}
+
+.alphacube_close {
+ width: 23px;
+ height: 23px;
+ background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
+ position:absolute;
+ top:0px;
+ right:11px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.alphacube_minimize {
+ width: 23px;
+ height: 23px;
+ background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
+ position:absolute;
+ top:0px;
+ right:55px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.alphacube_maximize {
+ width: 23px;
+ height: 23px;
+ background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
+ position:absolute;
+ top:0px;
+ right:33px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.alphacube_title {
+ float:left;
+ height:14px;
+ font-size:14px;
+ text-align:center;
+ margin-top:2px;
+ width:100%;
+ color:#123456;
+}
+
+.alphacube_content {
+ overflow:auto;
+ color: #000;
+ font-family: Tahoma, Arial, sans-serif;
+ font: 12px arial;
+ background:#FDFDFD;
+}
+
+/* For alert/confirm dialog */
+.alphacube_window {
+ border:1px solid #F00;
+ background: #FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.alphacube_message {
+ font: 12px arial;
+ text-align:center;
+ width:100%;
+ padding-bottom:10px;
+}
+
+.alphacube_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.alphacube_buttons input {
+ width:20%;
+ margin:10px;
+}
+
+.alphacube_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background: #FFF url('alert/progress.gif') no-repeat center center
+}
+
+.alphacube_wired_frame {
+ background: #FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc
index 437c5ec92..e5c6edc1c 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc
@@ -1,51 +1,51 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css
index 2f83cfd46..e3df3e0a4 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css
@@ -1,121 +1,121 @@
-.overlay_darkX {
- background-color: #85BBEF;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-.darkX_nw {
- background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
- width:6px;
- height:21px;
-}
-.darkX_n {
- background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
- height:21px;
-}
-.darkX_ne {
- background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
- width:6px;
- height:21px;
-}
-.darkX_w {
- background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
- width:3px;
-}
-
-.darkX_e {
- background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
- width:3px;
-}
-
-.darkX_sw {
- background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
- width:5px;
- height:3px;
-}
-.darkX_s {
- background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
- height:3px;
-}
-.darkX_se, .darkX_sizer {
- background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
- width:5px;
- height:3px;
-}
-
-.darkX_sizer {
- cursor:se-resize;
-}
-
-.darkX_close {
- width: 21px;
- height: 21px;
- background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
- position:absolute;
- top:0px;
- right:5px;
- cursor:pointer;
- z-index:1000;
-}
-
-.darkX_minimize {
- width: 21px;
- height: 21px;
- background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
- position:absolute;
- top:0px;
- right:26px;
- cursor:pointer;
- z-index:1000;
-}
-
-.darkX_maximize {
- width: 21px;
- height: 21px;
- background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
- position:absolute;
- top:0px;
- right:47px;
- cursor:pointer;
- z-index:1000;
-}
-
-
-.darkX_title {
- float:left;
- height:14px;
- font-size:12px;
- text-align:center;
- margin-top:2px;
- width:100%;
- color:#FFF;
-}
-
-.darkX_content {
- overflow:auto;
- color: #E6DF2A;
- font-family: Tahoma, Arial, sans-serif;
- font-size: 14px;
- background:#5E5148;
-}
-
-
-/* FOR IE */
-* html .darkX_minimize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop");
-}
-
-* html .darkX_maximize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale");
-}
-
-* html .darkX_close {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop");
-}
+.overlay_darkX {
+ background-color: #85BBEF;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+.darkX_nw {
+ background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
+ width:6px;
+ height:21px;
+}
+.darkX_n {
+ background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
+ height:21px;
+}
+.darkX_ne {
+ background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
+ width:6px;
+ height:21px;
+}
+.darkX_w {
+ background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
+ width:3px;
+}
+
+.darkX_e {
+ background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
+ width:3px;
+}
+
+.darkX_sw {
+ background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
+ width:5px;
+ height:3px;
+}
+.darkX_s {
+ background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
+ height:3px;
+}
+.darkX_se, .darkX_sizer {
+ background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
+ width:5px;
+ height:3px;
+}
+
+.darkX_sizer {
+ cursor:se-resize;
+}
+
+.darkX_close {
+ width: 21px;
+ height: 21px;
+ background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
+ position:absolute;
+ top:0px;
+ right:5px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.darkX_minimize {
+ width: 21px;
+ height: 21px;
+ background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
+ position:absolute;
+ top:0px;
+ right:26px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.darkX_maximize {
+ width: 21px;
+ height: 21px;
+ background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
+ position:absolute;
+ top:0px;
+ right:47px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+
+.darkX_title {
+ float:left;
+ height:14px;
+ font-size:12px;
+ text-align:center;
+ margin-top:2px;
+ width:100%;
+ color:#FFF;
+}
+
+.darkX_content {
+ overflow:auto;
+ color: #E6DF2A;
+ font-family: Tahoma, Arial, sans-serif;
+ font-size: 14px;
+ background:#5E5148;
+}
+
+
+/* FOR IE */
+* html .darkX_minimize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop");
+}
+
+* html .darkX_maximize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale");
+}
+
+* html .darkX_close {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop");
+}
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css
index 69e3b7fc2..d7981e9ca 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css
@@ -1,25 +1,25 @@
-div.inspector div.inspectable {
- padding: 0.25em 0 0.25em 1em;
- background-color: Gray;
- color: white;
- border: outset 2px white;
- cursor: pointer;
-}
-
-div.inspector div.child {
- margin: 0 0 0 1em;
-}
-
-#debug_window_content { /* DIV container for debug sizing*/
- width:250px;
- height:100px;
- background-color:#000;
-}
-
-#debug { /* DIV container for debug contents*/
- padding:3px;
- color:#0f0;
- font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
- font-size:10px;
-}
-
+div.inspector div.inspectable {
+ padding: 0.25em 0 0.25em 1em;
+ background-color: Gray;
+ color: white;
+ border: outset 2px white;
+ cursor: pointer;
+}
+
+div.inspector div.child {
+ margin: 0 0 0 1em;
+}
+
+#debug_window_content { /* DIV container for debug sizing*/
+ width:250px;
+ height:100px;
+ background-color:#000;
+}
+
+#debug { /* DIV container for debug contents*/
+ padding:3px;
+ color:#0f0;
+ font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
+ font-size:10px;
+}
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css
index 6ab13789d..591451723 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css
@@ -1,155 +1,155 @@
-.overlay_dialog {
- background-color: #666666;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-.overlay___invisible__ {
- background-color: #666666;
- filter:alpha(opacity=0);
- -moz-opacity: 0;
- opacity: 0;
-}
-
-.dialog_nw {
- width: 9px;
- height: 23px;
- background: transparent url(default/top_left.gif) no-repeat 0 0;
-}
-
-.dialog_n {
- background: transparent url(default/top_mid.gif) repeat-x 0 0;
- height: 23px;
-}
-
-.dialog_ne {
- width: 9px;
- height: 23px;
- background: transparent url(default/top_right.gif) no-repeat 0 0;
-}
-
-.dialog_e {
- width: 2px;
- background: transparent url(default/center_right.gif) repeat-y 0 0;
-}
-
-.dialog_w {
- width: 2px;
- background: transparent url(default/center_left.gif) repeat-y 0 0;
-}
-
-.dialog_sw {
- width: 9px;
- height: 19px;
- background: transparent url(default/bottom_left.gif) no-repeat 0 0;
-}
-
-.dialog_s {
- background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
- height: 19px;
-}
-
-.dialog_se {
- width: 9px;
- height: 19px;
- background: transparent url(default/bottom_right.gif) no-repeat 0 0;
-}
-
-.dialog_sizer {
- width: 9px;
- height: 19px;
- background: transparent url(default/sizer.gif) no-repeat 0 0;
- cursor:se-resize;
-}
-
-.dialog_close {
- width: 14px;
- height: 14px;
- background: transparent url(default/close.gif) no-repeat 0 0;
- position:absolute;
- top:5px;
- left:8px;
- cursor:pointer;
- z-index:2000;
-}
-
-.dialog_minimize {
- width: 14px;
- height: 15px;
- background: transparent url(default/minimize.gif) no-repeat 0 0;
- position:absolute;
- top:5px;
- left:28px;
- cursor:pointer;
- z-index:2000;
-}
-
-.dialog_maximize {
- width: 14px;
- height: 15px;
- background: transparent url(default/maximize.gif) no-repeat 0 0;
- position:absolute;
- top:5px;
- left:49px;
- cursor:pointer;
- z-index:2000;
-}
-
-.dialog_title {
- float:left;
- height:14px;
- font-family: Tahoma, Arial, sans-serif;
- font-size:12px;
- text-align:center;
- width:100%;
- color:#000;
-}
-
-.dialog_content {
- overflow:auto;
- color: #DDD;
- font-family: Tahoma, Arial, sans-serif;
- font-size: 10px;
- background-color:#123;
-}
-
-.top_draggable, .bottom_draggable {
- cursor:move;
-}
-
-.status_bar {
- font-size:12px;
-}
-.status_bar input{
- font-size:12px;
-}
-
-.wired_frame {
- display: block;
- position: absolute;
- border: 1px #000 dashed;
-}
-
-/* DO NOT CHANGE THESE VALUES*/
-.dialog {
- display: block;
- position: absolute;
-}
-
-.dialog table.table_window {
- border-collapse: collapse;
- border-spacing: 0;
- width: 100%;
- margin: 0px;
- padding:0px;
-}
-
-.dialog table.table_window td , .dialog table.table_window th {
- padding: 0;
-}
-
-.dialog .title_window {
- -moz-user-select:none;
-}
-
+.overlay_dialog {
+ background-color: #666666;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+.overlay___invisible__ {
+ background-color: #666666;
+ filter:alpha(opacity=0);
+ -moz-opacity: 0;
+ opacity: 0;
+}
+
+.dialog_nw {
+ width: 9px;
+ height: 23px;
+ background: transparent url(default/top_left.gif) no-repeat 0 0;
+}
+
+.dialog_n {
+ background: transparent url(default/top_mid.gif) repeat-x 0 0;
+ height: 23px;
+}
+
+.dialog_ne {
+ width: 9px;
+ height: 23px;
+ background: transparent url(default/top_right.gif) no-repeat 0 0;
+}
+
+.dialog_e {
+ width: 2px;
+ background: transparent url(default/center_right.gif) repeat-y 0 0;
+}
+
+.dialog_w {
+ width: 2px;
+ background: transparent url(default/center_left.gif) repeat-y 0 0;
+}
+
+.dialog_sw {
+ width: 9px;
+ height: 19px;
+ background: transparent url(default/bottom_left.gif) no-repeat 0 0;
+}
+
+.dialog_s {
+ background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
+ height: 19px;
+}
+
+.dialog_se {
+ width: 9px;
+ height: 19px;
+ background: transparent url(default/bottom_right.gif) no-repeat 0 0;
+}
+
+.dialog_sizer {
+ width: 9px;
+ height: 19px;
+ background: transparent url(default/sizer.gif) no-repeat 0 0;
+ cursor:se-resize;
+}
+
+.dialog_close {
+ width: 14px;
+ height: 14px;
+ background: transparent url(default/close.gif) no-repeat 0 0;
+ position:absolute;
+ top:5px;
+ left:8px;
+ cursor:pointer;
+ z-index:2000;
+}
+
+.dialog_minimize {
+ width: 14px;
+ height: 15px;
+ background: transparent url(default/minimize.gif) no-repeat 0 0;
+ position:absolute;
+ top:5px;
+ left:28px;
+ cursor:pointer;
+ z-index:2000;
+}
+
+.dialog_maximize {
+ width: 14px;
+ height: 15px;
+ background: transparent url(default/maximize.gif) no-repeat 0 0;
+ position:absolute;
+ top:5px;
+ left:49px;
+ cursor:pointer;
+ z-index:2000;
+}
+
+.dialog_title {
+ float:left;
+ height:14px;
+ font-family: Tahoma, Arial, sans-serif;
+ font-size:12px;
+ text-align:center;
+ width:100%;
+ color:#000;
+}
+
+.dialog_content {
+ overflow:auto;
+ color: #DDD;
+ font-family: Tahoma, Arial, sans-serif;
+ font-size: 10px;
+ background-color:#123;
+}
+
+.top_draggable, .bottom_draggable {
+ cursor:move;
+}
+
+.status_bar {
+ font-size:12px;
+}
+.status_bar input{
+ font-size:12px;
+}
+
+.wired_frame {
+ display: block;
+ position: absolute;
+ border: 1px #000 dashed;
+}
+
+/* DO NOT CHANGE THESE VALUES*/
+.dialog {
+ display: block;
+ position: absolute;
+}
+
+.dialog table.table_window {
+ border-collapse: collapse;
+ border-spacing: 0;
+ width: 100%;
+ margin: 0px;
+ padding:0px;
+}
+
+.dialog table.table_window td , .dialog table.table_window th {
+ padding: 0;
+}
+
+.dialog .title_window {
+ -moz-user-select:none;
+}
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css
index 257a1b1e3..249388be5 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css
@@ -1,3 +1,3 @@
-/* PNG fix for all themes that uses PNG images on IE */
-td, div { behavior: url(../themes/iefix/iepngfix.htc) }
-
+/* PNG fix for all themes that uses PNG images on IE */
+td, div { behavior: url(../themes/iefix/iepngfix.htc) }
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc
index a6c683b9f..9a13f32bf 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc
@@ -1,54 +1,54 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css
index 95ec287a9..0d955c3d7 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css
@@ -1,960 +1,960 @@
-.overlay___invisible__ {
- background-color: #666;
- filter:alpha(opacity=0);
- -moz-opacity: 0;
- opacity: 0;
-}
-
-.top_draggable, .bottom_draggable {
- cursor:move;
-}
-
-.status_bar {
- font-size:12px;
-}
-.status_bar input{
- font-size:12px;
-}
-
-.wired_frame {
- display:block;
- position:absolute;
- border:1px #000 dashed;
-}
-
-
-
-.overlay_bluelighting {
- background-color:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.bluelighting_wired_frame {
- background:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.bluelighting_nw {
- background:transparent url(lighting/top-left-blue.png) no-repeat 0 0;
- width:9px;
- height:28px;
-}
-
-.bluelighting_n {
- background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0;
- height:28px;
-}
-
-.bluelighting_ne {
- background:transparent url(lighting/top-right-blue.png) no-repeat 0 0;
- width:15px;
- height:28px;
-}
-
-.bluelighting_w {
- background:transparent url(lighting/left-blue.png) repeat-y top left;
- width:9px;
-}
-
-.bluelighting_e {
- background:transparent url(lighting/right-blue.png) repeat-y top right;
- width:15px;
-}
-
-.bluelighting_sw {
- background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0;
- width:9px;
- height:15px;
-}
-
-.bluelighting_s {
- background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0;
- height:15px;
-}
-
-.bluelighting_se, .bluelighting_sizer {
- background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0;
- width:15px;
- height:15px;
-}
-
-.bluelighting_sizer {
- cursor:se-resize;
-}
-
-.bluelighting_close {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-close-blue.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:10px;
- cursor:pointer;
- z-index:1000;
-}
-
-.bluelighting_maximize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:25px;
- cursor:pointer;
- z-index:1000;
-}
-
-.bluelighting_minimize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:40px;
- cursor:pointer;
- z-index:1000;
-}
-
-.bluelighting_title {
- float:left;
- height:14px;
- font-size:14px;
- font-weight:bold;
- font-family:Verdana, Arial, sans-serif;
- text-align:center;
- margin-top:2px;
- width:100%;
- color:#17385B;
-}
-
-.bluelighting_content {
- overflow:auto;
- color:#000;
- font-family:Verdana, Arial, sans-serif;
- font-size:12px;
- background:#BFDBFF;
-}
-
-/* For alert/confirm dialog */
-.bluelighting_window {
- border:1px solid #F00;
- background:#FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.bluelighting_message {
- font-size:12px;
- text-align:center;
- width:100%;
- padding-bottom:10px;
-}
-
-.bluelighting_buttons {
- text-align:center;
- width:100%;
-}
-
-.bluelighting_buttons input {
- border:1px solid #999;
- border-top-color:#CCC;
- border-left-color:#CCC;
- padding:2px;
- background-color:#FFF;
- color:#333;
- background-image:url(lighting/background_buttons.gif);
- background-repeat:repeat-x;
- font-family:Verdana, Arial, sans-serif;
- font-size:10px;
- font-weight:bold;
- text-align:center;
-}
-
-.bluelighting_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background:transparent url('lighting/spinner.gif') no-repeat center center
-}
-
-/* FOR IE */
-* html .bluelighting_nw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_n {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale");
-}
-
-* html .bluelighting_ne {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_w {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale");
-}
-
-* html .bluelighting_e {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale");
-}
-
-* html .bluelighting_sw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_s {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale");
-}
-
-* html .bluelighting_se, * html .bluelighting_sizer {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_close {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_minimize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_maximize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop");
-}
-
-* html .bluelighting_content {
- background:#B8D7FF;
-}
-
-
-
-.overlay_greylighting {
- background-color:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.greylighting_wired_frame {
- background:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.greylighting_nw {
- background:transparent url(lighting/top-left-grey.png) no-repeat 0 0;
- width:9px;
- height:28px;
-}
-
-.greylighting_n {
- background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0;
- height:28px;
-}
-
-.greylighting_ne {
- background:transparent url(lighting/top-right-grey.png) no-repeat 0 0;
- width:15px;
- height:28px;
-}
-
-.greylighting_w {
- background:transparent url(lighting/left-grey.png) repeat-y top left;
- width:9px;
-}
-
-.greylighting_e {
- background:transparent url(lighting/right-grey.png) repeat-y top right;
- width:15px;
-}
-
-.greylighting_sw {
- background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0;
- width:9px;
- height:15px;
-}
-
-.greylighting_s {
- background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0;
- height:15px;
-}
-
-.greylighting_se, .greylighting_sizer {
- background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0;
- width:15px;
- height:15px;
-}
-
-.greylighting_sizer {
- cursor:se-resize;
-}
-
-.greylighting_close {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-close-grey.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:10px;
- cursor:pointer;
- z-index:1000;
-}
-
-.greylighting_maximize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:25px;
- cursor:pointer;
- z-index:1000;
-}
-
-.greylighting_minimize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:40px;
- cursor:pointer;
- z-index:1000;
-}
-
-.greylighting_title {
- float:left;
- height:14px;
- font-size:14px;
- font-weight:bold;
- font-family:Verdana, Arial, sans-serif;
- text-align:center;
- margin-top:2px;
- width:100%;
- color:#525252;
-}
-
-.greylighting_content {
- overflow:auto;
- color:#000;
- font-family:Verdana, Arial, sans-serif;
- font-size:12px;
- background:#CDCDCD;
-}
-
-/* For alert/confirm dialog */
-.greylighting_window {
- border:1px solid #F00;
- background:#FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.greylighting_message {
- font-size:12px;
- text-align:center;
- width:100%;
- padding-bottom:10px;
-}
-
-.greylighting_buttons {
- text-align:center;
- width:100%;
-}
-
-.greylighting_buttons input {
- border:1px solid #999;
- border-top-color:#CCC;
- border-left-color:#CCC;
- padding:2px;
- background-color:#FFF;
- color:#333;
- background-image:url(lighting/background_buttons.gif);
- background-repeat:repeat-x;
- font-family:Verdana, Arial, sans-serif;
- font-size:10px;
- font-weight:bold;
- text-align:center;
-}
-
-.greylighting_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background:transparent url('lighting/spinner.gif') no-repeat center center
-}
-
-/* FOR IE */
-* html .greylighting_nw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_n {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale");
-}
-
-* html .greylighting_ne {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_w {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale");
-}
-
-* html .greylighting_e {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale");
-}
-
-* html .greylighting_sw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_s {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale");
-}
-
-* html greylighting_se, * html .greylighting_sizer {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_close {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_minimize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_maximize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop");
-}
-
-* html .greylighting_content {
- background:#C7C7C7;
-}
-
-
-
-.overlay_greenlighting {
- background-color:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.greenlighting_wired_frame {
- background:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.greenlighting_nw {
- background:transparent url(lighting/top-left-green.png) no-repeat 0 0;
- width:9px;
- height:28px;
-}
-
-.greenlighting_n {
- background:transparent url(lighting/top-middle-green.png) repeat-x 0 0;
- height:28px;
-}
-
-.greenlighting_ne {
- background:transparent url(lighting/top-right-green.png) no-repeat 0 0;
- width:15px;
- height:28px;
-}
-
-.greenlighting_w {
- background:transparent url(lighting/left-green.png) repeat-y top left;
- width:9px;
-}
-
-.greenlighting_e {
- background:transparent url(lighting/right-green.png) repeat-y top right;
- width:15px;
-}
-
-.greenlighting_sw {
- background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0;
- width:9px;
- height:15px;
-}
-
-.greenlighting_s {
- background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0;
- height:15px;
-}
-
-.greenlighting_se, .greenlighting_sizer {
- background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0;
- width:15px;
- height:15px;
-}
-
-.greenlighting_sizer {
- cursor:se-resize;
-}
-
-.greenlighting_close {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-close-green.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:10px;
- cursor:pointer;
- z-index:1000;
-}
-
-.greenlighting_maximize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:25px;
- cursor:pointer;
- z-index:1000;
-}
-
-.greenlighting_minimize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:40px;
- cursor:pointer;
- z-index:1000;
-}
-
-.greenlighting_title {
- float:left;
- height:14px;
- font-size:14px;
- font-weight:bold;
- font-family:Verdana, Arial, sans-serif;
- text-align:center;
- margin-top:2px;
- width:100%;
- color:#2A6002;
-}
-
-.greenlighting_content {
- overflow:auto;
- color:#000;
- font-family:Verdana, Arial, sans-serif;
- font-size:12px;
- background:#ACFCAF;
-}
-
-/* For alert/confirm dialog */
-.greenlighting_window {
- border:1px solid #F00;
- background:#FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.greenlighting_message {
- font-size:12px;
- text-align:center;
- width:100%;
- padding-bottom:10px;
-}
-
-.greenlighting_buttons {
- text-align:center;
- width:100%;
-}
-
-.greenlighting_buttons input {
- border:1px solid #999;
- border-top-color:#CCC;
- border-left-color:#CCC;
- padding:2px;
- background-color:#FFF;
- color:#333;
- background-image:url(lighting/background_buttons.gif);
- background-repeat:repeat-x;
- font-family:Verdana, Arial, sans-serif;
- font-size:10px;
- font-weight:bold;
- text-align:center;
-}
-
-.greenlighting_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background:transparent url('lighting/spinner.gif') no-repeat center center
-}
-
-/* FOR IE */
-* html .greenlighting_nw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_n {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale");
-}
-
-* html .greenlighting_ne {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_w {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale");
-}
-
-* html .greenlighting_e {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale");
-}
-
-* html .greenlighting_sw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_s {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale");
-}
-
-* html greenlighting_se, * html .greenlighting_sizer {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_close {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_minimize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_maximize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop");
-}
-
-* html .greenlighting_content {
- background:#A4FCA7;
-}
-
-
-
-.overlay_darkbluelighting {
- background-color:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.darkbluelighting_wired_frame {
- background:#FFF;
- filter:alpha(opacity=60);
- -moz-opacity:0.6;
- opacity:0.6;
-}
-
-.darkbluelighting_nw {
- background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0;
- width:9px;
- height:28px;
-}
-
-.darkbluelighting_n {
- background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0;
- height:28px;
-}
-
-.darkbluelighting_ne {
- background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0;
- width:15px;
- height:28px;
-}
-
-.darkbluelighting_w {
- background:transparent url(lighting/left-darkblue.png) repeat-y top left;
- width:9px;
-}
-
-.darkbluelighting_e {
- background:transparent url(lighting/right-darkblue.png) repeat-y top right;
- width:15px;
-}
-
-.darkbluelighting_sw {
- background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0;
- width:9px;
- height:15px;
-}
-
-.darkbluelighting_s {
- background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0;
- height:15px;
-}
-
-.darkbluelighting_se, .darkbluelighting_sizer {
- background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0;
- width:15px;
- height:15px;
-}
-
-.darkbluelighting_sizer {
- cursor:se-resize;
-}
-
-.darkbluelighting_close {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:10px;
- cursor:pointer;
- z-index:1000;
-}
-
-.darkbluelighting_maximize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:25px;
- cursor:pointer;
- z-index:1000;
-}
-
-.darkbluelighting_minimize {
- width:15px;
- height:9px;
- background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0;
- position:absolute;
- top:11px;
- right:40px;
- cursor:pointer;
- z-index:1000;
-}
-
-.darkbluelighting_title {
- float:left;
- height:14px;
- font-size:14px;
- font-weight:bold;
- font-family:Verdana, Arial, sans-serif;
- text-align:center;
- margin-top:2px;
- width:100%;
- color:#E4EFFD;
-}
-
-.darkbluelighting_content {
- overflow:auto;
- color:#FFF;
- font-family:Verdana, Arial, sans-serif;
- font-size:12px;
- background:#0413C0;
-}
-
-/* For alert/confirm dialog */
-.darkbluelighting_window {
- border:1px solid #F00;
- background:#FFF;
- padding:20px;
- margin-left:auto;
- margin-right:auto;
- width:400px;
-}
-
-.darkbluelighting_message {
- font-size:12px;
- text-align:center;
- width:100%;
- padding-bottom:10px;
-}
-
-.darkbluelighting_buttons {
- text-align:center;
- width:100%;
-}
-
-.darkbluelighting_buttons input {
- border:1px solid #999;
- border-top-color:#CCC;
- border-left-color:#CCC;
- padding:2px;
- background-color:#FFF;
- color:#333;
- background-image:url(lighting/background_buttons.gif);
- background-repeat:repeat-x;
- font-family:Verdana, Arial, sans-serif;
- font-size:10px;
- font-weight:bold;
- text-align:center;
-}
-
-.darkbluelighting_progress {
- float:left;
- margin:auto;
- text-align:center;
- width:100%;
- height:16px;
- background:transparent url('lighting/spinner.gif') no-repeat center center
-}
-
-/* FOR IE */
-* html .darkbluelighting_nw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_n {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale");
-}
-
-* html .darkbluelighting_ne {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_w {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale");
-}
-
-* html .darkbluelighting_e {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale");
-}
-
-* html .darkbluelighting_sw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_s {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale");
-}
-
-* html darkbluelighting_se, * html .darkbluelighting_sizer {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_close {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_minimize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_maximize {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop");
-}
-
-* html .darkbluelighting_content {
- background:#020EBA;
-}
-
+.overlay___invisible__ {
+ background-color: #666;
+ filter:alpha(opacity=0);
+ -moz-opacity: 0;
+ opacity: 0;
+}
+
+.top_draggable, .bottom_draggable {
+ cursor:move;
+}
+
+.status_bar {
+ font-size:12px;
+}
+.status_bar input{
+ font-size:12px;
+}
+
+.wired_frame {
+ display:block;
+ position:absolute;
+ border:1px #000 dashed;
+}
+
+
+
+.overlay_bluelighting {
+ background-color:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.bluelighting_wired_frame {
+ background:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.bluelighting_nw {
+ background:transparent url(lighting/top-left-blue.png) no-repeat 0 0;
+ width:9px;
+ height:28px;
+}
+
+.bluelighting_n {
+ background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0;
+ height:28px;
+}
+
+.bluelighting_ne {
+ background:transparent url(lighting/top-right-blue.png) no-repeat 0 0;
+ width:15px;
+ height:28px;
+}
+
+.bluelighting_w {
+ background:transparent url(lighting/left-blue.png) repeat-y top left;
+ width:9px;
+}
+
+.bluelighting_e {
+ background:transparent url(lighting/right-blue.png) repeat-y top right;
+ width:15px;
+}
+
+.bluelighting_sw {
+ background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0;
+ width:9px;
+ height:15px;
+}
+
+.bluelighting_s {
+ background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0;
+ height:15px;
+}
+
+.bluelighting_se, .bluelighting_sizer {
+ background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0;
+ width:15px;
+ height:15px;
+}
+
+.bluelighting_sizer {
+ cursor:se-resize;
+}
+
+.bluelighting_close {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-close-blue.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:10px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.bluelighting_maximize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:25px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.bluelighting_minimize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:40px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.bluelighting_title {
+ float:left;
+ height:14px;
+ font-size:14px;
+ font-weight:bold;
+ font-family:Verdana, Arial, sans-serif;
+ text-align:center;
+ margin-top:2px;
+ width:100%;
+ color:#17385B;
+}
+
+.bluelighting_content {
+ overflow:auto;
+ color:#000;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:12px;
+ background:#BFDBFF;
+}
+
+/* For alert/confirm dialog */
+.bluelighting_window {
+ border:1px solid #F00;
+ background:#FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.bluelighting_message {
+ font-size:12px;
+ text-align:center;
+ width:100%;
+ padding-bottom:10px;
+}
+
+.bluelighting_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.bluelighting_buttons input {
+ border:1px solid #999;
+ border-top-color:#CCC;
+ border-left-color:#CCC;
+ padding:2px;
+ background-color:#FFF;
+ color:#333;
+ background-image:url(lighting/background_buttons.gif);
+ background-repeat:repeat-x;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:10px;
+ font-weight:bold;
+ text-align:center;
+}
+
+.bluelighting_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background:transparent url('lighting/spinner.gif') no-repeat center center
+}
+
+/* FOR IE */
+* html .bluelighting_nw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_n {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale");
+}
+
+* html .bluelighting_ne {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_w {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale");
+}
+
+* html .bluelighting_e {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale");
+}
+
+* html .bluelighting_sw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_s {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale");
+}
+
+* html .bluelighting_se, * html .bluelighting_sizer {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_close {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_minimize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_maximize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop");
+}
+
+* html .bluelighting_content {
+ background:#B8D7FF;
+}
+
+
+
+.overlay_greylighting {
+ background-color:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.greylighting_wired_frame {
+ background:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.greylighting_nw {
+ background:transparent url(lighting/top-left-grey.png) no-repeat 0 0;
+ width:9px;
+ height:28px;
+}
+
+.greylighting_n {
+ background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0;
+ height:28px;
+}
+
+.greylighting_ne {
+ background:transparent url(lighting/top-right-grey.png) no-repeat 0 0;
+ width:15px;
+ height:28px;
+}
+
+.greylighting_w {
+ background:transparent url(lighting/left-grey.png) repeat-y top left;
+ width:9px;
+}
+
+.greylighting_e {
+ background:transparent url(lighting/right-grey.png) repeat-y top right;
+ width:15px;
+}
+
+.greylighting_sw {
+ background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0;
+ width:9px;
+ height:15px;
+}
+
+.greylighting_s {
+ background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0;
+ height:15px;
+}
+
+.greylighting_se, .greylighting_sizer {
+ background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0;
+ width:15px;
+ height:15px;
+}
+
+.greylighting_sizer {
+ cursor:se-resize;
+}
+
+.greylighting_close {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-close-grey.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:10px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.greylighting_maximize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:25px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.greylighting_minimize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:40px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.greylighting_title {
+ float:left;
+ height:14px;
+ font-size:14px;
+ font-weight:bold;
+ font-family:Verdana, Arial, sans-serif;
+ text-align:center;
+ margin-top:2px;
+ width:100%;
+ color:#525252;
+}
+
+.greylighting_content {
+ overflow:auto;
+ color:#000;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:12px;
+ background:#CDCDCD;
+}
+
+/* For alert/confirm dialog */
+.greylighting_window {
+ border:1px solid #F00;
+ background:#FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.greylighting_message {
+ font-size:12px;
+ text-align:center;
+ width:100%;
+ padding-bottom:10px;
+}
+
+.greylighting_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.greylighting_buttons input {
+ border:1px solid #999;
+ border-top-color:#CCC;
+ border-left-color:#CCC;
+ padding:2px;
+ background-color:#FFF;
+ color:#333;
+ background-image:url(lighting/background_buttons.gif);
+ background-repeat:repeat-x;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:10px;
+ font-weight:bold;
+ text-align:center;
+}
+
+.greylighting_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background:transparent url('lighting/spinner.gif') no-repeat center center
+}
+
+/* FOR IE */
+* html .greylighting_nw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_n {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale");
+}
+
+* html .greylighting_ne {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_w {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale");
+}
+
+* html .greylighting_e {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale");
+}
+
+* html .greylighting_sw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_s {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale");
+}
+
+* html greylighting_se, * html .greylighting_sizer {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_close {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_minimize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_maximize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop");
+}
+
+* html .greylighting_content {
+ background:#C7C7C7;
+}
+
+
+
+.overlay_greenlighting {
+ background-color:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.greenlighting_wired_frame {
+ background:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.greenlighting_nw {
+ background:transparent url(lighting/top-left-green.png) no-repeat 0 0;
+ width:9px;
+ height:28px;
+}
+
+.greenlighting_n {
+ background:transparent url(lighting/top-middle-green.png) repeat-x 0 0;
+ height:28px;
+}
+
+.greenlighting_ne {
+ background:transparent url(lighting/top-right-green.png) no-repeat 0 0;
+ width:15px;
+ height:28px;
+}
+
+.greenlighting_w {
+ background:transparent url(lighting/left-green.png) repeat-y top left;
+ width:9px;
+}
+
+.greenlighting_e {
+ background:transparent url(lighting/right-green.png) repeat-y top right;
+ width:15px;
+}
+
+.greenlighting_sw {
+ background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0;
+ width:9px;
+ height:15px;
+}
+
+.greenlighting_s {
+ background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0;
+ height:15px;
+}
+
+.greenlighting_se, .greenlighting_sizer {
+ background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0;
+ width:15px;
+ height:15px;
+}
+
+.greenlighting_sizer {
+ cursor:se-resize;
+}
+
+.greenlighting_close {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-close-green.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:10px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.greenlighting_maximize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:25px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.greenlighting_minimize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:40px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.greenlighting_title {
+ float:left;
+ height:14px;
+ font-size:14px;
+ font-weight:bold;
+ font-family:Verdana, Arial, sans-serif;
+ text-align:center;
+ margin-top:2px;
+ width:100%;
+ color:#2A6002;
+}
+
+.greenlighting_content {
+ overflow:auto;
+ color:#000;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:12px;
+ background:#ACFCAF;
+}
+
+/* For alert/confirm dialog */
+.greenlighting_window {
+ border:1px solid #F00;
+ background:#FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.greenlighting_message {
+ font-size:12px;
+ text-align:center;
+ width:100%;
+ padding-bottom:10px;
+}
+
+.greenlighting_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.greenlighting_buttons input {
+ border:1px solid #999;
+ border-top-color:#CCC;
+ border-left-color:#CCC;
+ padding:2px;
+ background-color:#FFF;
+ color:#333;
+ background-image:url(lighting/background_buttons.gif);
+ background-repeat:repeat-x;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:10px;
+ font-weight:bold;
+ text-align:center;
+}
+
+.greenlighting_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background:transparent url('lighting/spinner.gif') no-repeat center center
+}
+
+/* FOR IE */
+* html .greenlighting_nw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_n {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale");
+}
+
+* html .greenlighting_ne {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_w {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale");
+}
+
+* html .greenlighting_e {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale");
+}
+
+* html .greenlighting_sw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_s {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale");
+}
+
+* html greenlighting_se, * html .greenlighting_sizer {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_close {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_minimize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_maximize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop");
+}
+
+* html .greenlighting_content {
+ background:#A4FCA7;
+}
+
+
+
+.overlay_darkbluelighting {
+ background-color:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.darkbluelighting_wired_frame {
+ background:#FFF;
+ filter:alpha(opacity=60);
+ -moz-opacity:0.6;
+ opacity:0.6;
+}
+
+.darkbluelighting_nw {
+ background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0;
+ width:9px;
+ height:28px;
+}
+
+.darkbluelighting_n {
+ background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0;
+ height:28px;
+}
+
+.darkbluelighting_ne {
+ background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0;
+ width:15px;
+ height:28px;
+}
+
+.darkbluelighting_w {
+ background:transparent url(lighting/left-darkblue.png) repeat-y top left;
+ width:9px;
+}
+
+.darkbluelighting_e {
+ background:transparent url(lighting/right-darkblue.png) repeat-y top right;
+ width:15px;
+}
+
+.darkbluelighting_sw {
+ background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0;
+ width:9px;
+ height:15px;
+}
+
+.darkbluelighting_s {
+ background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0;
+ height:15px;
+}
+
+.darkbluelighting_se, .darkbluelighting_sizer {
+ background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0;
+ width:15px;
+ height:15px;
+}
+
+.darkbluelighting_sizer {
+ cursor:se-resize;
+}
+
+.darkbluelighting_close {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:10px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.darkbluelighting_maximize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:25px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.darkbluelighting_minimize {
+ width:15px;
+ height:9px;
+ background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0;
+ position:absolute;
+ top:11px;
+ right:40px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.darkbluelighting_title {
+ float:left;
+ height:14px;
+ font-size:14px;
+ font-weight:bold;
+ font-family:Verdana, Arial, sans-serif;
+ text-align:center;
+ margin-top:2px;
+ width:100%;
+ color:#E4EFFD;
+}
+
+.darkbluelighting_content {
+ overflow:auto;
+ color:#FFF;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:12px;
+ background:#0413C0;
+}
+
+/* For alert/confirm dialog */
+.darkbluelighting_window {
+ border:1px solid #F00;
+ background:#FFF;
+ padding:20px;
+ margin-left:auto;
+ margin-right:auto;
+ width:400px;
+}
+
+.darkbluelighting_message {
+ font-size:12px;
+ text-align:center;
+ width:100%;
+ padding-bottom:10px;
+}
+
+.darkbluelighting_buttons {
+ text-align:center;
+ width:100%;
+}
+
+.darkbluelighting_buttons input {
+ border:1px solid #999;
+ border-top-color:#CCC;
+ border-left-color:#CCC;
+ padding:2px;
+ background-color:#FFF;
+ color:#333;
+ background-image:url(lighting/background_buttons.gif);
+ background-repeat:repeat-x;
+ font-family:Verdana, Arial, sans-serif;
+ font-size:10px;
+ font-weight:bold;
+ text-align:center;
+}
+
+.darkbluelighting_progress {
+ float:left;
+ margin:auto;
+ text-align:center;
+ width:100%;
+ height:16px;
+ background:transparent url('lighting/spinner.gif') no-repeat center center
+}
+
+/* FOR IE */
+* html .darkbluelighting_nw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_n {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale");
+}
+
+* html .darkbluelighting_ne {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_w {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale");
+}
+
+* html .darkbluelighting_e {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale");
+}
+
+* html .darkbluelighting_sw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_s {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale");
+}
+
+* html darkbluelighting_se, * html .darkbluelighting_sizer {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_close {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_minimize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_maximize {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop");
+}
+
+* html .darkbluelighting_content {
+ background:#020EBA;
+}
+
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc
index 36ea182e7..92248c665 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc
@@ -1,67 +1,67 @@
-
-
-
-