Merge branch 'develop' into cxt_course

Conflicts:
	db/schema.rb
hjq_resource
cxt 9 years ago
commit 357e143c9a

@ -1,11 +1,13 @@
source 'https://rubygems.org/' source 'https://rubygems.org/'
### 这里执行bundle config mirror.https://rubygems.org https://gems.ruby-china.org 切换到ruby-china源 ### 这里执行bundle config mirror.https://rubygems.org https://gems.ruby-china.org 切换到ruby-china源
unless RUBY_PLATFORM =~ /w32/ unless RUBY_PLATFORM =~ /w32/
# unix-like only # unix-like only
gem 'iconv' gem 'iconv'
end end
gem 'certified'
gem 'wechat',path: 'lib/wechat' gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack' gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli' gem 'gitlab', path: 'lib/gitlab-cli'

@ -79,7 +79,7 @@ class OrgDocumentCommentsController < ApplicationController
def add_reply def add_reply
@document = OrgDocumentComment.find(params[:id]).root @document = OrgDocumentComment.find(params[:id]).root
@act = OrgActivity.find(params[:id]) @act = OrgActivity.find(params[:act_id])
@comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id]) @comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id])
@comment.content = params[:org_content] @comment.content = params[:org_content]
@document.children << @comment @document.children << @comment

@ -15,6 +15,12 @@ class OrgSubfieldsController < ApplicationController
end end
end end
@subfield.update_attributes(:field_type => params[:field_type]) @subfield.update_attributes(:field_type => params[:field_type])
# 如果栏目是教师,不参入类型的配置,定义为右三模式
# 新增模块命名规则左边1开头右边2开头以前的不变
# eg23 右三
if params[:field_type] == "Comptec"
@subfield.update_attributes(:status => 23)
end
else else
@res = false @res = false
end end

@ -28,7 +28,7 @@ class OrganizationsController < ApplicationController
helper :project_score helper :project_score
helper :issues helper :issues
include UsersHelper include UsersHelper
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout] before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers]
layout 'base_org' layout 'base_org'
def index def index
@ -98,10 +98,26 @@ class OrganizationsController < ApplicationController
else else
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
@organization = Organization.find(params[:id]) @organization = Organization.find(params[:id])
# params[:org_subfield_id] 存在即对应的栏目,否则进入组织动态
if params[:org_subfield_id] if params[:org_subfield_id]
@org_subfield = OrgSubfield.find(params[:org_subfield_id]) @org_subfield = OrgSubfield.find(params[:org_subfield_id])
@org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 if @org_subfield.field_type == "Comptec" || @org_subfield.field_type == "Compstu"
@org_activities = 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').page(params[:page] || 1).per(10)
# @org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,( SELECT `courses`.* FROM `courses` INNER JOIN `members` ON `courses`.`id` = `members`.`course_id` WHERE `members`.`user_id` = u.id AND (courses.status<>9)) as course_count
# from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 order by course_count desc")
@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 order by course_count desc")
# @org_count = @org_teachers.count
# @limit = 25
# @is_remote = true
# @atta_count = @attachments.count
# @atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
# @offset ||= @atta_pages.offset
# #@curse_attachments_all = @all_attachments[@offset, @limit]
# @attachments = paginateHelper @attachments,25
else
@org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0
@org_activities = 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').page(params[:page] || 1).per(10)
end
else else
shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_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) shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
@ -142,6 +158,57 @@ class OrganizationsController < ApplicationController
end end
def teachers
unless @organization.allow_set_teachers
render_403
return
end
q = params[:search].nil? ? "" : "#{params[:search].strip}"
@field = 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")
end
limit = 10
# @is_remote = true
@teachers_count = @org_teachers.count
@atta_pages = Paginator.new @teachers_count, limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
@org_teachers = paginateHelper @org_teachers, limit
respond_to do |format|
format.html
format.js
end
end
def searchmember_by_name members, name
#searchPeopleByRoles(project, StudentRoles)
mems = []
if name != ""
name = name.to_s.downcase
members.each do |m|
username = m.user[:lastname].to_s.downcase + m.user[:firstname].to_s.downcase
if(m.user[:login].to_s.downcase.include?(name) || m.user.user_extensions[:student_id].to_s.downcase.include?(name) || username.include?(name))
mems << m
end
end
else
mems = members
end
mems
end
def get_project_message_activities_org org def get_project_message_activities_org org
project_ids = org.projects.map{|project| project.id}.join(",") project_ids = org.projects.map{|project| project.id}.join(",")
unless project_ids.blank? unless project_ids.blank?
@ -221,6 +288,7 @@ class OrganizationsController < ApplicationController
# @organization.domain = params[:organization][:domain] # @organization.domain = params[:organization][:domain]
@organization.is_public = params[:organization][:is_public] == 'on' ? 1 : 0 @organization.is_public = params[:organization][:is_public] == 'on' ? 1 : 0
@organization.allow_guest_download = params[:organization][:allow_guest_download] == 'on' ? 1 : 0 @organization.allow_guest_download = params[:organization][:allow_guest_download] == 'on' ? 1 : 0
@organization.allow_teacher = params[:organization][:allow_teacher] == 'on' ? 1 : 0
@organization.show_mode = params[:show_mode] @organization.show_mode = params[:show_mode]
#@organization.name = params[:organization][:name] #@organization.name = params[:organization][:name]
@organization.save @organization.save
@ -403,6 +471,18 @@ class OrganizationsController < ApplicationController
end end
end end
# 设置为名师
def set_excellent_teacher
@ex_teacher = User.find(params[:user])
@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)
end
def hide_org_subfield def hide_org_subfield
@org_subfield = OrgSubfield.find(params[:org_subfield_id]) @org_subfield = OrgSubfield.find(params[:org_subfield_id])
@org_subfield.update_attribute(:hide, 1) @org_subfield.update_attribute(:hide, 1)

@ -32,9 +32,9 @@ class RepositoriesController < ApplicationController
before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo, :stats] before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo, :stats]
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers] before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked] before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked, :project_archive]
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue] before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :commit_diff] before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :commit_diff, :project_archive]
accept_rss_auth :revisions accept_rss_auth :revisions
# hidden repositories filter // 隐藏代码过滤器 # hidden repositories filter // 隐藏代码过滤器
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ] before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
@ -95,6 +95,13 @@ class RepositoriesController < ApplicationController
end end
# 一键ZIP下载
def project_archive
g = Gitlab.client
g.get()
# g.project_archive(params[:gpid].to_i, params[:rev])
end
# 判断用户是否已经fork过该项目 # 判断用户是否已经fork过该项目
def has_forked?(project, user) def has_forked?(project, user)
projects = Project.where("user_id =?", user) projects = Project.where("user_id =?", user)

@ -123,6 +123,7 @@ class StudentWorkController < ApplicationController
#-1 默认值 0全部正确并结束 2 超时 -2 编译错误 #-1 默认值 0全部正确并结束 2 超时 -2 编译错误
resultObj[:status] = -1 resultObj[:status] = -1
resultObj[:results] = result["results"].first #本次测试结果 resultObj[:results] = result["results"].first #本次测试结果
result["error_msg"] = result["error_msg"][0..2047]
resultObj[:error_msg] = result["error_msg"] #编译错误时的信息 resultObj[:error_msg] = result["error_msg"] #编译错误时的信息
#该状态用于存入CodeTests #该状态用于存入CodeTests

@ -2618,6 +2618,9 @@ class UsersController < ApplicationController
# 获取我的资源 # 获取我的资源
def get_my_resources author_id, user_course_ids, user_project_ids, order, score def get_my_resources author_id, user_course_ids, user_project_ids, order, score
unless author_id.to_i.to_s == author_id
author_id = User.find_by_login(author_id).id
end
attachments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('OrgSubfield','Principal','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ attachments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('OrgSubfield','Principal','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" + "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" +
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
@ -2625,6 +2628,7 @@ class UsersController < ApplicationController
# 获取我的资源查询结果 # 获取我的资源查询结果
def get_my_resources_search (author_id, user_course_ids, user_project_ids, order, score, search) def get_my_resources_search (author_id, user_course_ids, user_project_ids, order, score, search)
author_id = User.find_by_login(author_id).id
@attachments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ @attachments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" + "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" +
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)" ,:p => search).order("#{order.nil? ? 'created_on' : order} #{score}") "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)" ,:p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
@ -2632,6 +2636,7 @@ class UsersController < ApplicationController
# 获取我的课程资源 # 获取我的课程资源
def get_course_resources author_id, user_course_ids, order, score def get_course_resources author_id, user_course_ids, order, score
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+ attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
@ -2639,6 +2644,7 @@ class UsersController < ApplicationController
# 获取我的课程资源中搜索结果 # 获取我的课程资源中搜索结果
def get_course_resources_search author_id, user_course_ids, order, score, search def get_course_resources_search author_id, user_course_ids, order, score, search
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+ attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
@ -2656,6 +2662,7 @@ class UsersController < ApplicationController
# 获取我的项目资源 # 获取我的项目资源
def get_project_resources author_id, user_project_ids, order, score def get_project_resources author_id, user_project_ids, order, score
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+ attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
and is_publish = 1 and container_id is not null)").order("#{order.nil? ? 'created_on' : order} #{score}") and is_publish = 1 and container_id is not null)").order("#{order.nil? ? 'created_on' : order} #{score}")
@ -2663,6 +2670,7 @@ class UsersController < ApplicationController
# 获取我的项目资源搜索 # 获取我的项目资源搜索
def get_project_resources_search author_id, user_project_ids, order, score, search def get_project_resources_search author_id, user_project_ids, order, score, search
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+ attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Project') "+
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')})
and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") and is_publish = 1 and container_id is not null)) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
@ -2680,12 +2688,14 @@ class UsersController < ApplicationController
# 获取我上传的附件 # 获取我上传的附件
def get_attch_resources author_id, order, score def get_attch_resources author_id, order, score
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue', attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue',
'Document','Message','News','StudentWorkScore','HomewCommon'))").order("#{order.nil? ? 'created_on' : order} #{score}") 'Document','Message','News','StudentWorkScore','HomewCommon'))").order("#{order.nil? ? 'created_on' : order} #{score}")
end end
# 获取我上传的附件搜索结果 # 获取我上传的附件搜索结果
def get_attch_resources_search author_id, order, score, search def get_attch_resources_search author_id, order, score, search
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue', attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue',
'Document','Message','News','StudentWorkScore','HomewCommon')) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") 'Document','Message','News','StudentWorkScore','HomewCommon')) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
end end
@ -2704,11 +2714,13 @@ class UsersController < ApplicationController
# 获取我的用户类型资源 # 获取我的用户类型资源
def get_principal_resources author_id, order, score def get_principal_resources author_id, order, score
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal'").order("#{order.nil? ? 'created_on' : order} #{score}") attchments = Attachment.where("author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal'").order("#{order.nil? ? 'created_on' : order} #{score}")
end end
# 获取我的用户类型资源搜索 # 获取我的用户类型资源搜索
def get_principal_resources_search author_id, order, score, search def get_principal_resources_search author_id, order, score, search
author_id = User.find_by_login(author_id).id
attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal') and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") attchments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Principal') and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
end end
@ -2725,7 +2737,7 @@ class UsersController < ApplicationController
# 资源库 分为全部 课程资源 项目资源 附件 # 资源库 分为全部 课程资源 项目资源 附件
def user_resource def user_resource
# 别人的资源库是没有权限去看的 # 别人的资源库是没有权限去看的
if User.current.id.to_i != params[:id].to_i if User.current.id.to_i != @user.id.to_i
render_403 render_403
return return
end end
@ -2780,13 +2792,13 @@ class UsersController < ApplicationController
# 导入资源 # 导入资源
def import_resources def import_resources
# 别人的资源库是没有权限去看的 # 别人的资源库是没有权限去看的
if User.current.id.to_i != params[:id].to_i @user = User.find_by_login(params[:id])
if User.current != @user
render_403 render_403
return return
end end
@resource_id = params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id] @resource_id = params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id]
@resource_type = params[:project_id].nil? ? (params[:course_id].nil? ? "SubfieldFile" : "Course") : "Project" @resource_type = params[:project_id].nil? ? (params[:course_id].nil? ? "SubfieldFile" : "Course") : "Project"
@user = User.find(params[:id])
@order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
@score = @b_sort == "desc" ? "asc" : "desc" @score = @b_sort == "desc" ? "asc" : "desc"
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}

@ -33,6 +33,19 @@ module ApplicationHelper
extend Forwardable extend Forwardable
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
def user_path(resource, parameters = {})
if Fixnum === resource
resource = User.find(resource)
end
super
end
# def user_blogs_path(resource,parameters={})
# super
# end
def update_visiti_count container def update_visiti_count container
container.update_column(:visits, container.visits + 1) container.update_column(:visits, container.visits + 1)
end end

@ -148,4 +148,43 @@ module OrganizationsHelper
org_acts org_acts
end 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)
case field.field_type
when "Post"
result = "帖子"
when "Resource"
result = "资源"
when "Compstu"
result = "学生"
when "Comptec"
result = "教师"
when "Complex"
result = "综合"
end
end
def org_teacher_resource_count user
results = Attachment.find_by_sql("SELECT * FROM attachments where author_id = #{user.id};").count
end
def org_teacher_course_count user
results = Course.find_by_sql("select * from courses where courses.tea_id = #{user.id}").count
end
def org_student_course_count user
course_ids = user.courses.map { |c| c.is_delete == 0 && c.id}
results = Member.find_by_sql("select id from courses where courses.tea_id = #{user.id}").count
end
def excellent_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 order by course_count desc").first(5)
end
end end

@ -262,7 +262,7 @@ class Issue < ActiveRecord::Base
# set default values for new records only # set default values for new records only
self.status ||= IssueStatus.default self.status ||= IssueStatus.default
self.priority ||= IssuePriority.default self.priority ||= IssuePriority.default
self.watcher_user_ids = [] # self.watcher_user_ids = []
end end
end end

@ -26,4 +26,8 @@ class Organization < ActiveRecord::Base
def switch_type def switch_type
self.show_mode.to_i == 1 ? true : false self.show_mode.to_i == 1 ? true : false
end end
def allow_set_teachers
self.allow_teacher.to_i == 1 ? true : false
end
end end

@ -5,4 +5,5 @@ class School < ActiveRecord::Base
def to_s def to_s
self.name.to_s self.name.to_s
end end
end end

@ -309,6 +309,20 @@ class User < Principal
end end
# ====================================================================== # ======================================================================
def my_workplace
self.user_extensions.try(:occupation).to_s
end
def my_blogs_count
self.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count
end
def my_students
my_students=StudentsForCourse.find_by_sql("SELECT SUM(student_count) as students_count, c.tea_id FROM courses c, (SELECT course_id , COUNT(id) AS student_count FROM students_for_courses GROUP BY course_id) AS ct
WHERE c.id= ct.course_id and c.tea_id = #{self.id} GROUP BY c.tea_id").first
results = my_students.blank? ? 0 : my_students.students_count
results
end
# 查询用户未读过的记录 # 查询用户未读过的记录
# 用户留言记录 # 用户留言记录
@ -1073,16 +1087,25 @@ class User < Principal
anonymous_user anonymous_user
end end
def self.is_id?(id)
Fixnum===id || id.to_i.to_s == id
end
# refactor User model find function, # refactor User model find function,
# return anonymous user when can not find user id = user_id # return anonymous user when can not find user id = user_id
def self.find (*args, &block) def self.find (*args, &block)
begin begin
return find_by_login(args.first) if args.size==1 && !is_id?(args.first)
super super
rescue rescue
self.anonymous self.anonymous
end end
# super # super
end end
def to_param
login
end
# Salts all existing unsalted passwords # Salts all existing unsalted passwords
# It changes password storage scheme from SHA1(password) to SHA1(salt + SHA1(password)) # It changes password storage scheme from SHA1(password) to SHA1(salt + SHA1(password))
# This method is used in the SaltPasswords migration and is to be kept as is # This method is used in the SaltPasswords migration and is to be kept as is

@ -36,7 +36,7 @@
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_' name="new_form[course_message]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_' name="new_form[course_message]"></textarea>
<p nhname='contentmsg_'></p> <p nhname='contentmsg_'></p>
<a id="new_message_cancel_btn_" href="javascript:void(0)" class="grey_btn fr mt10">取消</a> <a id="new_message_cancel_btn_" href="javascript:void(0)" class="grey_btn fr mt10">取消</a>
<a href="javascript:void(0);" class="blue_btn fr ml10 mt10" id="new_message_submit_btn_" >留言</a> <a href="javascript:void(0);" class="blue_btn fr ml10 mt10" id="submit_feedback_course" >留言</a>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
@ -55,6 +55,9 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$("#submit_feedback_course").one('click',function() {
$("#course_feedback_new").submit();
});
KindEditor.ready(function(K){ KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){ $("a[nhname='reply_btn']").live('click',function(){
var params = {}; var params = {};
@ -65,7 +68,6 @@
params.textarea = $("textarea[name='user_notes']",params.div_form); params.textarea = $("textarea[name='user_notes']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form); params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form); params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.submit_btn = $("input[nhname='submit_btn']",params.div_form);
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form); params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
params.height = 55; params.height = 55;
if(params.textarea.data('init') == undefined){ if(params.textarea.data('init') == undefined){
@ -74,9 +76,6 @@
params.cancel_btn.click(function(){ params.cancel_btn.click(function(){
nh_reset_form(params); nh_reset_form(params);
}); });
params.submit_btn.one('click', function () {
params.form.submit();
});
} }
params.cancel_btn.click(); params.cancel_btn.click();
toggleAndSettingWordsVal(params.div_form, params.textarea); toggleAndSettingWordsVal(params.div_form, params.textarea);

@ -77,7 +77,7 @@
</div> </div>
</div> </div>
<!--导航--> <!--导航-->
<div class="sn-row sn-bg-blue"> <div class="sn-row sn-bg-blue sn-p-relative">
<ul class="sn-nav"> <ul class="sn-nav">
<% @subfield_content.each do |field| %> <% @subfield_content.each do |field| %>
<% if is_default_field?(field) %> <% if is_default_field?(field) %>
@ -105,6 +105,7 @@
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;"> <ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
<% field.sub_domains.each do |subdomain| %> <% field.sub_domains.each do |subdomain| %>
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %></li> <li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %></li>
<li class="sn-subnav-slice">|</li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
@ -156,6 +157,8 @@
<%= render :partial => 'organizations/org_subfield_rightM', :locals => {:field => field} %> <%= render :partial => 'organizations/org_subfield_rightM', :locals => {:field => field} %>
<% elsif field.status.to_i == 8 %> <% elsif field.status.to_i == 8 %>
<%= render :partial => 'organizations/org_subfield_rightD', :locals => {:field => field} %> <%= render :partial => 'organizations/org_subfield_rightD', :locals => {:field => field} %>
<% elsif field.status.to_i == 23 %>
<%= render :partial => 'organizations/org_subfield_rightM2', :locals => {:field => field} %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -190,16 +193,19 @@
</body> </body>
<script> <script>
$(".nav-element").mouseover(function(){ $(".nav-element").mouseover(function(){
$(this).next(".sn-grey-opacity").show(); $(this).next(".sn-grey-opacity").show(0);
}); });
$(".sn-grey-opacity").mouseover(function(){ $(".sn-grey-opacity").mouseover(function(){
$(this).show(); $(this).show(0);
}); });
$(".nav-element").mouseout(function(){ $(".nav-element").mouseout(function(){
$(this).next(".sn-grey-opacity").hide(); $(this).next(".sn-grey-opacity").delay(150).hide(0);
}); });
$(".sn-grey-opacity").mouseout(function(){ $(".sn-grey-opacity").mouseout(function(){
$(this).hide(); $(this).delay(150).hide(0);
});
$(".sn-sub-nav").each(function(){
$(this).children(".sn-subnav-slice:last").hide();
}); });
</script> </script>

@ -1,187 +1,191 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title><%= h html_title %></title> <title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" /> <meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" /> <meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
<%= favicon %> <%= favicon %>
<%= javascript_heads %> <%= javascript_heads %>
<%= heads_for_theme %> <%= heads_for_theme %>
<%= stylesheet_link_tag 'org_new_style','jquery/jquery-ui-1.9.2', 'org2' %> <%= stylesheet_link_tag 'org_new_style','jquery/jquery-ui-1.9.2', 'org2' %>
<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
<%= javascript_include_tag 'attachments' %> <%= javascript_include_tag 'attachments' %>
<%#= call_hook :view_layouts_base_html_head %> <%#= call_hook :view_layouts_base_html_head %>
<!-- page specific tags --> <!-- page specific tags -->
<%#= yield :header_tags -%> <%#= yield :header_tags -%>
<!-- MathJax的配置 --> <!-- MathJax的配置 -->
<script type="text/javascript" <script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script> </script>
<!-- 配置 在生成的公式图片上去掉Math定义的右键菜单$$ $$ \( \) \[ \] 中的公式给予显示--> <!-- 配置 在生成的公式图片上去掉Math定义的右键菜单$$ $$ \( \) \[ \] 中的公式给予显示-->
<script type="text/x-mathjax-config"> <script type="text/x-mathjax-config">
MathJax.Hub.Config({ MathJax.Hub.Config({
showMathMenu: false, showMathMenu: false,
showMathMenuMSIE: false, showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
}); });
</script> </script>
<!--<script type="text/javascript" src="/javascripts/jquery-1.8.3.min.js"></script>--> <!--<script type="text/javascript" src="/javascripts/jquery-1.8.3.min.js"></script>-->
<script type="text/javascript" src="/javascripts/koala.min.1.5.js"></script><!--焦点图--> <script type="text/javascript" src="/javascripts/koala.min.1.5.js"></script><!--焦点图-->
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$(".nav-element").mouseover(function(){ $(".nav-element").mouseover(function(){
$(this).next(".sn-grey-opacity").show(); $(this).next(".sn-grey-opacity").show(0);
}); });
$(".sn-grey-opacity").mouseover(function(){ $(".sn-grey-opacity").mouseover(function(){
$(this).show(); $(this).show(0);
}); });
$(".nav-element").mouseout(function(){ $(".nav-element").mouseout(function(){
$(this).next(".sn-grey-opacity").hide(); $(this).next(".sn-grey-opacity").delay(150).hide(0);
}); });
$(".sn-grey-opacity").mouseout(function(){ $(".sn-grey-opacity").mouseout(function(){
$(this).hide(); $(this).delay(150).hide(0);
}); });
}); $(".sn-sub-nav").each(function(){
</script> $(this).children(".sn-subnav-slice:last").hide();
});
</head> });
</script>
<!--add by huang-->
<script type="text/javascript"> </head>
function org_new_files_upload()
{ <!--add by huang-->
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_org_new_files',:locals => {:org => @organization, :org_attachment_type => 0}) %>'); <script type="text/javascript">
showModal('ajax-modal', '513px'); function org_new_files_upload()
$('#ajax-modal').siblings().remove(); {
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>"); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_org_new_files',:locals => {:org => @organization, :org_attachment_type => 0}) %>');
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9"); showModal('ajax-modal', '513px');
$('#ajax-modal').parent().addClass("popbox_polls"); $('#ajax-modal').siblings().remove();
} $('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
function org_new_files_banner_upload() $('#ajax-modal').parent().addClass("popbox_polls");
{ }
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_org_new_files_banner',:locals => {:org => @organization, :org_attachment_type => 1}) %>');
showModal('ajax-modal', '513px'); function org_new_files_banner_upload()
$('#ajax-modal').siblings().remove(); {
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>"); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_org_new_files_banner',:locals => {:org => @organization, :org_attachment_type => 1}) %>');
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9"); showModal('ajax-modal', '513px');
$('#ajax-modal').parent().addClass("popbox_polls"); $('#ajax-modal').siblings().remove();
} $('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
</script> $('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
<body onload="prettyPrint();"> $('#ajax-modal').parent().addClass("popbox_polls");
<!--内容开始--> }
<div class="sn-inner-body"> </script>
<header> <body onload="prettyPrint();">
<div class="sn-header"> <!--内容开始-->
<%= render :partial => 'organizations/org_logined_header' %> <div class="sn-inner-body">
<div class="sn-row sn-bg-white"> <header>
<div class="sn-logo"> <div class="sn-header">
<% if @org_logo_attchment.blank? %> <%= render :partial => 'organizations/org_logined_header' %>
<img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13" alt=""/> <div class="sn-row sn-bg-white">
<% else %> <div class="sn-logo">
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13" alt=""> <% if @org_logo_attchment.blank? %>
<% end %> <img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13" alt=""/>
<% if User.current.admin_of_org?(@organization) %> <% else %>
<a href="#" class="sn-logo-add" title="点击替换LOGO" onclick="org_new_files_upload();"></a> <img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13" alt="">
<% end %> <% end %>
<% if User.current.admin_of_org?(@organization) %>
</div> <a href="#" class="sn-logo-add" title="点击替换LOGO" onclick="org_new_files_upload();"></a>
</div> <% end %>
<!--导航-->
<div class="sn-row sn-bg-blue"> </div>
<ul class="sn-nav"> </div>
<% @subfield_content.each do |field| %> <!--导航-->
<% if is_default_field?(field) %> <div class="sn-row sn-bg-blue sn-p-relative">
<% case field.name %> <ul class="sn-nav">
<% when 'activity' %> <% @subfield_content.each do |field| %>
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;"> <% if is_default_field?(field) %>
<%= link_to "首页", organization_path(@organization), :class => "sn-link-white" %> <% case field.name %>
</li> <% when 'activity' %>
<% when 'course' %> <li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;"> <%= link_to "首页", organization_path(@organization), :class => "sn-link-white" %>
<a href="#course_<%= field.id %>" class="sn-link-white"> 课程动态</a> </li>
</li> <% when 'course' %>
<% when 'project' %> <li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;"> <a href="#course_<%= field.id %>" class="sn-link-white"> 课程动态</a>
<a href="#project_<%= field.id %>" class="sn-link-white">项目动态</a> </li>
</li> <% when 'project' %>
<% end %> <li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
<% else %> <a href="#project_<%= field.id %>" class="sn-link-white">项目动态</a>
<% if field.field_type == "Post" && field.hide == 0 %> </li>
<li class="nav-element"> <% end %>
<a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a> <% else %>
</li> <% if field.field_type == "Post" && field.hide == 0 %>
<!--二级目录--> <li class="nav-element">
<div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;"> <a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;"> </li>
<% field.sub_domains.each do |subdomain| %> <!--二级目录-->
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey" %></li> <div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
<% end %> <ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
</ul> <% field.sub_domains.each do |subdomain| %>
</div> <li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey" %></li>
<% elsif field.field_type == "Resource" && field.hide == 0 %> <li class="sn-subnav-slice">|</li>
<li class="nav-element"> <% end %>
<a href="#resource_<%= field.id %>" class="sn-link-white"><%= field.name %></a> </ul>
</li> </div>
<% end %> <% elsif field.field_type == "Resource" && field.hide == 0 %>
<% end %> <li class="nav-element">
<% end %> <a href="#resource_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
<% if User.current.admin_of_org?(@organization) %> </li>
<li class="nav-element"> <% end %>
<a href="<%= setting_organization_path(@organization) %>" class="sn-link-white">配置</a> <% end %>
</li> <% end %>
<% end %> <% if User.current.admin_of_org?(@organization) %>
</ul> <li class="nav-element">
</div> <a href="<%= setting_organization_path(@organization) %>" class="sn-link-white">配置</a>
<div class="sn-row"> </li>
<div class="sn-banner"> <% end %>
<img src="/images/sn_banner.jpg" width="1200" height="210" alt="banner image" /> </ul>
<!--<a href="#" class="sn-banner-add" title="点击替换图片" ></a>--> </div>
</div> <div class="sn-row">
</div> <div class="sn-banner">
</div> <img src="/images/sn_banner.jpg" width="1200" height="210" alt="banner image" />
</header> <!--<a href="#" class="sn-banner-add" title="点击替换图片" ></a>-->
<%# 更新访问数,刷新的时候更新访问次数 %> </div>
<% update_visiti_count @organization %> </div>
<%# over %> </div>
<!--内容开始--> </header>
<%# 更新访问数,刷新的时候更新访问次数 %>
<!--内容结束--> <% update_visiti_count @organization %>
<%= render_flash_messages %> <%# over %>
<%= yield %> <!--内容开始-->
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div> <!--内容结束-->
<%= render_flash_messages %>
<footer> <%= yield %>
<!--footer--> <%= call_hook :view_layouts_base_content %>
<div class="sn-row sn-bg-grey2"> <div style="clear:both;"></div>
<div class="sn-footer">
<ul class="sn-footer-link"> <footer>
<li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li> <!--footer-->
<li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li> <div class="sn-row sn-bg-grey2">
<li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li> <div class="sn-footer">
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="sn-link-white sn-f18">在线报名</a></li> <ul class="sn-footer-link">
</ul> <li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li>
<div class="sn-contact">联系人:魏小姐 | 电 话0731-84761282 | 传 真0731-84761268 | 邮 箱office@gnssopenlab.org</div> <li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li>
<div class="sn-address">地 址湖南省长沙市开福区东风路89号观园大厦23层<br /> <li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li>
卫星导航仿真与测试开放实验室</div> <li><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="sn-link-white sn-f18">在线报名</a></li>
</div> </ul>
</div> <div class="sn-contact">联系人:魏小姐 | 电 话0731-84761282 | 传 真0731-84761268 | 邮 箱office@gnssopenlab.org</div>
</footer> <div class="sn-address">地 址湖南省长沙市开福区东风路89号观园大厦23层<br />
</div> 卫星导航仿真与测试开放实验室</div>
</div>
<!--页面底部--> </div>
<div class="cl"></div> </footer>
<div id="ajax-modal" style="display:none;"></div> </div>
<div id="ajax-indicator" style="display:none;"> <!--页面底部-->
<span><%= l(:label_loading) %></span> <div class="cl"></div>
</div> <div id="ajax-modal" style="display:none;"></div>
</body>
</html> <div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
</body>
</html>

@ -1,2 +1,2 @@
$("#organization_document_<%= @act.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => params[:flag], :act => @act}) %>"); $("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => params[:flag], :act => @act}) %>");
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>"); sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");

@ -4,6 +4,7 @@
:locals => {:subfields => @organization.org_subfields.order("priority") }) %>"); :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
$("#sub_field_left_lists").html(""); $("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); $("#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') %>");
<% end %> <% end %>
$("#subfield_name").val(""); $("#subfield_name").val("");
$("#sub_dir").val(""); $("#sub_dir").val("");

@ -2,4 +2,5 @@ $("#org_subfield_list").html("");
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', $("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
:locals => {:subfields => @organization.org_subfields.order("priority") }) %>"); :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
$("#sub_field_left_lists").html(""); $("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); $("#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') %>");

@ -91,7 +91,7 @@
<% end %> <% end %>
<% else %> <% else %>
<div style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>"> <div style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<% if field.field_type == "Post" %> <!--讨论帖子--> <% if field.field_type == "Post" || field.field_type == "Complex" || field.field_type == "Compstu" || field.field_type == "Comptec" %> <!--讨论帖子-->
<div class="homepageLeftMenuBlock"> <div class="homepageLeftMenuBlock">
<!--<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>--> <!--<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>-->
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子--> <% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
@ -101,9 +101,13 @@
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %> <% end %>
<% else %> <% else %>
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <% if field.field_type == "Comptec" %>
<%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% else %>
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
<% end %> <% end %>
<% if User.current.logged? and User.current.admin_of_org?(organization) %> <% if User.current.logged? and User.current.admin_of_org?(organization) && field.field_type != "Comptec" %>
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %> <%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
<% end %> <% end %>
</div> </div>
@ -118,7 +122,6 @@
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a> <a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
</li> </li>
<% end %> <% end %>
<% else %> <% else %>
<div class="homepageLeftMenuBlock"> <div class="homepageLeftMenuBlock">
<% if !field.subfield_subdomain_dir.nil? %> <% if !field.subfield_subdomain_dir.nil? %>

@ -24,8 +24,9 @@
</h3> </h3>
<span class="txt-grey"><%= format_date activity.updated_at %></span> <span class="txt-grey"><%= format_date activity.updated_at %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.description.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", activity.name.to_s, student_work_index_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% elsif act.org_act_type == "Message" %> <% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %> <% activity = Message.find(act.org_act_id) %>
@ -37,16 +38,13 @@
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
<% end %> <% end %>
<h3> <h3>
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"--> <%= link_to activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
<% end %>
</h3> </h3>
<span class="txt-grey"><%= format_date activity.updated_on %></span> <span class="txt-grey"><%= format_date activity.updated_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.content.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% elsif act.org_act_type == "News" %> <% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %> <% activity = News.find(act.org_act_id) %>
@ -62,8 +60,10 @@
</h3> </h3>
<span class="txt-grey"><%= format_date activity.created_on %></span> <span class="txt-grey"><%= format_date activity.created_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.description.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", activity.title.to_s, news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% elsif act.org_act_type == "Poll" %> <% elsif act.org_act_type == "Poll" %>
<% activity = Poll.find(act.org_act_id) %> <% activity = Poll.find(act.org_act_id) %>
@ -86,8 +86,9 @@
</h3> </h3>
<span class="txt-grey"><%= format_date activity.published_at %></span> <span class="txt-grey"><%= format_date activity.published_at %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.polls_description.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.polls_description.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
@ -116,8 +117,9 @@
</h3> </h3>
<span class="txt-grey"><%= format_date activity.updated_on %></span> <span class="txt-grey"><%= format_date activity.updated_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.description.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", activity.subject.to_s, issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% elsif act.org_act_type == "Message" %> <% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %> <% activity = Message.find(act.org_act_id) %>
@ -128,17 +130,14 @@
<% else %> <% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
<% end %> <% end %>
<h3> <h3> <!--+"(帖子标题)"-->
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"--> <%= link_to activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "h3-title" %>
<% end %>
</h3> </h3>
<span class="txt-grey"><%= format_date activity.updated_on %></span> <span class="txt-grey"><%= format_date activity.updated_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.content.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% elsif act.org_act_type == "News" %> <% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %> <% activity = News.find(act.org_act_id) %>
@ -154,8 +153,9 @@
</h3> </h3>
<span class="txt-grey">2016-04-08</span> <span class="txt-grey">2016-04-08</span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= activity.description.to_s.html_safe %></p> <div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
@ -190,8 +190,9 @@
</h3> </h3>
<span class="txt-grey"><%= format_date document.created_at %></span> <span class="txt-grey"><%= format_date document.created_at %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= document.content.to_s.html_safe %></p> <div class="sn-news-wrap"><%= document.content.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% else activity.container_type == 'OrgSubfield' %> <% 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 %> <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
@ -209,17 +210,14 @@
<% else %> <% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %>
<% end %> <% end %>
<h3> <h3> <!--+"(帖子标题)"-->
<% if message.parent_id.nil? %> <!--+"(帖子标题)"--> <%= link_to message.parent_id.nil? ? message.subject.to_s.html_safe : message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "h3-title" %>
<%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "h3-title" %>
<% else %>
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "h3-title" %>
<% end %>
</h3> </h3>
<span class="txt-grey"><%= format_date message.created_on %></span> <span class="txt-grey"><%= format_date message.created_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= content.to_s.html_safe %></p> <div class="sn-news-wrap"><%= content.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", message.parent_id.nil? ? message.subject.to_s.html_safe : message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% else %> <% else %>
<div class="sn-news-bigbox fl"> <div class="sn-news-bigbox fl">
@ -237,7 +235,14 @@
</h3> </h3>
<span class="txt-grey"><%= format_date message.created_on %></span> <span class="txt-grey"><%= format_date message.created_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= content.to_s.html_safe %></p> <div class="sn-news-wrap"><%= content.to_s.html_safe %></div>
</div>
<div class="sn-read-more">
<% if message.parent_id.nil? %>
<%=link_to "查看全文>>", message.subject.to_s.html_safe, board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
<% else %>
<%=link_to "查看全文>>", message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
<% end %>
</div> </div>
</div> </div>
<% end %> <% end %>
@ -256,8 +261,9 @@
</h3> </h3>
<span class="txt-grey"><%= format_date news.created_on %></span> <span class="txt-grey"><%= format_date news.created_on %></span>
<div class="sn-news-txt"> <div class="sn-news-txt">
<p><%= news.description.to_s.html_safe %></p> <div class="sn-news-wrap"><%= news.description.to_s.html_safe %></div>
</div> </div>
<div class="sn-read-more"><%=link_to "查看全文>>", news.title.to_s, news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
@ -266,4 +272,14 @@
<% end %> <% end %>
<% end %> <% end %>
<script>
$(".sn-read-more").hide();
$(".sn-news-txt").each(function(){
var txtHeight = $(this).children().height();
if (txtHeight > 180){
$(this).next().show();
}
});
</script>

@ -10,7 +10,7 @@
<% org_acts = get_subfield_acts field %> <% org_acts = get_subfield_acts field %>
<% unless org_acts.blank? %> <% unless org_acts.blank? %>
<% activity = org_acts.first %> <% activity = org_acts.first %>
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;"> <div class="sn-index-smallbanner sn-mb20" style="display:<%= field.hide == 0?'block':'none' %>;">
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% document = activity.org_act %> <% document = activity.org_act %>
<% org_subfield_id = params[:org_subfield_id] %> <% org_subfield_id = params[:org_subfield_id] %>
@ -52,13 +52,13 @@
<% end %> <% end %>
</div> </div>
<% else %> <% else %>
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;"> <div class="sn-index-smallbanner sn-mb20" style="display:<%= field.hide == 0?'block':'none' %>;">
<a href="javascript:void(0);" target="_blank" ><img src="/images/default_blank/right-03.jpg" width="369" height="169" alt=""/></a> <a href="javascript:void(0);" target="_blank" ><img src="/images/default_blank/right-03.jpg" width="369" height="169" alt=""/></a>
</div> </div>
<% end %> <% end %>
<% elsif field.field_type == "Resource" %> <% elsif field.field_type == "Resource" %>
<% org_attachs = get_attach_org2(field) %> <% org_attachs = get_attach_org2(field) %>
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;"> <div class="sn-index-smallbanner sn-mb20" style="display:<%= field.hide == 0?'block':'none' %>;">
<% if !field.subfield_subdomain_dir.nil? %> <% 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) %> <% 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 image_tag("/images/default_blank/right-03.jpg", :width => "369", :height => "169"), show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %> <%= link_to image_tag("/images/default_blank/right-03.jpg", :width => "369", :height => "169"), show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>

