Conflicts: app/controllers/homework_common_controller.rb app/views/student_work/show.js.erb public/javascripts/application.js public/stylesheets/base.css public/stylesheets/public_new.csscxt_course
commit
d72aa3a93c
@ -1,185 +1,185 @@
|
|||||||
# Redmine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class Member < ActiveRecord::Base
|
class Member < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :principal, :foreign_key => 'user_id'
|
belongs_to :principal, :foreign_key => 'user_id'
|
||||||
has_many :member_roles, :dependent => :destroy
|
has_many :member_roles, :dependent => :destroy
|
||||||
has_many :roles, :through => :member_roles
|
has_many :roles, :through => :member_roles
|
||||||
|
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
belongs_to :course
|
belongs_to :course
|
||||||
|
|
||||||
belongs_to :course_group
|
belongs_to :course_group
|
||||||
validates_presence_of :principal
|
validates_presence_of :principal
|
||||||
validates_uniqueness_of :user_id, :scope => [:project_id,:course_id]
|
validates_uniqueness_of :user_id, :scope => [:project_id,:course_id]
|
||||||
validate :validate_role
|
validate :validate_role
|
||||||
|
|
||||||
before_destroy :set_issue_category_nil
|
before_destroy :set_issue_category_nil
|
||||||
# 删除项目成员一并删除该成员的邀请记录
|
# 删除项目成员一并删除该成员的邀请记录
|
||||||
after_destroy :delete_ivite_list
|
after_destroy :delete_ivite_list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def role
|
def role
|
||||||
end
|
end
|
||||||
|
|
||||||
def role=
|
def role=
|
||||||
end
|
end
|
||||||
|
|
||||||
def name
|
def name
|
||||||
self.user.name
|
self.user.name
|
||||||
end
|
end
|
||||||
|
|
||||||
alias :base_role_ids= :role_ids=
|
alias :base_role_ids= :role_ids=
|
||||||
def role_ids=(arg)
|
def role_ids=(arg)
|
||||||
ids = (arg || []).collect(&:to_i) - [0]
|
ids = (arg || []).collect(&:to_i) - [0]
|
||||||
# Keep inherited roles
|
# Keep inherited roles
|
||||||
ids += member_roles.select {|mr| !mr.inherited_from.nil?}.collect(&:role_id)
|
ids += member_roles.select {|mr| !mr.inherited_from.nil?}.collect(&:role_id)
|
||||||
|
|
||||||
new_role_ids = ids - role_ids
|
new_role_ids = ids - role_ids
|
||||||
# Add new roles
|
# Add new roles
|
||||||
new_role_ids.each {|id| member_roles << MemberRole.new(:role_id => id) }
|
new_role_ids.each {|id| member_roles << MemberRole.new(:role_id => id) }
|
||||||
# Remove roles (Rails' #role_ids= will not trigger MemberRole#on_destroy)
|
# Remove roles (Rails' #role_ids= will not trigger MemberRole#on_destroy)
|
||||||
member_roles_to_destroy = member_roles.select {|mr| !ids.include?(mr.role_id)}
|
member_roles_to_destroy = member_roles.select {|mr| !ids.include?(mr.role_id)}
|
||||||
if member_roles_to_destroy.any?
|
if member_roles_to_destroy.any?
|
||||||
member_roles_to_destroy.each(&:destroy)
|
member_roles_to_destroy.each(&:destroy)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def <=>(member)
|
def <=>(member)
|
||||||
a, b = roles.sort.first, member.roles.sort.first
|
a, b = roles.sort.first, member.roles.sort.first
|
||||||
if a == b
|
if a == b
|
||||||
if principal
|
if principal
|
||||||
principal <=> member.principal
|
principal <=> member.principal
|
||||||
else
|
else
|
||||||
1
|
1
|
||||||
end
|
end
|
||||||
elsif a
|
elsif a
|
||||||
a <=> b
|
a <=> b
|
||||||
else
|
else
|
||||||
1
|
1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def deletable?
|
def deletable?
|
||||||
member_roles.detect {|mr| mr.inherited_from}.nil?
|
member_roles.detect {|mr| mr.inherited_from}.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def include?(user)
|
def include?(user)
|
||||||
if principal.is_a?(Group)
|
if principal.is_a?(Group)
|
||||||
!user.nil? && user.groups.include?(principal)
|
!user.nil? && user.groups.include?(principal)
|
||||||
else
|
else
|
||||||
self.user == user
|
self.user == user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_issue_category_nil
|
def set_issue_category_nil
|
||||||
if user
|
if user
|
||||||
# remove category based auto assignments for this member
|
# remove category based auto assignments for this member
|
||||||
#modify by nwb
|
#modify by nwb
|
||||||
if project
|
if project
|
||||||
IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
|
IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
|
||||||
elsif course
|
elsif course
|
||||||
#IssueCategory.update_all "assigned_to_id = NULL", ["course_id = ? AND assigned_to_id = ?", course.id, user.id]
|
#IssueCategory.update_all "assigned_to_id = NULL", ["course_id = ? AND assigned_to_id = ?", course.id, user.id]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# 删除成员一并删除该成员的邀请信息
|
# 删除成员一并删除该成员的邀请信息
|
||||||
def delete_ivite_list
|
def delete_ivite_list
|
||||||
member_invite_lists = InviteList.where("user_id =? and project_id =?", self.user_id, self.project_id)
|
member_invite_lists = InviteList.where("user_id =? and project_id =?", self.user_id, self.project_id)
|
||||||
unless member_invite_lists.nil?
|
unless member_invite_lists.nil?
|
||||||
member_invite_lists.each do |member_invite_list|
|
member_invite_lists.each do |member_invite_list|
|
||||||
member_invite_list.destroy
|
member_invite_list.destroy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Find or initilize a Member with an id, attributes, and for a Principal
|
# Find or initilize a Member with an id, attributes, and for a Principal
|
||||||
def self.edit_membership(id, new_attributes, principal=nil)
|
def self.edit_membership(id, new_attributes, principal=nil)
|
||||||
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal)
|
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal)
|
||||||
@membership.attributes = new_attributes
|
@membership.attributes = new_attributes
|
||||||
@membership
|
@membership
|
||||||
end
|
end
|
||||||
|
|
||||||
# Finds or initilizes a Member for the given project and principal
|
# Finds or initilizes a Member for the given project and principal
|
||||||
def self.find_or_new(project, principal)
|
def self.find_or_new(project, principal)
|
||||||
project_id = project.is_a?(Project) ? project.id : project
|
project_id = project.is_a?(Project) ? project.id : project
|
||||||
principal_id = principal.is_a?(Principal) ? principal.id : principal
|
principal_id = principal.is_a?(Principal) ? principal.id : principal
|
||||||
|
|
||||||
member = Member.find_by_project_id_and_user_id(project_id, principal_id)
|
member = Member.find_by_project_id_and_user_id(project_id, principal_id)
|
||||||
member ||= Member.new(:project_id => project_id, :user_id => principal_id)
|
member ||= Member.new(:project_id => project_id, :user_id => principal_id)
|
||||||
member
|
member
|
||||||
end
|
end
|
||||||
|
|
||||||
# 查找每个学生每个作业的评分
|
# 查找每个学生每个作业的评分
|
||||||
def student_homework_score
|
def student_homework_score
|
||||||
homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score
|
homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score
|
||||||
FROM student_works,homework_commons
|
FROM student_works,homework_commons
|
||||||
WHERE student_works.homework_common_id = homework_commons.id
|
WHERE student_works.homework_common_id = homework_commons.id
|
||||||
AND homework_commons.course_id = #{self.course_id}
|
AND homework_commons.course_id = #{self.course_id}
|
||||||
AND student_works.user_id = #{self.user_id}")
|
AND student_works.user_id = #{self.user_id}")
|
||||||
score_count = StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
|
score_count = StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
|
||||||
[homework_score, format("%0.2f", score_count)]
|
[homework_score, format("%0.2f", score_count)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def student_work_score
|
def student_work_score
|
||||||
StudentWork.select("homework_commons.name, student_works.final_score").joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}")
|
StudentWork.select("homework_commons.name, student_works.final_score").joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}")
|
||||||
end
|
end
|
||||||
|
|
||||||
#当前课程的作业列表
|
#当前课程的作业列表
|
||||||
def homework_common_list
|
def homework_common_list
|
||||||
HomeworkCommon.where(:course_id => self.course_id)
|
HomeworkCommon.where(:course_id => self.course_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
#当前学生在指定作业内的得分
|
#当前学生在指定作业内的得分
|
||||||
def homework_common_score homework_common
|
def homework_common_score homework_common
|
||||||
StudentWork.select("IF(final_score is null,null,IF(final_score = 0, 0, final_score - absence_penalty - late_penalty)) as final_score").where(:homework_common_id => homework_common.id,:user_id => self.user_id)
|
StudentWork.select("IF(final_score is null,null,IF(final_score = 0, 0, final_score - absence_penalty - late_penalty)) as final_score").where(:homework_common_id => homework_common.id,:user_id => self.user_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def student_work_score_avg
|
def student_work_score_avg
|
||||||
StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
|
StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
def student_work_score_sum
|
def student_work_score_sum
|
||||||
sql_select = "SELECT (SUM(IF(student_works.final_score IS NULL,NULL,IF(student_works.final_score =0,0,student_works.final_score - student_works.absence_penalty - student_works.late_penalty)))) as score
|
sql_select = "SELECT (SUM(IF(student_works.final_score IS NULL,NULL,IF(student_works.final_score =0,0,student_works.final_score - student_works.absence_penalty - student_works.late_penalty)))) as score
|
||||||
FROM student_works,homework_commons
|
FROM student_works,homework_commons
|
||||||
WHERE student_works.homework_common_id = homework_commons.id
|
WHERE student_works.homework_common_id = homework_commons.id
|
||||||
AND homework_commons.course_id = #{self.course_id}
|
AND homework_commons.course_id = #{self.course_id}
|
||||||
AND student_works.user_id = #{self.user_id}"
|
AND student_works.user_id = #{self.user_id}"
|
||||||
score = StudentWork.find_by_sql(sql_select)
|
score = StudentWork.find_by_sql(sql_select)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def validate_role
|
def validate_role
|
||||||
errors.add_on_empty :role if member_roles.empty? && roles.empty?
|
errors.add_on_empty :role if member_roles.empty? && roles.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def searchTeacherAndAssistant project
|
def searchTeacherAndAssistant project
|
||||||
#searchPeopleByRoles(project, TeacherRoles)
|
#searchPeopleByRoles(project, TeacherRoles)
|
||||||
members = []
|
members = []
|
||||||
project.members.each do |m|
|
project.members.each do |m|
|
||||||
members << m if m && m.user && m.user.allowed_to?(:as_teacher,project)
|
members << m if m && m.user && m.user.allowed_to?(:as_teacher,project)
|
||||||
end
|
end
|
||||||
members
|
members
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -0,0 +1,64 @@
|
|||||||
|
<h3><%=l(:label_course_resource_list)%></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th style="width: 60px;">
|
||||||
|
资源名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
资源大小
|
||||||
|
</th>
|
||||||
|
<th style="width: 25px;">
|
||||||
|
资源类型
|
||||||
|
</th>
|
||||||
|
<th style="width: 23px;">
|
||||||
|
上传时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 15px;">
|
||||||
|
下载次数
|
||||||
|
</th>
|
||||||
|
<th style="width: 20px;">
|
||||||
|
上传者
|
||||||
|
</th>
|
||||||
|
<th style="width: 35px;">
|
||||||
|
所属课程
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @resource.each do |resource| %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: left;">
|
||||||
|
<%= link_to truncate(resource.filename, :length => 18), download_named_attachment_path(resource.id, resource.filename ), :title => resource.filename,:class=>'resourcesBlack'%>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= number_to_human_size(resource.filesize)%>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
课程资源
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= format_date(resource.created_on)%>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= resource.downloads %>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= link_to(User.find(resource.author_id).realname, user_path(User.find(resource.author_id)) ) %>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%=link_to truncate(Course.find(resource.container_id).name, :length => 10), course_path(Course.find(resource.container_id)), :title => Course.find(resource.container_id).name, :class => "hidden fl w170" %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
@ -0,0 +1,75 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_excellent_courses_list)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 25px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
课程名
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
主讲老师
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
学生数
|
||||||
|
</th>
|
||||||
|
<th style="width: 25px;">
|
||||||
|
作业数
|
||||||
|
</th>
|
||||||
|
<th style="width: 25px;">
|
||||||
|
作品数
|
||||||
|
</th>
|
||||||
|
<th style="width: 25px;">
|
||||||
|
资源数
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
帖子数
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
动态数
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @courses.each do |course| %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= course.id %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=course.name%>'>
|
||||||
|
<span>
|
||||||
|
<%= link_to(course.name, course_path(course.id)) %>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= studentCount(course) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= course.homework_commons.count%>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= student_works_num(course) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= visable_attachemnts_incourse(course).count%>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", course.boards.first.id, nil).count %>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= course.course_activities.count%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -0,0 +1,64 @@
|
|||||||
|
<h3><%=l(:label_project_resource_list)%></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th style="width: 60px;">
|
||||||
|
资源名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
资源大小
|
||||||
|
</th>
|
||||||
|
<th style="width: 25px;">
|
||||||
|
资源类型
|
||||||
|
</th>
|
||||||
|
<th style="width: 23px;">
|
||||||
|
上传时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 15px;">
|
||||||
|
下载次数
|
||||||
|
</th>
|
||||||
|
<th style="width: 20px;">
|
||||||
|
上传者
|
||||||
|
</th>
|
||||||
|
<th style="width: 35px;">
|
||||||
|
所属项目
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @pro_resource.each do |pro_resource| %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: left;">
|
||||||
|
<%= link_to truncate(pro_resource.filename, :length => 18), download_named_attachment_path(pro_resource.id, pro_resource.filename ), :title => pro_resource.filename,:class=>'resourcesBlack'%>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= number_to_human_size(pro_resource.filesize)%>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
项目资源
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= format_date(pro_resource.created_on)%>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= pro_resource.downloads %>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%= link_to(User.find(pro_resource.author_id).realname, user_path(User.find(pro_resource.author_id)) ) %>
|
||||||
|
</td>
|
||||||
|
<td style=" text-align: center;">
|
||||||
|
<%=link_to truncate(Project.find(pro_resource.container_id).name, :length => 10), project_path(Project.find(pro_resource.container_id)), :title => Project.find(pro_resource.container_id).name, :class => "hidden fl w170" %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
@ -1,21 +1,21 @@
|
|||||||
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||||
<div class="ReplyToMessageInputContainer mb10">
|
<div class="ReplyToMessageInputContainer mb10">
|
||||||
<div nhname='new_message_<%= reply.id%>'>
|
<div nhname='new_message_<%= reply.id%>'>
|
||||||
<%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
<%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||||
<% if course_id%>
|
<% if course_id%>
|
||||||
<input type="hidden" name="course_id" id="" value="<%= course_id%>">
|
<input type="hidden" name="course_id" id="" value="<%= course_id%>">
|
||||||
<% end %>
|
<% end %>
|
||||||
<input type="hidden" name="blog_comment[title]" id="reply_subject">
|
<input type="hidden" name="blog_comment[title]" id="reply_subject">
|
||||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="blog_comment[content]"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="blog_comment[content]"></textarea>
|
||||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
@ -1,6 +1,5 @@
|
|||||||
<% if User.current.logged? && User.current.id == @user.id %>
|
|
||||||
<%= form_for @article, :url =>{:controller=>'blog_comments',:action => 'update',:user_id=>@user.id , :blog_id => @article.id, :is_homepage => params[:is_homepage],:in_act => params[:in_act]},:method=>'PUT',
|
<%= form_for @article, :url =>{:controller=>'blog_comments',:action => 'update',:user_id=>@user.id , :blog_id => @article.id, :is_homepage => params[:is_homepage],:in_act => params[:in_act]},:method=>'PUT',
|
||||||
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'blog_comments/edit', :locals => {:f => f, :article => @article, :edit_mode => true, :user => @user} %>
|
<%= render :partial => 'blog_comments/edit', :locals => {:f => f, :article => @article, :edit_mode => true, :user => @user} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
@ -1,86 +1,86 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<% issue.journals.reorder("created_on desc").each do |reply| %>
|
<% issue.journals.reorder("created_on desc").each do |reply| %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
showNormalImage('reply_content_<%= reply.id %>');
|
showNormalImage('reply_content_<%= reply.id %>');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% replies_all_i=replies_all_i + 1 %>
|
<% replies_all_i=replies_all_i + 1 %>
|
||||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();" >
|
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();" >
|
||||||
<div class="homepagePostReplyPortrait" >
|
<div class="homepagePostReplyPortrait" >
|
||||||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes">
|
||||||
<div class="homepagePostReplyPublisher mt-4">
|
<div class="homepagePostReplyPublisher mt-4">
|
||||||
<% if reply.try(:user).try(:realname) == ' ' %>
|
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||||
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%#= format_time(reply.created_on) %>
|
<%#= format_time(reply.created_on) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
||||||
<% if reply.details.any? %>
|
<% if reply.details.any? %>
|
||||||
<% details_to_strings(reply.details).each do |string| %>
|
<% details_to_strings(reply.details).each do |string| %>
|
||||||
<p><%= string %></p>
|
<p><%= string %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<P><%= reply.notes.html_safe %></P>
|
<P><%= reply.notes.html_safe %></P>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 7px">
|
<div style="margin-top: 7px">
|
||||||
<%= format_time(reply.created_on) %>
|
<%= format_time(reply.created_on) %>
|
||||||
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'issues', :action => 'reply', :user_id => reply.user_id, :id => issue.id, :journal_id => reply.id},
|
{:controller => 'issues', :action => 'reply', :user_id => reply.user_id, :id => issue.id, :journal_id => reply.id},
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:class => 'fr newsBlue',
|
:class => 'fr newsBlue',
|
||||||
:title => l(:button_reply)) if User.current.logged? %>
|
:title => l(:button_reply)) if User.current.logged? %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>reply.id},
|
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>reply.id},
|
||||||
:method => :get,
|
:method => :get,
|
||||||
:remote=>true,
|
:remote=>true,
|
||||||
:class => 'fr newsGrey mr10',
|
:class => 'fr newsGrey mr10',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if reply.user_id == User.current.id %>
|
) if reply.user_id == User.current.id %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p id="reply_message_<%= reply.id%>"></p>
|
<p id="reply_message_<%= reply.id%>"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
||||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
<div nhname='new_message_<%= @issue.id %>' style="display:none;">
|
<div nhname='new_message_<%= @issue.id %>' style="display:none;">
|
||||||
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
|
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
|
||||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||||
<!--<div class="cl"></div>-->
|
<!--<div class="cl"></div>-->
|
||||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||||
<div nhname='toolbar_container_<%= @issue.id %>' ></div>
|
<div nhname='toolbar_container_<%= @issue.id %>' ></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5 fl">
|
<div class="mt5 fl">
|
||||||
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
|
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
|
||||||
</div>
|
</div>
|
||||||
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
||||||
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" class="blue_n_btn fr mt5" style="display:none;">发送</a>
|
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
@ -1,27 +1,27 @@
|
|||||||
<div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @issue.id%>">
|
<div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @issue.id%>">
|
||||||
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
||||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ReplyToMessageInputContainer mb10">
|
<div class="ReplyToMessageInputContainer mb10">
|
||||||
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
||||||
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||||
<!--<div class="cl"></div>-->
|
<!--<div class="cl"></div>-->
|
||||||
<input type="hidden" name="quote" value=""/>
|
<input type="hidden" name="quote" value=""/>
|
||||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||||
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
||||||
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,19 +1,19 @@
|
|||||||
|
|
||||||
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
|
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||||
<div class="ReplyToMessageInputContainer mb10">
|
<div class="ReplyToMessageInputContainer mb10">
|
||||||
<div nhname='new_message_<%= reply.id%>'>
|
<div nhname='new_message_<%= reply.id%>'>
|
||||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea>
|
||||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
@ -1,18 +1,18 @@
|
|||||||
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||||
<div class="ReplyToMessageInputContainer mb10">
|
<div class="ReplyToMessageInputContainer mb10">
|
||||||
<div nhname='new_message_<%= reply.id%>'>
|
<div nhname='new_message_<%= reply.id%>'>
|
||||||
<%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
<%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||||
<input type="hidden" name="org_document_comment[title]" id="reply_subject">
|
<input type="hidden" name="org_document_comment[title]" id="reply_subject">
|
||||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="org_document_comment[content]"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="org_document_comment[content]"></textarea>
|
||||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
@ -1,102 +1,102 @@
|
|||||||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||||
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||||
<li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
|
<li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="hworkPortrait mt15 mr10">
|
<li class="hworkPortrait mt15 mr10">
|
||||||
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40"),user_activities_path(student_work.user)) %>
|
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40"),user_activities_path(student_work.user)) %>
|
||||||
</li>
|
</li>
|
||||||
<div onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>">
|
<div onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>">
|
||||||
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>">
|
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>">
|
||||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||||
<div>
|
<div>
|
||||||
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<% if @homework.homework_type != 3 %>
|
<% if @homework.homework_type != 3 %>
|
||||||
<ul class="mt10 fl">
|
<ul class="mt10 fl">
|
||||||
<li class="hworkStName mr10 mt16" title="<%= student_work.user.show_name%>">
|
<li class="hworkStName mr10 mt16" title="<%= student_work.user.show_name%>">
|
||||||
<%= student_work.user.show_name%>
|
<%= student_work.user.show_name%>
|
||||||
</li>
|
</li>
|
||||||
<li class="hworkStID mt16" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>">
|
<li class="hworkStID mt16" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>">
|
||||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||||
<ul class="mt10 fl">
|
<ul class="mt10 fl">
|
||||||
<li class="hworkPrName mr10 mt12" title="项目名称">
|
<li class="hworkPrName mr10 mt12" title="项目名称">
|
||||||
<%= student_work.project.name %>
|
<%= student_work.project.name %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||||
<% if student_work.created_at && @homework.end_time%>
|
<% if student_work.created_at && @homework.end_time%>
|
||||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
|
||||||
<span class="c_red">[迟交]</span>
|
<span class="c_red">[迟交]</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<li class="hworkList50 <%= score_color student_work.teacher_score%>">
|
<li class="hworkList50 <%= score_color student_work.teacher_score%>">
|
||||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||||
</li>
|
</li>
|
||||||
<li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
|
<li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
|
||||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<% if @homework.homework_type == 2%>
|
<% if @homework.homework_type == 2%>
|
||||||
<!-- 系统评分 -->
|
<!-- 系统评分 -->
|
||||||
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
||||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||||
</li>
|
</li>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
<% if @homework.anonymous_comment == 0%>
|
<% if @homework.anonymous_comment == 0%>
|
||||||
<li class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
|
<li class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
|
||||||
<%= student_work.student_score.nil? ? "未参与" : format("%.1f",student_work.student_score)%>
|
<%= student_work.student_score.nil? ? "未参与" : format("%.1f",student_work.student_score)%>
|
||||||
<% unless student_work.student_score.nil?%>
|
<% unless student_work.student_score.nil?%>
|
||||||
<span class="linkBlue">
|
<span class="linkBlue">
|
||||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
|
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
|
||||||
</span>
|
</span>
|
||||||
<div class="infoNi none">
|
<div class="infoNi none">
|
||||||
现共有
|
现共有
|
||||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> </span>
|
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> </span>
|
||||||
名学生进行了匿评,平均分为
|
名学生进行了匿评,平均分为
|
||||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- 成绩 -->
|
<!-- 成绩 -->
|
||||||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||||
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
||||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||||
<% unless score.nil?%>
|
<% unless score.nil?%>
|
||||||
<div class="infoNi none width180">
|
<div class="infoNi none width180">
|
||||||
作品最终评分为
|
作品最终评分为
|
||||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||||
迟交扣分
|
迟交扣分
|
||||||
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
||||||
缺评扣分
|
缺评扣分
|
||||||
<span class="c_red"> <%= student_work.absence_penalty%> </span>分,
|
<span class="c_red"> <%= student_work.absence_penalty%> </span>分,
|
||||||
最终成绩为
|
最终成绩为
|
||||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分。
|
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分。
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||||
</ul>
|
</ul>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(".student_work_<%= student_work.id%>").mouseenter(function(){
|
$(".student_work_<%= student_work.id%>").mouseenter(function(){
|
||||||
if($("#about_hwork_<%= student_work.id%>").html().trim() == "") {
|
if($("#about_hwork_<%= student_work.id%>").html().trim() == "") {
|
||||||
$("#work_click_<%= student_work.id%>").show();
|
$("#work_click_<%= student_work.id%>").show();
|
||||||
}
|
}
|
||||||
}).mouseleave(function(){
|
}).mouseleave(function(){
|
||||||
$("#work_click_<%= student_work.id%>").hide();
|
$("#work_click_<%= student_work.id%>").hide();
|
||||||
}).mouse;
|
}).mouse;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
<% if AtMessage === ma && ma.at_valid? %>
|
<% if AtMessage === ma && ma.at_valid? %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
|
||||||
<li class="homepageNewsPubType fl">
|
<li class="homepageNewsPubType fl">
|
||||||
<span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span>
|
<span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsContent fl">
|
<li class="homepageNewsContent fl">
|
||||||
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
||||||
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
|
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
|
||||||
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
|
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
|
||||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %>
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
||||||
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
|
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
|
||||||
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
|
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
|
||||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %>
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to ma.subject.html_safe, ma.url, :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
|
<%= link_to ma.subject.html_safe, ma.url, :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<div style="display: none" class="message_title_red system_message_style">
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
<p><strong>标题:</strong><%= ma.subject %></p>
|
<p><strong>标题:</strong><%= ma.subject %></p>
|
||||||
<% unless ma.description.nil? %>
|
<% unless ma.description.nil? %>
|
||||||
<div class="fl"><strong>内容:</strong></div>
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
<div class="ml36"><%= ma.description.html_safe %></div>
|
<div class="ml36"><%= ma.description.html_safe %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
File diff suppressed because it is too large
Load Diff
@ -1,30 +1,30 @@
|
|||||||
<% if ma.class == UserFeedbackMessage %>
|
<% if ma.class == UserFeedbackMessage %>
|
||||||
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsPubType fl">
|
<li class="homepageNewsPubType fl">
|
||||||
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl">
|
||||||
<%= link_to ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
<%= link_to ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></a>
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
</li>
|
</li>
|
||||||
<div style="display: none" class="message_title_red system_message_style" >
|
<div style="display: none" class="message_title_red system_message_style" >
|
||||||
<% if ma.journals_for_message.reply_id == 0 %>
|
<% if ma.journals_for_message.reply_id == 0 %>
|
||||||
<%= ma.journals_for_message.notes.html_safe %>
|
<%= ma.journals_for_message.notes.html_safe %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="fl"><strong>您的留言:</strong></div>
|
<div class="fl"><strong>您的留言:</strong></div>
|
||||||
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
||||||
<div class="fl"><strong>回复内容:</strong></div>
|
<div class="fl"><strong>回复内容:</strong></div>
|
||||||
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
@ -1,18 +1,18 @@
|
|||||||
class UpdateHomeworkCommonUpdatedAt < ActiveRecord::Migration
|
class UpdateHomeworkCommonUpdatedAt < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
count = HomeworkCommon.all.count / 30 + 2
|
count = HomeworkCommon.all.count / 30 + 2
|
||||||
transaction do
|
transaction do
|
||||||
for i in 1 ... count do i
|
for i in 1 ... count do i
|
||||||
HomeworkCommon.page(i).per(30).each do |hw|
|
HomeworkCommon.page(i).per(30).each do |hw|
|
||||||
ca = CourseActivity.where("course_act_type = 'HomeworkCommon' and course_act_id = #{hw.id}").first
|
ca = CourseActivity.where("course_act_type = 'HomeworkCommon' and course_act_id = #{hw.id}").first
|
||||||
unless ca.nil?
|
unless ca.nil?
|
||||||
hw.update_attributes(:updated_at => ca.updated_at)
|
hw.update_attributes(:updated_at => ca.updated_at)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
class UpdateContributorAfterDelete < ActiveRecord::Migration
|
class UpdateContributorAfterDelete < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
Course.all.each do |course|
|
Course.all.each do |course|
|
||||||
if course.course_activities.count > 1
|
if course.course_activities.count > 1
|
||||||
course.members.each do |s|
|
course.members.each do |s|
|
||||||
puts course.id
|
puts course.id
|
||||||
puts course.name
|
puts course.name
|
||||||
puts s.user_id
|
puts s.user_id
|
||||||
# board_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?",s.student_id, course.id, "Message").count * 2
|
# board_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?",s.student_id, course.id, "Message").count * 2
|
||||||
# 发帖数
|
# 发帖数
|
||||||
board_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is null;").count
|
board_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is null;").count
|
||||||
# 回帖数
|
# 回帖数
|
||||||
message_reply_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is not null").count * 1
|
message_reply_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is not null").count * 1
|
||||||
# 新闻回复
|
# 新闻回复
|
||||||
common_reply_count = Comment.find_by_sql("select cm.* from comments cm, news n where cm.author_id = #{s.user_id} and n.course_id = #{course.id} and cm.commented_id = n.id and cm.commented_type ='News'").count * 1
|
common_reply_count = Comment.find_by_sql("select cm.* from comments cm, news n where cm.author_id = #{s.user_id} and n.course_id = #{course.id} and cm.commented_id = n.id and cm.commented_type ='News'").count * 1
|
||||||
# 通知
|
# 通知
|
||||||
common_count = News.find_by_sql("select n.* from news n where n.author_id = #{s.user_id} and n.course_id = #{course.id} ").count * 1
|
common_count = News.find_by_sql("select n.* from news n where n.author_id = #{s.user_id} and n.course_id = #{course.id} ").count * 1
|
||||||
# attachment_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "Attachment").count * 5
|
# attachment_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "Attachment").count * 5
|
||||||
# 附件数
|
# 附件数
|
||||||
attachment_count = Attachment.find_by_sql("SELECT * FROM `attachments` where container_id = #{course.id} and author_id = #{s.user_id} and container_type ='Course'").count
|
attachment_count = Attachment.find_by_sql("SELECT * FROM `attachments` where container_id = #{course.id} and author_id = #{s.user_id} and container_type ='Course'").count
|
||||||
# 课程留言数
|
# 课程留言数
|
||||||
journal_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? ", s.user_id, course.id, "Course").count * 1
|
journal_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? ", s.user_id, course.id, "Course").count * 1
|
||||||
# 作业留言
|
# 作业留言
|
||||||
journal_homework_count = JournalsForMessage.find_by_sql("SELECT jfm.* FROM `journals_for_messages` jfm, homework_commons hc where hc.id = jfm.jour_id and hc.course_id =#{course.id} and jfm.user_id =#{s.user_id} and jfm.jour_type ='HomeworkCommon';").count * 1
|
journal_homework_count = JournalsForMessage.find_by_sql("SELECT jfm.* FROM `journals_for_messages` jfm, homework_commons hc where hc.id = jfm.jour_id and hc.course_id =#{course.id} and jfm.user_id =#{s.user_id} and jfm.jour_type ='HomeworkCommon';").count * 1
|
||||||
# journal_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "JournalsForMessage").count * 1
|
# journal_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "JournalsForMessage").count * 1
|
||||||
# journal_reply_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? and status =?", s.student_id, course.id, "Course",1).count * 1
|
# journal_reply_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? and status =?", s.student_id, course.id, "Course",1).count * 1
|
||||||
total = board_count + message_reply_count + common_reply_count + attachment_count + journal_count
|
total = board_count + message_reply_count + common_reply_count + attachment_count + journal_count
|
||||||
course_contributor = CourseContributorScore.where("course_id =? and user_id =?", course.id, s.user_id).first
|
course_contributor = CourseContributorScore.where("course_id =? and user_id =?", course.id, s.user_id).first
|
||||||
if course_contributor.nil?
|
if course_contributor.nil?
|
||||||
CourseContributorScore.create(:course_id => course.id, :user_id => s.user_id, :message_num => board_count, :message_reply_num => message_reply_count,
|
CourseContributorScore.create(:course_id => course.id, :user_id => s.user_id, :message_num => board_count, :message_reply_num => message_reply_count,
|
||||||
:news_reply_num => common_reply_count, :news_num => common_count, :resource_num => attachment_count, :journal_num => journal_count,
|
:news_reply_num => common_reply_count, :news_num => common_count, :resource_num => attachment_count, :journal_num => journal_count,
|
||||||
:homework_journal_num => journal_homework_count, :journal_reply_num => 0, :total_score => total)
|
:homework_journal_num => journal_homework_count, :journal_reply_num => 0, :total_score => total)
|
||||||
else
|
else
|
||||||
course_contributor.message_num = board_count
|
course_contributor.message_num = board_count
|
||||||
course_contributor.message_reply_num = message_reply_count
|
course_contributor.message_reply_num = message_reply_count
|
||||||
course_contributor.news_reply_num = common_reply_count
|
course_contributor.news_reply_num = common_reply_count
|
||||||
course_contributor.news_num = common_count
|
course_contributor.news_num = common_count
|
||||||
course_contributor.resource_num = attachment_count
|
course_contributor.resource_num = attachment_count
|
||||||
course_contributor.journal_num = journal_count
|
course_contributor.journal_num = journal_count
|
||||||
course_contributor.homework_journal_num = journal_homework_count
|
course_contributor.homework_journal_num = journal_homework_count
|
||||||
course_contributor.save
|
course_contributor.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
class DeleteStudentWorkData < ActiveRecord::Migration
|
class DeleteStudentWorkData < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
StudentWork.where("homework_common_id = 2604 AND user_id = 10763 AND final_score = 0").destroy_all
|
StudentWork.where("homework_common_id = 2604 AND user_id = 10763 AND final_score = 0").destroy_all
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddVisitsToUser < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :users, :visits, :integer, :default => 0
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddVisitsToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :visits, :integer, :default => 0
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddVisitsToCourse < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :courses, :visits, :integer, :default => 0
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddVisitsToOrganization < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :organizations, :visits, :integer, :default => 0
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,8 @@
|
|||||||
|
class UpdateCourseLead < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
Message.where("status =? ", 1).update_all(:author_id => 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
@ -1,73 +1,78 @@
|
|||||||
#coding=utf-8
|
#coding=utf-8
|
||||||
|
|
||||||
module Trustie
|
module Trustie
|
||||||
module Gitlab
|
module Gitlab
|
||||||
module Helper
|
module Helper
|
||||||
GUEST = 10
|
GUEST = 10
|
||||||
REPORTER = 20
|
REPORTER = 20
|
||||||
DEVELOPER = 30
|
DEVELOPER = 30
|
||||||
MASTER = 40
|
MASTER = 40
|
||||||
OWNER = 50
|
OWNER = 50
|
||||||
# 项目公开和私有
|
# 项目公开和私有
|
||||||
PUBLIC = 20
|
PUBLIC = 20
|
||||||
PRIVATE = 0
|
PRIVATE = 0
|
||||||
|
|
||||||
def change_password(uid, en_pwd, salt)
|
def change_password(uid, en_pwd, salt)
|
||||||
return unless uid
|
return unless uid
|
||||||
options = {:encrypted_password=>en_pwd, :password_salt=>salt}
|
options = {:encrypted_password=>en_pwd, :password_salt=>salt}
|
||||||
self.g.put("/users/ext/#{uid}", :body => options)
|
self.g.put("/users/ext/#{uid}", :body => options)
|
||||||
# g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
|
# g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_user(user)
|
def find_user(user)
|
||||||
us = self.g.get("/users?search=#{user.mail}")
|
us = self.g.get("/users?search=#{user.mail}")
|
||||||
if Array === us
|
if Array === us
|
||||||
us.each do |u|
|
us.each do |u|
|
||||||
return u if u.email == user.mail
|
return u if u.email == user.mail
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_user(user)
|
def add_user(user)
|
||||||
u = nil
|
u = nil
|
||||||
begin
|
begin
|
||||||
u = find_user(user)
|
u = find_user(user)
|
||||||
unless u
|
unless u
|
||||||
u = self.g.create_user(user.mail,
|
u = self.g.create_user(user.mail,
|
||||||
user.hashed_password,
|
user.hashed_password,
|
||||||
name: user.show_name,
|
name: user.show_name,
|
||||||
username: user.login,
|
username: user.login,
|
||||||
confirm: "true")
|
confirm: "true")
|
||||||
user.gid = u.id
|
user.gid = u.id
|
||||||
end
|
user.save
|
||||||
change_password(u.id, user.hashed_password, user.salt)
|
end
|
||||||
rescue => e
|
if user.gid.nil?
|
||||||
puts e
|
user.gid = u.id
|
||||||
end
|
user.save
|
||||||
return u
|
end
|
||||||
end
|
change_password(u.id, user.hashed_password, user.salt)
|
||||||
|
rescue => e
|
||||||
def del_user(user)
|
puts e
|
||||||
return unless user.gid
|
end
|
||||||
self.g.delete_user(user.gid)
|
return u
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_gitlab_role m
|
def del_user(user)
|
||||||
case m.roles.first.position
|
return unless user.gid
|
||||||
when 1,2
|
self.g.delete_user(user.gid)
|
||||||
GUEST
|
end
|
||||||
when 5
|
|
||||||
REPORTER
|
def get_gitlab_role m
|
||||||
when 4
|
case m.roles.first.position
|
||||||
DEVELOPER
|
when 1,2
|
||||||
when 3
|
GUEST
|
||||||
MASTER
|
when 5
|
||||||
else
|
REPORTER
|
||||||
GUEST
|
when 4
|
||||||
end
|
DEVELOPER
|
||||||
end
|
when 3
|
||||||
|
MASTER
|
||||||
end
|
else
|
||||||
end
|
GUEST
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
File diff suppressed because it is too large
Load Diff
@ -1,49 +1,51 @@
|
|||||||
.ke-content {
|
.ke-content {
|
||||||
font-size: 10pt;
|
font-size: 12px;
|
||||||
}
|
font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: ΢ÈíÑźÚ, ËÎÌå;
|
||||||
.ke-content pre {
|
font-family:Tahoma;
|
||||||
font-size:9pt;
|
}
|
||||||
font-family:Courier New,Arial;
|
.ke-content pre {
|
||||||
border:1px solid #ddd;
|
font-size:9pt;
|
||||||
border-left:5px solid #6CE26C;
|
font-family:Courier New,Arial;
|
||||||
background:#f6f6f6;
|
border:1px solid #ddd;
|
||||||
padding:5px;
|
border-left:5px solid #6CE26C;
|
||||||
}
|
background:#f6f6f6;
|
||||||
|
padding:5px;
|
||||||
.ke-content code {
|
}
|
||||||
margin: 0 2px;
|
|
||||||
padding: 0 5px;
|
.ke-content code {
|
||||||
white-space: nowrap;
|
margin: 0 2px;
|
||||||
border: 1px solid #DDD;
|
padding: 0 5px;
|
||||||
background-color: #F6F6F6;
|
white-space: nowrap;
|
||||||
border-radius: 3px;
|
border: 1px solid #DDD;
|
||||||
}
|
background-color: #F6F6F6;
|
||||||
|
border-radius: 3px;
|
||||||
.ke-content pre>code {
|
}
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
.ke-content pre>code {
|
||||||
white-space: pre;
|
margin: 0;
|
||||||
border: none;
|
padding: 0;
|
||||||
background: transparent;
|
white-space: pre;
|
||||||
}
|
border: none;
|
||||||
|
background: transparent;
|
||||||
.ke-content pre code {
|
}
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
.ke-content pre code {
|
||||||
}
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
.ke-content p {
|
}
|
||||||
/*margin: 0 0 15px 0;*/
|
|
||||||
/*margin-bottom:15pt;*/
|
.ke-content p {
|
||||||
line-height:1.5;
|
/*margin: 0 0 15px 0;*/
|
||||||
/*letter-spacing: 1px;*/
|
/*margin-bottom:15pt;*/
|
||||||
}
|
line-height:1.5;
|
||||||
|
/*letter-spacing: 1px;*/
|
||||||
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
|
}
|
||||||
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
|
|
||||||
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
|
||||||
|
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
|
||||||
|
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
||||||
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
|
|
||||||
span.at {color:#269ac9;}
|
|
||||||
|
.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;}
|
@ -1,38 +1,40 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* KindEditor - WYSIWYG HTML Editor for Internet
|
* KindEditor - WYSIWYG HTML Editor for Internet
|
||||||
* Copyright (C) 2006-2011 kindsoft.net
|
* Copyright (C) 2006-2011 kindsoft.net
|
||||||
*
|
*
|
||||||
* @author Roddy <luolonghao@gmail.com>
|
* @author Roddy <luolonghao@gmail.com>
|
||||||
* @site http://www.kindsoft.net/
|
* @site http://www.kindsoft.net/
|
||||||
* @licence http://www.kindsoft.net/license.php
|
* @licence http://www.kindsoft.net/license.php
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
KindEditor.plugin('lineheight', function(K) {
|
KindEditor.plugin('lineheight', function(K) {
|
||||||
var self = this, name = 'lineheight', lang = self.lang(name + '.');
|
var self = this, name = 'lineheight', lang = self.lang(name + '.');
|
||||||
self.clickToolbar(name, function() {
|
self.clickToolbar(name, function() {
|
||||||
var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'});
|
var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'});
|
||||||
if (commonNode) {
|
if (commonNode) {
|
||||||
curVal = commonNode.css('line-height');
|
curVal = commonNode.css('line-height');
|
||||||
}
|
}
|
||||||
var menu = self.createMenu({
|
var menu = self.createMenu({
|
||||||
name : name,
|
name : name,
|
||||||
width : 150
|
width : 150
|
||||||
});
|
});
|
||||||
K.each(lang.lineHeight, function(i, row) {
|
K.each(lang.lineHeight, function(i, row) {
|
||||||
K.each(row, function(key, val) {
|
K.each(row, function(key, val) {
|
||||||
menu.addItem({
|
menu.addItem({
|
||||||
title : val,
|
title : val,
|
||||||
checked : curVal === key,
|
checked : curVal === key,
|
||||||
click : function() {
|
click : function() {
|
||||||
self.cmd.toggle('<span style="line-height:' + key + ';"></span>', {
|
self.cmd.toggle('<span style="line-height:' + key + ';"></span>', {
|
||||||
span : '.line-height=' + key
|
span : '.line-height=' + key
|
||||||
});
|
});
|
||||||
self.updateState();
|
self.updateState();
|
||||||
self.addBookmark();
|
self.addBookmark();
|
||||||
self.hideMenu();
|
//curVal = key;
|
||||||
}
|
//self.cmd.doc.body.style.lineHeight = key;
|
||||||
});
|
self.hideMenu();
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 8.4 KiB |
@ -1,177 +1,183 @@
|
|||||||
//需求:表情栏可以隐藏显示,高度只要一点高
|
//需求:表情栏可以隐藏显示,高度只要一点高
|
||||||
function sd_create_editor(params){
|
function sd_create_editor(params){
|
||||||
// var minHeight; //最小高度
|
// var minHeight; //最小高度
|
||||||
var paramsHeight = params.height; //设定的高度
|
var paramsHeight = params.height; //设定的高度
|
||||||
var id = arguments[1] ? arguments[1] : undefined;
|
var id = arguments[1] ? arguments[1] : undefined;
|
||||||
var type = arguments[2] ? arguments[2] : '';
|
var type = arguments[2] ? arguments[2] : '';
|
||||||
var paramsWidth = params.width == undefined ? "100%" : params.width;
|
var paramsWidth = params.width == undefined ? "100%" : params.width;
|
||||||
|
|
||||||
var editor = params.kindutil.create(params.textarea, {
|
var editor = params.kindutil.create(params.textarea, {
|
||||||
resizeType : 1,minWidth:"1px",width:"94%",
|
resizeType : 1,minWidth:"1px",width:"94%",
|
||||||
height:"33px",// == undefined ? "30px":paramsHeight+"px",
|
height:"33px",// == undefined ? "30px":paramsHeight+"px",
|
||||||
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
|
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
|
||||||
width:params.width,
|
width:params.width,
|
||||||
items:['emoticons','fontname',
|
/*
|
||||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
items:['emoticons','fontname',
|
||||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||||
'|','imagedirectupload','more'],
|
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||||
afterChange:function(){//按键事件
|
'|','imagedirectupload','more'],*/
|
||||||
var edit = this.edit;
|
items : ['code','emoticons','fontname',
|
||||||
var body = edit.doc.body;
|
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||||
edit.iframe.height(paramsHeight);
|
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight));
|
'|','imagedirectupload','table', 'media', 'preview',"more"
|
||||||
},
|
],
|
||||||
afterBlur:function(){
|
afterChange:function(){//按键事件
|
||||||
//params.toolbar_container.hide();
|
var edit = this.edit;
|
||||||
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
var body = edit.doc.body;
|
||||||
if(this.isEmpty()) {
|
edit.iframe.height(paramsHeight);
|
||||||
this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
|
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight));
|
||||||
}
|
},
|
||||||
//params.toolbar_container.hide();
|
afterBlur:function(){
|
||||||
$('#reply_image_' + id).addClass('imageFuzzy');
|
//params.toolbar_container.hide();
|
||||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
|
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||||
params.submit_btn.hide();
|
if(this.isEmpty()) {
|
||||||
params.toolbar_container.hide();
|
this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
|
||||||
this.resize("100%", null);
|
}
|
||||||
}else if(this.edit.html().trim() != ""){
|
//params.toolbar_container.hide();
|
||||||
params.submit_btn.show();
|
$('#reply_image_' + id).addClass('imageFuzzy');
|
||||||
params.toolbar_container.show();
|
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
|
||||||
}
|
params.submit_btn.hide();
|
||||||
|
params.toolbar_container.hide();
|
||||||
//params.submit_btn.css("display","none");
|
this.resize("100%", null);
|
||||||
},
|
}else if(this.edit.html().trim() != ""){
|
||||||
afterFocus: function(){
|
params.submit_btn.show();
|
||||||
var edit = this.edit;
|
params.toolbar_container.show();
|
||||||
var body = edit.doc.body;
|
}
|
||||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
|
|
||||||
edit.html('');
|
//params.submit_btn.css("display","none");
|
||||||
}
|
},
|
||||||
params.submit_btn.show();
|
afterFocus: function(){
|
||||||
params.contentmsg.hide();
|
var edit = this.edit;
|
||||||
params.toolbar_container.show();
|
var body = edit.doc.body;
|
||||||
// params.toolbar_container.show();
|
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
|
||||||
$('#reply_image_' + id).removeClass('imageFuzzy');
|
edit.html('');
|
||||||
//edit.iframe.width(paramsWidth);
|
}
|
||||||
this.resize(paramsWidth, null);
|
params.submit_btn.show();
|
||||||
//params.submit_btn.show();
|
params.contentmsg.hide();
|
||||||
},
|
params.toolbar_container.show();
|
||||||
|
// params.toolbar_container.show();
|
||||||
afterCreate:function(){
|
$('#reply_image_' + id).removeClass('imageFuzzy');
|
||||||
//params.submit_btn.hide();
|
//edit.iframe.width(paramsWidth);
|
||||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
this.resize(paramsWidth, null);
|
||||||
toolbar.css('display','inline');
|
//params.submit_btn.show();
|
||||||
toolbar.css('padding',0);
|
},
|
||||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
|
||||||
params.toolbar_container.append(toolbar);
|
afterCreate:function(){
|
||||||
params.toolbar_container.hide();
|
//params.submit_btn.hide();
|
||||||
//init
|
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||||
var edit = this.edit;
|
toolbar.css('display','inline');
|
||||||
var body = edit.doc.body;
|
toolbar.css('padding',0);
|
||||||
edit.iframe[0].scroll = 'no';
|
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||||
body.style.overflowY = 'hidden';
|
params.toolbar_container.append(toolbar);
|
||||||
//reset height
|
params.toolbar_container.hide();
|
||||||
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
|
//init
|
||||||
edit.iframe.height(paramsHeight);
|
var edit = this.edit;
|
||||||
edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
|
var body = edit.doc.body;
|
||||||
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
|
edit.iframe[0].scroll = 'no';
|
||||||
// params.toolbar_container.hide();
|
body.style.overflowY = 'hidden';
|
||||||
if(typeof enableAt === 'function'){
|
//reset height
|
||||||
enableAt(this, id, type);
|
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>");
|
||||||
}).loadPlugin('paste');
|
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
|
||||||
return editor;
|
// params.toolbar_container.hide();
|
||||||
}
|
if(typeof enableAt === 'function'){
|
||||||
|
enableAt(this, id, type);
|
||||||
function sd_check_editor_form_field(params){
|
}
|
||||||
var result=true;
|
}
|
||||||
if(params.content!=undefined){
|
}).loadPlugin('paste');
|
||||||
if(params.content.isEmpty()){
|
return editor;
|
||||||
result=false;
|
}
|
||||||
}
|
|
||||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
function sd_check_editor_form_field(params){
|
||||||
params.textarea.html(params.content.html());
|
var result=true;
|
||||||
params.content.sync();
|
if(params.content!=undefined){
|
||||||
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
|
if(params.content.isEmpty()){
|
||||||
params.contentmsg.html('内容不能为空');
|
result=false;
|
||||||
params.contentmsg.css({color:'#ff0000'});
|
}
|
||||||
}else{
|
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||||
params.contentmsg.html('填写正确');
|
params.textarea.html(params.content.html());
|
||||||
params.contentmsg.css({color:'#008000'});
|
params.content.sync();
|
||||||
}
|
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
|
||||||
params.contentmsg.show();
|
params.contentmsg.html('内容不能为空');
|
||||||
}
|
params.contentmsg.css({color:'#ff0000'});
|
||||||
}
|
}else{
|
||||||
return result;
|
params.contentmsg.html('填写正确');
|
||||||
}
|
params.contentmsg.css({color:'#008000'});
|
||||||
function sd_create_form(params){
|
}
|
||||||
params.form.submit(function(){
|
params.contentmsg.show();
|
||||||
var flag = false;
|
}
|
||||||
if(params.form.attr('data-remote') != undefined ){
|
}
|
||||||
flag = true
|
return result;
|
||||||
}
|
}
|
||||||
var is_checked = sd_check_editor_form_field({
|
function sd_create_form(params){
|
||||||
issubmit:true,
|
params.form.submit(function(){
|
||||||
content:params.editor,
|
var flag = false;
|
||||||
contentmsg:params.contentmsg,
|
if(params.form.attr('data-remote') != undefined ){
|
||||||
textarea:params.textarea
|
flag = true
|
||||||
});
|
}
|
||||||
if(is_checked){
|
var is_checked = sd_check_editor_form_field({
|
||||||
if(flag){
|
issubmit:true,
|
||||||
return true;
|
content:params.editor,
|
||||||
}else{
|
contentmsg:params.contentmsg,
|
||||||
$(this)[0].submit();
|
textarea:params.textarea
|
||||||
return false;
|
});
|
||||||
}
|
if(is_checked){
|
||||||
}
|
if(flag){
|
||||||
return false;
|
return true;
|
||||||
});
|
}else{
|
||||||
}
|
$(this)[0].submit();
|
||||||
function sd_reset_editor_form(params){
|
return false;
|
||||||
params.form[0].reset();
|
}
|
||||||
params.textarea.empty();
|
}
|
||||||
if(params.editor != undefined){
|
return false;
|
||||||
params.editor.html(params.textarea.html());
|
});
|
||||||
}
|
}
|
||||||
params.contentmsg.hide();
|
function sd_reset_editor_form(params){
|
||||||
}
|
params.form[0].reset();
|
||||||
//第二个参数是高度,可以传,可以不传
|
params.textarea.empty();
|
||||||
function sd_create_editor_from_data(id){
|
if(params.editor != undefined){
|
||||||
var height = arguments[1] ? arguments[1] : undefined;
|
params.editor.html(params.textarea.html());
|
||||||
var width = arguments[2] ? arguments[2] : undefined;
|
}
|
||||||
var type = arguments[3] ? arguments[3] : undefined;
|
params.contentmsg.hide();
|
||||||
KindEditor.ready(function (K) {
|
}
|
||||||
$("div[nhname='new_message_" + id + "']").each(function () {
|
//第二个参数是高度,可以传,可以不传
|
||||||
var params = {};
|
function sd_create_editor_from_data(id){
|
||||||
params.kindutil = K;
|
var height = arguments[1] ? arguments[1] : undefined;
|
||||||
params.div_form = $(this);
|
var width = arguments[2] ? arguments[2] : undefined;
|
||||||
params.form = $("form", params.div_form);
|
var type = arguments[3] ? arguments[3] : undefined;
|
||||||
if (params.form == undefined || params.form.length == 0) {
|
KindEditor.ready(function (K) {
|
||||||
return;
|
$("div[nhname='new_message_" + id + "']").each(function () {
|
||||||
}
|
var params = {};
|
||||||
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
|
params.kindutil = K;
|
||||||
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
|
params.div_form = $(this);
|
||||||
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
|
params.form = $("form", params.div_form);
|
||||||
params.cancel_btn = $("#new_message_cancel_btn_" + id);
|
if (params.form == undefined || params.form.length == 0) {
|
||||||
params.submit_btn = $("#new_message_submit_btn_" + id);
|
return;
|
||||||
params.height = height;
|
}
|
||||||
params.width = width;
|
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
|
||||||
if (params.textarea.data('init') == undefined) {
|
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
|
||||||
params.editor = sd_create_editor(params,id, type);
|
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
|
||||||
sd_create_form(params);
|
params.cancel_btn = $("#new_message_cancel_btn_" + id);
|
||||||
params.cancel_btn.click(function () {
|
params.submit_btn = $("#new_message_submit_btn_" + id);
|
||||||
sd_reset_editor_form(params);
|
params.height = height;
|
||||||
});
|
params.width = width;
|
||||||
params.submit_btn.click(function () {
|
if (params.textarea.data('init') == undefined) {
|
||||||
params.form.submit();
|
params.editor = sd_create_editor(params,id, type);
|
||||||
});
|
sd_create_form(params);
|
||||||
params.textarea.data('init', 1);
|
params.cancel_btn.click(function () {
|
||||||
$(this).show();
|
sd_reset_editor_form(params);
|
||||||
}
|
});
|
||||||
});
|
params.submit_btn.click(function () {
|
||||||
});
|
params.form.submit();
|
||||||
|
});
|
||||||
div_form = $("div[nhname='new_message_" + id + "']");
|
params.textarea.data('init', 1);
|
||||||
$(".ke-edit", div_form).css("height","33px");
|
$(this).show();
|
||||||
$(".ke-edit-iframe",div_form).css("height","33px");
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
div_form = $("div[nhname='new_message_" + id + "']");
|
||||||
|
$(".ke-edit", div_form).css("height","33px");
|
||||||
|
$(".ke-edit-iframe",div_form).css("height","33px");
|
||||||
}
|
}
|
@ -1,354 +1,354 @@
|
|||||||
/*
|
/*
|
||||||
# Code Review plugin for Redmine
|
# Code Review plugin for Redmine
|
||||||
# Copyright (C) 2009-2013 Haruyuki Iida
|
# Copyright (C) 2009-2013 Haruyuki Iida
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var topZindex = 1000;
|
var topZindex = 1000;
|
||||||
var action_type = '';
|
var action_type = '';
|
||||||
var rev = '';
|
var rev = '';
|
||||||
var rev_to = '';
|
var rev_to = '';
|
||||||
var path = '';
|
var path = '';
|
||||||
var urlprefix = '';
|
var urlprefix = '';
|
||||||
var review_form_dialog = null;
|
var review_form_dialog = null;
|
||||||
var add_form_title = null;
|
var add_form_title = null;
|
||||||
var review_dialog_title = null;
|
var review_dialog_title = null;
|
||||||
var repository_id = null;
|
var repository_id = null;
|
||||||
var filenames = [];
|
var filenames = [];
|
||||||
|
|
||||||
var ReviewCount = function(total, open, progress){
|
var ReviewCount = function(total, open, progress){
|
||||||
this.total = total;
|
this.total = total;
|
||||||
this.open = open;
|
this.open = open;
|
||||||
this.closed = total - open;
|
this.closed = total - open;
|
||||||
this.progress = progress
|
this.progress = progress
|
||||||
};
|
};
|
||||||
|
|
||||||
var CodeReview = function(id) {
|
var CodeReview = function(id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.path = '';
|
this.path = '';
|
||||||
this.line = 0;
|
this.line = 0;
|
||||||
this.url = '';
|
this.url = '';
|
||||||
this.is_closed = false;
|
this.is_closed = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var review_counts = new Array();
|
var review_counts = new Array();
|
||||||
var code_reviews_map = new Array();
|
var code_reviews_map = new Array();
|
||||||
var code_reviews_dialog_map = new Array();
|
var code_reviews_dialog_map = new Array();
|
||||||
|
|
||||||
function UpdateRepositoryView(title) {
|
function UpdateRepositoryView(title) {
|
||||||
var header = $("table.changesets thead tr:first");
|
var header = $("table.changesets thead tr:first");
|
||||||
var th = $('<th></th>');
|
var th = $('<th></th>');
|
||||||
th.html(title);
|
th.html(title);
|
||||||
header.append(th);
|
header.append(th);
|
||||||
$('tr.changeset td.id a').each(function(i){
|
$('tr.changeset td.id a').each(function(i){
|
||||||
var revision = this.getAttribute("href");
|
var revision = this.getAttribute("href");
|
||||||
revision = revision.substr(revision.lastIndexOf("/") + 1);
|
revision = revision.substr(revision.lastIndexOf("/") + 1);
|
||||||
var review = review_counts['revision_' + revision];
|
var review = review_counts['revision_' + revision];
|
||||||
var td = $('<td/>',{
|
var td = $('<td/>',{
|
||||||
'class':'progress'
|
'class':'progress'
|
||||||
});
|
});
|
||||||
td.html(review.progress);
|
td.html(review.progress);
|
||||||
$(this.parentNode.parentNode).append(td);
|
$(this.parentNode.parentNode).append(td);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//add function $.down
|
//add function $.down
|
||||||
if(! $.fn.down)
|
if(! $.fn.down)
|
||||||
(function($) {
|
(function($) {
|
||||||
$.fn.down = function() {
|
$.fn.down = function() {
|
||||||
var el = this[0] && this[0].firstChild;
|
var el = this[0] && this[0].firstChild;
|
||||||
while (el && el.nodeType != 1)
|
while (el && el.nodeType != 1)
|
||||||
el = el.nextSibling;
|
el = el.nextSibling;
|
||||||
return $(el);
|
return $(el);
|
||||||
};
|
};
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
function UpdateRevisionView() {
|
function UpdateRevisionView() {
|
||||||
$('li.change').each(function(){
|
$('li.change').each(function(){
|
||||||
var li = $(this);
|
var li = $(this);
|
||||||
if (li.hasClass('folder')) return;
|
if (li.hasClass('folder')) return;
|
||||||
|
|
||||||
var a = li.down('a');
|
var a = li.down('a');
|
||||||
if (a.size() == 0) return;
|
if (a.size() == 0) return;
|
||||||
var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, '');
|
var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, '');
|
||||||
|
|
||||||
var reviewlist = code_reviews_map[path];
|
var reviewlist = code_reviews_map[path];
|
||||||
if (reviewlist == null) return;
|
if (reviewlist == null) return;
|
||||||
|
|
||||||
var ul = $('<ul></ul>');
|
var ul = $('<ul></ul>');
|
||||||
for (var j = 0; j < reviewlist.length; j++) {
|
for (var j = 0; j < reviewlist.length; j++) {
|
||||||
var review = reviewlist[j];
|
var review = reviewlist[j];
|
||||||
var icon = review.is_closed? 'icon-closed-review': 'icon-review';
|
var icon = review.is_closed? 'icon-closed-review': 'icon-review';
|
||||||
var item = $('<li></li>', {
|
var item = $('<li></li>', {
|
||||||
'class': 'icon ' + icon + ' code_review_summary'
|
'class': 'icon ' + icon + ' code_review_summary'
|
||||||
});
|
});
|
||||||
item.html(review.url);
|
item.html(review.url);
|
||||||
ul.append(item);
|
ul.append(item);
|
||||||
}
|
}
|
||||||
li.append(ul);
|
li.append(ul);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){
|
function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){
|
||||||
var filetables = [];
|
var filetables = [];
|
||||||
var j = 0;
|
var j = 0;
|
||||||
$('table').each(function(){
|
$('table').each(function(){
|
||||||
if($(this).hasClass('filecontent')){
|
if($(this).hasClass('filecontent')){
|
||||||
filetables[j++] = this;
|
filetables[j++] = this;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
j = 0;
|
j = 0;
|
||||||
$('table.filecontent th.filename').each(function(){
|
$('table.filecontent th.filename').each(function(){
|
||||||
filenames[j] = $.trim($(this).text());
|
filenames[j] = $.trim($(this).text());
|
||||||
j++;
|
j++;
|
||||||
});
|
});
|
||||||
addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type +
|
addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type +
|
||||||
'&rev=' + rev + '&rev_to=' + rev_to +
|
'&rev=' + rev + '&rev_to=' + rev_to +
|
||||||
'&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id);
|
'&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id);
|
||||||
if (path != null && path.length > 0) {
|
if (path != null && path.length > 0) {
|
||||||
addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path);
|
addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path);
|
||||||
}
|
}
|
||||||
var num = 0;
|
var num = 0;
|
||||||
if (is_diff) {
|
if (is_diff) {
|
||||||
num = 1;
|
num = 1;
|
||||||
}
|
}
|
||||||
var i, l, tl;
|
var i, l, tl;
|
||||||
for (i = 0, tl = filetables.length; i < tl; i++) {
|
for (i = 0, tl = filetables.length; i < tl; i++) {
|
||||||
var table = filetables[i];
|
var table = filetables[i];
|
||||||
var trs = table.getElementsByTagName('tr');
|
var trs = table.getElementsByTagName('tr');
|
||||||
|
|
||||||
for (j = 0,l = trs.length; j < l; j++) {
|
for (j = 0,l = trs.length; j < l; j++) {
|
||||||
var tr = trs[j];
|
var tr = trs[j];
|
||||||
var ths = tr.getElementsByTagName('th');
|
var ths = tr.getElementsByTagName('th');
|
||||||
|
|
||||||
var th = ths[num];
|
var th = ths[num];
|
||||||
if (th == null) {
|
if (th == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var th_html = th.innerHTML;
|
var th_html = th.innerHTML;
|
||||||
|
|
||||||
var line = th_html.match(/[0-9]+/);
|
var line = th_html.match(/[0-9]+/);
|
||||||
if (line == null) {
|
if (line == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var span_html = '<span white-space="nowrap" id="review_span_' + line + '_' + i + '">';
|
var span_html = '<span white-space="nowrap" id="review_span_' + line + '_' + i + '">';
|
||||||
|
|
||||||
if (!is_readonly) {
|
if (!is_readonly) {
|
||||||
span_html += image_tag;
|
span_html += image_tag;
|
||||||
}
|
}
|
||||||
span_html += '</span>';
|
span_html += '</span>';
|
||||||
th.innerHTML = th_html + span_html;
|
th.innerHTML = th_html + span_html;
|
||||||
|
|
||||||
var img = th.getElementsByTagName('img')[0];
|
var img = th.getElementsByTagName('img')[0];
|
||||||
if (img != null ) {
|
if (img != null ) {
|
||||||
img.id = 'add_revew_img_' + line + '_' + i;
|
img.id = 'add_revew_img_' + line + '_' + i;
|
||||||
$(img).click(clickPencil);
|
$(img).click(clickPencil);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickPencil(e)
|
function clickPencil(e)
|
||||||
{
|
{
|
||||||
// alert('$(e.target).attr("id") = ' + $(e.target).attr("id"));
|
// alert('$(e.target).attr("id") = ' + $(e.target).attr("id"));
|
||||||
var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/);
|
var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/);
|
||||||
var line = result[1];
|
var line = result[1];
|
||||||
var file_count = eval(result[2]);
|
var file_count = eval(result[2]);
|
||||||
var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count;
|
var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count;
|
||||||
|
|
||||||
if (path == null || path.length == 0) {
|
if (path == null || path.length == 0) {
|
||||||
url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true';
|
url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true';
|
||||||
}
|
}
|
||||||
addReview(url);
|
addReview(url);
|
||||||
formPopup(e.pageX, e.pageY);
|
formPopup(e.pageX, e.pageY);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
var addReviewUrl = null;
|
var addReviewUrl = null;
|
||||||
var showReviewUrl = null;
|
var showReviewUrl = null;
|
||||||
var showReviewImageTag = null;
|
var showReviewImageTag = null;
|
||||||
var showClosedReviewImageTag = null;
|
var showClosedReviewImageTag = null;
|
||||||
|
|
||||||
function setShowReviewButton(line, review_id, is_closed, file_count) {
|
function setShowReviewButton(line, review_id, is_closed, file_count) {
|
||||||
//alert('file_count = ' + file_count);
|
//alert('file_count = ' + file_count);
|
||||||
var span = $('#review_span_' + line + '_' + file_count);
|
var span = $('#review_span_' + line + '_' + file_count);
|
||||||
if (span.size() == 0) {
|
if (span.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var innerSpan = $('<span></span>',{id: 'review_' + review_id});
|
var innerSpan = $('<span></span>',{id: 'review_' + review_id});
|
||||||
span.append(innerSpan);
|
span.append(innerSpan);
|
||||||
innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag);
|
innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag);
|
||||||
var div = $('<div></div>', {
|
var div = $('<div></div>', {
|
||||||
'class':'draggable',
|
'class':'draggable',
|
||||||
id: 'show_review_' + review_id
|
id: 'show_review_' + review_id
|
||||||
});
|
});
|
||||||
$('#code_review').append(div);
|
$('#code_review').append(div);
|
||||||
innerSpan.down('img').click(function(e) {
|
innerSpan.down('img').click(function(e) {
|
||||||
var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0];
|
var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0];
|
||||||
var span = $('#review_' + review_id); // span element of view review button
|
var span = $('#review_' + review_id); // span element of view review button
|
||||||
var pos = span.offset();
|
var pos = span.offset();
|
||||||
showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25);
|
showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function popupReview(review_id) {
|
function popupReview(review_id) {
|
||||||
var span = $('#review_' + review_id); // span element of view review button
|
var span = $('#review_' + review_id); // span element of view review button
|
||||||
var pos = span.offset();
|
var pos = span.offset();
|
||||||
$('html,body').animate({ scrollTop: pos.top },
|
$('html,body').animate({ scrollTop: pos.top },
|
||||||
{duration: 'fast',
|
{duration: 'fast',
|
||||||
complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}});
|
complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}});
|
||||||
// position and show popup dialog
|
// position and show popup dialog
|
||||||
// create popup dialog
|
// create popup dialog
|
||||||
//var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top);
|
//var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top);
|
||||||
// win.toFront();
|
// win.toFront();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showReview(url, review_id, x, y) {
|
function showReview(url, review_id, x, y) {
|
||||||
if (code_reviews_dialog_map[review_id] != null) {
|
if (code_reviews_dialog_map[review_id] != null) {
|
||||||
var cur_win = code_reviews_dialog_map[review_id];
|
var cur_win = code_reviews_dialog_map[review_id];
|
||||||
cur_win.hide();
|
cur_win.hide();
|
||||||
code_reviews_dialog_map[review_id] = null;
|
code_reviews_dialog_map[review_id] = null;
|
||||||
}
|
}
|
||||||
$('#show_review_' + review_id).load(url, {review_id: review_id});
|
$('#show_review_' + review_id).load(url, {review_id: review_id});
|
||||||
var review = getReviewObjById(review_id);
|
var review = getReviewObjById(review_id);
|
||||||
|
|
||||||
var win = $('#show_review_' + review_id).dialog({
|
var win = $('#show_review_' + review_id).dialog({
|
||||||
show: {effect:'scale'},// ? 'top-left'
|
show: {effect:'scale'},// ? 'top-left'
|
||||||
//position: [x, y + 5],
|
//position: [x, y + 5],
|
||||||
width:640,
|
width:640,
|
||||||
zIndex: topZindex,
|
zIndex: topZindex,
|
||||||
title: review_dialog_title
|
title: review_dialog_title
|
||||||
});
|
});
|
||||||
// win.getContent().style.color = "#484848";
|
// win.getContent().style.color = "#484848";
|
||||||
// win.getContent().style.background = "#ffffff";
|
// win.getContent().style.background = "#ffffff";
|
||||||
topZindex++;
|
topZindex++;
|
||||||
code_reviews_dialog_map[review_id] = win;
|
code_reviews_dialog_map[review_id] = win;
|
||||||
return win
|
return win
|
||||||
}
|
}
|
||||||
|
|
||||||
function getReviewObjById(review_id) {
|
function getReviewObjById(review_id) {
|
||||||
for (var reviewlist in code_reviews_map) {
|
for (var reviewlist in code_reviews_map) {
|
||||||
for (var i = 0; i < reviewlist.length; i++) {
|
for (var i = 0; i < reviewlist.length; i++) {
|
||||||
var review = reviewlist[i];
|
var review = reviewlist[i];
|
||||||
if (review.id == review_id) {
|
if (review.id == review_id) {
|
||||||
return review;
|
return review;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formPopup(x, y){
|
function formPopup(x, y){
|
||||||
//@see http://docs.jquery.com/UI/Effects/Scale
|
//@see http://docs.jquery.com/UI/Effects/Scale
|
||||||
var win = $('#review-form-frame').dialog({
|
var win = $('#review-form-frame').dialog({
|
||||||
show: {effect:'scale', direction: 'both'},// ? 'top-left'
|
show: {effect:'scale', direction: 'both'},// ? 'top-left'
|
||||||
// position: [x, y + 5],
|
// position: [x, y + 5],
|
||||||
width:640,
|
width:640,
|
||||||
zIndex: topZindex,
|
zIndex: topZindex,
|
||||||
title: add_form_title
|
title: add_form_title
|
||||||
});
|
});
|
||||||
// win.getContent().style.background = "#ffffff";
|
// win.getContent().style.background = "#ffffff";
|
||||||
if (review_form_dialog != null) {
|
if (review_form_dialog != null) {
|
||||||
review_form_dialog.destroy();
|
review_form_dialog.destroy();
|
||||||
review_form_dialog = null;
|
review_form_dialog = null;
|
||||||
}
|
}
|
||||||
review_form_dialog = win;
|
review_form_dialog = win;
|
||||||
topZindex += 10;
|
topZindex += 10;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideForm() {
|
function hideForm() {
|
||||||
if (review_form_dialog == null) {
|
if (review_form_dialog == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
review_form_dialog.dialog('close');
|
review_form_dialog.dialog('close');
|
||||||
review_form_dialog = null;
|
review_form_dialog = null;
|
||||||
$('#review-form').html('');
|
$('#review-form').html('');
|
||||||
}
|
}
|
||||||
function addReview(url) {
|
function addReview(url) {
|
||||||
$('#review-form').load(url);
|
$('#review-form').load(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteReview(review_id) {
|
function deleteReview(review_id) {
|
||||||
$('show_review_' + review_id).remove();
|
$('show_review_' + review_id).remove();
|
||||||
$('review_' + review_id).remove();
|
$('review_' + review_id).remove();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeImage(review_id, is_closed) {
|
function changeImage(review_id, is_closed) {
|
||||||
var span = $('review_' + review_id);
|
var span = $('review_' + review_id);
|
||||||
var new_image = null;
|
var new_image = null;
|
||||||
var dummy = new Element('span');
|
var dummy = new Element('span');
|
||||||
if (is_closed) {
|
if (is_closed) {
|
||||||
dummy.insert(showClosedReviewImageTag);
|
dummy.insert(showClosedReviewImageTag);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dummy.insert(showReviewImageTag);
|
dummy.insert(showReviewImageTag);
|
||||||
}
|
}
|
||||||
new_image = dummy.down().getAttribute('src');
|
new_image = dummy.down().getAttribute('src');
|
||||||
//alert(new_image);
|
//alert(new_image);
|
||||||
span.down('img').setAttribute('src', new_image);
|
span.down('img').setAttribute('src', new_image);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_addreview_link(project, link) {
|
function make_addreview_link(project, link) {
|
||||||
var alist = $('#content p a');
|
var alist = $('#content p a');
|
||||||
if (alist == null) {
|
if (alist == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var a = alist[0];
|
var a = alist[0];
|
||||||
var p = a.parentNode;
|
var p = a.parentNode;
|
||||||
p.innerHTML = p.innerHTML + " | " + link;
|
p.innerHTML = p.innerHTML + " | " + link;
|
||||||
}
|
}
|
||||||
|
|
||||||
function call_update_revisions(url) {
|
function call_update_revisions(url) {
|
||||||
var changeset_ids = '';
|
var changeset_ids = '';
|
||||||
var links = $$('table.changesets tbody tr.changeset td.id a');
|
var links = $$('table.changesets tbody tr.changeset td.id a');
|
||||||
for (var i = 0; i < links.length; i++) {
|
for (var i = 0; i < links.length; i++) {
|
||||||
var link = links[i];
|
var link = links[i];
|
||||||
var href = link.getAttribute('href');
|
var href = link.getAttribute('href');
|
||||||
var id = href.replace(/^.*\/revisions\//, '');
|
var id = href.replace(/^.*\/revisions\//, '');
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
changeset_ids += ',';
|
changeset_ids += ',';
|
||||||
}
|
}
|
||||||
changeset_ids += id;
|
changeset_ids += id;
|
||||||
}
|
}
|
||||||
new Ajax.Updater('code_review_revisions', url,
|
new Ajax.Updater('code_review_revisions', url,
|
||||||
{
|
{
|
||||||
evalScripts:true,
|
evalScripts:true,
|
||||||
method:'get',
|
method:'get',
|
||||||
parameters: 'changeset_ids=' + encodeURI(changeset_ids)
|
parameters: 'changeset_ids=' + encodeURI(changeset_ids)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$.fn.serialize2json = function()
|
$.fn.serialize2json = function()
|
||||||
{
|
{
|
||||||
var o = {};
|
var o = {};
|
||||||
var a = this.serializeArray();
|
var a = this.serializeArray();
|
||||||
$.each(a, function() {
|
$.each(a, function() {
|
||||||
if (o[this.name]) {
|
if (o[this.name]) {
|
||||||
if (!o[this.name].push) {
|
if (!o[this.name].push) {
|
||||||
o[this.name] = [o[this.name]];
|
o[this.name] = [o[this.name]];
|
||||||
}
|
}
|
||||||
o[this.name].push(this.value || '');
|
o[this.name].push(this.value || '');
|
||||||
} else {
|
} else {
|
||||||
o[this.name] = this.value || '';
|
o[this.name] = this.value || '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return o;
|
return o;
|
||||||
};
|
};
|
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
dt.code_review {
|
dt.code_review {
|
||||||
background-image: url(../images/review.png);
|
background-image: url(../images/review.png);
|
||||||
}
|
}
|
@ -1,97 +1,97 @@
|
|||||||
/*
|
/*
|
||||||
# Code Review plugin for Redmine
|
# Code Review plugin for Redmine
|
||||||
# Copyright (C) 2009 Haruyuki Iida
|
# Copyright (C) 2009 Haruyuki Iida
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
#review-form-frame {
|
#review-form-frame {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autoscroll table.filecontent th.line-num {
|
.autoscroll table.filecontent th.line-num {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.filecontent th.line-num img{
|
table.filecontent th.line-num img{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.code-review-form-title {
|
.code-review-form-title {
|
||||||
background-color: #002059;
|
background-color: #002059;
|
||||||
color: white;
|
color: white;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.code_review_viewer {
|
.code_review_viewer {
|
||||||
|
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
/*
|
/*
|
||||||
max-width: 60%;
|
max-width: 60%;
|
||||||
*/
|
*/
|
||||||
/* max-height: 400px; */
|
/* max-height: 400px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.code_review_viewer .issue{
|
.code_review_viewer .issue{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.code_review_body {
|
.code_review_body {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
||||||
padding:2px;
|
padding:2px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_review_list table.list td {
|
#code_review_list table.list td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_review_list table.list td.path {
|
#code_review_list table.list td.path {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_review_list table.list td.subject {
|
#code_review_list table.list td.subject {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-review {
|
.icon-review {
|
||||||
background-image: url(../images/review.png);
|
background-image: url(../images/review.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-closed-review {
|
.icon-closed-review {
|
||||||
background-image: url(../images/closed_review.png);
|
background-image: url(../images/closed_review.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-settings {
|
.icon-settings {
|
||||||
background-image: url(../../../images/changeset.png);
|
background-image: url(../../../images/changeset.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
li.code_review_summary {
|
li.code_review_summary {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
@ -1,19 +1,19 @@
|
|||||||
Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
|
Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
"Software"), to deal in the Software without restriction, including
|
"Software"), to deal in the Software without restriction, including
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
the following conditions:
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
The above copyright notice and this permission notice shall be
|
||||||
included in all copies or substantial portions of the Software.
|
included in all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
@ -1,119 +1,119 @@
|
|||||||
.overlay_alert {
|
.overlay_alert {
|
||||||
background-color: #85BBEF;
|
background-color: #85BBEF;
|
||||||
filter:alpha(opacity=60);
|
filter:alpha(opacity=60);
|
||||||
-moz-opacity: 0.6;
|
-moz-opacity: 0.6;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_nw {
|
.alert_nw {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: transparent url(alert/top_left.gif) no-repeat bottom left;
|
background: transparent url(alert/top_left.gif) no-repeat bottom left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_n {
|
.alert_n {
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: transparent url(alert/top.gif) repeat-x bottom left;
|
background: transparent url(alert/top.gif) repeat-x bottom left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_ne {
|
.alert_ne {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: transparent url(alert/top_right.gif) no-repeat bottom left
|
background: transparent url(alert/top_right.gif) no-repeat bottom left
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_e {
|
.alert_e {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
background: transparent url(alert/right.gif) repeat-y 0 0;
|
background: transparent url(alert/right.gif) repeat-y 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_w {
|
.alert_w {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
background: transparent url(alert/left.gif) repeat-y 0 0;
|
background: transparent url(alert/left.gif) repeat-y 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_sw {
|
.alert_sw {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
|
background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_s {
|
.alert_s {
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: transparent url(alert/bottom.gif) repeat-x 0 0;
|
background: transparent url(alert/bottom.gif) repeat-x 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_se, .alert_sizer {
|
.alert_se, .alert_sizer {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
|
background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_close {
|
.alert_close {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_minimize {
|
.alert_minimize {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_maximize {
|
.alert_maximize {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_title {
|
.alert_title {
|
||||||
float:left;
|
float:left;
|
||||||
height:1px;
|
height:1px;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_content {
|
.alert_content {
|
||||||
overflow:visible;
|
overflow:visible;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
font: 12px arial;
|
font: 12px arial;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For alert/confirm dialog */
|
/* For alert/confirm dialog */
|
||||||
.alert_window {
|
.alert_window {
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
padding:20px;
|
padding:20px;
|
||||||
margin-left:auto;
|
margin-left:auto;
|
||||||
margin-right:auto;
|
margin-right:auto;
|
||||||
width:400px;
|
width:400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_message {
|
.alert_message {
|
||||||
font: 12px arial;
|
font: 12px arial;
|
||||||
width:100%;
|
width:100%;
|
||||||
color:#F00;
|
color:#F00;
|
||||||
padding-bottom:10px;
|
padding-bottom:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_buttons {
|
.alert_buttons {
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_buttons input {
|
.alert_buttons input {
|
||||||
width:20%;
|
width:20%;
|
||||||
margin:10px;
|
margin:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_progress {
|
.alert_progress {
|
||||||
float:left;
|
float:left;
|
||||||
margin:auto;
|
margin:auto;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
height:16px;
|
height:16px;
|
||||||
background: #FFF url('alert/progress.gif') no-repeat center center
|
background: #FFF url('alert/progress.gif') no-repeat center center
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,88 +1,88 @@
|
|||||||
.overlay_alert_lite {
|
.overlay_alert_lite {
|
||||||
background-color: #85BBEF;
|
background-color: #85BBEF;
|
||||||
filter:alpha(opacity=60);
|
filter:alpha(opacity=60);
|
||||||
-moz-opacity: 0.6;
|
-moz-opacity: 0.6;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_sizer {
|
.alert_lite_sizer {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_close {
|
.alert_lite_close {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_minimize {
|
.alert_lite_minimize {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_maximize {
|
.alert_lite_maximize {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_title {
|
.alert_lite_title {
|
||||||
width:0px;
|
width:0px;
|
||||||
height:0px;
|
height:0px;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_content {
|
.alert_lite_content {
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* For alert/confirm dialog */
|
/* For alert/confirm dialog */
|
||||||
.alert_lite_window {
|
.alert_lite_window {
|
||||||
border:1px solid #F00;
|
border:1px solid #F00;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
padding:20px;
|
padding:20px;
|
||||||
margin-left:auto;
|
margin-left:auto;
|
||||||
margin-right:auto;
|
margin-right:auto;
|
||||||
width:400px;
|
width:400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_message {
|
.alert_lite_message {
|
||||||
font-size:16px;
|
font-size:16px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
color:#F00;
|
color:#F00;
|
||||||
padding-bottom:10px;
|
padding-bottom:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_buttons {
|
.alert_lite_buttons {
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_buttons input {
|
.alert_lite_buttons input {
|
||||||
width:20%;
|
width:20%;
|
||||||
margin:10px;
|
margin:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert_lite_progress {
|
.alert_lite_progress {
|
||||||
float:left;
|
float:left;
|
||||||
margin:auto;
|
margin:auto;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
height:16px;
|
height:16px;
|
||||||
background: #FFF url('alert/progress.gif') no-repeat center center
|
background: #FFF url('alert/progress.gif') no-repeat center center
|
||||||
}
|
}
|
||||||
|
|
||||||
table.alert_lite_header {
|
table.alert_lite_header {
|
||||||
border:1px solid #F00;
|
border:1px solid #F00;
|
||||||
background:#FFF
|
background:#FFF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,150 +1,150 @@
|
|||||||
.overlay_alphacube {
|
.overlay_alphacube {
|
||||||
background-color: #85BBEF;
|
background-color: #85BBEF;
|
||||||
filter:alpha(opacity=60);
|
filter:alpha(opacity=60);
|
||||||
-moz-opacity: 0.6;
|
-moz-opacity: 0.6;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_nw {
|
.alphacube_nw {
|
||||||
background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
|
background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
|
||||||
width:10px;
|
width:10px;
|
||||||
height:25px;
|
height:25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_n {
|
.alphacube_n {
|
||||||
background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
|
background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
|
||||||
height:25px;
|
height:25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_ne {
|
.alphacube_ne {
|
||||||
background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
|
background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
|
||||||
width:10px;
|
width:10px;
|
||||||
height:25px;
|
height:25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_w {
|
.alphacube_w {
|
||||||
background: transparent url(alphacube/frame-left.gif) repeat-y top left;
|
background: transparent url(alphacube/frame-left.gif) repeat-y top left;
|
||||||
width:7px;
|
width:7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_e {
|
.alphacube_e {
|
||||||
background: transparent url(alphacube/frame-right.gif) repeat-y top right;
|
background: transparent url(alphacube/frame-right.gif) repeat-y top right;
|
||||||
width:7px;
|
width:7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_sw {
|
.alphacube_sw {
|
||||||
background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
|
background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
|
||||||
width:7px;
|
width:7px;
|
||||||
height:7px;
|
height:7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_s {
|
.alphacube_s {
|
||||||
background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
|
background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
|
||||||
height:7px;
|
height:7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_se, .alphacube_sizer {
|
.alphacube_se, .alphacube_sizer {
|
||||||
background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
|
background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
|
||||||
width:7px;
|
width:7px;
|
||||||
height:7px;
|
height:7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_sizer {
|
.alphacube_sizer {
|
||||||
cursor:se-resize;
|
cursor:se-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_close {
|
.alphacube_close {
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
|
background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
right:11px;
|
right:11px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:1000;
|
z-index:1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_minimize {
|
.alphacube_minimize {
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
|
background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
right:55px;
|
right:55px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:1000;
|
z-index:1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_maximize {
|
.alphacube_maximize {
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
|
background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
right:33px;
|
right:33px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:1000;
|
z-index:1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_title {
|
.alphacube_title {
|
||||||
float:left;
|
float:left;
|
||||||
height:14px;
|
height:14px;
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
margin-top:2px;
|
margin-top:2px;
|
||||||
width:100%;
|
width:100%;
|
||||||
color:#123456;
|
color:#123456;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_content {
|
.alphacube_content {
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
font: 12px arial;
|
font: 12px arial;
|
||||||
background:#FDFDFD;
|
background:#FDFDFD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For alert/confirm dialog */
|
/* For alert/confirm dialog */
|
||||||
.alphacube_window {
|
.alphacube_window {
|
||||||
border:1px solid #F00;
|
border:1px solid #F00;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
padding:20px;
|
padding:20px;
|
||||||
margin-left:auto;
|
margin-left:auto;
|
||||||
margin-right:auto;
|
margin-right:auto;
|
||||||
width:400px;
|
width:400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_message {
|
.alphacube_message {
|
||||||
font: 12px arial;
|
font: 12px arial;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
padding-bottom:10px;
|
padding-bottom:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_buttons {
|
.alphacube_buttons {
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_buttons input {
|
.alphacube_buttons input {
|
||||||
width:20%;
|
width:20%;
|
||||||
margin:10px;
|
margin:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_progress {
|
.alphacube_progress {
|
||||||
float:left;
|
float:left;
|
||||||
margin:auto;
|
margin:auto;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
height:16px;
|
height:16px;
|
||||||
background: #FFF url('alert/progress.gif') no-repeat center center
|
background: #FFF url('alert/progress.gif') no-repeat center center
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphacube_wired_frame {
|
.alphacube_wired_frame {
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
filter:alpha(opacity=60);
|
filter:alpha(opacity=60);
|
||||||
-moz-opacity: 0.6;
|
-moz-opacity: 0.6;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,51 +1,51 @@
|
|||||||
<public:component>
|
<public:component>
|
||||||
<public:attach event="onpropertychange" onevent="propertyChanged()" />
|
<public:attach event="onpropertychange" onevent="propertyChanged()" />
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
|
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
|
||||||
var realSrc;
|
var realSrc;
|
||||||
var blankSrc = "blank.gif";
|
var blankSrc = "blank.gif";
|
||||||
|
|
||||||
if (supported) fixImage();
|
if (supported) fixImage();
|
||||||
|
|
||||||
function propertyChanged() {
|
function propertyChanged() {
|
||||||
if (!supported) return;
|
if (!supported) return;
|
||||||
|
|
||||||
var pName = event.propertyName;
|
var pName = event.propertyName;
|
||||||
if (pName != "src") return;
|
if (pName != "src") return;
|
||||||
// if not set to blank
|
// if not set to blank
|
||||||
if ( ! new RegExp(blankSrc).test(src))
|
if ( ! new RegExp(blankSrc).test(src))
|
||||||
fixImage();
|
fixImage();
|
||||||
};
|
};
|
||||||
|
|
||||||
function fixImage() {
|
function fixImage() {
|
||||||
// get src
|
// get src
|
||||||
var src = element.src;
|
var src = element.src;
|
||||||
|
|
||||||
// check for real change
|
// check for real change
|
||||||
if (src == realSrc) {
|
if (src == realSrc) {
|
||||||
element.src = blankSrc;
|
element.src = blankSrc;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! new RegExp(blankSrc).test(src)) {
|
if ( ! new RegExp(blankSrc).test(src)) {
|
||||||
// backup old src
|
// backup old src
|
||||||
realSrc = src;
|
realSrc = src;
|
||||||
}
|
}
|
||||||
|
|
||||||
// test for png
|
// test for png
|
||||||
if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
|
if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
|
||||||
// set blank image
|
// set blank image
|
||||||
element.src = blankSrc;
|
element.src = blankSrc;
|
||||||
// set filter
|
// set filter
|
||||||
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
|
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
|
||||||
src + "',sizingMethod='scale')";
|
src + "',sizingMethod='scale')";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// remove filter
|
// remove filter
|
||||||
element.runtimeStyle.filter = "";
|
element.runtimeStyle.filter = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</public:component>
|
</public:component>
|
@ -1,121 +1,121 @@
|
|||||||
.overlay_darkX {
|
.overlay_darkX {
|
||||||
background-color: #85BBEF;
|
background-color: #85BBEF;
|
||||||
filter:alpha(opacity=60);
|
filter:alpha(opacity=60);
|
||||||
-moz-opacity: 0.6;
|
-moz-opacity: 0.6;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_nw {
|
.darkX_nw {
|
||||||
background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
|
||||||
width:6px;
|
width:6px;
|
||||||
height:21px;
|
height:21px;
|
||||||
}
|
}
|
||||||
.darkX_n {
|
.darkX_n {
|
||||||
background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
|
background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
|
||||||
height:21px;
|
height:21px;
|
||||||
}
|
}
|
||||||
.darkX_ne {
|
.darkX_ne {
|
||||||
background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
|
||||||
width:6px;
|
width:6px;
|
||||||
height:21px;
|
height:21px;
|
||||||
}
|
}
|
||||||
.darkX_w {
|
.darkX_w {
|
||||||
background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
|
background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
|
||||||
width:3px;
|
width:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_e {
|
.darkX_e {
|
||||||
background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
|
background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
|
||||||
width:3px;
|
width:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_sw {
|
.darkX_sw {
|
||||||
background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
|
||||||
width:5px;
|
width:5px;
|
||||||
height:3px;
|
height:3px;
|
||||||
}
|
}
|
||||||
.darkX_s {
|
.darkX_s {
|
||||||
background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
|
background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
|
||||||
height:3px;
|
height:3px;
|
||||||
}
|
}
|
||||||
.darkX_se, .darkX_sizer {
|
.darkX_se, .darkX_sizer {
|
||||||
background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
|
||||||
width:5px;
|
width:5px;
|
||||||
height:3px;
|
height:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_sizer {
|
.darkX_sizer {
|
||||||
cursor:se-resize;
|
cursor:se-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_close {
|
.darkX_close {
|
||||||
width: 21px;
|
width: 21px;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
right:5px;
|
right:5px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:1000;
|
z-index:1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_minimize {
|
.darkX_minimize {
|
||||||
width: 21px;
|
width: 21px;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
right:26px;
|
right:26px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:1000;
|
z-index:1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_maximize {
|
.darkX_maximize {
|
||||||
width: 21px;
|
width: 21px;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
|
background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
right:47px;
|
right:47px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:1000;
|
z-index:1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.darkX_title {
|
.darkX_title {
|
||||||
float:left;
|
float:left;
|
||||||
height:14px;
|
height:14px;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
margin-top:2px;
|
margin-top:2px;
|
||||||
width:100%;
|
width:100%;
|
||||||
color:#FFF;
|
color:#FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkX_content {
|
.darkX_content {
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
color: #E6DF2A;
|
color: #E6DF2A;
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background:#5E5148;
|
background:#5E5148;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* FOR IE */
|
/* FOR IE */
|
||||||
* html .darkX_minimize {
|
* html .darkX_minimize {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop");
|
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop");
|
||||||
}
|
}
|
||||||
|
|
||||||
* html .darkX_maximize {
|
* html .darkX_maximize {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale");
|
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale");
|
||||||
}
|
}
|
||||||
|
|
||||||
* html .darkX_close {
|
* html .darkX_close {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop");
|
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop");
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
div.inspector div.inspectable {
|
div.inspector div.inspectable {
|
||||||
padding: 0.25em 0 0.25em 1em;
|
padding: 0.25em 0 0.25em 1em;
|
||||||
background-color: Gray;
|
background-color: Gray;
|
||||||
color: white;
|
color: white;
|
||||||
border: outset 2px white;
|
border: outset 2px white;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.inspector div.child {
|
div.inspector div.child {
|
||||||
margin: 0 0 0 1em;
|
margin: 0 0 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#debug_window_content { /* DIV container for debug sizing*/
|
#debug_window_content { /* DIV container for debug sizing*/
|
||||||
width:250px;
|
width:250px;
|
||||||
height:100px;
|
height:100px;
|
||||||
background-color:#000;
|
background-color:#000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#debug { /* DIV container for debug contents*/
|
#debug { /* DIV container for debug contents*/
|
||||||
padding:3px;
|
padding:3px;
|
||||||
color:#0f0;
|
color:#0f0;
|
||||||
font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
|
font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
|
||||||
font-size:10px;
|
font-size:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,155 +1,155 @@
|
|||||||
.overlay_dialog {
|
.overlay_dialog {
|
||||||
background-color: #666666;
|
background-color: #666666;
|
||||||
filter:alpha(opacity=60);
|
filter:alpha(opacity=60);
|
||||||
-moz-opacity: 0.6;
|
-moz-opacity: 0.6;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay___invisible__ {
|
.overlay___invisible__ {
|
||||||
background-color: #666666;
|
background-color: #666666;
|
||||||
filter:alpha(opacity=0);
|
filter:alpha(opacity=0);
|
||||||
-moz-opacity: 0;
|
-moz-opacity: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_nw {
|
.dialog_nw {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
background: transparent url(default/top_left.gif) no-repeat 0 0;
|
background: transparent url(default/top_left.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_n {
|
.dialog_n {
|
||||||
background: transparent url(default/top_mid.gif) repeat-x 0 0;
|
background: transparent url(default/top_mid.gif) repeat-x 0 0;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_ne {
|
.dialog_ne {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
background: transparent url(default/top_right.gif) no-repeat 0 0;
|
background: transparent url(default/top_right.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_e {
|
.dialog_e {
|
||||||
width: 2px;
|
width: 2px;
|
||||||
background: transparent url(default/center_right.gif) repeat-y 0 0;
|
background: transparent url(default/center_right.gif) repeat-y 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_w {
|
.dialog_w {
|
||||||
width: 2px;
|
width: 2px;
|
||||||
background: transparent url(default/center_left.gif) repeat-y 0 0;
|
background: transparent url(default/center_left.gif) repeat-y 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_sw {
|
.dialog_sw {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
background: transparent url(default/bottom_left.gif) no-repeat 0 0;
|
background: transparent url(default/bottom_left.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_s {
|
.dialog_s {
|
||||||
background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
|
background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_se {
|
.dialog_se {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
background: transparent url(default/bottom_right.gif) no-repeat 0 0;
|
background: transparent url(default/bottom_right.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_sizer {
|
.dialog_sizer {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
background: transparent url(default/sizer.gif) no-repeat 0 0;
|
background: transparent url(default/sizer.gif) no-repeat 0 0;
|
||||||
cursor:se-resize;
|
cursor:se-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_close {
|
.dialog_close {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
background: transparent url(default/close.gif) no-repeat 0 0;
|
background: transparent url(default/close.gif) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:5px;
|
top:5px;
|
||||||
left:8px;
|
left:8px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:2000;
|
z-index:2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_minimize {
|
.dialog_minimize {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
background: transparent url(default/minimize.gif) no-repeat 0 0;
|
background: transparent url(default/minimize.gif) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:5px;
|
top:5px;
|
||||||
left:28px;
|
left:28px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:2000;
|
z-index:2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_maximize {
|
.dialog_maximize {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
background: transparent url(default/maximize.gif) no-repeat 0 0;
|
background: transparent url(default/maximize.gif) no-repeat 0 0;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:5px;
|
top:5px;
|
||||||
left:49px;
|
left:49px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
z-index:2000;
|
z-index:2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_title {
|
.dialog_title {
|
||||||
float:left;
|
float:left;
|
||||||
height:14px;
|
height:14px;
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
color:#000;
|
color:#000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog_content {
|
.dialog_content {
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
color: #DDD;
|
color: #DDD;
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
background-color:#123;
|
background-color:#123;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top_draggable, .bottom_draggable {
|
.top_draggable, .bottom_draggable {
|
||||||
cursor:move;
|
cursor:move;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status_bar {
|
.status_bar {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
}
|
}
|
||||||
.status_bar input{
|
.status_bar input{
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wired_frame {
|
.wired_frame {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: 1px #000 dashed;
|
border: 1px #000 dashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DO NOT CHANGE THESE VALUES*/
|
/* DO NOT CHANGE THESE VALUES*/
|
||||||
.dialog {
|
.dialog {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog table.table_window {
|
.dialog table.table_window {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding:0px;
|
padding:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog table.table_window td , .dialog table.table_window th {
|
.dialog table.table_window td , .dialog table.table_window th {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog .title_window {
|
.dialog .title_window {
|
||||||
-moz-user-select:none;
|
-moz-user-select:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
/* PNG fix for all themes that uses PNG images on IE */
|
/* PNG fix for all themes that uses PNG images on IE */
|
||||||
td, div { behavior: url(../themes/iefix/iepngfix.htc) }
|
td, div { behavior: url(../themes/iefix/iepngfix.htc) }
|
||||||
|
|
||||||
|
@ -1,54 +1,54 @@
|
|||||||
<public:component>
|
<public:component>
|
||||||
<public:attach event="onpropertychange" onevent="doFix()" />
|
<public:attach event="onpropertychange" onevent="doFix()" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
// IE5.5+ PNG Alpha Fix v1.0RC4
|
// IE5.5+ PNG Alpha Fix v1.0RC4
|
||||||
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
|
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
|
||||||
|
|
||||||
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
|
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
|
||||||
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
||||||
|
|
||||||
// Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com)
|
// Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com)
|
||||||
// To work only on background and to handle repeat bg
|
// To work only on background and to handle repeat bg
|
||||||
|
|
||||||
// This must be a path to a blank image. That's all the configuration you need.
|
// This must be a path to a blank image. That's all the configuration you need.
|
||||||
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
|
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
|
||||||
|
|
||||||
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
||||||
|
|
||||||
function filt(s, m)
|
function filt(s, m)
|
||||||
{
|
{
|
||||||
if (filters[f])
|
if (filters[f])
|
||||||
{
|
{
|
||||||
filters[f].enabled = s ? true : false;
|
filters[f].enabled = s ? true : false;
|
||||||
if (s) with (filters[f]) { src = s; sizingMethod = m }
|
if (s) with (filters[f]) { src = s; sizingMethod = m }
|
||||||
}
|
}
|
||||||
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
|
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
|
||||||
}
|
}
|
||||||
|
|
||||||
function doFix()
|
function doFix()
|
||||||
{
|
{
|
||||||
// Assume IE7 is OK.
|
// Assume IE7 is OK.
|
||||||
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
|
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
|
||||||
(event && !/(background|src)/.test(event.propertyName))) return;
|
(event && !/(background|src)/.test(event.propertyName))) return;
|
||||||
|
|
||||||
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
|
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
|
||||||
var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat;
|
var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat;
|
||||||
if (bgImg && bgImg != 'none')
|
if (bgImg && bgImg != 'none')
|
||||||
{
|
{
|
||||||
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
|
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
|
||||||
{
|
{
|
||||||
var s = RegExp.$1;
|
var s = RegExp.$1;
|
||||||
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
|
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
|
||||||
style.width = offsetWidth + 'px';
|
style.width = offsetWidth + 'px';
|
||||||
style.backgroundImage = 'none';
|
style.backgroundImage = 'none';
|
||||||
filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale');
|
filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doFix();
|
doFix();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</public:component>
|
</public:component>
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue