Merge branch 'develop' into cxt_course

Conflicts:
	db/schema.rb
This commit is contained in:
cxt 2016-05-17 16:30:03 +08:00
commit 357e143c9a
96 changed files with 4200 additions and 3446 deletions

View File

@ -1,11 +1,13 @@
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/
# unix-like only
gem 'iconv'
end
gem 'certified'
gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli'

View File

@ -79,7 +79,7 @@ class OrgDocumentCommentsController < ApplicationController
def add_reply
@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.content = params[:org_content]
@document.children << @comment

View File

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

View File

@ -28,7 +28,7 @@ class OrganizationsController < ApplicationController
helper :project_score
helper :issues
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'
def index
@ -98,10 +98,26 @@ class OrganizationsController < ApplicationController
else
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
@organization = Organization.find(params[:id])
# params[:org_subfield_id] 存在即对应的栏目,否则进入组织动态
if params[:org_subfield_id]
@org_subfield = OrgSubfield.find(params[:org_subfield_id])
@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)
if @org_subfield.field_type == "Comptec" || @org_subfield.field_type == "Compstu"
# @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
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)
@ -142,6 +158,57 @@ class OrganizationsController < ApplicationController
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
project_ids = org.projects.map{|project| project.id}.join(",")
unless project_ids.blank?
@ -221,6 +288,7 @@ class OrganizationsController < ApplicationController
# @organization.domain = params[:organization][:domain]
@organization.is_public = params[:organization][:is_public] == '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.name = params[:organization][:name]
@organization.save
@ -403,6 +471,18 @@ class OrganizationsController < ApplicationController
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
@org_subfield = OrgSubfield.find(params[:org_subfield_id])
@org_subfield.update_attribute(:hide, 1)

View File

@ -32,9 +32,9 @@ class RepositoriesController < ApplicationController
before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo, :stats]
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 :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
# hidden repositories filter // 隐藏代码过滤器
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
@ -95,6 +95,13 @@ class RepositoriesController < ApplicationController
end
# 一键ZIP下载
def project_archive
g = Gitlab.client
g.get()
# g.project_archive(params[:gpid].to_i, params[:rev])
end
# 判断用户是否已经fork过该项目
def has_forked?(project, user)
projects = Project.where("user_id =?", user)

View File

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

View File

@ -2618,6 +2618,9 @@ class UsersController < ApplicationController
# 获取我的资源
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')) "+
"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}")
@ -2625,6 +2628,7 @@ class UsersController < ApplicationController
# 获取我的资源查询结果
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')) "+
"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}")
@ -2632,6 +2636,7 @@ class UsersController < ApplicationController
# 获取我的课程资源
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')"+
"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}")
@ -2639,6 +2644,7 @@ class UsersController < ApplicationController
# 获取我的课程资源中搜索结果
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')"+
"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}")
@ -2656,6 +2662,7 @@ class UsersController < ApplicationController
# 获取我的项目资源
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') "+
"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}")
@ -2663,6 +2670,7 @@ class UsersController < ApplicationController
# 获取我的项目资源搜索
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') "+
"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}")
@ -2680,12 +2688,14 @@ class UsersController < ApplicationController
# 获取我上传的附件
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',
'Document','Message','News','StudentWorkScore','HomewCommon'))").order("#{order.nil? ? 'created_on' : order} #{score}")
end
# 获取我上传的附件搜索结果
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',
'Document','Message','News','StudentWorkScore','HomewCommon')) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}")
end
@ -2704,11 +2714,13 @@ class UsersController < ApplicationController
# 获取我的用户类型资源
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}")
end
# 获取我的用户类型资源搜索
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}")
end
@ -2725,7 +2737,7 @@ class UsersController < ApplicationController
# 资源库 分为全部 课程资源 项目资源 附件
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
return
end
@ -2780,13 +2792,13 @@ class UsersController < ApplicationController
# 导入资源
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
return
end
@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"
@user = User.find(params[:id])
@order, @b_sort = params[:order] || "created_on", params[:sort] || "asc"
@score = @b_sort == "desc" ? "asc" : "desc"
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}

View File

@ -33,6 +33,19 @@ module ApplicationHelper
extend Forwardable
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
container.update_column(:visits, container.visits + 1)
end

View File

@ -148,4 +148,43 @@ module OrganizationsHelper
org_acts
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

View File

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

View File

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

View File

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

View File

@ -309,6 +309,20 @@ class User < Principal
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
end
def self.is_id?(id)
Fixnum===id || id.to_i.to_s == id
end
# refactor User model find function,
# return anonymous user when can not find user id = user_id
def self.find (*args, &block)
begin
return find_by_login(args.first) if args.size==1 && !is_id?(args.first)
super
rescue
self.anonymous
end
# super
end
def to_param
login
end
# Salts all existing unsalted passwords
# 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

View File

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

View File

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

View File

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

View File

@ -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%>");

View File

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

View File

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

View File

@ -91,7 +91,7 @@
<% end %>
<% else %>
<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">
<!--<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>-->
<% 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();" %>
<% end %>
<% 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 %>
<% 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 => "发布帖子" %>
<% end %>
</div>
@ -118,7 +122,6 @@
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
</li>
<% end %>
<% else %>
<div class="homepageLeftMenuBlock">
<% if !field.subfield_subdomain_dir.nil? %>

View File

@ -24,8 +24,9 @@
</h3>
<span class="txt-grey"><%= format_date activity.updated_at %></span>
<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 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>
<% elsif act.org_act_type == "Message" %>
<% 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;" %>
<% end %>
<h3>
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= 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 %>
<%= 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" %>
</h3>
<span class="txt-grey"><%= format_date activity.updated_on %></span>
<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 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>
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
@ -62,8 +60,10 @@
</h3>
<span class="txt-grey"><%= format_date activity.created_on %></span>
<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 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>
<% elsif act.org_act_type == "Poll" %>
<% activity = Poll.find(act.org_act_id) %>
@ -86,8 +86,9 @@
</h3>
<span class="txt-grey"><%= format_date activity.published_at %></span>
<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 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>
<% end %>
<% end %>
@ -116,8 +117,9 @@
</h3>
<span class="txt-grey"><%= format_date activity.updated_on %></span>
<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 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>
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
@ -128,17 +130,14 @@
<% 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;" %>
<% end %>
<h3>
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= 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> <!--+"(帖子标题)"-->
<%= 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" %>
</h3>
<span class="txt-grey"><%= format_date activity.updated_on %></span>
<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 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>
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
@ -154,8 +153,9 @@
</h3>
<span class="txt-grey">2016-04-08</span>
<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 class="sn-read-more"><%=link_to "查看全文>>", news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div>
<% end %>
<% end %>
@ -190,8 +190,9 @@
</h3>
<span class="txt-grey"><%= format_date document.created_at %></span>
<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 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>
<% 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 %>
@ -209,17 +210,14 @@
<% 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;" %>
<% end %>
<h3>
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= 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> <!--+"(帖子标题)"-->
<%= 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" %>
</h3>
<span class="txt-grey"><%= format_date message.created_on %></span>
<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"><%=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>
<% else %>
<div class="sn-news-bigbox fl">
@ -237,7 +235,14 @@
</h3>
<span class="txt-grey"><%= format_date message.created_on %></span>
<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>
<% end %>
@ -256,8 +261,9 @@
</h3>
<span class="txt-grey"><%= format_date news.created_on %></span>
<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 class="sn-read-more"><%=link_to "查看全文>>", news.title.to_s, news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
</div>
<% end %>
<% end %>
@ -266,4 +272,14 @@
<% end %>
<% end %>
<script>
$(".sn-read-more").hide();
$(".sn-news-txt").each(function(){
var txtHeight = $(this).children().height();
if (txtHeight > 180){
$(this).next().show();
}
});
</script>

View File

@ -10,7 +10,7 @@
<% org_acts = get_subfield_acts field %>
<% unless org_acts.blank? %>
<% 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 %>
<% document = activity.org_act %>
<% org_subfield_id = params[:org_subfield_id] %>
@ -52,13 +52,13 @@
<% end %>
</div>
<% 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>
</div>
<% end %>
<% elsif field.field_type == "Resource" %>
<% 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 !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" %>

View File

@ -23,7 +23,8 @@
<% 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" %>
<% 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>
<% 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" %>
<% 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-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>
<% 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" %>
<% 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-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>
<% 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" %>
<% 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-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>
<% end %>
@ -96,3 +100,12 @@
</div>
<% end %>
<% end %>
<script>
$(".sn-index-txt").each(function(){
var wholeHeight = $(this).children().height();
if (wholeHeight > 54){
$(this).next().show();
}
});
</script>

View File

@ -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 %>

View File

@ -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>

View File

@ -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 %>

View File

@ -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>

View File

@ -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>

View File

@ -8,7 +8,6 @@
<li class="orgListOperation fb"><span class="mr10">操作</span></li>
<div class="cl"></div>
</ul>
<% subfields.each do |field| %>
<% if is_default_field?(field) %>
<% name = get_default_name(field) %>
@ -32,10 +31,9 @@
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div>
<%= 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 %>
</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>
@ -59,21 +57,20 @@
</li>
<li class="orgListStatus">新增</li>
<li class="orgListStatusList">
<% if field.field_type == "Resource" %>
列表
<% if field.field_type == "Resource" || field.field_type == "Comptec" %>
默认
<% 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 %>
<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>
</div>
<%= select( :name,:group_id, subfield_status_option,
{ :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;"}) %>
{ :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;"}) %>
<% end %>
<% end %>
</li>
<li class="orgListType"><%= field.field_type == "Post" ? "帖子" : "资源" %></li>
<li class="orgListType"><%= org_subfield_type field %></li>
<li class="orgListCatalog hidden">
<% 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="双击可编辑">
@ -95,7 +92,7 @@
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
<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>
<% unless field.field_type == "Resource" %>
<% unless field.field_type == "Resource" || field.field_type == "Comptec" %>
<span class="fr">|</span>
<!--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>-->

View File

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

View File

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

View File

@ -87,6 +87,11 @@
&nbsp;<span>允许游客下载</span>
<span class="c_green f12" id="allow_down_hint"><%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %></span>
</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>
<% end %>
</div>
@ -152,10 +157,9 @@
<input type="radio" id="orgMeb" value="Resource" name="field_type" />
<label for="orgMeb">资源</label>
</li>
<!--<li class="fl">-->
<!--<input type="radio" id="orgCom" value="Complex" name="field_type" />-->
<!--<label for="orgMeb">综合</label>-->
<!--</li>-->
<div id="org_excellent_teachers">
<%= render :partial => 'organizations/setting_excellent_teachers' %>
</div>
<li class="fr"><a href="javascript:void(0);" class="saveBtn db" onclick="add_org_subfield();">新增</a></li>
<li class="cl"></li>
</ul>

View File

@ -5,46 +5,46 @@
<% end %>
<% if params[:show_homepage].nil? and User.current.logged? %>
<div class="homepageRightBanner">
<div class="NewsBannerName"><%= @org_subfield.nil? ? "最新动态":"#{@org_subfield.name}" %></div>
<% if params[:org_subfield_id].nil? %>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType">
<li>
<ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</li>
<li><%= link_to "作业动态", {:controller => "organizations", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
<!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li>
<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><%= 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><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<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_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<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 => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
<div class="homepageRightBanner">
<div class="NewsBannerName"><%= @org_subfield.nil? ? "最新动态":"#{@org_subfield.name}" %></div>
<% if params[:org_subfield_id].nil? %>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType">
<li>
<ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</li>
<li><%= link_to "作业动态", {:controller => "organizations", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
<!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li>
<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><%= 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><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<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_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<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 => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<% end %>
</div>
<% end %>
</div>
<% end %>
<% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 and params[:org_subfield_id].nil? %>
<script>
@ -53,7 +53,7 @@
});
</script>
<% 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 %>
<% if @org_activities %>
<%= render :partial => 'organizations/org_activities',
@ -67,3 +67,6 @@

View File

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

View File

@ -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>

View File

@ -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) %>');

View File

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

View File

@ -43,7 +43,7 @@
</div>
</td>
<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小时 %>
<%= 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 %>

View File

@ -1,6 +1,8 @@
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
<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>
<!--<a href="javascript:void(0);" class="btn_zipdown fr" onclick="">ZIP下载</a>-->
</div>
<div class="repository_con" style="line-height:1.9;">
<% if @entries.nil? %>

View File

@ -56,8 +56,8 @@
<% else %>
<% work= params[:show_work_id].nil? ? @homework.student_works.where("user_id = ?",User.current.id).first : StudentWork.find(params[:show_work_id]) %>
<% end %>
location.hash = "<%=work.id %>";
<% unless work.nil? %>
location.hash = "<%=work.id %>";
<% 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}) %>");