@ -23,7 +23,8 @@
<% else %> <% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "fl sn-index-wximg" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "fl sn-index-wximg" %>
<% end %> <% end %>
<p class="fl sn-index-txt sn-w229"><%=link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %></p> <p class="fl sn-index-txt sn-w229"><%=link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %></p>
<p class="fl sn-f12 sn-read-all" style="display:none;"><%=link_to "查看全文>>", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "sn-link-grey2" %></p>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else activity.container_type == 'OrgSubfield' %> <% else activity.container_type == 'OrgSubfield' %>
@ -39,6 +40,7 @@
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "fl sn-index-wximg" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "fl sn-index-wximg" %>
<% end %> <% end %>
<p class="fl sn-index-txt sn-w229"><%=link_to message.content.to_s.html_safe, board_message_url_in_org(message.board.id, message.id), :target => "_blank" %></p> <p class="fl sn-index-txt sn-w229"><%=link_to message.content.to_s.html_safe, board_message_url_in_org(message.board.id, message.id), :target => "_blank" %></p>
<p class="fl sn-f12 sn-read-all" style="display:none;"><%=link_to "查看全文>>", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "sn-link-grey2" %></p>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %> <% else %>
@ -51,6 +53,7 @@
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), board_message_path(message.board, activity), :target => "_blank", :class => "fl sn-index-wximg" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), board_message_path(message.board, activity), :target => "_blank", :class => "fl sn-index-wximg" %>
<% end %> <% end %>
<p class="fl sn-index-txt sn-w229"><%=link_to message.content.to_s.html_safe, board_message_path(message.board, activity), :target => "_blank" %></p> <p class="fl sn-index-txt sn-w229"><%=link_to message.content.to_s.html_safe, board_message_path(message.board, activity), :target => "_blank" %></p>
<p class="fl sn-f12 sn-read-all" style="display:none;"><%=link_to "查看全文>>", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "sn-link-grey2" %></p>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
@ -66,6 +69,7 @@
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), news_path(news), :target => "_blank", :class => "fl sn-index-wximg" %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "104", :height => "104"), news_path(news), :target => "_blank", :class => "fl sn-index-wximg" %>
<% end %> <% end %>
<p class="fl sn-index-txt sn-w229"><%=link_to news.description.to_s.html_safe, news_path(news), :target => "_blank" %></p> <p class="fl sn-index-txt sn-w229"><%=link_to news.description.to_s.html_safe, news_path(news), :target => "_blank" %></p>
<p class="fl sn-f12 sn-read-all" style="display:none;"><%=link_to "查看全文>>", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class => "sn-link-grey2" %></p>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
@ -96,3 +100,12 @@
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
<script>
$(".sn-index-txt").each(function(){
var wholeHeight = $(this).children().height();
if (wholeHeight > 54){
$(this).next().show();
}
});
</script>

@ -0,0 +1,33 @@
<% unless excellent_teachers.count == 0 %>
<div class="sn-teacher-wrap" style="display:<%= field.hide == 0?'block':'none' %>;">
<h2 class="h2-title sn-mb5"><%= field.name %>
<%= link_to "更多", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => field.id), :target => "_blank", :class => "more" %>
</h2>
<% excellent_teachers.each do |teacher| %>
<div class="sn-teacher-list">
<%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sn-fl sn-avatar-circle", :style => "display:block;"), user_path(teacher), :alt => "用户头像", :target => '_blank' %>
<!--<a href="javascript:void(0);" target="_blank"><img src="images/avatar_default.png" width="60" height="60" style="display:block;" class="sn-fl" /></a>-->
<div class="sn-teacher-info">
<%=link_to teacher.try(:realname) ? teacher.try(:realname) :teacher.try(:login), user_path(teacher), :class => "sn-teacher-name sn-hidden", :title => '', :target => '_blank' %></a>
<span class="sn-teacher-unit sn-hidden" title="<%= teacher.my_workplace %>"><%= teacher.my_workplace %></span> </div>
<div class="sn-teacher-social">
<% unless teacher.my_blogs_count == 0 %>
<span class="sn-mr20">博客 <%= teacher.my_blogs_count %></span>
<% end %>
<% unless teacher.courses.count == 0 %>
<span class="sn-mr20">课程 <%= teacher.courses.count %></span>
<% end %>
<% unless teacher.my_students == 0 %>
<span>学生 <%= teacher.my_students %></span>
<% end %>
</div>
<div class="sn-cl"></div>
</div>
<% end %>
</div>
<script>
$(".sn-teacher-list:last").addClass("sn-border-none");
</script>
<% end %>

@ -0,0 +1,59 @@
<% org_teachers.each do |org_teacher| %>
<% school = School.where("id =?", org_teacher.school_id).first %>
<div class="teacher-list-row">
<div>
<div class="teacher-avatar">
<%= link_to image_tag(url_to_avatar(org_teacher), :width => "90", :height => "90"), user_url_in_org(org_teacher), :alt => "用户头像" %>
</div>
<div class="fl">
<div class="ml25 mb20"><span class="teacher-name"><%=link_to org_teacher.try(:realname).nil? ? org_teacher.try(:login) : org_teacher.try(:realname), user_url_in_org(org_teacher) %></span>
<% unless school.nil? %>
<span class="f12 fontGrey2 mr15"><%= school.name %></span>
<% end %>
<% unless org_teacher.nil? %>
<span class="f12 fontGrey2"><%= org_teacher.technical_title %></span></div>
<% end %>
<div class="teacher-social-block">
<div class="block-num"><%= org_teacher.courses.count %></div>
<div class="block-title">课程数</div>
</div>
<div class="block-slice"></div>
<div class="teacher-social-block">
<div class="block-num"><%= org_teacher.my_students %></div>
<div class="block-title">学生数</div>
</div>
<div class="block-slice"></div>
<div class="teacher-social-block">
<div class="block-num"><%= org_teacher_resource_count(org_teacher) %></div>
<div class="block-title">资源数</div>
</div>
</div>
<% if User.current.admin_of_org?(@organization) %>
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_teacher.id %>');" id="hide_<%= org_teacher.id %>"><%= org_teacher.excellent_teacher==0?"设为名师":"取消设置" %></a>
<!--<a href="javascript:void(0);" class="fr teacher-select">设为名师</a>-->
<% else %>
<!--<%# if(org_teacher.watched_by?(User.current)) %>-->
<!--<%#= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>org_teacher.id,:target_id=>org_teacher.id),:class => "fr teacher-select", :method => "delete",:remote => "true", :title => "取消关注"%>-->
<!--<%# else %>-->
<!--<%#= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>org_teacher.id,:target_id=>org_teacher.id),:class => "fr teacher-select", :method => "post",:remote => "true", :title => "添加关注"%>-->
<!--<%# end %>-->
<% end %>
</div>
<div class="cl"></div>
</div>
<% end %>
<script>
function hide(content, id){
if (content.text() == '设为名师')
$.ajax({
url: "/organizations/set_excellent_teacher?user=" + id,
type: "post"
});
else
$.ajax({
url: "/organizations/reset_excellent_teacher?user=" + id,
type: "post"
});
}
</script>

@ -0,0 +1,6 @@
<% if @organization.allow_set_teachers && !org_subfield_had_created?(@organization, "Comptec") %>
<li class="fl mr15">
<input type="radio" id="orgTec" value="Comptec" name="field_type" />
<label for="Comptec">教师</label>
</li>
<% end %>

@ -0,0 +1,36 @@
<div class="resources mt10">
<div class="function-row">
<input type="text" placeholder="搜索" class="teacher-list-search fl" />
<a href="javascript:void(0);" class="teacher-search-icon fl"></a>
<select class="teacher-search-type fr">
<option>课程数</option>
<option>学生数</option>
<option>资源数</option>
</select>
<div class="cl"></div>
</div>
<div class="teacher-list-row">
<div>
<div class="teacher-avatar"><img src="images/homepageImage.jpg" width="90" height="90" /></div>
<div class="fl">
<div class="ml25 mb20"><span class="teacher-name">尹刚</span><span class="f12 fontGrey2 mr15">国防科学技术大学</span><span class="f12 fontGrey2">教授</span></div>
<div class="teacher-social-block">
<div class="block-num">6000</div>
<div class="block-title">课程数</div>
</div>
<div class="block-slice"></div>
<div class="teacher-social-block">
<div class="block-num">500</div>
<div class="block-title">学生数</div>
</div>
<div class="block-slice"></div>
<div class="teacher-social-block">
<div class="block-num">8000</div>
<div class="block-title">资源数</div>
</div>
</div>
<a href="javascript:void(0);" class="fr teacher-select">添加</a>
</div>
<div class="cl"></div>
</div>
</div>

@ -0,0 +1,22 @@
<div class="resources mt10">
<div class="function-row">
<%= form_tag( url_for(:controller => 'organizations', :action => 'teacher_search'),
:remote => true , :method => 'get', :id => 'resource_search_form') do %>
<input type="text" name="search" placeholder="输入教师名进行搜索" class="teacher-list-search fl" />
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none', :class => "teacher-search-icon fl" %>
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
<% end %>
<!--<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>-->
<!--<input type="text" placeholder="搜索" class="teacher-list-search fl" />-->
<!--<a href="javascript:void(0);" class="teacher-search-icon fl"></a>-->
<select class="teacher-search-type fr" onclick="chooseTeacherType();">
<option value="1">课程数</option>
<option value="2">学生数</option>
<option value="3">资源数</option>
</select>
<div class="cl"></div>
</div>
<div id="org_teachers_list">
<%=render 'organizations/org_teachers_list' %>
</div>
</div>

@ -8,7 +8,6 @@
<li class="orgListOperation fb"><span class="mr10">操作</span></li> <li class="orgListOperation fb"><span class="mr10">操作</span></li>
<div class="cl"></div> <div class="cl"></div>
</ul> </ul>
<% subfields.each do |field| %> <% subfields.each do |field| %>
<% if is_default_field?(field) %> <% if is_default_field?(field) %>
<% name = get_default_name(field) %> <% name = get_default_name(field) %>
@ -32,10 +31,9 @@
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a> <a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div> </div>
<%= select( :name,:group_id, subfield_status_option_default, { :include_blank => false,:selected => field.status}, <%= select( :name,:group_id, subfield_status_option_default, { :include_blank => false,:selected => field.status},
{ :onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> { :onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<% end %> <% end %>
<% end %> <% end %>
</li> </li>
<li class="orgListType">默认</li> <li class="orgListType">默认</li>
<a href="javascript:void(0);" class="linkGrey fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a> <a href="javascript:void(0);" class="linkGrey fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a>
@ -59,21 +57,20 @@
</li> </li>
<li class="orgListStatus">新增</li> <li class="orgListStatus">新增</li>
<li class="orgListStatusList"> <li class="orgListStatusList">
<% if field.field_type == "Resource" %> <% if field.field_type == "Resource" || field.field_type == "Comptec" %>
列表 默认
<% else %> <% else %>
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
<div class="update_status_class"><span class="hidden"><%= subfield_list_type(field.status) %></span> <div class="update_status_class"><span class="hidden"><%= subfield_list_type(field.status) %></span>
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a> <a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div> </div>
<%= select( :name,:group_id, subfield_status_option, <%= select( :name,:group_id, subfield_status_option,
{ :include_blank => false,:selected => field.status}, { :include_blank => false,:selected => field.status},
{:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> { :onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<% end %> <% end %>
<% end %> <% end %>
</li> </li>
<li class="orgListType"><%= field.field_type == "Post" ? "帖子" : "资源" %></li> <li class="orgListType"><%= org_subfield_type field %></li>
<li class="orgListCatalog hidden"> <li class="orgListCatalog hidden">
<% if Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 %> <% if Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 %>
<div id="sub_dir_show_<%= field.id %>" ondblclick="edit_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>');" style="cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; margin-left:20px;" title="双击可编辑"> <div id="sub_dir_show_<%= field.id %>" ondblclick="edit_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>');" style="cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; margin-left:20px;" title="双击可编辑">
@ -95,7 +92,7 @@
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %> <%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
<span class="fr">|</span> <span class="fr">|</span>
<a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a> <a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
<% unless field.field_type == "Resource" %> <% unless field.field_type == "Resource" || field.field_type == "Comptec" %>
<span class="fr">|</span> <span class="fr">|</span>
<!--escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)--> <!--escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)-->
<!--<a href="javascript:void(0);" class="linkGrey fr mr5" onclick="org_submain_new('<%#= escape_javascript new_org_subfield_sub_domain_path(:org_subfield_id => field.id, :field => field) %>');">添加二级目录</a>--> <!--<a href="javascript:void(0);" class="linkGrey fr mr5" onclick="org_submain_new('<%#= escape_javascript new_org_subfield_sub_domain_path(:org_subfield_id => field.id, :field => field) %>');">添加二级目录</a>-->

@ -0,0 +1 @@
$("#hide_<%= @ex_teacher.id %>").text("设为名师");

@ -0,0 +1 @@
$("#hide_<%= @ex_teacher.id %>").text("取消设置");

@ -87,6 +87,11 @@
&nbsp;<span>允许游客下载</span> &nbsp;<span>允许游客下载</span>
<span class="c_green f12" id="allow_down_hint"><%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %></span> <span class="c_green f12" id="allow_down_hint"><%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %></span>
</div> </div>
<% if User.current.admin? %>
<div class="orgRow mb10 mt5"><span style="margin-left:10px;">允许设置名师榜&nbsp;: </span>
<input id="allow_set_excellent_teachers" type="checkbox" style="margin-top:5px;" name="organization[allow_teacher]" <%= @organization.allow_teacher==1 ? 'checked': ''%> class="ml3" />
</div>
<% end %>
<a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick="update_org('<%=@organization.id %>','<%= @organization.name %>', $('#organization_name'));">保存</a> <a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick="update_org('<%=@organization.id %>','<%= @organization.name %>', $('#organization_name'));">保存</a>
<% end %> <% end %>
</div> </div>
@ -152,10 +157,9 @@
<input type="radio" id="orgMeb" value="Resource" name="field_type" /> <input type="radio" id="orgMeb" value="Resource" name="field_type" />
<label for="orgMeb">资源</label> <label for="orgMeb">资源</label>
</li> </li>
<!--<li class="fl">--> <div id="org_excellent_teachers">
<!--<input type="radio" id="orgCom" value="Complex" name="field_type" />--> <%= render :partial => 'organizations/setting_excellent_teachers' %>
<!--<label for="orgMeb">综合</label>--> </div>
<!--</li>-->
<li class="fr"><a href="javascript:void(0);" class="saveBtn db" onclick="add_org_subfield();">新增</a></li> <li class="fr"><a href="javascript:void(0);" class="saveBtn db" onclick="add_org_subfield();">新增</a></li>
<li class="cl"></li> <li class="cl"></li>
</ul> </ul>

@ -5,46 +5,46 @@
<% end %> <% end %>
<% if params[:show_homepage].nil? and User.current.logged? %> <% if params[:show_homepage].nil? and User.current.logged? %>
<div class="homepageRightBanner"> <div class="homepageRightBanner">
<div class="NewsBannerName"><%= @org_subfield.nil? ? "最新动态":"#{@org_subfield.name}" %></div> <div class="NewsBannerName"><%= @org_subfield.nil? ? "最新动态":"#{@org_subfield.name}" %></div>
<% if params[:org_subfield_id].nil? %> <% if params[:org_subfield_id].nil? %>
<ul class="resourcesSelect"> <ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a> <li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType"> <ul class="homepagePostType">
<li> <li>
<ul class="homepagePostTypeHomework fl"> <ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</li> <li class="f14">课程动态</li>
<li><%= link_to "作业动态", {:controller => "organizations", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%> <li><%= link_to "作业动态", {:controller => "organizations", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
<!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li> <!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li>
<li><%= link_to "通知动态", {:controller => "organizations", :action => "show", :type => "course_news"}, :class => "homepagePostTypeNotice postTypeGrey"%> <li><%= link_to "通知动态", {:controller => "organizations", :action => "show", :type => "course_news"}, :class => "homepagePostTypeNotice postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>--> <!--<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>-->
<li><%= link_to "论坛动态", {:controller => "organizations", :action => "show", :type => "course_message"}, :class => "homepagePostTypeForum postTypeGrey"%> <li><%= link_to "论坛动态", {:controller => "organizations", :action => "show", :type => "course_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<li><%= link_to "问卷动态", {:controller => "organizations", :action => "show", :type => "course_poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%> <li><%= link_to "问卷动态", {:controller => "organizations", :action => "show", :type => "course_poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>--> <!--<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>--> <!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
</ul> </ul>
</li> </li>
<li> <li>
<ul class="homepagePostTypeProject fl"> <ul class="homepagePostTypeProject fl">
<li class="f14">项目动态</li> <li class="f14">项目动态</li>
<li><%= link_to "问题动态", {:controller => "organizations", :action => "show", :type => "project_issue"}, :class => "homepagePostTypeQuestion postTypeGrey"%> <li><%= link_to "问题动态", {:controller => "organizations", :action => "show", :type => "project_issue"}, :class => "homepagePostTypeQuestion postTypeGrey"%>
<li><%= link_to "论坛动态", {:controller => "organizations", :action => "show", :type => "project_message"}, :class => "homepagePostTypeForum postTypeGrey"%> <li><%= link_to "论坛动态", {:controller => "organizations", :action => "show", :type => "project_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li> <!--<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>--> <li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
</ul> </ul>
</li> </li>
<li> <li>
<ul class="homepagePostTypeProject fl"> <ul class="homepagePostTypeProject fl">
<li class="f14">更多</li> <li class="f14">更多</li>
<li class="mt-4"><%= link_to "组织动态", {:controller => "organizations", :action => "show", :type => "org"}, :class =>"homepagePostTypeMessage postTypeGrey"%> <li class="mt-4"><%= link_to "组织动态", {:controller => "organizations", :action => "show", :type => "org"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
<li class="mt-4"><%= link_to "全部动态", {:controller => "organizations", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%> <li class="mt-4"><%= link_to "全部动态", {:controller => "organizations", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
</ul>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> <% end %>
</ul> </div>
<% end %>
</div>
<% end %> <% end %>
<% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 and params[:org_subfield_id].nil? %> <% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 and params[:org_subfield_id].nil? %>
<script> <script>
@ -53,7 +53,7 @@
}); });
</script> </script>
<% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %> <% 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} %> <%= render :partial => 'show_home_page', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id, :act => act} %>
<% end %> <% end %>
<% if @org_activities %> <% if @org_activities %>
<%= render :partial => 'organizations/org_activities', <%= render :partial => 'organizations/org_activities',
@ -67,3 +67,6 @@

@ -0,0 +1 @@
$("#org_teachers_list").html('<%= escape_javascript( render :partial => 'organizations/org_teachers_list')%>');

@ -0,0 +1,39 @@
<div class="homepageRightBanner">
<div class="f16 fontGrey3">
<% if @type == "famous" %>
名师列表
<% else %>
<%= @field.name %>
<% end %>
</div>
</div>
<div class="resources mt10">
<div class="function-row" id="org_teacher_search">
<%= form_tag( url_for(:controller => 'organizations', :action => 'teachers', :type => @type),
:remote => true , :method => 'get', :id => 'resource_search_form') do %>
<input type="text" name="search" placeholder="输入教师名进行搜索" class="teacher-list-search fl" />
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
<% end %>
<!--<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>-->
<!--<input type="text" placeholder="搜索" class="teacher-list-search fl" />-->
<!--<a href="javascript:void(0);" class="teacher-search-icon fl"></a>-->
<!--<select id="teacher_type_select" class="teacher-search-type fr" onclick="chooseTeacherType('<%#= @organization.id %>');">-->
<!--<option value="1">课程数</option>-->
<!--<option value="2">学生数</option>-->
<!--<option value="3">资源数</option>-->
<!--</select>-->
<div class="sn-font-grey fr">
<%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
</div>
<div class="cl"></div>
</div>
<div id="org_teachers_list">
<%=render 'organizations/org_teachers_list', :org_teachers => @org_teachers %>
</div>
<div>
<ul class="wlist" id="pages" style="margin-top: 15px;">
<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :flag => true %>
</ul>
</div>
</div>

@ -0,0 +1,3 @@
$("#org_teachers_list").html('<%= escape_javascript( render :partial => 'organizations/org_teachers_list', :locals => {:org_teachers => @org_teachers})%>');
$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
$("#org_teacher_search").attr('href','<%= teachers_organization_path(@organization, :type => @type) %>');

@ -20,6 +20,11 @@
// text: 'Source: WorldClimate.com' // text: 'Source: WorldClimate.com'
}, },
xAxis: { xAxis: {
title: {
text: '作者',
x: -23, //center设置标题的位置
y: 6
},
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] // categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@a_uname_code) %> categories: <%= raw(@a_uname_code) %>
}, },
@ -70,7 +75,7 @@
lineWidth: 1.5 lineWidth: 1.5
}, },
{ {
name: '<b style="font-weight:normal ">改动或增加</b>', name: '<b style="font-weight:normal;text-align: center ">改动或增加</b>',
color: '#5b6b76', color: '#5b6b76',
data: <%= @a_commits_add %>, data: <%= @a_commits_add %>,
dataLabels: { dataLabels: {
@ -122,6 +127,11 @@
// text: 'Source: WorldClimate.com' // text: 'Source: WorldClimate.com'
}, },
xAxis: { xAxis: {
title: {
text: '作者',
x: -20, //center设置标题的位置
y: 6
},
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] // categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@a_uname) %> categories: <%= raw(@a_uname) %>
}, },

@ -43,7 +43,7 @@
</div> </div>
</td> </td>
<td class="tree-age c_grey"> <td class="tree-age c_grey">
<div class="hidden" title="<%= distance_of_time_in_words(latest_changes.time, Time.now + 8.hours) if latest_changes && latest_changes.time %>"> <div class="hidden" title="<%= format_time(latest_changes.time) %>">
<%# 为了转换UTC时间时差8小时 %> <%# 为了转换UTC时间时差8小时 %>
<%= distance_of_time_in_words(latest_changes.time, Time.now + 8.hours) if latest_changes && latest_changes.time %> <%= distance_of_time_in_words(latest_changes.time, Time.now + 8.hours) if latest_changes && latest_changes.time %>
<%#= latest_changes.time if latest_changes && latest_changes.time %> <%#= latest_changes.time if latest_changes && latest_changes.time %>

@ -1,6 +1,8 @@
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %> <%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
<div class="project_r_h"> <div class="project_r_h">
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div> <div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
<!--<a href="javascript:void(0);" class="btn_zipdown fr" onclick="">ZIP下载</a>-->
</div> </div>
<div class="repository_con" style="line-height:1.9;"> <div class="repository_con" style="line-height:1.9;">
<% if @entries.nil? %> <% if @entries.nil? %>

@ -56,8 +56,8 @@
<% else %> <% else %>
<% work= params[:show_work_id].nil? ? @homework.student_works.where("user_id = ?",User.current.id).first : StudentWork.find(params[:show_work_id]) %> <% work= params[:show_work_id].nil? ? @homework.student_works.where("user_id = ?",User.current.id).first : StudentWork.find(params[:show_work_id]) %>
<% end %> <% end %>
location.hash = "<%=work.id %>";
<% unless work.nil? %> <% unless work.nil? %>
location.hash = "<%=work.id %>";
<% if @homework.homework_type == 2 %> <% if @homework.homework_type == 2 %>
$("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>work,:score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc"),:is_focus => @is_focus}) %>"); $("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>work,:score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc"),:is_focus => @is_focus}) %>");

@ -14,7 +14,7 @@
<li> <li>
<div class="sn-circle fl"></div><%=link_to document.title, org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id => @org_subfield, :sub_domain_id => @subdomain), :class => "sn-newslist-titile fl", :target => "_blank" %> <div class="sn-circle fl"></div><%=link_to document.title, org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id => @org_subfield, :sub_domain_id => @subdomain), :class => "sn-newslist-titile fl", :target => "_blank" %>
<span class=" txt-grey fr"><%= format_date(document.created_at) %></span> <span class=" txt-grey fr"><%= format_date(document.created_at) %></span>
<a href="javascript:void(0)" target="_blank" class="sn-newslist-reply fr mr10">回复(<%= document.children.count %></a> <span class="sn-newslist-reply fr mr10 txt-grey">回复(<%= document.children.count %></span>
<!--<a href="javascript:void(0)" target="_blank" class="sn-newslist-zan fr mr10">100</a>--> <!--<a href="javascript:void(0)" target="_blank" class="sn-newslist-zan fr mr10">100</a>-->
<div class="cl"></div> <div class="cl"></div>
</li> </li>

@ -44,7 +44,7 @@
<% end %> <% end %>
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p> <p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p>
</div> </div>
<div class="ml15 mt10"> <div class="ml15 mt10 f12">
<span class="grayTxt">发帖时间:<%= format_time(activity.created_on) %></span> <span class="grayTxt">发帖时间:<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %></span> <span class="grayTxt">更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %></span>
<% count=0 %> <% count=0 %>

@ -28,7 +28,7 @@
</form> </form>
<div> <div>
<ul class="wlist" id="pages" style="margin-top: 5px;"> <ul class="wlist" id="pages" style="margin-top: 15px;">
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %> <%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
</ul> </ul>
</div> </div>
@ -37,7 +37,7 @@
<!--<div id="upload_box" style="display: none">--> <!--<div id="upload_box" style="display: none">-->
<!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>--> <!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>-->
<!--</div>--> <!--</div>-->
<ul class="resource-list"> <ul>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" id="contextMenu"> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" id="contextMenu">
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)preview();" onfocus="this.blur()">预览</a></li> <li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)preview();" onfocus="this.blur()">预览</a></li>
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)rename();" onfocus="this.blur()">重命名</a></li> <li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)rename();" onfocus="this.blur()">重命名</a></li>
@ -228,4 +228,22 @@
alert('您无法修改此资源!') alert('您无法修改此资源!')
} }
} }
//发送至按钮控制
$("input[name='checkbox1[]']").click(function(){
if($("input[name='checkbox1[]']:checked").length >= 1){
$(".resourcesSelectSendButton").removeClass("inactive-border");
$(".resourcesSelectSendButton").mouseover(function(){
$(this).css("backgroundColor","#297fb8");
});
$(".resourcesSelectSendButton").mouseout(function(){
$(this).css("backgroundColor","#fff");
});
$(".sendButtonBlue").removeClass("inactive-text");
}else{
$(".resourcesSelectSendButton").addClass("inactive-border");
$(".sendButtonBlue").addClass("inactive-text");
$(".resourcesSelectSendButton").unbind("mouseover").unbind("mouseout");
}
});
</script> </script>

@ -5,13 +5,16 @@
$(".resource-switch").children().removeClass("resource-tab-active"); $(".resource-switch").children().removeClass("resource-tab-active");
$(this).children().addClass("resource-tab-active"); $(this).children().addClass("resource-tab-active");
}); });
$("input[name='subject-list-name']").click(function(){ $("input[name='checkMenu']").click(function(){
if($("input[name='subject-list-name']:checked").length >= 1){ if($("input[name='checkMenu']:checked").length >= 1){
$(".resourcesSelectSendButton").removeClass("inactive-border"); $(".resourcesSelectSendButton").removeClass("inactive-border");
$(".resourcesSelectSendButton").mouseover(function(){
$(this).css("backgroundColor","#297fb8");
});
$(".resourcesSelectSendButton").mouseout(function(){
$(this).css("backgroundColor","#fff");
});
$(".sendButtonBlue").removeClass("inactive-text"); $(".sendButtonBlue").removeClass("inactive-text");
}else {
$(".resourcesSelectSendButton").addClass("inactive-border");
$(".sendButtonBlue").addClass("inactive-text");
} }
}); });
}); });
@ -33,7 +36,7 @@
<div class="homepageContentContainer"> <div class="homepageContentContainer">
<div class="homepageContent"> <div class="homepageContent">
<div class="resource-wrapper"> <div class="resource-wrapper mb10">
<ul class="resource-banner"> <ul class="resource-banner">
<li class="fl resource-switch"> <li class="fl resource-switch">
<a href="<%= user_homework_type_user_path(@user,:is_import => 0) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active" data-remote="true">题库</a> <a href="<%= user_homework_type_user_path(@user,:is_import => 0) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active" data-remote="true">题库</a>

@ -12,8 +12,8 @@
<%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %>
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div> <div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<input nhname="submit_btn" type="button" class="reply_btn" value="<%=l(:button_feedback_respond) %>"/> <!--<input nhname="submit_btn" type="button" class="reply_btn" value="<%#=l(:button_feedback_respond) %>"/>-->
<%#= submit_tag l(:button_feedback_respond), :name => nil , <%= submit_tag l(:button_feedback_respond), :name => nil ,
:class => "reply_btn"%> :class => "reply_btn"%>
<input nhname="cancel_btn" type="button" style="display:none;"/> <input nhname="cancel_btn" type="button" style="display:none;"/>
<% end %> <% end %>

@ -17,7 +17,7 @@ RedmineApp::Application.configure do
# config.logger.level = Logger::INFO # config.logger.level = Logger::INFO
# Full error reports are disabled and caching is turned on # Full error reports are disabled and caching is turned on
config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly # config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# to additional_environment.rb # to additional_environment.rb

@ -194,36 +194,36 @@ require 'fileutils'
# end # end
# # e.g. "Thu Sep 22 08:51:08 GMT+9:00 2005: hello world" # # e.g. "Thu Sep 22 08:51:08 GMT+9:00 2005: hello world"
# #
class Logger # class Logger
#具体内容请看https://bugs.ruby-lang.org/issues/7303 # #具体内容请看https://bugs.ruby-lang.org/issues/7303
# Device used for logging messages. # # Device used for logging messages.
class LogDevice # class LogDevice
def shift_log_period(period_end) # def shift_log_period(period_end)
postfix = period_end.strftime("%Y%m%d") # YYYYMMDD # postfix = period_end.strftime("%Y%m%d") # YYYYMMDD
age_file = "#{@filename}.#{postfix}" # age_file = "#{@filename}.#{postfix}"
if FileTest.exist?(age_file) # if FileTest.exist?(age_file)
# try to avoid filename crash caused by Timestamp change. # # try to avoid filename crash caused by Timestamp change.
idx = 0 # idx = 0
# .99 can be overridden; avoid too much file search with 'loop do' # # .99 can be overridden; avoid too much file search with 'loop do'
while idx < 100 # while idx < 100
idx += 1 # idx += 1
age_file = "#{@filename}.#{postfix}.#{idx}" # age_file = "#{@filename}.#{postfix}.#{idx}"
break unless FileTest.exist?(age_file) # break unless FileTest.exist?(age_file)
end # end
end # end
# @dev.close rescue nil # # @dev.close rescue nil
# File.rename("#{@filename}", age_file) # # File.rename("#{@filename}", age_file)
# @dev = create_logfile(@filename) # # @dev = create_logfile(@filename)
#覆盖原来lib库的方法将上边三行删除增加下边两行 # #覆盖原来lib库的方法将上边三行删除增加下边两行
FileUtils.cp(@filename, age_file) # FileUtils.cp(@filename, age_file)
reset_logfile(@dev) # see below for this new method return true # reset_logfile(@dev) # see below for this new method return true
return true # return true
end # end
#打开原来lib库新增一个方法 # #打开原来lib库新增一个方法
def reset_logfile(logdev) # def reset_logfile(logdev)
logdev.truncate( 0 ) # logdev.truncate( 0 )
logdev.sync = true # logdev.sync = true
add_log_header(logdev) # add_log_header(logdev)
end # end
end # end
end # end

@ -76,6 +76,7 @@ RedmineApp::Application.routes.draw do
get 'more_org_projects' get 'more_org_projects'
get 'more_org_courses' get 'more_org_courses'
get 'search_courses' get 'search_courses'
get 'teachers'
post 'join_course_menu' post 'join_course_menu'
post 'join_courses' post 'join_courses'
get 'search_projects' get 'search_projects'
@ -92,6 +93,8 @@ RedmineApp::Application.routes.draw do
get 'autocomplete_search' get 'autocomplete_search'
post 'hide_org_subfield' post 'hide_org_subfield'
post 'show_org_subfield' post 'show_org_subfield'
post 'set_excellent_teacher'
post 'reset_excellent_teacher'
post 'agree_apply_subdomain' post 'agree_apply_subdomain'
end end
end end
@ -523,6 +526,10 @@ RedmineApp::Application.routes.draw do
match 'courses/:course_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news' match 'courses/:course_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news'
match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post] match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post]
scope ":username" do
resources :posts
end
#added by young #added by young
resources :users do resources :users do
collection do collection do
@ -905,6 +912,7 @@ RedmineApp::Application.routes.draw do
get 'projects/:id/repository/changes(/*path(.:ext))', :to => 'repositories#changes' get 'projects/:id/repository/changes(/*path(.:ext))', :to => 'repositories#changes'
get 'projects/:id/repository/forked', :to => 'repositories#forked' get 'projects/:id/repository/forked', :to => 'repositories#forked'
get 'projects/:id/repository/project_archive', :to => 'repositories#project_archive', :as => 'project_archive'
get 'projects/:id/repository/revisions', :to => 'repositories#revisions' get 'projects/:id/repository/revisions', :to => 'repositories#revisions'
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision'
get 'projects/:id/repository/revision', :to => 'repositories#revision' get 'projects/:id/repository/revision', :to => 'repositories#revision'

@ -0,0 +1,5 @@
class AddExcellentTeacherToUser < ActiveRecord::Migration
def change
add_column :users, :excellent_teacher, :integer, :default => false
end
end

@ -0,0 +1,5 @@
class AddAllowTeacherToOrganization < ActiveRecord::Migration
def change
add_column :organizations, :allow_teacher, :integer, :default => false
end
end

@ -0,0 +1,18 @@
class DeleteEmptyApplyHomework < ActiveRecord::Migration
def up
count = ApplyHomework.all.count / 30 + 2
transaction do
for i in 1 ... count do i
ApplyHomework.page(i).per(30).each do |ah|
homework = HomeworkCommon.where("id = ?",ah.homework_common_id)
if homework.empty?
ah.destroy
end
end
end
end
end
def down
end
end

@ -11,8 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160517013659) do ActiveRecord::Schema.define(:version => 20160511055221) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
t.string "act_type", :null => false t.string "act_type", :null => false

@ -137,11 +137,20 @@ class Gitlab::Client
end end
alias_method :repo_commit_diff, :commit_diff alias_method :repo_commit_diff, :commit_diff
#Get the commits count of each contributor in a project # Get the commits count of each contributor in a project
#@param [Integer] project the ID fo a project. # @param [Integer] project the ID fo a project.
# @return [Gitlab::ObjectifiedHash] # @return [Gitlab::ObjectifiedHash]
def contributors(project) def contributors(project)
get("/projects/#{project}/repository/contributors") get("/projects/#{project}/repository/contributors")
end end
# Get an archive of the repository
# @param [Integer] project the ID fo a project.
# sha (optional) - The commit SHA to download defaults to the tip of the default branch
# @return [Gitlab::ObjectifiedHash]
def project_archive(project, sha)
get("/projects/#{project}/repository/archive?sha=#{sha}")
end
alias_method :repo_project_archive, :project_archive
end end
end end

@ -5,7 +5,7 @@ PATH
rack (~> 1.5.1) rack (~> 1.5.1)
GEM GEM
remote: https://ruby.taobao.org/ remote: https://rubygems.org/
specs: specs:
byebug (4.0.5) byebug (4.0.5)
columnize (= 0.9.0) columnize (= 0.9.0)

@ -118,6 +118,59 @@ class Kindeditor::AssetsController < ApplicationController
@result[:file_list] = @file_list @result[:file_list] = @file_list
render :text => @result.to_json render :text => @result.to_json
end end
#在KE里面复制粘贴的时候 把图片下载到服务器上
def uploadpic
picStr = params["pic"]
picArry = picStr.split("|")
#图片存放目录
dirPath = "public/files/uploads/image/"
dirDate = Time.now.strftime('%Y%m')
unless Dir.exist?("public")
Dir.mkdir("public")
end
unless Dir.exist?("public/files")
Dir.mkdir("public/files")
end
unless Dir.exist?("public/files/uploads")
Dir.mkdir("public/files/uploads")
end
unless Dir.exist?("public/files/uploads/image")
Dir.mkdir("public/files/uploads/image")
end
unless Dir.exist?(dirPath+dirDate)
Dir.mkdir(dirPath+dirDate)
end
fileStr = ""
picArry.each_with_index do |picUrl,index|
imgBaseName = File.basename(picUrl)
tmpImgType = imgBaseName.split(".").last.split("?")[0]
# 仅支持如下图片格式:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF
fileType = tmpImgType.match("gif|jpg|jpeg|png|bmp|BMP|JPEG|JPG|PNG|GIF")
fileName = fileType.nil? ? Time.now.to_i.to_s+index.to_s : Time.now.to_i.to_s+index.to_s+"."+fileType[0]
# fileType = File.basename(picurl).split(".").last[0..2]
# fileName = Time.now.to_i.to_s+index.to_s
fileDir = dirPath + dirDate + "/"+fileName
#重点!!
begin
File.open(fileDir,'wb'){ |f| f.write(open(picUrl).read) }
fileDir = fileDir.split("public")[1]
rescue
fileDir = picUrl
end
fileStr = fileStr+fileDir + "|"
end
render :text =>fileStr
end
private private
def show_error(msg) def show_error(msg)

@ -2,5 +2,6 @@ Rails.application.routes.draw do
namespace :kindeditor do namespace :kindeditor do
post "/upload" => "assets#create" post "/upload" => "assets#create"
get "/filemanager" => "assets#list" get "/filemanager" => "assets#list"
get "/uploadpic" => "assets#uploadpic"
end end
end end