View File

@ -14,7 +14,7 @@
<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" %>
<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>-->
<div class="cl"></div>
</li>

View File

@ -44,7 +44,7 @@
<% end %>
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p>
</div>
<div class="ml15 mt10">
<div class="ml15 mt10 f12">
<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>
<% count=0 %>

View File

@ -28,7 +28,7 @@
</form>
<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 %>
</ul>
</div>
@ -37,7 +37,7 @@
<!--<div id="upload_box" style="display: none">-->
<!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>-->
<!--</div>-->
<ul class="resource-list">
<ul>
<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?%>)rename();" onfocus="this.blur()">重命名</a></li>
@ -228,4 +228,22 @@
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>

View File

@ -5,13 +5,16 @@
$(".resource-switch").children().removeClass("resource-tab-active");
$(this).children().addClass("resource-tab-active");
});
$("input[name='subject-list-name']").click(function(){
if($("input[name='subject-list-name']:checked").length >= 1){
$("input[name='checkMenu']").click(function(){
if($("input[name='checkMenu']: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");
}
});
});
@ -33,7 +36,7 @@
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="resource-wrapper">
<div class="resource-wrapper mb10">
<ul class="resource-banner">
<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>

View File

@ -12,8 +12,8 @@
<%= 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>
<input nhname="submit_btn" type="button" class="reply_btn" value="<%=l(:button_feedback_respond) %>"/>
<%#= submit_tag l(:button_feedback_respond), :name => nil ,
<!--<input nhname="submit_btn" type="button" class="reply_btn" value="<%#=l(:button_feedback_respond) %>"/>-->
<%= submit_tag l(:button_feedback_respond), :name => nil ,
:class => "reply_btn"%>
<input nhname="cancel_btn" type="button" style="display:none;"/>
<% end %>

View File

@ -17,7 +17,7 @@ RedmineApp::Application.configure do
# config.logger.level = Logger::INFO
# 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
# to additional_environment.rb

View File

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

View File

@ -76,6 +76,7 @@ RedmineApp::Application.routes.draw do
get 'more_org_projects'
get 'more_org_courses'
get 'search_courses'
get 'teachers'
post 'join_course_menu'
post 'join_courses'
get 'search_projects'
@ -92,6 +93,8 @@ RedmineApp::Application.routes.draw do
get 'autocomplete_search'
post 'hide_org_subfield'
post 'show_org_subfield'
post 'set_excellent_teacher'
post 'reset_excellent_teacher'
post 'agree_apply_subdomain'
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/new', :to => 'news#new', :via => [:get, :post]
scope ":username" do
resources :posts
end
#added by young
resources :users 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/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/:rev', :to => 'repositories#revision'
get 'projects/:id/repository/revision', :to => 'repositories#revision'

View File

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

View File

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

View File

@ -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

View File

@ -11,8 +11,7 @@
#
# 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|
t.integer "act_id", :null => false
t.string "act_type", :null => false

View File

@ -137,11 +137,20 @@ class Gitlab::Client
end
alias_method :repo_commit_diff, :commit_diff
#Get the commits count of each contributor in a project
#@param [Integer] project the ID fo a project.
# Get the commits count of each contributor in a project
# @param [Integer] project the ID fo a project.
# @return [Gitlab::ObjectifiedHash]
def contributors(project)
get("/projects/#{project}/repository/contributors")
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

View File

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

View File

@ -118,6 +118,59 @@ class Kindeditor::AssetsController < ApplicationController
@result[:file_list] = @file_list
render :text => @result.to_json
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
def show_error(msg)

View File

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

View File

@ -3,8 +3,7 @@
// for (var property in myObject) {
// s = s + "\n "+property +": " + myObject[property] ;
// }
// alert(s);
//}
// alert(s)
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2013 kindsoft.net
@ -291,14 +290,14 @@ K.options = {
],
table: [
'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',
'.width', '.height', '.border-collapse'
'.width', '.height', '.border-collapse','.table-layout'
],
'td,th': [
'id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
'.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'],
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(/\u00A9/g, '&copy;');
html = html.replace(/\u00AE/g, '&reg;');
html = html.replace(/\u2003/g, '&emsp;');
html = html.replace(/\u3000/g, '&emsp;');
html = html.replace(/<[^>]+/g, function($0) {
return $0.replace(/\s+/g, ' ');
});
@ -3788,6 +3789,7 @@ _extend(KEdit, KWidget, {
} else {
val = body.innerHTML;
}
//yk
if (self.beforeGetHtml) {
val = self.beforeGetHtml(val);
}
@ -5994,7 +5996,24 @@ _plugin('core', function(K) {
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){
if (self.pasteType === 0) {

View File

@ -1,8 +1,8 @@
// 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.
https://github.com/layerssss/paste.js
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
*/
(function() {
@ -279,7 +279,7 @@ https://github.com/layerssss/paste.js
}
//firefox问题处理因为采用了 pastableContenteditable 模式,故只需要删除默认的粘贴
if ($(img).attr('src').startsWith('data:image/')) {
_results.push($(img).remove());
_results.push($(img).remove());
};
}
return _results;
@ -307,23 +307,23 @@ function enablePasteImg(_editor) {
$(nodeBody).pastableContenteditable();
dataURItoBlob = function(dataURI) {
// convert base64/URLEncoded data component to raw binary data held in a string
var byteString;
if (dataURI.split(',')[0].indexOf('base64') >= 0)
byteString = atob(dataURI.split(',')[1]);
else
byteString = unescape(dataURI.split(',')[1]);
// convert base64/URLEncoded data component to raw binary data held in a string
var byteString;
if (dataURI.split(',')[0].indexOf('base64') >= 0)
byteString = atob(dataURI.split(',')[1]);
else
byteString = unescape(dataURI.split(',')[1]);
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
// write the bytes of the string to a typed array
var ia = new Uint8Array(byteString.length);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
// write the bytes of the string to a typed array
var ia = new Uint8Array(byteString.length);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return new Blob([ia], {type:mimeString});
return new Blob([ia], {type:mimeString});
};
$(nodeBody).on('pasteImage', function(ev, data) {
@ -337,18 +337,103 @@ function enablePasteImg(_editor) {
data.append("imgFile",blob, "imageFilename.png");
console.log(data);
$.ajax({
url: '/kindeditor/upload?dir=image',
contentType: false,
type: 'POST',
data: data,
processData: false,
success: function(data) {
console.log(data);
editor.exec('insertimage', JSON.parse(data).url);
}
url: '/kindeditor/upload?dir=image',
contentType: false,
type: 'POST',
data: data,
processData: false,
success: function(data) {
console.log(data);
editor.exec('insertimage', JSON.parse(data).url);
}
});
}
});
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;
});
}

View File

@ -1,7 +1,7 @@
.ke-content {
font-size: 12px;
font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: ΢ÈíÑźÚ, ËÎÌå;
font-family:Tahoma;
font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: ΢<EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
font-family:Tahoma;
}
.ke-content pre {
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;}
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;}

View File

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

View File

@ -283,7 +283,7 @@ KindEditor.plugin('table', function(K) {
for (var i = 0; i < rows; i++) {
html += '<tr>';
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>';
}

View File

@ -3,7 +3,7 @@
<div class="post-container">
<div class="post-wrapper">
<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>
<td class="text-nowrap v-top">发布者:</td>
<td>{{discussion.user.realname}}</td>
@ -38,7 +38,7 @@
</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-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">

View File

@ -3,7 +3,7 @@
<div class="post-container">
<div class="post-wrapper">
<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>
<td class="text-nowrap v-top">发布者:</td>
<td>{{discussion.user.realname}}</td>
@ -38,7 +38,7 @@
</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-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<div class="post-input-container">

BIN
public/images/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

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

View File

@ -31,7 +31,7 @@ function sd_create_editor(params){
//params.toolbar_container.hide();
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
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();
$('#reply_image_' + id).addClass('imageFuzzy');
@ -78,7 +78,7 @@ function sd_create_editor(params){
//reset height
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.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)
// params.toolbar_container.hide();
if(typeof enableAt === 'function'){

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -134,12 +134,14 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostDes {float:left; width:655px; margin-left:15px;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.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;}
.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;}
.homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;}
.homepagePostIntro ol li{list-style-type: decimal;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;}
.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 ol li{list-style-type: decimal;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;}
.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;}
@ -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;}
.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 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;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -76,6 +76,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.ml15{ margin-left:15px;}
.ml20{ margin-left:20px;}
.ml24{margin-left:24px;}
.ml25{margin-left:25px;}
.ml36{ margin-left:36px; }
.ml40{ margin-left:40px;}
.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; }
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;}
.dropdown-menu {
@ -680,7 +680,11 @@ a.postTypeGrey:hover {color:#269ac9;}
.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;}
.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;}
div.minHeight48{min-height: 48px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:15px;}