@ -3,8 +3,7 @@
// for (var property in myObject) { // for (var property in myObject) {
// s = s + "\n "+property +": " + myObject[property] ; // s = s + "\n "+property +": " + myObject[property] ;
// } // }
// alert(s); // alert(s)
//}
/******************************************************************************* /*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet * KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2013 kindsoft.net * Copyright (C) 2006-2013 kindsoft.net
@ -291,14 +290,14 @@ K.options = {
], ],
table: [ table: [
'id', 'class', 'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor', 'id', 'class', 'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor',
'.padding', '.margin', '.border', 'bgcolor', '.text-align', '.color', '.background-color', '.padding', '.margin', '.border','.border-color', 'bgcolor', '.text-align', '.color', '.background-color',
'.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background', '.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background',
'.width', '.height', '.border-collapse' '.width', '.height', '.border-collapse','.table-layout'
], ],
'td,th': [ 'td,th': [
'id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor', 'id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
'.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
'.font-style', '.text-decoration', '.vertical-align', '.background', '.border' '.font-style', '.text-decoration', '.vertical-align', '.background', '.border', '.text-overflow','.overflow','.white-space'
], ],
a : ['id', 'class', 'href', 'target', 'name'], a : ['id', 'class', 'href', 'target', 'name'],
embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
@ -737,6 +736,8 @@ function _formatHtml(html, htmlTags, urlType, wellFormatted, indentChar) {
html = html.replace(/\u200B/g, ''); html = html.replace(/\u200B/g, '');
html = html.replace(/\u00A9/g, '&copy;'); html = html.replace(/\u00A9/g, '&copy;');
html = html.replace(/\u00AE/g, '&reg;'); html = html.replace(/\u00AE/g, '&reg;');
html = html.replace(/\u2003/g, '&emsp;');
html = html.replace(/\u3000/g, '&emsp;');
html = html.replace(/<[^>]+/g, function($0) { html = html.replace(/<[^>]+/g, function($0) {
return $0.replace(/\s+/g, ' '); return $0.replace(/\s+/g, ' ');
}); });
@ -3788,6 +3789,7 @@ _extend(KEdit, KWidget, {
} else { } else {
val = body.innerHTML; val = body.innerHTML;
} }
//yk
if (self.beforeGetHtml) { if (self.beforeGetHtml) {
val = self.beforeGetHtml(val); val = self.beforeGetHtml(val);
} }
@ -5994,7 +5996,24 @@ _plugin('core', function(K) {
html = html.replace(/\n/g, '<br />$&'); html = html.replace(/\n/g, '<br />$&');
} }
} }
self.insertHtml(html, true);
// var kePasteContainer = document.getElementById("ke_paste");
// if (kePasteContainer == null) {
// kePasteContainer = document.createElement("div");
// kePasteContainer.id = "ke_paste";
// var last=document.body.lastChild;//得到页面的最后个元素
// document.body.insertBefore(kePasteContainer,last);//在得到的最后元素之前插入
// }
// kePasteContainer.innerHTML = html;
// $("#ke_paste").hide();
//
// var imglist = $("#ke_paste").find("img");
//
// if (imglist.length > 0){
// df(self);
// }
self.insertHtml(html, true);
df(self);
} }
K(doc.body).bind('paste', function(e){ K(doc.body).bind('paste', function(e){
if (self.pasteType === 0) { if (self.pasteType === 0) {

@ -1,8 +1,8 @@
// Generated by CoffeeScript 1.9.0 // Generated by CoffeeScript 1.9.0
/* /*
paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks. paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks.
https://github.com/layerssss/paste.js https://github.com/layerssss/paste.js
*/ */
(function() { (function() {
@ -279,7 +279,7 @@ https://github.com/layerssss/paste.js
} }
//firefox问题处理因为采用了 pastableContenteditable 模式,故只需要删除默认的粘贴 //firefox问题处理因为采用了 pastableContenteditable 模式,故只需要删除默认的粘贴
if ($(img).attr('src').startsWith('data:image/')) { if ($(img).attr('src').startsWith('data:image/')) {
_results.push($(img).remove()); _results.push($(img).remove());
}; };
} }
return _results; return _results;
@ -307,23 +307,23 @@ function enablePasteImg(_editor) {
$(nodeBody).pastableContenteditable(); $(nodeBody).pastableContenteditable();
dataURItoBlob = function(dataURI) { dataURItoBlob = function(dataURI) {
// convert base64/URLEncoded data component to raw binary data held in a string // convert base64/URLEncoded data component to raw binary data held in a string
var byteString; var byteString;
if (dataURI.split(',')[0].indexOf('base64') >= 0) if (dataURI.split(',')[0].indexOf('base64') >= 0)
byteString = atob(dataURI.split(',')[1]); byteString = atob(dataURI.split(',')[1]);
else else
byteString = unescape(dataURI.split(',')[1]); byteString = unescape(dataURI.split(',')[1]);
// separate out the mime component // separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
// write the bytes of the string to a typed array // write the bytes of the string to a typed array
var ia = new Uint8Array(byteString.length); var ia = new Uint8Array(byteString.length);
for (var i = 0; i < byteString.length; i++) { for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i); ia[i] = byteString.charCodeAt(i);
} }
return new Blob([ia], {type:mimeString}); return new Blob([ia], {type:mimeString});
}; };
$(nodeBody).on('pasteImage', function(ev, data) { $(nodeBody).on('pasteImage', function(ev, data) {
@ -337,18 +337,103 @@ function enablePasteImg(_editor) {
data.append("imgFile",blob, "imageFilename.png"); data.append("imgFile",blob, "imageFilename.png");
console.log(data); console.log(data);
$.ajax({ $.ajax({
url: '/kindeditor/upload?dir=image', url: '/kindeditor/upload?dir=image',
contentType: false, contentType: false,
type: 'POST', type: 'POST',
data: data, data: data,
processData: false, processData: false,
success: function(data) { success: function(data) {
console.log(data); console.log(data);
editor.exec('insertimage', JSON.parse(data).url); editor.exec('insertimage', JSON.parse(data).url);
} }
}); });
} }
}); });
return; return;
}; };
//复制粘贴时把远程图片上传到服务器
function df(myself) {
// var img = $("#ke_paste").find("img");
var currele = document.activeElement;
var img = $(currele).contents().find("img");
var piccount = 0;
var sstr = "";
$(img).each(function (i) {
var that = $(this);
if(that.attr("src")) {
if (that.attr("src").indexOf("http://") >= 0 || that.attr("src").indexOf("https://") >= 0) {
piccount++;
if (i == $(img).length - 1)
sstr += that.attr("src");
else
sstr += that.attr("src") + "|";
}
}
});
uploadpic(sstr,myself);
}
function keShadow(myself)
{
var keShadowContainer = document.getElementById("ke_shadow");
if (keShadowContainer == null) {
keShadowContainer = document.createElement("div");
keShadowContainer.id = "ke_shadow";
keShadowContainer.innerHTML = "<div class='ui-widget-overlay' z-index: 1001;'></div>";
$("#ajax-modal").after(keShadowContainer);
}
var tWidth = document.body.scrollWidth;
var tHeight = document.body.scrollHeight;
$(".ui-widget-overlay").css("width", tWidth);
$(".ui-widget-overlay").css("height", tHeight);
$("#ke_shadow").show();
myself.readonly();
}
function uploadpic(piclist,myself) {
if (piclist.length == 0) return false;
$.ajax({
url: "/kindeditor/uploadpic",
data:{"pic":piclist},
type: "GET",
beforeSend: function () {
// $("#ajax-indicator span").text("图片上传中请稍等...");
keShadow(myself);
},
success: function (msg) {
if (msg !== "") {
var str = new Array();
str = msg.split('|');
var currele = document.activeElement;
var img = $(currele).contents().find("img");
var tIndex = 0;
$(img).each(function (i) {
var that = $(this);
if(that.attr("src")){
if (that.attr("src").indexOf("http://") >= 0 || that.attr("src").indexOf("https://") >= 0) {
that.attr("src", str[tIndex]);
that.attr("data-ke-src", str[tIndex]);
that.removeAttr("class");
that.parent().removeAttr("class");
that.parent().removeAttr("href");
that.parent().removeAttr("data-ke-src");
tIndex = tIndex + 1;
}
}
});
}
// $("#ajax-indicator span").text("载入中...");
$("#ke_shadow").hide();
myself.readonly(false);
}
}).fail(function(xhr, status){
// $("#ajax-indicator span").text("载入中...");
$("#ke_shadow").hide();
myself.readonly(false);
return;
});
}

@ -1,7 +1,7 @@
.ke-content { .ke-content {
font-size: 12px; font-size: 12px;
font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: ΢ÈíÑźÚ, ËÎÌå; font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: ΢<EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
font-family:Tahoma; font-family:Tahoma;
} }
.ke-content pre { .ke-content pre {
font-size:9pt; font-size:9pt;
@ -48,4 +48,8 @@
.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;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
span.at {color:#269ac9;} span.at {color:#269ac9;}
span.at a{color:#269ac9;text-decoration: none;} span.at a{color:#269ac9;text-decoration: none;}
/*yk*/
.ke-content ol li{list-style-type: decimal;margin-left: 20px;}
.ke-content ul li{list-style-type: disc;margin-left: 20px;}

@ -353,3 +353,4 @@ KindEditor.plugin('paste', function(K) {
return; return;
}); });

@ -283,7 +283,7 @@ KindEditor.plugin('table', function(K) {
for (var i = 0; i < rows; i++) { for (var i = 0; i < rows; i++) {
html += '<tr>'; html += '<tr>';
for (var j = 0; j < cols; j++) { for (var j = 0; j < cols; j++) {
html += '<td style="border:solid windowtext 1.0px; text-overflow:inherit;overflow: hidden;white-space: nowrap" >' + (K.IE ? '&nbsp;' : '<br />') + '</td>'; html += '<td style="text-overflow:inherit;overflow: hidden;white-space: nowrap" >' + (K.IE ? '&nbsp;' : '<br />') + '</td>';
} }
html += '</tr>'; html += '</tr>';
} }

@ -3,7 +3,7 @@
<div class="post-container"> <div class="post-container">
<div class="post-wrapper"> <div class="post-wrapper">
<div class="post-main"> <div class="post-main">
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span></div> <div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span><span ng-if="discussion.locked" class="locked_btn_cir ml10" title="已锁定">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
<table class="post-detail-info"><tr> <table class="post-detail-info"><tr>
<td class="text-nowrap v-top">发布者:</td> <td class="text-nowrap v-top">发布者:</td>
<td>{{discussion.user.realname}}</td> <td>{{discussion.user.realname}}</td>
@ -38,7 +38,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="post-input-wrap"> <div ng-if="!discussion.locked" class="post-input-wrap">
<div class="post-reply-row"> <div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>--> <!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container"> <div class="post-input-container">

@ -3,7 +3,7 @@
<div class="post-container"> <div class="post-container">
<div class="post-wrapper"> <div class="post-wrapper">
<div class="post-main"> <div class="post-main">
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span></div> <div class="post-title mb5"><span class="c-grey3 f15 fb">{{discussion.subject}}</span><span ng-if="discussion.locked" class="locked_btn_cir ml10" title="已锁定">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
<table class="post-detail-info"><tr> <table class="post-detail-info"><tr>
<td class="text-nowrap v-top">发布者:</td> <td class="text-nowrap v-top">发布者:</td>
<td>{{discussion.user.realname}}</td> <td>{{discussion.user.realname}}</td>
@ -38,7 +38,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="post-input-wrap"> <div ng-if="!discussion.locked" class="post-input-wrap">
<div class="post-reply-row"> <div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>--> <!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container"> <div class="post-input-container">

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -1039,15 +1039,18 @@ function showNormalImage(id) {
var image=$(description_images[i]); var image=$(description_images[i]);
var _path = getRootPath(); var _path = getRootPath();
//如果图片是视频图片,不处理。 //如果图片是视频图片,不处理。
if($(image).hasClass("mediaIco")){ if($(image).hasClass("mediaIco")){
var _src = _path+"/"+$(image).attr('src'); var _src = _path+"/"+$(image).attr('src');
$(image).attr('src',_src); $(image).attr('src',_src);
return; return;
} }
var tmpsrc = image.attr('src');
var element=$("<a></a>").attr("href",image.attr('src')); if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
image.wrap(element); var element = $("<a></a>").attr("href", image.attr('src'));
$(image).parent().colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); image.wrap(element);
$(image).parent().colorbox({rel: 'nofollow', close: "关闭", returnFocus: false});
}
} }
//$('#'+id+' a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); //有图片才将链接变为弹出框 //$('#'+id+' a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); //有图片才将链接变为弹出框
} }

@ -31,7 +31,7 @@ function sd_create_editor(params){
//params.toolbar_container.hide(); //params.toolbar_container.hide();
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
if(this.isEmpty()) { if(this.isEmpty()) {
this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>"); this.edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
} }
//params.toolbar_container.hide(); //params.toolbar_container.hide();
$('#reply_image_' + id).addClass('imageFuzzy'); $('#reply_image_' + id).addClass('imageFuzzy');
@ -78,7 +78,7 @@ function sd_create_editor(params){
//reset height //reset height
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight; paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight); edit.iframe.height(paramsHeight);
edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>"); edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight) this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
// params.toolbar_container.hide(); // params.toolbar_container.hide();
if(typeof enableAt === 'function'){ if(typeof enableAt === 'function'){

@ -49,9 +49,6 @@ function nh_check_field(params){
if(params.content.isEmpty()){ if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空'); params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'}); params.contentmsg.css({color:'#ff0000'});
params.submit_btn.one('click', function(){
params.form.submit();
});
}else{ }else{
params.contentmsg.html('填写正确'); params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'}); params.contentmsg.css({color:'#008000'});
@ -71,9 +68,7 @@ function init_form(params){
issubmit:true, issubmit:true,
content:params.editor, content:params.editor,
contentmsg:params.contentmsg, contentmsg:params.contentmsg,
textarea:params.textarea, textarea:params.textarea
submit_btn:params.submit_btn,
form:params.form
}); });
if(is_checked){ if(is_checked){
if(flag){ if(flag){
@ -120,7 +115,7 @@ function init_KindEditor_data(id){
params.cancel_btn.click(function () { params.cancel_btn.click(function () {
nh_reset_form(params); nh_reset_form(params);
}); });
params.submit_btn.one('click', function () { params.submit_btn.click(function () {
params.form.submit(); params.form.submit();
}); });
params.textarea.data('init', 1); params.textarea.data('init', 1);

@ -74,4 +74,38 @@ function search_tag_attachment(url,tag_name,q,course_id,sort)
); );
} }
}
// 教师选项
var sendType = '1';
var lastSendType ;//初始为发送到我的课程
function chooseTeacherType(org_id){
sendType = $("#teacher_type_select").val();
if (sendType === lastSendType) {
alert("666");
return;
} else if(lastSendType != null) { //不是第一次点击的时候
if (sendType == '1') {
alert("te");
$.ajax({
type: 'get',
url: '/organizations/' + org_id + '/teachers',
data:{type:"teachers"}
});
} else if(sendType == '2') {
alert(org_id);
$.ajax({
type: 'get',
url: '/organizations/' + org_id + '/teachers',
data:{type:"students"}
});
}else if(sendType == '3'){
$.ajax({
type: 'get',
url: '/organizations/' + org_id + '/teachers',
data:{type:"resources"}
});
}
}
lastSendType = sendType;
} }