View File

@ -159,4 +159,22 @@ a.blue-btn {
background-color: #269ac9;
cursor: pointer;
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;}

View File

@ -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-container {width:100%; background-color:#fff;}
.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-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;}
a.sn-link-blue {color:#24366e;}
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-grey2 {color:#888;}
a.sn-link-select {color:#809df9;}
@ -47,11 +48,13 @@ a.sn-link-select {color:#809df9;}
.sn-mt13 {margin-top:13px;}
.sn-mt15 {margin-top:15px;}
.sn-mt28 {margin-top:28px;}
.sn-mb20 {margin-bottom:20px;}
.sn-mb40 {margin-bottom:40px;}
.sn-ml15 {margin-left:15px;}
.sn-ml20 {margin-left:20px;}
.sn-ml55 {margin-left:55px;}
.sn-mr0 {margin-right:0px !important;}
.sn-mr20 {margin-right:20px;}
.sn-mr50 {margin-right:50px;}
.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-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;}
.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 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;}
.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 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;}
@ -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;}
a.sn-teacher-name {width:75px; 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;}
a.sn-teacher-name {width:60px; font-size:18px; color:#777; float:left;}
.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-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-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 {

View File

@ -973,6 +973,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.topBorder {
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;}
.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 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;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -605,6 +605,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;}
.homepagePostIntro ol li{list-style-type: decimal;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;}
.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;}
@ -640,6 +641,7 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostReplyContent ol li{list-style-type: decimal;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;}
.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;}
@ -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; }
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;}
.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;}
.AgreementImg{ margin:0px auto;}
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;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;}
/* @功能 定义 */
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;}
.likeText{color: #7f7f7f}
.likeNum{color: #7f7f7f}
.likeNum{color: #7f7f7f}

View File

@ -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;}
a.sendButtonBlue {color:#15bccf;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#15bccf;}
.db {display:block !important;}
.dropdown-menu {

View File

@ -287,4 +287,7 @@ li.commit .commit-row-info .committed_ago {
.rep_history_grey{
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;}

View File

@ -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 img {margin-top: 3px; text-align: center;}
.loading-box span {display: block; font-size:12px;}
/*帖子锁定样式*/
.locked_btn_cir {background: url("/images/locked.png") 0 0 no-repeat; cursor: default;}