@ -1,354 +1,354 @@
/* /*
# Code Review plugin for Redmine # Code Review plugin for Redmine
# Copyright (C) 2009-2013 Haruyuki Iida # Copyright (C) 2009-2013 Haruyuki Iida
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
var topZindex = 1000; var topZindex = 1000;
var action_type = ''; var action_type = '';
var rev = ''; var rev = '';
var rev_to = ''; var rev_to = '';
var path = ''; var path = '';
var urlprefix = ''; var urlprefix = '';
var review_form_dialog = null; var review_form_dialog = null;
var add_form_title = null; var add_form_title = null;
var review_dialog_title = null; var review_dialog_title = null;
var repository_id = null; var repository_id = null;
var filenames = []; var filenames = [];
var ReviewCount = function(total, open, progress){ var ReviewCount = function(total, open, progress){
this.total = total; this.total = total;
this.open = open; this.open = open;
this.closed = total - open; this.closed = total - open;
this.progress = progress this.progress = progress
}; };
var CodeReview = function(id) { var CodeReview = function(id) {
this.id = id; this.id = id;
this.path = ''; this.path = '';
this.line = 0; this.line = 0;
this.url = ''; this.url = '';
this.is_closed = false; this.is_closed = false;
}; };
var review_counts = new Array(); var review_counts = new Array();
var code_reviews_map = new Array(); var code_reviews_map = new Array();
var code_reviews_dialog_map = new Array(); var code_reviews_dialog_map = new Array();
function UpdateRepositoryView(title) { function UpdateRepositoryView(title) {
var header = $("table.changesets thead tr:first"); var header = $("table.changesets thead tr:first");
var th = $('<th></th>'); var th = $('<th></th>');
th.html(title); th.html(title);
header.append(th); header.append(th);
$('tr.changeset td.id a').each(function(i){ $('tr.changeset td.id a').each(function(i){
var revision = this.getAttribute("href"); var revision = this.getAttribute("href");
revision = revision.substr(revision.lastIndexOf("/") + 1); revision = revision.substr(revision.lastIndexOf("/") + 1);
var review = review_counts['revision_' + revision]; var review = review_counts['revision_' + revision];
var td = $('<td/>',{ var td = $('<td/>',{
'class':'progress' 'class':'progress'
}); });
td.html(review.progress); td.html(review.progress);
$(this.parentNode.parentNode).append(td); $(this.parentNode.parentNode).append(td);
}); });
} }
//add function $.down //add function $.down
if(! $.fn.down) if(! $.fn.down)
(function($) { (function($) {
$.fn.down = function() { $.fn.down = function() {
var el = this[0] && this[0].firstChild; var el = this[0] && this[0].firstChild;
while (el && el.nodeType != 1) while (el && el.nodeType != 1)
el = el.nextSibling; el = el.nextSibling;
return $(el); return $(el);
}; };
})(jQuery); })(jQuery);
function UpdateRevisionView() { function UpdateRevisionView() {
$('li.change').each(function(){ $('li.change').each(function(){
var li = $(this); var li = $(this);
if (li.hasClass('folder')) return; if (li.hasClass('folder')) return;
var a = li.down('a'); var a = li.down('a');
if (a.size() == 0) return; if (a.size() == 0) return;
var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, ''); var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, '');
var reviewlist = code_reviews_map[path]; var reviewlist = code_reviews_map[path];
if (reviewlist == null) return; if (reviewlist == null) return;
var ul = $('<ul></ul>'); var ul = $('<ul></ul>');
for (var j = 0; j < reviewlist.length; j++) { for (var j = 0; j < reviewlist.length; j++) {
var review = reviewlist[j]; var review = reviewlist[j];
var icon = review.is_closed? 'icon-closed-review': 'icon-review'; var icon = review.is_closed? 'icon-closed-review': 'icon-review';
var item = $('<li></li>', { var item = $('<li></li>', {
'class': 'icon ' + icon + ' code_review_summary' 'class': 'icon ' + icon + ' code_review_summary'
}); });
item.html(review.url); item.html(review.url);
ul.append(item); ul.append(item);
} }
li.append(ul); li.append(ul);
}); });
} }
function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){ function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){
var filetables = []; var filetables = [];
var j = 0; var j = 0;
$('table').each(function(){ $('table').each(function(){
if($(this).hasClass('filecontent')){ if($(this).hasClass('filecontent')){
filetables[j++] = this; filetables[j++] = this;
} }
}); });
j = 0; j = 0;
$('table.filecontent th.filename').each(function(){ $('table.filecontent th.filename').each(function(){
filenames[j] = $.trim($(this).text()); filenames[j] = $.trim($(this).text());
j++; j++;
}); });
addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type + addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type +
'&rev=' + rev + '&rev_to=' + rev_to + '&rev=' + rev + '&rev_to=' + rev_to +
'&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id); '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id);
if (path != null && path.length > 0) { if (path != null && path.length > 0) {
addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path); addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path);
} }
var num = 0; var num = 0;
if (is_diff) { if (is_diff) {
num = 1; num = 1;
} }
var i, l, tl; var i, l, tl;
for (i = 0, tl = filetables.length; i < tl; i++) { for (i = 0, tl = filetables.length; i < tl; i++) {
var table = filetables[i]; var table = filetables[i];
var trs = table.getElementsByTagName('tr'); var trs = table.getElementsByTagName('tr');
for (j = 0,l = trs.length; j < l; j++) { for (j = 0,l = trs.length; j < l; j++) {
var tr = trs[j]; var tr = trs[j];
var ths = tr.getElementsByTagName('th'); var ths = tr.getElementsByTagName('th');
var th = ths[num]; var th = ths[num];
if (th == null) { if (th == null) {
continue; continue;
} }
var th_html = th.innerHTML; var th_html = th.innerHTML;
var line = th_html.match(/[0-9]+/); var line = th_html.match(/[0-9]+/);
if (line == null) { if (line == null) {
continue; continue;
} }
var span_html = '<span white-space="nowrap" id="review_span_' + line + '_' + i + '">'; var span_html = '<span white-space="nowrap" id="review_span_' + line + '_' + i + '">';
if (!is_readonly) { if (!is_readonly) {
span_html += image_tag; span_html += image_tag;
} }
span_html += '</span>'; span_html += '</span>';
th.innerHTML = th_html + span_html; th.innerHTML = th_html + span_html;
var img = th.getElementsByTagName('img')[0]; var img = th.getElementsByTagName('img')[0];
if (img != null ) { if (img != null ) {
img.id = 'add_revew_img_' + line + '_' + i; img.id = 'add_revew_img_' + line + '_' + i;
$(img).click(clickPencil); $(img).click(clickPencil);
} }
} }
} }
} }
function clickPencil(e) function clickPencil(e)
{ {
// alert('$(e.target).attr("id") = ' + $(e.target).attr("id")); // alert('$(e.target).attr("id") = ' + $(e.target).attr("id"));
var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/); var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/);
var line = result[1]; var line = result[1];
var file_count = eval(result[2]); var file_count = eval(result[2]);
var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count; var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count;
if (path == null || path.length == 0) { if (path == null || path.length == 0) {
url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true'; url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true';
} }
addReview(url); addReview(url);
formPopup(e.pageX, e.pageY); formPopup(e.pageX, e.pageY);
e.preventDefault(); e.preventDefault();
} }
var addReviewUrl = null; var addReviewUrl = null;
var showReviewUrl = null; var showReviewUrl = null;
var showReviewImageTag = null; var showReviewImageTag = null;
var showClosedReviewImageTag = null; var showClosedReviewImageTag = null;
function setShowReviewButton(line, review_id, is_closed, file_count) { function setShowReviewButton(line, review_id, is_closed, file_count) {
//alert('file_count = ' + file_count); //alert('file_count = ' + file_count);
var span = $('#review_span_' + line + '_' + file_count); var span = $('#review_span_' + line + '_' + file_count);
if (span.size() == 0) { if (span.size() == 0) {
return; return;
} }
var innerSpan = $('<span></span>',{id: 'review_' + review_id}); var innerSpan = $('<span></span>',{id: 'review_' + review_id});
span.append(innerSpan); span.append(innerSpan);
innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag); innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag);
var div = $('<div></div>', { var div = $('<div></div>', {
'class':'draggable', 'class':'draggable',
id: 'show_review_' + review_id id: 'show_review_' + review_id
}); });
$('#code_review').append(div); $('#code_review').append(div);
innerSpan.down('img').click(function(e) { innerSpan.down('img').click(function(e) {
var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0]; var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0];
var span = $('#review_' + review_id); // span element of view review button var span = $('#review_' + review_id); // span element of view review button
var pos = span.offset(); var pos = span.offset();
showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25); showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25);
}); });
} }
function popupReview(review_id) { function popupReview(review_id) {
var span = $('#review_' + review_id); // span element of view review button var span = $('#review_' + review_id); // span element of view review button
var pos = span.offset(); var pos = span.offset();
$('html,body').animate({ scrollTop: pos.top }, $('html,body').animate({ scrollTop: pos.top },
{duration: 'fast', {duration: 'fast',
complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}}); complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}});
// position and show popup dialog // position and show popup dialog
// create popup dialog // create popup dialog
//var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top); //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top);
// win.toFront(); // win.toFront();
} }
function showReview(url, review_id, x, y) { function showReview(url, review_id, x, y) {
if (code_reviews_dialog_map[review_id] != null) { if (code_reviews_dialog_map[review_id] != null) {
var cur_win = code_reviews_dialog_map[review_id]; var cur_win = code_reviews_dialog_map[review_id];
cur_win.hide(); cur_win.hide();
code_reviews_dialog_map[review_id] = null; code_reviews_dialog_map[review_id] = null;
} }
$('#show_review_' + review_id).load(url, {review_id: review_id}); $('#show_review_' + review_id).load(url, {review_id: review_id});
var review = getReviewObjById(review_id); var review = getReviewObjById(review_id);
var win = $('#show_review_' + review_id).dialog({ var win = $('#show_review_' + review_id).dialog({
show: {effect:'scale'},// ? 'top-left' show: {effect:'scale'},// ? 'top-left'
//position: [x, y + 5], //position: [x, y + 5],
width:640, width:640,
zIndex: topZindex, zIndex: topZindex,
title: review_dialog_title title: review_dialog_title
}); });
// win.getContent().style.color = "#484848"; // win.getContent().style.color = "#484848";
// win.getContent().style.background = "#ffffff"; // win.getContent().style.background = "#ffffff";
topZindex++; topZindex++;
code_reviews_dialog_map[review_id] = win; code_reviews_dialog_map[review_id] = win;
return win return win
} }
function getReviewObjById(review_id) { function getReviewObjById(review_id) {
for (var reviewlist in code_reviews_map) { for (var reviewlist in code_reviews_map) {
for (var i = 0; i < reviewlist.length; i++) { for (var i = 0; i < reviewlist.length; i++) {
var review = reviewlist[i]; var review = reviewlist[i];
if (review.id == review_id) { if (review.id == review_id) {
return review; return review;
} }
} }
} }
return null; return null;
} }
function formPopup(x, y){ function formPopup(x, y){
//@see http://docs.jquery.com/UI/Effects/Scale //@see http://docs.jquery.com/UI/Effects/Scale
var win = $('#review-form-frame').dialog({ var win = $('#review-form-frame').dialog({
show: {effect:'scale', direction: 'both'},// ? 'top-left' show: {effect:'scale', direction: 'both'},// ? 'top-left'
// position: [x, y + 5], // position: [x, y + 5],
width:640, width:640,
zIndex: topZindex, zIndex: topZindex,
title: add_form_title title: add_form_title
}); });
// win.getContent().style.background = "#ffffff"; // win.getContent().style.background = "#ffffff";
if (review_form_dialog != null) { if (review_form_dialog != null) {
review_form_dialog.destroy(); review_form_dialog.destroy();
review_form_dialog = null; review_form_dialog = null;
} }
review_form_dialog = win; review_form_dialog = win;
topZindex += 10; topZindex += 10;
return false; return false;
} }
function hideForm() { function hideForm() {
if (review_form_dialog == null) { if (review_form_dialog == null) {
return; return;
} }
review_form_dialog.dialog('close'); review_form_dialog.dialog('close');
review_form_dialog = null; review_form_dialog = null;
$('#review-form').html(''); $('#review-form').html('');
} }
function addReview(url) { function addReview(url) {
$('#review-form').load(url); $('#review-form').load(url);
} }
function deleteReview(review_id) { function deleteReview(review_id) {
$('show_review_' + review_id).remove(); $('show_review_' + review_id).remove();
$('review_' + review_id).remove(); $('review_' + review_id).remove();
} }
function changeImage(review_id, is_closed) { function changeImage(review_id, is_closed) {
var span = $('review_' + review_id); var span = $('review_' + review_id);
var new_image = null; var new_image = null;
var dummy = new Element('span'); var dummy = new Element('span');
if (is_closed) { if (is_closed) {
dummy.insert(showClosedReviewImageTag); dummy.insert(showClosedReviewImageTag);
} }
else { else {
dummy.insert(showReviewImageTag); dummy.insert(showReviewImageTag);
} }
new_image = dummy.down().getAttribute('src'); new_image = dummy.down().getAttribute('src');
//alert(new_image); //alert(new_image);
span.down('img').setAttribute('src', new_image); span.down('img').setAttribute('src', new_image);
} }
function make_addreview_link(project, link) { function make_addreview_link(project, link) {
var alist = $('#content p a'); var alist = $('#content p a');
if (alist == null) { if (alist == null) {
return; return;
} }
var a = alist[0]; var a = alist[0];
var p = a.parentNode; var p = a.parentNode;
p.innerHTML = p.innerHTML + " | " + link; p.innerHTML = p.innerHTML + " | " + link;
} }
function call_update_revisions(url) { function call_update_revisions(url) {
var changeset_ids = ''; var changeset_ids = '';
var links = $$('table.changesets tbody tr.changeset td.id a'); var links = $$('table.changesets tbody tr.changeset td.id a');
for (var i = 0; i < links.length; i++) { for (var i = 0; i < links.length; i++) {
var link = links[i]; var link = links[i];
var href = link.getAttribute('href'); var href = link.getAttribute('href');
var id = href.replace(/^.*\/revisions\//, ''); var id = href.replace(/^.*\/revisions\//, '');
if (i > 0) { if (i > 0) {
changeset_ids += ','; changeset_ids += ',';
} }
changeset_ids += id; changeset_ids += id;
} }
new Ajax.Updater('code_review_revisions', url, new Ajax.Updater('code_review_revisions', url,
{ {
evalScripts:true, evalScripts:true,
method:'get', method:'get',
parameters: 'changeset_ids=' + encodeURI(changeset_ids) parameters: 'changeset_ids=' + encodeURI(changeset_ids)
}); });
} }
$.fn.serialize2json = function() $.fn.serialize2json = function()
{ {
var o = {}; var o = {};
var a = this.serializeArray(); var a = this.serializeArray();
$.each(a, function() { $.each(a, function() {
if (o[this.name]) { if (o[this.name]) {
if (!o[this.name].push) { if (!o[this.name].push) {
o[this.name] = [o[this.name]]; o[this.name] = [o[this.name]];
} }
o[this.name].push(this.value || ''); o[this.name].push(this.value || '');
} else { } else {
o[this.name] = this.value || ''; o[this.name] = this.value || '';
} }
}); });
return o; return o;
}; };

@ -1,4 +1,4 @@
dt.code_review { dt.code_review {
background-image: url(../images/review.png); background-image: url(../images/review.png);
} }

@ -1,97 +1,97 @@
/* /*
# Code Review plugin for Redmine # Code Review plugin for Redmine
# Copyright (C) 2009 Haruyuki Iida # Copyright (C) 2009 Haruyuki Iida
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#review-form-frame { #review-form-frame {
height: 100%; height: 100%;
} }
.autoscroll table.filecontent th.line-num { .autoscroll table.filecontent th.line-num {
white-space: nowrap; white-space: nowrap;
vertical-align: bottom; vertical-align: bottom;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
text-align:left; text-align:left;
} }
table.filecontent th.line-num img{ table.filecontent th.line-num img{
padding: 0; padding: 0;
margin: 0; margin: 0;
cursor: pointer; cursor: pointer;
} }
.code-review-form-title { .code-review-form-title {
background-color: #002059; background-color: #002059;
color: white; color: white;
padding-left: 2px; padding-left: 2px;
padding-right: 2px; padding-right: 2px;
cursor: default; cursor: default;
} }
.code_review_viewer { .code_review_viewer {
min-width: 300px; min-width: 300px;
/* /*
max-width: 60%; max-width: 60%;
*/ */
/* max-height: 400px; */ /* max-height: 400px; */
} }
.code_review_viewer .issue{ .code_review_viewer .issue{
} }
.code_review_body { .code_review_body {
background-color: white; background-color: white;
padding:2px; padding:2px;
} }
#code_review_list table.list td { #code_review_list table.list td {
text-align: center; text-align: center;
} }
#code_review_list table.list td.path { #code_review_list table.list td.path {
text-align: left; text-align: left;
} }
#code_review_list table.list td.subject { #code_review_list table.list td.subject {
text-align: left; text-align: left;
} }
.icon-review { .icon-review {
background-image: url(../images/review.png); background-image: url(../images/review.png);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.icon-closed-review { .icon-closed-review {
background-image: url(../images/closed_review.png); background-image: url(../images/closed_review.png);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.icon-settings { .icon-settings {
background-image: url(../../../images/changeset.png); background-image: url(../../../images/changeset.png);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
li.code_review_summary { li.code_review_summary {
list-style-type: none; list-style-type: none;
} }

@ -1,19 +1,19 @@
Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -1,119 +1,119 @@
.overlay_alert { .overlay_alert {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.alert_nw { .alert_nw {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/top_left.gif) no-repeat bottom left; background: transparent url(alert/top_left.gif) no-repeat bottom left;
} }
.alert_n { .alert_n {
height: 5px; height: 5px;
background: transparent url(alert/top.gif) repeat-x bottom left; background: transparent url(alert/top.gif) repeat-x bottom left;
} }
.alert_ne { .alert_ne {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/top_right.gif) no-repeat bottom left background: transparent url(alert/top_right.gif) no-repeat bottom left
} }
.alert_e { .alert_e {
width: 5px; width: 5px;
background: transparent url(alert/right.gif) repeat-y 0 0; background: transparent url(alert/right.gif) repeat-y 0 0;
} }
.alert_w { .alert_w {
width: 5px; width: 5px;
background: transparent url(alert/left.gif) repeat-y 0 0; background: transparent url(alert/left.gif) repeat-y 0 0;
} }
.alert_sw { .alert_sw {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/bottom_left.gif) no-repeat 0 0; background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
} }
.alert_s { .alert_s {
height: 5px; height: 5px;
background: transparent url(alert/bottom.gif) repeat-x 0 0; background: transparent url(alert/bottom.gif) repeat-x 0 0;
} }
.alert_se, .alert_sizer { .alert_se, .alert_sizer {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/bottom_right.gif) no-repeat 0 0; background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
} }
.alert_close { .alert_close {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_minimize { .alert_minimize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_maximize { .alert_maximize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_title { .alert_title {
float:left; float:left;
height:1px; height:1px;
width:100%; width:100%;
} }
.alert_content { .alert_content {
overflow:visible; overflow:visible;
color: #000; color: #000;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font: 12px arial; font: 12px arial;
background: #FFF; background: #FFF;
} }
/* For alert/confirm dialog */ /* For alert/confirm dialog */
.alert_window { .alert_window {
background: #FFF; background: #FFF;
padding:20px; padding:20px;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
width:400px; width:400px;
} }
.alert_message { .alert_message {
font: 12px arial; font: 12px arial;
width:100%; width:100%;
color:#F00; color:#F00;
padding-bottom:10px; padding-bottom:10px;
} }
.alert_buttons { .alert_buttons {
text-align:center; text-align:center;
width:100%; width:100%;
} }
.alert_buttons input { .alert_buttons input {
width:20%; width:20%;
margin:10px; margin:10px;
} }
.alert_progress { .alert_progress {
float:left; float:left;
margin:auto; margin:auto;
text-align:center; text-align:center;
width:100%; width:100%;
height:16px; height:16px;
background: #FFF url('alert/progress.gif') no-repeat center center background: #FFF url('alert/progress.gif') no-repeat center center
} }

@ -1,88 +1,88 @@
.overlay_alert_lite { .overlay_alert_lite {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.alert_lite_sizer { .alert_lite_sizer {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_close { .alert_lite_close {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_minimize { .alert_lite_minimize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_maximize { .alert_lite_maximize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_title { .alert_lite_title {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_content { .alert_lite_content {
overflow:auto; overflow:auto;
color: #000; color: #000;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background: #FFF; background: #FFF;
} }
/* For alert/confirm dialog */ /* For alert/confirm dialog */
.alert_lite_window { .alert_lite_window {
border:1px solid #F00; border:1px solid #F00;
background: #FFF; background: #FFF;
padding:20px; padding:20px;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
width:400px; width:400px;
} }
.alert_lite_message { .alert_lite_message {
font-size:16px; font-size:16px;
text-align:center; text-align:center;
width:100%; width:100%;
color:#F00; color:#F00;
padding-bottom:10px; padding-bottom:10px;
} }
.alert_lite_buttons { .alert_lite_buttons {
text-align:center; text-align:center;
width:100%; width:100%;
} }
.alert_lite_buttons input { .alert_lite_buttons input {
width:20%; width:20%;
margin:10px; margin:10px;
} }
.alert_lite_progress { .alert_lite_progress {
float:left; float:left;
margin:auto; margin:auto;
text-align:center; text-align:center;
width:100%; width:100%;
height:16px; height:16px;
background: #FFF url('alert/progress.gif') no-repeat center center background: #FFF url('alert/progress.gif') no-repeat center center
} }
table.alert_lite_header { table.alert_lite_header {
border:1px solid #F00; border:1px solid #F00;
background:#FFF background:#FFF
} }

@ -1,150 +1,150 @@
.overlay_alphacube { .overlay_alphacube {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.alphacube_nw { .alphacube_nw {
background: transparent url(alphacube/left-top.gif) no-repeat 0 0; background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.alphacube_n { .alphacube_n {
background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
height:25px; height:25px;
} }
.alphacube_ne { .alphacube_ne {
background: transparent url(alphacube/right-top.gif) no-repeat 0 0; background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.alphacube_w { .alphacube_w {
background: transparent url(alphacube/frame-left.gif) repeat-y top left; background: transparent url(alphacube/frame-left.gif) repeat-y top left;
width:7px; width:7px;
} }
.alphacube_e { .alphacube_e {
background: transparent url(alphacube/frame-right.gif) repeat-y top right; background: transparent url(alphacube/frame-right.gif) repeat-y top right;
width:7px; width:7px;
} }
.alphacube_sw { .alphacube_sw {
background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.alphacube_s { .alphacube_s {
background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
height:7px; height:7px;
} }
.alphacube_se, .alphacube_sizer { .alphacube_se, .alphacube_sizer {
background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.alphacube_sizer { .alphacube_sizer {
cursor:se-resize; cursor:se-resize;
} }
.alphacube_close { .alphacube_close {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:11px; right:11px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.alphacube_minimize { .alphacube_minimize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:55px; right:55px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.alphacube_maximize { .alphacube_maximize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:33px; right:33px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.alphacube_title { .alphacube_title {
float:left; float:left;
height:14px; height:14px;
font-size:14px; font-size:14px;
text-align:center; text-align:center;
margin-top:2px; margin-top:2px;
width:100%; width:100%;
color:#123456; color:#123456;
} }
.alphacube_content { .alphacube_content {
overflow:auto; overflow:auto;
color: #000; color: #000;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font: 12px arial; font: 12px arial;
background:#FDFDFD; background:#FDFDFD;
} }
/* For alert/confirm dialog */ /* For alert/confirm dialog */
.alphacube_window { .alphacube_window {
border:1px solid #F00; border:1px solid #F00;
background: #FFF; background: #FFF;
padding:20px; padding:20px;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
width:400px; width:400px;
} }
.alphacube_message { .alphacube_message {
font: 12px arial; font: 12px arial;
text-align:center; text-align:center;
width:100%; width:100%;
padding-bottom:10px; padding-bottom:10px;
} }
.alphacube_buttons { .alphacube_buttons {
text-align:center; text-align:center;
width:100%; width:100%;
} }
.alphacube_buttons input { .alphacube_buttons input {
width:20%; width:20%;
margin:10px; margin:10px;
} }
.alphacube_progress { .alphacube_progress {
float:left; float:left;
margin:auto; margin:auto;
text-align:center; text-align:center;
width:100%; width:100%;
height:16px; height:16px;
background: #FFF url('alert/progress.gif') no-repeat center center background: #FFF url('alert/progress.gif') no-repeat center center
} }
.alphacube_wired_frame { .alphacube_wired_frame {
background: #FFF; background: #FFF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }

@ -1,51 +1,51 @@
<public:component> <public:component>
<public:attach event="onpropertychange" onevent="propertyChanged()" /> <public:attach event="onpropertychange" onevent="propertyChanged()" />
<script> <script>
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32"; var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
var realSrc; var realSrc;
var blankSrc = "blank.gif"; var blankSrc = "blank.gif";
if (supported) fixImage(); if (supported) fixImage();
function propertyChanged() { function propertyChanged() {
if (!supported) return; if (!supported) return;
var pName = event.propertyName; var pName = event.propertyName;
if (pName != "src") return; if (pName != "src") return;
// if not set to blank // if not set to blank
if ( ! new RegExp(blankSrc).test(src)) if ( ! new RegExp(blankSrc).test(src))
fixImage(); fixImage();
}; };
function fixImage() { function fixImage() {
// get src // get src
var src = element.src; var src = element.src;
// check for real change // check for real change
if (src == realSrc) { if (src == realSrc) {
element.src = blankSrc; element.src = blankSrc;
return; return;
} }
if ( ! new RegExp(blankSrc).test(src)) { if ( ! new RegExp(blankSrc).test(src)) {
// backup old src // backup old src
realSrc = src; realSrc = src;
} }
// test for png // test for png
if ( /\.png$/.test( realSrc.toLowerCase() ) ) { if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
// set blank image // set blank image
element.src = blankSrc; element.src = blankSrc;
// set filter // set filter
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
src + "',sizingMethod='scale')"; src + "',sizingMethod='scale')";
} }
else { else {
// remove filter // remove filter
element.runtimeStyle.filter = ""; element.runtimeStyle.filter = "";
} }
} }
</script> </script>
</public:component> </public:component>

@ -1,121 +1,121 @@
.overlay_darkX { .overlay_darkX {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.darkX_nw { .darkX_nw {
background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
width:6px; width:6px;
height:21px; height:21px;
} }
.darkX_n { .darkX_n {
background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
height:21px; height:21px;
} }
.darkX_ne { .darkX_ne {
background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
width:6px; width:6px;
height:21px; height:21px;
} }
.darkX_w { .darkX_w {
background: transparent url(darkX/frame-left-focused.png) repeat-y top left; background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
width:3px; width:3px;
} }
.darkX_e { .darkX_e {
background: transparent url(darkX/frame-right-focused.png) repeat-y top right; background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
width:3px; width:3px;
} }
.darkX_sw { .darkX_sw {
background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
width:5px; width:5px;
height:3px; height:3px;
} }
.darkX_s { .darkX_s {
background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
height:3px; height:3px;
} }
.darkX_se, .darkX_sizer { .darkX_se, .darkX_sizer {
background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
width:5px; width:5px;
height:3px; height:3px;
} }
.darkX_sizer { .darkX_sizer {
cursor:se-resize; cursor:se-resize;
} }
.darkX_close { .darkX_close {
width: 21px; width: 21px;
height: 21px; height: 21px;
background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:5px; right:5px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.darkX_minimize { .darkX_minimize {
width: 21px; width: 21px;
height: 21px; height: 21px;
background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:26px; right:26px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.darkX_maximize { .darkX_maximize {
width: 21px; width: 21px;
height: 21px; height: 21px;
background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:47px; right:47px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.darkX_title { .darkX_title {
float:left; float:left;
height:14px; height:14px;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:2px; margin-top:2px;
width:100%; width:100%;
color:#FFF; color:#FFF;
} }
.darkX_content { .darkX_content {
overflow:auto; overflow:auto;
color: #E6DF2A; color: #E6DF2A;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 14px; font-size: 14px;
background:#5E5148; background:#5E5148;
} }
/* FOR IE */ /* FOR IE */
* html .darkX_minimize { * html .darkX_minimize {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop");
} }
* html .darkX_maximize { * html .darkX_maximize {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale");
} }
* html .darkX_close { * html .darkX_close {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop");
} }

@ -1,25 +1,25 @@
div.inspector div.inspectable { div.inspector div.inspectable {
padding: 0.25em 0 0.25em 1em; padding: 0.25em 0 0.25em 1em;
background-color: Gray; background-color: Gray;
color: white; color: white;
border: outset 2px white; border: outset 2px white;
cursor: pointer; cursor: pointer;
} }
div.inspector div.child { div.inspector div.child {
margin: 0 0 0 1em; margin: 0 0 0 1em;
} }
#debug_window_content { /* DIV container for debug sizing*/ #debug_window_content { /* DIV container for debug sizing*/
width:250px; width:250px;
height:100px; height:100px;
background-color:#000; background-color:#000;
} }
#debug { /* DIV container for debug contents*/ #debug { /* DIV container for debug contents*/
padding:3px; padding:3px;
color:#0f0; color:#0f0;
font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size:10px; font-size:10px;
} }

@ -1,155 +1,155 @@
.overlay_dialog { .overlay_dialog {
background-color: #666666; background-color: #666666;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.overlay___invisible__ { .overlay___invisible__ {
background-color: #666666; background-color: #666666;
filter:alpha(opacity=0); filter:alpha(opacity=0);
-moz-opacity: 0; -moz-opacity: 0;
opacity: 0; opacity: 0;
} }
.dialog_nw { .dialog_nw {
width: 9px; width: 9px;
height: 23px; height: 23px;
background: transparent url(default/top_left.gif) no-repeat 0 0; background: transparent url(default/top_left.gif) no-repeat 0 0;
} }
.dialog_n { .dialog_n {
background: transparent url(default/top_mid.gif) repeat-x 0 0; background: transparent url(default/top_mid.gif) repeat-x 0 0;
height: 23px; height: 23px;
} }
.dialog_ne { .dialog_ne {
width: 9px; width: 9px;
height: 23px; height: 23px;
background: transparent url(default/top_right.gif) no-repeat 0 0; background: transparent url(default/top_right.gif) no-repeat 0 0;
} }
.dialog_e { .dialog_e {
width: 2px; width: 2px;
background: transparent url(default/center_right.gif) repeat-y 0 0; background: transparent url(default/center_right.gif) repeat-y 0 0;
} }
.dialog_w { .dialog_w {
width: 2px; width: 2px;
background: transparent url(default/center_left.gif) repeat-y 0 0; background: transparent url(default/center_left.gif) repeat-y 0 0;
} }
.dialog_sw { .dialog_sw {
width: 9px; width: 9px;
height: 19px; height: 19px;
background: transparent url(default/bottom_left.gif) no-repeat 0 0; background: transparent url(default/bottom_left.gif) no-repeat 0 0;
} }
.dialog_s { .dialog_s {
background: transparent url(default/bottom_mid.gif) repeat-x 0 0; background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
height: 19px; height: 19px;
} }
.dialog_se { .dialog_se {
width: 9px; width: 9px;
height: 19px; height: 19px;
background: transparent url(default/bottom_right.gif) no-repeat 0 0; background: transparent url(default/bottom_right.gif) no-repeat 0 0;
} }
.dialog_sizer { .dialog_sizer {
width: 9px; width: 9px;
height: 19px; height: 19px;
background: transparent url(default/sizer.gif) no-repeat 0 0; background: transparent url(default/sizer.gif) no-repeat 0 0;
cursor:se-resize; cursor:se-resize;
} }
.dialog_close { .dialog_close {
width: 14px; width: 14px;
height: 14px; height: 14px;
background: transparent url(default/close.gif) no-repeat 0 0; background: transparent url(default/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:5px; top:5px;
left:8px; left:8px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.dialog_minimize { .dialog_minimize {
width: 14px; width: 14px;
height: 15px; height: 15px;
background: transparent url(default/minimize.gif) no-repeat 0 0; background: transparent url(default/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:5px; top:5px;
left:28px; left:28px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.dialog_maximize { .dialog_maximize {
width: 14px; width: 14px;
height: 15px; height: 15px;
background: transparent url(default/maximize.gif) no-repeat 0 0; background: transparent url(default/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:5px; top:5px;
left:49px; left:49px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.dialog_title { .dialog_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
width:100%; width:100%;
color:#000; color:#000;
} }
.dialog_content { .dialog_content {
overflow:auto; overflow:auto;
color: #DDD; color: #DDD;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background-color:#123; background-color:#123;
} }
.top_draggable, .bottom_draggable { .top_draggable, .bottom_draggable {
cursor:move; cursor:move;
} }
.status_bar { .status_bar {
font-size:12px; font-size:12px;
} }
.status_bar input{ .status_bar input{
font-size:12px; font-size:12px;
} }
.wired_frame { .wired_frame {
display: block; display: block;
position: absolute; position: absolute;
border: 1px #000 dashed; border: 1px #000 dashed;
} }
/* DO NOT CHANGE THESE VALUES*/ /* DO NOT CHANGE THESE VALUES*/
.dialog { .dialog {
display: block; display: block;
position: absolute; position: absolute;
} }
.dialog table.table_window { .dialog table.table_window {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
width: 100%; width: 100%;
margin: 0px; margin: 0px;
padding:0px; padding:0px;
} }
.dialog table.table_window td , .dialog table.table_window th { .dialog table.table_window td , .dialog table.table_window th {
padding: 0; padding: 0;
} }
.dialog .title_window { .dialog .title_window {
-moz-user-select:none; -moz-user-select:none;
} }

@ -1,3 +1,3 @@
/* PNG fix for all themes that uses PNG images on IE */ /* PNG fix for all themes that uses PNG images on IE */
td, div { behavior: url(../themes/iefix/iepngfix.htc) } td, div { behavior: url(../themes/iefix/iepngfix.htc) }

@ -1,54 +1,54 @@
<public:component> <public:component>
<public:attach event="onpropertychange" onevent="doFix()" /> <public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript"> <script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4 // IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com // (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later. // This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/ // For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com) // Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com)
// To work only on background and to handle repeat bg // To work only on background and to handle repeat bg
// This must be a path to a blank image. That's all the configuration you need. // This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif'; if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader'; var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m) function filt(s, m)
{ {
if (filters[f]) if (filters[f])
{ {
filters[f].enabled = s ? true : false; filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m } if (s) with (filters[f]) { src = s; sizingMethod = m }
} }
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
} }
function doFix() function doFix()
{ {
// Assume IE7 is OK. // Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) || if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return; (event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage; var bgImg = currentStyle.backgroundImage || style.backgroundImage;
var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat; var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat;
if (bgImg && bgImg != 'none') if (bgImg && bgImg != 'none')
{ {
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{ {
var s = RegExp.$1; var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto') if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px'; style.width = offsetWidth + 'px';
style.backgroundImage = 'none'; style.backgroundImage = 'none';
filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale'); filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale');
} }
} }
} }
doFix(); doFix();
</script> </script>
</public:component> </public:component>

@ -1,67 +1,67 @@
<public:component> <public:component>
<public:attach event="onpropertychange" onevent="doFix()" /> <public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript"> <script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4 // IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com // (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later. // This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/ // For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image. That's all the configuration you need. // This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif'; if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader'; var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m) function filt(s, m)
{ {
if (filters[f]) if (filters[f])
{ {
filters[f].enabled = s ? true : false; filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m } if (s) with (filters[f]) { src = s; sizingMethod = m }
} }
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
} }
function doFix() function doFix()
{ {
alert('ok') alert('ok')
// Assume IE7 is OK. // Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) || if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return; (event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage; var bgImg = currentStyle.backgroundImage || style.backgroundImage;
if (tagName == 'IMG') if (tagName == 'IMG')
{ {
if ((/\.png$/i).test(src)) if ((/\.png$/i).test(src))
{ {
if (currentStyle.width == 'auto' && currentStyle.height == 'auto') if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px'; style.width = offsetWidth + 'px';
filt(src, 'scale'); filt(src, 'scale');
src = blankImg; src = blankImg;
} }
else if (src.indexOf(blankImg) < 0) filt(); else if (src.indexOf(blankImg) < 0) filt();
} }
else if (bgImg && bgImg != 'none') else if (bgImg && bgImg != 'none')
{ {
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{ {
var s = RegExp.$1; var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto') if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px'; style.width = offsetWidth + 'px';
style.backgroundImage = 'none'; style.backgroundImage = 'none';
filt(s, 'crop'); filt(s, 'crop');
// IE link fix. // IE link fix.
for (var n = 0; n < childNodes.length; n++) for (var n = 0; n < childNodes.length; n++)
if (childNodes[n].style) childNodes[n].style.position = 'relative'; if (childNodes[n].style) childNodes[n].style.position = 'relative';
} }
else filt(); else filt();
} }
} }
doFix(); doFix();

@ -1,333 +1,333 @@
/* Focused windows */ /* Focused windows */
.overlay_mac_os_x { .overlay_mac_os_x {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.mac_os_x_nw { .mac_os_x_nw {
background: transparent url(mac_os_x/TL_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/TL_Main.png) no-repeat 0 0;
width:24px; width:24px;
height:30px; height:30px;
} }
.mac_os_x_n { .mac_os_x_n {
background: transparent url(mac_os_x/T_Main.png) repeat-x 0 0; background: transparent url(mac_os_x/T_Main.png) repeat-x 0 0;
height:30px; height:30px;
} }
.mac_os_x_ne { .mac_os_x_ne {
background: transparent url(mac_os_x/TR_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/TR_Main.png) no-repeat 0 0;
width:31px; width:31px;
height:30px; height:30px;
} }
.mac_os_x_w { .mac_os_x_w {
background: transparent url(mac_os_x/L_Main.png) repeat-y top left; background: transparent url(mac_os_x/L_Main.png) repeat-y top left;
width:16px; width:16px;
} }
.mac_os_x_e { .mac_os_x_e {
background: transparent url(mac_os_x/R_Main.png) repeat-y top right; background: transparent url(mac_os_x/R_Main.png) repeat-y top right;
width:16px; width:16px;
} }
.mac_os_x_sw { .mac_os_x_sw {
background: transparent url(mac_os_x/BL_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/BL_Main.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_s { .mac_os_x_s {
background: transparent url(mac_os_x/B_Main.png) repeat-x 0 0; background: transparent url(mac_os_x/B_Main.png) repeat-x 0 0;
height:40px; height:40px;
} }
.mac_os_x_se, .mac_os_x_sizer { .mac_os_x_se, .mac_os_x_sizer {
background: transparent url(mac_os_x/BR_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/BR_Main.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_sizer { .mac_os_x_sizer {
cursor:se-resize; cursor:se-resize;
} }
.mac_os_x_close { .mac_os_x_close {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/close.gif) no-repeat 0 0; background: transparent url(mac_os_x/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:25px; left:25px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_minimize { .mac_os_x_minimize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0; background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:45px; left:45px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_maximize { .mac_os_x_maximize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0; background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:65px; left:65px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_title { .mac_os_x_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:8px; margin-top:8px;
width:100%; width:100%;
color:#000; color:#000;
} }
.mac_os_x_content { .mac_os_x_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background:#FFF; background:#FFF;
} }
.mac_os_x_s .status_bar { .mac_os_x_s .status_bar {
padding-bottom:24px; padding-bottom:24px;
} }
/* FOR IE */ /* FOR IE */
* html .mac_os_x_nw { * html .mac_os_x_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_n { * html .mac_os_x_n {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_ne { * html .mac_os_x_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_w { * html .mac_os_x_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_e { * html .mac_os_x_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_sw { * html .mac_os_x_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_s { * html .mac_os_x_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_se { * html .mac_os_x_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_sizer { * html .mac_os_x_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop");
} }
/* Focused windows */ /* Focused windows */
.overlay_blur_os_x { .overlay_blur_os_x {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.blur_os_x_nw { .blur_os_x_nw {
background: transparent url(mac_os_x/TL.png) no-repeat 0 0; background: transparent url(mac_os_x/TL.png) no-repeat 0 0;
width:24px; width:24px;
height:30px; height:30px;
} }
.blur_os_x_n { .blur_os_x_n {
background: transparent url(mac_os_x/T.png) repeat-x 0 0; background: transparent url(mac_os_x/T.png) repeat-x 0 0;
height:30px; height:30px;
} }
.blur_os_x_ne { .blur_os_x_ne {
background: transparent url(mac_os_x/TR.png) no-repeat 0 0; background: transparent url(mac_os_x/TR.png) no-repeat 0 0;
width:31px; width:31px;
height:30px; height:30px;
} }
.blur_os_x_w { .blur_os_x_w {
background: transparent url(mac_os_x/L.png) repeat-y top left; background: transparent url(mac_os_x/L.png) repeat-y top left;
width:16px; width:16px;
} }
.blur_os_x_e { .blur_os_x_e {
background: transparent url(mac_os_x/R.png) repeat-y top right; background: transparent url(mac_os_x/R.png) repeat-y top right;
width:16px; width:16px;
} }
.blur_os_x_sw { .blur_os_x_sw {
background: transparent url(mac_os_x/BL.png) no-repeat 0 0; background: transparent url(mac_os_x/BL.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.blur_os_x_s { .blur_os_x_s {
background: transparent url(mac_os_x/B.png) repeat-x 0 0; background: transparent url(mac_os_x/B.png) repeat-x 0 0;
height:40px; height:40px;
} }
.blur_os_x_se, .blur_os_x_sizer { .blur_os_x_se, .blur_os_x_sizer {
background: transparent url(mac_os_x/BR.png) no-repeat 0 0; background: transparent url(mac_os_x/BR.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.blur_os_x_sizer { .blur_os_x_sizer {
cursor:se-resize; cursor:se-resize;
} }
.blur_os_x_close { .blur_os_x_close {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/close.gif) no-repeat 0 0; background: transparent url(mac_os_x/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:25px; left:25px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.blur_os_x_minimize { .blur_os_x_minimize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0; background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:45px; left:45px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.blur_os_x_maximize { .blur_os_x_maximize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0; background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:65px; left:65px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.blur_os_x_title { .blur_os_x_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:8px; margin-top:8px;
width:100%; width:100%;
color:#000; color:#000;
} }
.blur_os_x_content { .blur_os_x_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background:#FFF; background:#FFF;
} }
.blur_os_x_s .status_bar { .blur_os_x_s .status_bar {
padding-bottom:24px; padding-bottom:24px;
} }
/* FOR IE */ /* FOR IE */
* html .blur_os_x_nw { * html .blur_os_x_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL.png", sizingMethod="crop");
} }
* html .blur_os_x_n { * html .blur_os_x_n {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T.png", sizingMethod="scale");
} }
* html .blur_os_x_ne { * html .blur_os_x_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR.png", sizingMethod="crop");
} }
* html .blur_os_x_w { * html .blur_os_x_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L.png", sizingMethod="scale");
} }
* html .blur_os_x_e { * html .blur_os_x_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R.png", sizingMethod="scale");
} }
* html .blur_os_x_sw { * html .blur_os_x_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL.png", sizingMethod="crop");
} }
* html .blur_os_x_s { * html .blur_os_x_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B.png", sizingMethod="scale");
} }
* html .blur_os_x_se { * html .blur_os_x_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop");
} }
* html .blur_os_x_sizer { * html .blur_os_x_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop");
} }

@ -1,160 +1,160 @@
.overlay_mac_os_x_dialog { .overlay_mac_os_x_dialog {
background-color: #FF7224; background-color: #FF7224;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.mac_os_x_dialog_nw { .mac_os_x_dialog_nw {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left; background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px; width:16px;
height:16px; height:16px;
} }
.mac_os_x_dialog_n { .mac_os_x_dialog_n {
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0; background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
height:18px; height:18px;
} }
.mac_os_x_dialog_ne { .mac_os_x_dialog_ne {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top left; background: transparent url(mac_os_x_dialog/R.png) repeat-y top left;
width:16px; width:16px;
height:16px; height:16px;
} }
.mac_os_x_dialog_w { .mac_os_x_dialog_w {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left; background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px; width:16px;
} }
.mac_os_x_dialog_e { .mac_os_x_dialog_e {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top right; background: transparent url(mac_os_x_dialog/R.png) repeat-y top right;
width:16px; width:16px;
} }
.mac_os_x_dialog_sw { .mac_os_x_dialog_sw {
background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0; background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_dialog_s { .mac_os_x_dialog_s {
background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0; background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0;
height:40px; height:40px;
} }
.mac_os_x_dialog_se, .mac_os_x_dialog_sizer { .mac_os_x_dialog_se, .mac_os_x_dialog_sizer {
background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0; background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_dialog_sizer { .mac_os_x_dialog_sizer {
cursor:se-resize; cursor:se-resize;
} }
.mac_os_x_dialog_close { .mac_os_x_dialog_close {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0; background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:25px; left:25px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_dialog_minimize { .mac_os_x_dialog_minimize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0; background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:45px; left:45px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_dialog_maximize { .mac_os_x_dialog_maximize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0; background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:65px; left:65px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_dialog_title { .mac_os_x_dialog_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:6px; margin-top:6px;
width:100%; width:100%;
color:#000; color:#000;
} }
.mac_os_x_dialog_content { .mac_os_x_dialog_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0; background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
} }
.mac_os_x_dialog_buttons { .mac_os_x_dialog_buttons {
text-align: center; text-align: center;
} }
/* FOR IE */ /* FOR IE */
* html .mac_os_x_dialog_nw { * html .mac_os_x_dialog_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_ne { * html .mac_os_x_dialog_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_w { * html .mac_os_x_dialog_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_e { * html .mac_os_x_dialog_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_sw { * html .mac_os_x_dialog_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop");
} }
* html .mac_os_x_dialog_s { * html .mac_os_x_dialog_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_se { * html .mac_os_x_dialog_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
} }
* html .mac_os_x_dialog_sizer { * html .mac_os_x_dialog_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
} }

@ -1,164 +1,164 @@
.overlay_nuncio img { border: none; } .overlay_nuncio img { border: none; }
.overlay_nuncio { .overlay_nuncio {
background-color: #666666; background-color: #666666;
} }
.nuncio_nw { .nuncio_nw {
width: 12px; width: 12px;
height: 28px; height: 28px;
background: url(nuncio/top_left.png) no-repeat; background: url(nuncio/top_left.png) no-repeat;
} }
.nuncio_n { .nuncio_n {
background: url(nuncio/top_mid.png) repeat-x; background: url(nuncio/top_mid.png) repeat-x;
height: 28px; height: 28px;
} }
.nuncio_ne { .nuncio_ne {
width: 21px; width: 21px;
height: 28px; height: 28px;
background: url(nuncio/top_right.png) no-repeat; background: url(nuncio/top_right.png) no-repeat;
} }
.nuncio_e { .nuncio_e {
width: 21px; width: 21px;
background: url(nuncio/center_right.png) repeat-y top right; background: url(nuncio/center_right.png) repeat-y top right;
} }
.nuncio_w { .nuncio_w {
width: 12px; width: 12px;
background: url(nuncio/center_left.png) repeat-y top left; background: url(nuncio/center_left.png) repeat-y top left;
} }
.nuncio_sw { .nuncio_sw {
width: 12px; width: 12px;
height: 18px; height: 18px;
background: url(nuncio/bottom_left.png) no-repeat; background: url(nuncio/bottom_left.png) no-repeat;
} }
.nuncio_s { .nuncio_s {
background: url(nuncio/bottom_mid.png) repeat-x 0 0; background: url(nuncio/bottom_mid.png) repeat-x 0 0;
height: 18px; height: 18px;
} }
.nuncio_se, .nuncio_sizer { .nuncio_se, .nuncio_sizer {
width: 21px; width: 21px;
height: 18px; height: 18px;
background: url(nuncio/bottom_right.png) no-repeat; background: url(nuncio/bottom_right.png) no-repeat;
} }
.nuncio_close { .nuncio_close {
width: 14px; width: 14px;
height: 14px; height: 14px;
background: url(nuncio/close.png) no-repeat; background: url(nuncio/close.png) no-repeat;
position:absolute; position:absolute;
top:10px; top:10px;
right:22px; right:22px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.nuncio_minimize { .nuncio_minimize {
width: 14px; width: 14px;
height: 15px; height: 15px;
background: url(nuncio/minimize.png) no-repeat; background: url(nuncio/minimize.png) no-repeat;
position:absolute; position:absolute;
top:10px; top:10px;
right:40px; right:40px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.nuncio_title { .nuncio_title {
float:left; float:left;
font-size:11px; font-size:11px;
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
color: #fff; color: #fff;
width: 100% width: 100%
} }
.nuncio_content { .nuncio_content {
background: url(nuncio/overlay.png) repeat; background: url(nuncio/overlay.png) repeat;
overflow:auto; overflow:auto;
color: #ddd; color: #ddd;
font-family: Tahoma, Arial, "sans-serif"; font-family: Tahoma, Arial, "sans-serif";
font-size: 10px; font-size: 10px;
} }
.nuncio_sizer { .nuncio_sizer {
cursor:se-resize; cursor:se-resize;
} }
.top_draggable, .bottom_draggable { .top_draggable, .bottom_draggable {
cursor:move cursor:move
} }
/* FOR IE */ /* FOR IE */
* html .nuncio_nw { * html .nuncio_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop");
} }
* html .nuncio_n { * html .nuncio_n {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale");
} }
* html .nuncio_ne { * html .nuncio_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop");
} }
* html .nuncio_w { * html .nuncio_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale");
} }
* html .nuncio_e { * html .nuncio_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale");
} }
* html .nuncio_sw { * html .nuncio_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop");
} }
* html .nuncio_s { * html .nuncio_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale");
} }
* html .nuncio_se { * html .nuncio_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
} }
* html .nuncio_sizer { * html .nuncio_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
} }
* html .nuncio_close { * html .nuncio_close {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop");
} }
* html .nuncio_minimize { * html .nuncio_minimize {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop");
} }

@ -1,108 +1,108 @@
.overlay_spread { .overlay_spread {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.spread_nw { .spread_nw {
background: transparent url(spread/left-top.gif) no-repeat 0 0; background: transparent url(spread/left-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.spread_n { .spread_n {
background: transparent url(spread/top-middle.gif) repeat-x 0 0; background: transparent url(spread/top-middle.gif) repeat-x 0 0;
height:25px; height:25px;
} }
.spread_ne { .spread_ne {
background: transparent url(spread/right-top.gif) no-repeat 0 0; background: transparent url(spread/right-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.spread_w { .spread_w {
background: transparent url(spread/frame-left.gif) repeat-y top left; background: transparent url(spread/frame-left.gif) repeat-y top left;
width:7px; width:7px;
} }
.spread_e { .spread_e {
background: transparent url(spread/frame-right.gif) repeat-y top right; background: transparent url(spread/frame-right.gif) repeat-y top right;
width:7px; width:7px;
} }
.spread_sw { .spread_sw {
background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.spread_s { .spread_s {
background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; background: transparent url(spread/bottom-middle.gif) repeat-x 0 0;
height:7px; height:7px;
} }
.spread_se, .spread_sizer { .spread_se, .spread_sizer {
background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.spread_sizer { .spread_sizer {
cursor:se-resize; cursor:se-resize;
} }
.spread_close { .spread_close {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; background: transparent url(spread/button-close-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:11px; right:11px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.spread_minimize { .spread_minimize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; background: transparent url(spread/button-min-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:55px; right:55px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.spread_maximize { .spread_maximize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; background: transparent url(spread/button-max-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:33px; right:33px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.spread_title { .spread_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:14px; font-size:14px;
font-weight:bold; font-weight:bold;
text-align:left; text-align:left;
margin-top:2px; margin-top:2px;
width:100%; width:100%;
color:#E47211; color:#E47211;
} }
.spread_content { .spread_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background:#A9EA00; background:#A9EA00;
} }

@ -134,12 +134,14 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostDes {float:left; width:655px; margin-left:15px;} .homepagePostDes {float:left; width:655px; margin-left:15px;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;} .homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;} .homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostSubmit:hover {background-color:#d8d8d8;}
.homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;} .homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
@ -181,6 +183,7 @@ a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;} .homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -1122,6 +1125,9 @@ a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; paddin
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;} .postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;} .postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 20px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 20px;}
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;} .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}

@ -76,6 +76,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.ml15{ margin-left:15px;} .ml15{ margin-left:15px;}
.ml20{ margin-left:20px;} .ml20{ margin-left:20px;}
.ml24{margin-left:24px;} .ml24{margin-left:24px;}
.ml25{margin-left:25px;}
.ml36{ margin-left:36px; } .ml36{ margin-left:36px; }
.ml40{ margin-left:40px;} .ml40{ margin-left:40px;}
.ml45{ margin-left:45px;} .ml45{ margin-left:45px;}
@ -426,7 +427,6 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; } .resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; }
a.sendButtonBlue {color:#269ac9;} a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;} a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;} .db {display:block !important;}
.dropdown-menu { .dropdown-menu {
@ -680,7 +680,11 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;}.borderBottomNone {border-bottom:none !important;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;} .topBorder {border-top: 1px solid #e4e4e4;}
div.minHeight48{min-height: 48px;} div.minHeight48{min-height: 48px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:15px;} .homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:15px;}

@ -159,4 +159,22 @@ a.blue-btn {
background-color: #269ac9; background-color: #269ac9;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
} }
/*名师榜20160505*/
.function-row {border-bottom:1px dashed #b2b2b2; padding-bottom:16px;}
.teacher-list-search {width:310px; height:23px; border:1px solid #ccc; border-right:none; outline:none;}
.teacher-search-icon {background:url(../images/search.png) 0 3px no-repeat; width:25px; height:25px; border:1px solid #ccc; border-left:none; cursor:pointer;}
.teacher-search-type {width:84px; height:23px; border:1px solid #ccc; outline:none;}
.teacher-list-row {border-bottom:1px dashed #b2b2b2; padding:18px 0;}
.teacher-avatar {float:left;}
.teacher-name {font-size:18px; color:#333; margin-right:15px;}
.teacher-social-block {width:90px; float:left; text-align:center;}
.block-num {font-size:16px; color:#000;}
.block-title {font-size:12px; color:#999;}
.block-slice {width:1px; height:40px; background-color:#e0e0e0; float:left; margin-top:3px;}
.teacher-intro {font-size:13px; color:#999; line-height:24px; height:72px; overflow:hidden;}
a.teacher-select {font-size:13px; color:#fff; padding:3px 18px; background-color:#269ac9;}
a.teacher-select:hover {background-color:#297fb8;}
a.follow-button {font-size:13px; color:#272727; padding:3px 5px; background-color:#f2efef;}
a.follow-button:hover {background-color:#c1c1c1;}

@ -14,6 +14,7 @@ a:hover,a:active{color:#24366e;}
.sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} .sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.sn-container {width:100%; background-color:#fff;} .sn-container {width:100%; background-color:#fff;}
.sn-p-absolute {position:absolute;} .sn-p-absolute {position:absolute;}
.sn-p-relative {position:relative;}
.sn-grey-opacity {background:rgba(230, 230, 230, 0.9)!important; filter:Alpha(opacity=90); background:#e6e6e6;} .sn-grey-opacity {background:rgba(230, 230, 230, 0.9)!important; filter:Alpha(opacity=90); background:#e6e6e6;}
.sn-border {border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;} .sn-border {border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;}
/* 公共 */ /* 公共 */
@ -32,7 +33,7 @@ a:hover,a:active{color:#24366e;}
.sn-font-grey3 {color:#999;} .sn-font-grey3 {color:#999;}
a.sn-link-blue {color:#24366e;} a.sn-link-blue {color:#24366e;}
a.sn-link-white {color:#fff;} a.sn-link-white {color:#fff;}
a.sn-link-grey {color:#999;} a.sn-link-grey {color:#666;}
a.sn-link-grey:hover {color:#24366e;} a.sn-link-grey:hover {color:#24366e;}
a.sn-link-grey2 {color:#888;} a.sn-link-grey2 {color:#888;}
a.sn-link-select {color:#809df9;} a.sn-link-select {color:#809df9;}
@ -47,11 +48,13 @@ a.sn-link-select {color:#809df9;}
.sn-mt13 {margin-top:13px;} .sn-mt13 {margin-top:13px;}
.sn-mt15 {margin-top:15px;} .sn-mt15 {margin-top:15px;}
.sn-mt28 {margin-top:28px;} .sn-mt28 {margin-top:28px;}
.sn-mb20 {margin-bottom:20px;}
.sn-mb40 {margin-bottom:40px;} .sn-mb40 {margin-bottom:40px;}
.sn-ml15 {margin-left:15px;} .sn-ml15 {margin-left:15px;}
.sn-ml20 {margin-left:20px;} .sn-ml20 {margin-left:20px;}
.sn-ml55 {margin-left:55px;} .sn-ml55 {margin-left:55px;}
.sn-mr0 {margin-right:0px !important;} .sn-mr0 {margin-right:0px !important;}
.sn-mr20 {margin-right:20px;}
.sn-mr50 {margin-right:50px;} .sn-mr50 {margin-right:50px;}
.sn-w229 {width:229px;} .sn-w229 {width:229px;}
/*头部样式*/ /*头部样式*/
@ -66,11 +69,11 @@ a.sn-link-select {color:#809df9;}
.sn-logo {width:1200px; height:90px; line-height:90px; margin:0 auto; vertical-align:middle;position:relative;} .sn-logo {width:1200px; height:90px; line-height:90px; margin:0 auto; vertical-align:middle;position:relative;}
.sn-search-input {width:328px; height:40px; font-size:16px; color:#ccc; padding-left:10px; border:1px solid #ccc; border-right:none; float:right; background-color:#fff; outline:none;} .sn-search-input {width:328px; height:40px; font-size:16px; color:#ccc; padding-left:10px; border:1px solid #ccc; border-right:none; float:right; background-color:#fff; outline:none;}
a.sn-search-button {width:53px; height:40px; border:1px solid #ccc; border-left:none; float:right; outline:none; background:url(../images/sn_search_icon.jpg) 0 3px no-repeat;} a.sn-search-button {width:53px; height:40px; border:1px solid #ccc; border-left:none; float:right; outline:none; background:url(../images/sn_search_icon.jpg) 0 3px no-repeat;}
.sn-nav {width:1200px; height:55px; margin:0 auto; font-size:16px; position:relative; line-height:1; overflow:hidden;} .sn-nav {width:1200px; height:55px; margin:0 auto; font-size:16px; line-height:1; overflow:hidden;}
.nav-element-default, .nav-element {float:left; padding-top:11px; padding-bottom:12px; margin-right:50px;} .nav-element-default, .nav-element {float:left; padding-top:11px; padding-bottom:12px; margin-right:50px;}
.nav-element-default a, .nav-element a {display:inline-block; padding:8px 6px; border-radius:5px;} .nav-element-default a, .nav-element a {display:inline-block; padding:8px 6px; border-radius:5px;}
.nav-element-default a:hover, .nav-element a:hover {background-color:#809df9;} .nav-element-default a:hover, .nav-element a:hover {background-color:#809df9;}
.sn-subnav-position {position:fixed; left:0; top:203px; z-index:99;} .sn-subnav-position {position:absolute; left:0; top:55px; z-index:99;}
.sn-sub-nav {width:1200px; margin:0 auto; font-size:14px; position:relative; line-height:1;} .sn-sub-nav {width:1200px; margin:0 auto; font-size:14px; position:relative; line-height:1;}
.sn-sub-nav li {color:#999; float:left;} .sn-sub-nav li {color:#999; float:left;}
.sn-sub-nav li a {height:40px; line-height:40px; vertical-align:middle; margin:0 5px; padding:0 5px; display:inline-block;} .sn-sub-nav li a {height:40px; line-height:40px; vertical-align:middle; margin:0 5px; padding:0 5px; display:inline-block;}
@ -238,11 +241,16 @@ ul.sn-inner-pages li a:hover{ background-color:#24366e; color:#fff; text-decorat
/*名师榜*/ /*名师榜*/
.sn-teacher-list {margin:0 20px; padding:15px 0; border-bottom:1px solid #e9e9e9;} .sn-teacher-list {margin:0 20px; padding:15px 0; border-bottom:1px solid #e9e9e9;}
a.sn-teacher-name {width:75px; font-size:18px; color:#777; float:left;} a.sn-teacher-name {width:60px; font-size:18px; color:#777; float:left;}
.sn-teacher-unit {width:154px; font-size:14px; color:#999; float:left; margin-left:15px; margin-top:3px;} .sn-teacher-unit {width:169px; font-size:14px; color:#999; float:left; margin-left:15px; margin-top:3px;}
.sn-teacher-info {height:30px; line-height:30px; vertical-align:middle; float:left; margin-left:15px;} .sn-teacher-info {height:30px; line-height:30px; vertical-align:middle; float:left; margin-left:15px;}
.sn-teacher-social {height:30px; line-height:30px; vertical-align:middle; float:left; color:#999; font-size:12px; margin-left:15px;} .sn-teacher-social {height:30px; line-height:30px; vertical-align:middle; float:left; color:#999; font-size:12px; margin-left:15px;}
.sn-border-none {border:none;} .sn-border-none {border:none;}
.sn-teacher-block {width:163px; height:222px; border-right:1px solid #e5e7ec; margin:40px 0 24px 0; float:left;}
.sn-teacher-avatar2 {margin:0 18px; padding:18px 0;}
.sn-teacher-info2 {color:#666; text-align:center; font-size:16px;}
.sn-info2-hidden {width:153px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:0 auto;}
.sn-avatar-circle {border-radius:50%;}
/*弹框*/ /*弹框*/
.upload_con h2 { .upload_con h2 {

@ -973,6 +973,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
} }
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.topBorder { .topBorder {
border-top: 1px solid #E4E4E4; border-top: 1px solid #E4E4E4;
} }
@ -1111,6 +1112,9 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;} .postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;} .postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 20px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 20px;}
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;} .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}

@ -605,6 +605,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;} .homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;} .homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
@ -640,6 +641,7 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;} .homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;}
@ -928,7 +930,6 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; } .resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; }
a.sendButtonBlue {color:#269ac9;} a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;} a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;} .db {display:block !important;}
.dropdown-menu { .dropdown-menu {
@ -976,8 +977,8 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r
.AgreementTxt{text-indent:2em; margin-bottom:15px;} .AgreementTxt{text-indent:2em; margin-bottom:15px;}
.AgreementImg{ margin:0px auto;} .AgreementImg{ margin:0px auto;}
.list_style ol li{list-style-type: decimal;margin-left: 20px;} .list_style ol li{list-style-type:decimal; margin-left:20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;} .list_style ul li{list-style-type:disc; margin-left:20px;}
/* @功能 定义 */ /* @功能 定义 */
span.at {color:#269ac9;} span.at {color:#269ac9;}
@ -1150,4 +1151,4 @@ a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../i
a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;} a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
.likeText{color: #7f7f7f} .likeText{color: #7f7f7f}
.likeNum{color: #7f7f7f} .likeNum{color: #7f7f7f}

@ -495,7 +495,6 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #15bccf; border-radius:5px; float:right;} .resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #15bccf; border-radius:5px; float:right;}
a.sendButtonBlue {color:#15bccf;} a.sendButtonBlue {color:#15bccf;}
a.sendButtonBlue:hover {color:#ffffff;} a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#15bccf;}
.db {display:block !important;} .db {display:block !important;}
.dropdown-menu { .dropdown-menu {

@ -287,4 +287,7 @@ li.commit .commit-row-info .committed_ago {
.rep_history_grey{ .rep_history_grey{
color: #7F7F7F; color: #7F7F7F;
} }
.rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;} .rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;}
a.btn_zipdown{ display:block; height:25px; width:80px; text-align: center; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE);
color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-top: 7px; margin-right: 5px;}
a:hover.btn_zipdown{color:#269ac9;}

@ -77,3 +77,6 @@ a.underline {text-decoration:underline;}
.loading-box {position:absolute; top:50%; background:white; width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;} .loading-box {position:absolute; top:50%; background:white; width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
.loading-box img {margin-top: 3px; text-align: center;} .loading-box img {margin-top: 3px; text-align: center;}
.loading-box span {display: block; font-size:12px;} .loading-box span {display: block; font-size:12px;}
/*帖子锁定样式*/
.locked_btn_cir {background: url("/images/locked.png") 0 0 no-repeat; cursor: default;}
Loading…
Cancel
Save