This commit is contained in:
z9hang 2014-07-16 14:22:37 +08:00
commit d9e04bab0a
62 changed files with 63906 additions and 2268 deletions

View File

@ -482,7 +482,7 @@ class BidsController < ApplicationController
#ended
end
if @bid.homework_type == 1
if @bid.homework_type
@homework = HomeworkAttach.new
#@homework_list = @bid.homeworks
#增加作业按评分排序,

View File

@ -119,6 +119,7 @@ class IssuesController < ApplicationController
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
respond_to do |format|
format.html {
@ -194,6 +195,30 @@ class IssuesController < ApplicationController
end
if saved
#修改界面增加跟踪者
watcherlist = @issue.watcher_users
select_users = []
if params[:issue]
if params[:issue][:watcher_user_ids]
params[:issue][:watcher_user_ids].each do |user_id|
select_users << User.find(user_id)
end
end
end
select_users.each do |user|
if watcherlist.include? user
else
@issue.add_watcher user
end
end
watcherlist.each do |user|
if select_users.include? user
else
@issue.remove_watcher user
end
end
render_attachment_warning_if_needed(@issue)
reply_id = params[:reference_user_id].to_i
if reply_id > 0

View File

@ -490,11 +490,11 @@ class ProjectsController < ApplicationController
end
end
def create
def create
@course_tag = params[:project][:project_type]
if(@course_tag=="1")
if User.current.user_extensions.identity#.include?(UserExtensions::TEACHER,UserExtensions::DEVELOPER)
if User.current.user_extensions.identity#.include?(UserExtensions::TEACHER,UserExtensions::DEVELOPER)
@course = Course.new
@course.extra='course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s
@course.safe_attributes = params[:project][:course]
@ -513,11 +513,12 @@ class ProjectsController < ApplicationController
@trackers = Tracker.sorted.all
@project = Project.new
@project.user_id = User.current.id
@project.dts_test = params[:project][:dts_test]
@project.safe_attributes = params[:project]
if @course_tag == '1'
@project.identifier = @course.extra
end
if @course_tag == '1'
if @course_tag == '1'
if User.current.user_extensions.identity == 0
if@course.save
if validate_parent_id && @project.save
@ -528,7 +529,7 @@ class ProjectsController < ApplicationController
m = Member.new(:user => User.current, :roles => [r])
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
user_grades = UserGrade.create(:user_id => User.current.id, :project_id => @project.id)
if params[:project][:is_public] == '1'
if params[:project][:is_public] == '1'
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :grade => 0, :project_type => @course_tag)
end
@project.members << m
@ -541,7 +542,7 @@ class ProjectsController < ApplicationController
attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
redirect_to new_project_path(attrs, :course => '0')
#Added by young
elsif params[:course_continue]
redirect_to new_project_path(:course => '1')
#Ended by young
@ -574,10 +575,11 @@ class ProjectsController < ApplicationController
end
end
else
#@project.memberships.create
if validate_parent_id && @project.save
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
# Add current user as a project member if he is not admin
unless User.current.admin?
#unless User.current.admin?
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
m = Member.new(:user => User.current, :roles => [r])
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
@ -587,7 +589,7 @@ class ProjectsController < ApplicationController
end
@project.members << m
@project.project_infos << project
end
#end
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)
@ -595,7 +597,7 @@ class ProjectsController < ApplicationController
attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
redirect_to new_project_path(attrs, :course => '0')
#Added by young
elsif params[:course_continue]
redirect_to new_project_path(:course => '1')
#Ended by young
@ -844,6 +846,7 @@ class ProjectsController < ApplicationController
def update
@project.safe_attributes = params[:project]
@project.dts_test = params[:project][:dts_test]
if validate_parent_id && @project.save
@course = Course.find_by_extra(@project.identifier)
unless @course.nil?

View File

@ -329,7 +329,7 @@ class UsersController < ApplicationController
when 'xml', 'json'
@offset, @limit = api_offset_and_limit({:limit => 15})
else
@limit = 15#per_page_option
@limit = 15#per_page_option
end
@status = params[:status] || 1

View File

@ -108,6 +108,11 @@ class Course < ActiveRecord::Base
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
end
# 课程的短名称信息
def short_name(length = 8)
name.gsub(/<\/?.*?>/,"").html_safe if name
end
def strip_html(html)
return html if html.empty? || !html.include?('<')
output = ""
@ -300,7 +305,7 @@ class Course < ActiveRecord::Base
end
#项目与课程分离后,很多课程的名称等信息为空,这些数据信息存储在项目表中!!就是数据兼容的问题
def name
read_attribute('name') || Project.find_by_identifier(self.extra).try(:name)
end
#def name
# read_attribute('name') || Project.find_by_identifier(self.extra).try(:name)
#end
end

View File

@ -86,10 +86,12 @@
</tr>
<tr>
<td>
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<strong>开发项目</strong>:&nbsp;
<% if homework.project != nil %>
<span title="<%= homework.project.name %>">
<%= link_to homework.project.name,project_path(homework.project.id)%>
</span>
<% else %>
暂无
<% end %>

View File

@ -1,4 +1,4 @@
<% if @bid.homework_type == Bid::HomeworkFile %>
<% if @bid.homework_type %>
<!-- 提交文件类型 -->
<%= render :partial => 'homework' %>

View File

@ -58,39 +58,65 @@
</div>
<% end -%>
<% if (@events_pages.page == @events_pages.last_page) %>
<div class="font_description">
<table width="660">
<tr>
<td><%= image_tag(url_to_avatar(@user), :class => "avatar") %></td>
<td colspan="2">
<table width="580">
<tr>
<td>
<% if @canShowRealName %>
(<%= link_to_user(@user, @canShowRealName) %>
)
<% else %>
<%= link_to_user(@user)%>
<% end %>
<%= l(:label_user_create_project) %> <%= link_to @course.name %>
<strong> !</strong></td>
</tr>
<tr>
<td class="font_lighter" style="float: right"><%= l :label_create_time %>
: <%= format_time(@course.created_at) %>
</table>
</td>
</tr>
</table>
</div>
<% end %>
</div>
<%else%>
<div class="font_description">
<table width="660">
<tr>
<td><%= image_tag(url_to_avatar(@user), :class => "avatar") %></td>
<td colspan="2">
<table width="580">
<tr>
<td>
<% if @canShowRealName %>
(<%= link_to_user(@user, @canShowRealName) %>
)
<% else %>
<%= link_to_user(@user)%>
<% end %>
<%= l(:label_user_create_project) %> <%= link_to @course.name %>
<strong> !</strong></td>
</tr>
<tr>
<td class="font_lighter" style="float: right"><%= l :label_create_time %>
: <%= format_time(@course.created_at) %>
</table>
</td>
</tr>
</table>
</div>
<% end %>
<div class="font_description">
<table width="660">
<tr>
<td><%= image_tag(url_to_avatar(@user), :class => "avatar") %></td>
<td colspan="2">
<table width="580">
<tr>
<td>
<%
#判断是否显示真名
if @canShowRealName
%>
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>
(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>)
<% else %>
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>
<% end %>
<%= l(:label_user_create_project) %> <%= link_to @course.name %>
<strong> !</strong></td>
</tr>
<tr>
<td class="font_lighter" style="float: right"><%= l :label_create_time %>
: <%= format_time(@course.created_at) %>
</table>
</td>
</tr>
</table>
</div>
<div class="pagination">

View File

@ -24,6 +24,21 @@
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
<p><%= render :partial => 'attachments/form', :locals => {:container => @issue} %></p>
</fieldset>
<div class="box tabular" >
<p id="watchers_form">
<label style="font-size: 15px;"><%= l(:label_issue_watchers) %></label>
<span id="watchers_inputs" style="font-size: 15px;">
<%= watchers_checkboxes(@issue, @available_watchers) %>
</span>
<span class="search_for_watchers" style="font-size: 15px;">
<%= link_to l(:label_search_for_watchers),
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
:remote => true,
:method => 'get' %>
</span>
</p>
</div>
</div>
<%= f.hidden_field :lock_version %>

View File

@ -45,7 +45,7 @@
<ul class="course_sub_menu">
<% User.current.courses.each do |course| %>
<% if !course_endTime_timeout?(course) %>
<li><%= link_to course.name, course_path(course) %></li>
<li><%= link_to course.name.truncate(10, omission: '...'), course_path(course) %></li>
<% end %>
<% end %>
</ul>
@ -54,7 +54,7 @@
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
<ul class="project_sub_menu">
<% User.current.projects.each do |project| %>
<li><%= link_to project.name, project_path(project) %></li>
<li><%= link_to project.name.truncate(10, omission: '...'), project_path(project) %></li>
<% end %>
</ul>
</li>

View File

@ -15,6 +15,9 @@
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
<%= f.check_box :dts_test, :style => "margin-left:10px;" %>
</em></p>
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>
<%= wikitoolbar_for 'project_description' %>

View File

@ -14,7 +14,9 @@
<li><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
</ul>
<ul><h3>其他工具</h3>
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
<% if @project.dts_test == 1 %>
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
<% end %>
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
<li></li>
</ul>

View File

@ -5,17 +5,22 @@
<div class="box tabular">
<%= render :partial => 'course_form', :locals => { :f => f } %>
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
<span style="padding-left: 60px">
<%= submit_tag l(:button_create), :class => "enterprise"%>
</span>
</div>
<!-- <%#= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
<% else %>
<h3><%=l(:label_project_new)%></h3>
<div class="box tabular" >
<p style="font-weight: bold; color: rgb(237,137,36)"> <%=raw l(:label_project_new_description)%> </p>
<%= render :partial => 'form', :locals => { :f => f } %>
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> -->
<span style="padding-left: 60px">
<%= submit_tag l(:button_create), :class => "enterprise"%>
</span>
</div>
<!-- <%#= submit_tag l(:button_create_and_continue), :name => 'continue' %> -->
<% end %>
<%= javascript_tag "$('#project_name').focus();" %>
</div>
<% end %>
<!--Ended by young-->

View File

@ -1,77 +1,103 @@
<% if @events_by_day.size >0 %>
<div class="content-title-top-avtive">
<p class="subtitle">
<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
</p>
<div class="content-title-top-avtive">
<p class="subtitle">
<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
</p>
<% @events_by_day.keys.sort.reverse.each do |day| %>
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
<%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%>
</div>
<div class="activity-content" style="padding:5px 5px 5px 70px;">
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
<% @events_by_day.keys.sort.reverse.each do |day| %>
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
<%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %>
</div>
<div class="activity-content" style="padding:5px 5px 5px 70px;">
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
<span class="activity-title font_lighter">
<% if @canShowRealName %>
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>)
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
(<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>)
<% else %>
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
<% end %>
<%= l(:label_new_activity) %>
</span>
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
<div class="activity_description info-break" style="font-size: 13px;">
<%= h(truncate(strip_tags(e.event_description).gsub(/&nbsp;/, ' '), length: 30, omission: '...')) %>
</div>
<div class="activity_status" style="position:relative; padding-top: 3px;">
<span class="font_lighter"> <%= l :label_activity_time %>
&nbsp; <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></span>
<% if e.event_type == "issue" %>
<div class="" style="display:inline-block;position:absolute; right:2%;">
<span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count) %></span>
</div>
<% end %>
</div>
</div>
</div>
<div class="activity_description info-break" style="font-size: 13px;">
<%= h(truncate(strip_tags(e.event_description).gsub(/&nbsp;/,' '), length: 30, omission:'...')) %>
</div>
<div class="activity_status" style="position:relative; padding-top: 3px;">
<span class="font_lighter"> <%= l :label_activity_time %>&nbsp; <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></span>
<% if e.event_type == "issue" %>
<div class="" style="display:inline-block;position:absolute; right:2%;">
<span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count)%></span>
</div>
<% end %>
</div>
</div>
</div>
<% end %>
<% end -%>
<% if(@events_pages.page == @events_pages.last_page) %>
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
</div>
<div class="activity-content" style="padding:5px 5px 5px 70px;">
<% end -%>
<% if (@events_pages.page == @events_pages.last_page) %>
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
</div>
<div class="activity-content" style="padding:5px 5px 5px 70px;">
<span class="activity-title font_lighter">
<% if @canShowRealName %>
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>)
<% else %>
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>
<% end %>
<% if @canShowRealName %>
(<%= link_to_user(@user, @canShowRealName) %>
)
<% else %>
<%= link_to_user(@user) %>
<% end %>
<%#= l(:label_new_activity) %>
</span>
<%= l(:label_user_create_project) %> <%= link_to @project.name %><strong> !</strong>
<div class="activity_description info-break" style="font-size: 13px;">
<%= l(:label_user_create_project) %> <%= link_to @project.name %>
<strong> !</strong>
<div class="activity_description info-break" style="font-size: 13px;">
</div>
<div class="activity_status" style="position:relative; padding-top: 3px;">
<span class="font_lighter"><%= l :label_activity_time %>: <%= format_time(@project.created_on) %></span>
</div>
</div>
</div>
<% end %>
</div>
<% else %>
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
</div>
<div class="activity_status" style="position:relative; padding-top: 3px;">
<span class="font_lighter"><%= l :label_activity_time %>: <%= format_time(@project.created_on) %></span>
<div class="activity-content" style="padding:5px 5px 5px 70px;">
<span class="activity-title font_lighter">
<% if @canShowRealName %>
(<%= link_to_user(@user, @canShowRealName) %>
)
<% else %>
<%= link_to_user(@user) %>
<% end %>
<%#= l(:label_new_activity) %>
</span>
<%= l(:label_user_create_project) %> <%= link_to @project.name %>
<strong> !</strong>
<div class="activity_description info-break" style="font-size: 13px;">
</div>
<div class="activity_status" style="position:relative; padding-top: 3px;">
<span class="font_lighter"><%= l :label_activity_time %>: <%= format_time(@project.created_on) %></span>
</div>
</div>
</div>
</div>
<% end %>
</div>
<%end%>
<% end %>
<div class="pagination">
<ul>
<%= pagination_links_full @events_pages%>
<% #binding.pry %>
<%= pagination_links_full @events_pages %>
<% #binding.pry %>
</ul>
</div>

View File

@ -50,8 +50,14 @@
<script type="text/javascript">
function ssearch(){
//alert($("#key_word").val());
value = $("#key_word").val();
province = $("#province").val();
var value = $("#key_word").val();
var province = $("#province").val();
//alert(value);
if(value == "")
{
alert("搜索条件不能为空");
return;
}
//alert(province);
$.ajax({
type :"POST",

View File

@ -1,6 +1,18 @@
<!-- modified by huang -->
<script type="text/javascript">
function searchUser(){
var name = $("#name").val();
if(name == "")
{
alert("搜索条件不能为空");
return;
}
$("#search_user_form").submit();
}
</script>
<div class="top-content">
<%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %>
<%= form_tag( users_search_path, :method => :get, :id => 'search_user_form') do %>
<table width="940px">
<tr>
<td class="info_font" style="width: 220px; color: #15bccf" ><%= l(:label_software_user ) %></td>
@ -9,8 +21,9 @@
</td>
<td rowspan="2" >
<div class="project-search" style="float: right">
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%= text_field_tag 'name', params[:name], :size => 30 %>
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div>
</td>
</tr>

View File

@ -1,7 +1,17 @@
<script type="text/javascript">
function searchUser(){
var name = $("#name").val();
if(name == "")
{
alert("搜索条件不能为空");
return;
}
$("#search_user_form").submit();
}
</script>
<div class="top-content">
<%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %>
<%= form_tag( users_search_path, :method => :get, :id => 'search_user_form') do %>
<table width="940px">
<tr>
<td class="info_font" style="width: 220px; color: #15bccf "><%= l(:label_software_user ) %></td>
@ -10,8 +20,9 @@
</td>
<td rowspan="2" >
<div class="project-search" style="float: right">
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%= text_field_tag 'name', params[:name], :size => 30 %>
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div>
</td>
</tr>

View File

@ -1904,6 +1904,7 @@ zh:
field_teacher_name: 教 师
field_hidden_repo: 隐藏代码库
field_dts_test: DTS测试工具
label_newbie_faq: '新手指引 & 问答'
label_hot_project: '热门项目'

View File

@ -0,0 +1,9 @@
class DstTest < ActiveRecord::Migration
def up
add_column :projects, :dts_test, :integer, :default => 0
end
def down
remove_column :projects, :dts_test
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,45 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("a11yHelp",function(j){var a=j.lang.a11yhelp,l=CKEDITOR.tools.getNextId(),e={8:a.backspace,9:a.tab,13:a.enter,16:a.shift,17:a.ctrl,18:a.alt,19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:a.end,36:a.home,37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:a["delete"],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,
105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=a.alt;e[CKEDITOR.SHIFT]=a.shift;e[CKEDITOR.CTRL]=a.ctrl;var f=[CKEDITOR.ALT,CKEDITOR.SHIFT,
CKEDITOR.CTRL],m=/\$\{(.*?)\}/g,p=function(){var a=j.keystrokeHandler.keystrokes,g={},c;for(c in a)g[a[c]]=c;return function(a,c){var b;if(g[c]){b=g[c];for(var h,i,k=[],d=0;d<f.length;d++)i=f[d],h=b/f[d],1<h&&2>=h&&(b-=i,k.push(e[i]));k.push(e[b]||String.fromCharCode(b));b=k.join("+")}else b=a;return b}}();return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:j.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},
html:function(){for(var e='<div class="cke_accessibility_legend" role="document" aria-labelledby="'+l+'_arialbl" tabIndex="-1">%1</div><span id="'+l+'_arialbl" class="cke_voice_label">'+a.contents+" </span>",g=[],c=a.legend,j=c.length,f=0;f<j;f++){for(var b=c[f],h=[],i=b.items,k=i.length,d=0;d<k;d++){var n=i[d],o=n.legend.replace(m,p);o.match(m)||h.push("<dt>%1</dt><dd>%2</dd>".replace("%1",n.name).replace("%2",o))}g.push("<h1>%1</h1><dl>%2</dl>".replace("%1",b.name).replace("%2",h.join("")))}return e.replace("%1",
g.join(""))}()+'<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,.cke_browser_ie6 .cke_accessibility_legend{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}]}],
buttons:[CKEDITOR.dialog.cancelButton]}});
*/
CKEDITOR.dialog.add("a11yHelp", function (j) {
var a = j.lang.a11yhelp, l = CKEDITOR.tools.getNextId(), e = {8: a.backspace, 9: a.tab, 13: a.enter, 16: a.shift, 17: a.ctrl, 18: a.alt, 19: a.pause, 20: a.capslock, 27: a.escape, 33: a.pageUp, 34: a.pageDown, 35: a.end, 36: a.home, 37: a.leftArrow, 38: a.upArrow, 39: a.rightArrow, 40: a.downArrow, 45: a.insert, 46: a["delete"], 91: a.leftWindowKey, 92: a.rightWindowKey, 93: a.selectKey, 96: a.numpad0, 97: a.numpad1, 98: a.numpad2, 99: a.numpad3, 100: a.numpad4, 101: a.numpad5, 102: a.numpad6, 103: a.numpad7, 104: a.numpad8,
105: a.numpad9, 106: a.multiply, 107: a.add, 109: a.subtract, 110: a.decimalPoint, 111: a.divide, 112: a.f1, 113: a.f2, 114: a.f3, 115: a.f4, 116: a.f5, 117: a.f6, 118: a.f7, 119: a.f8, 120: a.f9, 121: a.f10, 122: a.f11, 123: a.f12, 144: a.numLock, 145: a.scrollLock, 186: a.semiColon, 187: a.equalSign, 188: a.comma, 189: a.dash, 190: a.period, 191: a.forwardSlash, 192: a.graveAccent, 219: a.openBracket, 220: a.backSlash, 221: a.closeBracket, 222: a.singleQuote};
e[CKEDITOR.ALT] = a.alt;
e[CKEDITOR.SHIFT] = a.shift;
e[CKEDITOR.CTRL] = a.ctrl;
var f = [CKEDITOR.ALT, CKEDITOR.SHIFT,
CKEDITOR.CTRL], m = /\$\{(.*?)\}/g, p = function () {
var a = j.keystrokeHandler.keystrokes, g = {}, c;
for (c in a)g[a[c]] = c;
return function (a, c) {
var b;
if (g[c]) {
b = g[c];
for (var h, i, k = [], d = 0; d < f.length; d++)i = f[d], h = b / f[d], 1 < h && 2 >= h && (b -= i, k.push(e[i]));
k.push(e[b] || String.fromCharCode(b));
b = k.join("+")
} else b = a;
return b
}
}();
return{title: a.title, minWidth: 600, minHeight: 400, contents: [
{id: "info", label: j.lang.common.generalTab, expand: !0, elements: [
{type: "html", id: "legends", style: "white-space:normal;", focus: function () {
this.getElement().focus()
},
html: function () {
for (var e = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + l + '_arialbl" tabIndex="-1">%1</div><span id="' + l + '_arialbl" class="cke_voice_label">' + a.contents + " </span>", g = [], c = a.legend, j = c.length, f = 0; f < j; f++) {
for (var b = c[f], h = [], i = b.items, k = i.length, d = 0; d < k; d++) {
var n = i[d], o = n.legend.replace(m, p);
o.match(m) || h.push("<dt>%1</dt><dd>%2</dd>".replace("%1", n.name).replace("%2", o))
}
g.push("<h1>%1</h1><dl>%2</dl>".replace("%1", b.name).replace("%2", h.join("")))
}
return e.replace("%1",
g.join(""))
}() + '<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,.cke_browser_ie6 .cke_accessibility_legend{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}
]}
],
buttons: [CKEDITOR.dialog.cancelButton]}
});

View File

@ -1,11 +1,30 @@
/*

/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","ar",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"عام",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert","delete":"Delete",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",
graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
*/
CKEDITOR.plugins.setLang("a11yhelp", "ar", {title: "Accessibility Instructions", contents: "Help Contents. To close this dialog press ESC.", legend: [
{name: "عام", items: [
{name: "Editor Toolbar", legend: "Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},
{name: "Editor Dialog", legend: "Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name: "Editor Context Menu", legend: "Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},
{name: "Editor List Box", legend: "Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name: "Editor Element Path Bar", legend: "Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}
]},
{name: "Commands", items: [
{name: " Undo command", legend: "Press ${undo}"},
{name: " Redo command", legend: "Press ${redo}"},
{name: " Bold command", legend: "Press ${bold}"},
{name: " Italic command", legend: "Press ${italic}"},
{name: " Underline command",
legend: "Press ${underline}"},
{name: " Link command", legend: "Press ${link}"},
{name: " Toolbar Collapse command", legend: "Press ${toolbarCollapse}"},
{name: " Access previous focus space command", legend: "Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name: " Access next focus space command", legend: "Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name: " Accessibility Help", legend: "Press ${a11yHelp}"}
]}
], backspace: "Backspace", tab: "Tab", enter: "Enter", shift: "Shift", ctrl: "Ctrl", alt: "Alt", pause: "Pause", capslock: "Caps Lock", escape: "Escape", pageUp: "Page Up", pageDown: "Page Down", end: "End", home: "Home", leftArrow: "Left Arrow", upArrow: "Up Arrow", rightArrow: "Right Arrow", downArrow: "Down Arrow", insert: "Insert", "delete": "Delete", leftWindowKey: "Left Windows key", rightWindowKey: "Right Windows key", selectKey: "Select key", numpad0: "Numpad 0", numpad1: "Numpad 1",
numpad2: "Numpad 2", numpad3: "Numpad 3", numpad4: "Numpad 4", numpad5: "Numpad 5", numpad6: "Numpad 6", numpad7: "Numpad 7", numpad8: "Numpad 8", numpad9: "Numpad 9", multiply: "Multiply", add: "Add", subtract: "Subtract", decimalPoint: "Decimal Point", divide: "Divide", f1: "F1", f2: "F2", f3: "F3", f4: "F4", f5: "F5", f6: "F6", f7: "F7", f8: "F8", f9: "F9", f10: "F10", f11: "F11", f12: "F12", numLock: "Num Lock", scrollLock: "Scroll Lock", semiColon: "Semicolon", equalSign: "Equal Sign", comma: "Comma", dash: "Dash", period: "Period", forwardSlash: "Forward Slash",
graveAccent: "Grave Accent", openBracket: "Open Bracket", backSlash: "Backslash", closeBracket: "Close Bracket", singleQuote: "Single Quote"});

View File

@ -1,7 +1,14 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("about",function(a){var a=a.lang.about,b=CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png";return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'<style type="text/css">.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
b+");"+(CKEDITOR.env.hidpi?"background-size:163px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}</style><div class="cke_about_container"><div class="cke_about_logo"></div><p>CKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+')<br><a href="http://ckeditor.com/">http://ckeditor.com</a></p><p>'+a.help.replace("$1",'<a href="http://docs.ckeditor.com/user">'+
a.userGuide+"</a>")+"</p><p>"+a.moreInfo+'<br><a href="http://ckeditor.com/about/license">http://ckeditor.com/about/license</a></p><p>'+a.copy.replace("$1",'<a href="http://cksource.com/">CKSource</a> - Frederico Knabben')+"</p></div>"}]}],buttons:[CKEDITOR.dialog.cancelButton]}});
*/
CKEDITOR.dialog.add("about", function (a) {
var a = a.lang.about, b = CKEDITOR.plugins.get("about").path + "dialogs/" + (CKEDITOR.env.hidpi ? "hidpi/" : "") + "logo_ckeditor.png";
return{title: CKEDITOR.env.ie ? a.dlgTitle : a.title, minWidth: 390, minHeight: 230, contents: [
{id: "tab1", label: "", title: "", expand: !0, padding: 0, elements: [
{type: "html", html: '<style type="text/css">.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url(' +
b + ");" + (CKEDITOR.env.hidpi ? "background-size:163px 58px;" : "") + 'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}</style><div class="cke_about_container"><div class="cke_about_logo"></div><p>CKEditor ' + CKEDITOR.version + " (revision " + CKEDITOR.revision + ')<br><a href="http://ckeditor.com/">http://ckeditor.com</a></p><p>' + a.help.replace("$1", '<a href="http://docs.ckeditor.com/user">' +
a.userGuide + "</a>") + "</p><p>" + a.moreInfo + '<br><a href="http://ckeditor.com/about/license">http://ckeditor.com/about/license</a></p><p>' + a.copy.replace("$1", '<a href="http://cksource.com/">CKSource</a> - Frederico Knabben') + "</p></div>"}
]}
], buttons: [CKEDITOR.dialog.cancelButton]}
});

View File

@ -1,11 +1,94 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("paste",function(c){function h(a){var b=new CKEDITOR.dom.document(a.document),f=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();f.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));
b.getWindow().getFrame().removeCustomData("pendingFocus")&&f.focus()}var e=c.lang.clipboard;c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data})},null,null,1E3);return{title:e.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this.parts.title.setHtml(this.customTitle||e.title);this.customTitle=null},onLoad:function(){(CKEDITOR.env.ie7Compat||
CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"securityMsg",html:'<div style="white-space:normal;width:340px">'+e.securityMsg+"</div>"},{type:"html",id:"pasteMsg",html:'<div style="white-space:normal;width:340px">'+e.pasteMsg+"</div>"},{type:"html",id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(),
b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='<html dir="'+c.config.contentsLangDirection+'" lang="'+(c.config.contentsLanguage||c.langCode)+'"><head><style>body{margin:3px;height:95%}</style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction('+CKEDITOR.tools.addFunction(h,a)+",this);<\/script></body></html>",f=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?
"javascript:void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+'})())"':"",d=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="'+f+'" role="region" aria-label="'+e.pasteArea+'" aria-describedby="'+a.getContentElement("general","pasteMsg").domId+'" aria-multiple="true"></iframe>');d.on("load",function(a){a.removeListener();a=d.getFrameDocument();a.write(b);c.focusManager.add(a.getBody());
CKEDITOR.env.air&&h.call(this,a.getWindow().$)},a);d.setCustomData("dialog",a);a=this.getElement();a.setHtml("");a.append(d);if(CKEDITOR.env.ie){var g=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute" role="presentation"></span>');g.on("focus",function(){setTimeout(function(){d.$.contentWindow.focus()})});a.append(g);this.focus=function(){g.focus();this.fire("focus")}}this.getInputElement=function(){return d};CKEDITOR.env.ie&&(a.setStyle("display","block"),a.setStyle("height",
d.$.offsetHeight+2+"px"))},commit:function(){var a=this.getDialog().getParentEditor(),b=this.getInputElement().getFrameDocument().getBody(),c=b.getBogus(),d;c&&c.remove();d=b.getHtml();setTimeout(function(){a.fire("pasteDialogCommit",d)},0)}}]}]}});
*/
CKEDITOR.dialog.add("paste", function (c) {
function h(a) {
var b = new CKEDITOR.dom.document(a.document), f = b.getBody(), d = b.getById("cke_actscrpt");
d && d.remove();
f.setAttribute("contenteditable", !0);
if (CKEDITOR.env.ie && 8 > CKEDITOR.env.version)b.getWindow().on("blur", function () {
b.$.selection.empty()
});
b.on("keydown", function (a) {
var a = a.data, b;
switch (a.getKeystroke()) {
case 27:
this.hide();
b = 1;
break;
case 9:
case CKEDITOR.SHIFT + 9:
this.changeFocus(1), b = 1
}
b && a.preventDefault()
}, this);
c.fire("ariaWidget", new CKEDITOR.dom.element(a.frameElement));
b.getWindow().getFrame().removeCustomData("pendingFocus") && f.focus()
}
var e = c.lang.clipboard;
c.on("pasteDialogCommit", function (a) {
a.data && c.fire("paste", {type: "auto", dataValue: a.data})
}, null, null, 1E3);
return{title: e.title, minWidth: CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350, minHeight: CKEDITOR.env.quirks ? 250 : 245, onShow: function () {
this.parts.dialog.$.offsetHeight;
this.setupContent();
this.parts.title.setHtml(this.customTitle || e.title);
this.customTitle = null
}, onLoad: function () {
(CKEDITOR.env.ie7Compat ||
CKEDITOR.env.ie6Compat) && "rtl" == c.lang.dir && this.parts.contents.setStyle("overflow", "hidden")
}, onOk: function () {
this.commitContent()
}, contents: [
{id: "general", label: c.lang.common.generalTab, elements: [
{type: "html", id: "securityMsg", html: '<div style="white-space:normal;width:340px">' + e.securityMsg + "</div>"},
{type: "html", id: "pasteMsg", html: '<div style="white-space:normal;width:340px">' + e.pasteMsg + "</div>"},
{type: "html", id: "editing_area", style: "width:100%;height:100%", html: "", focus: function () {
var a = this.getInputElement(),
b = a.getFrameDocument().getBody();
!b || b.isReadOnly() ? a.setCustomData("pendingFocus", 1) : b.focus()
}, setup: function () {
var a = this.getDialog(), b = '<html dir="' + c.config.contentsLangDirection + '" lang="' + (c.config.contentsLanguage || c.langCode) + '"><head><style>body{margin:3px;height:95%}</style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction(' + CKEDITOR.tools.addFunction(h, a) + ",this);<\/script></body></html>", f = CKEDITOR.env.air ? "javascript:void(0)" : CKEDITOR.env.ie ?
"javascript:void((function(){" + encodeURIComponent("document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();") + '})())"' : "", d = CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="' + f + '" role="region" aria-label="' + e.pasteArea + '" aria-describedby="' + a.getContentElement("general", "pasteMsg").domId + '" aria-multiple="true"></iframe>');
d.on("load", function (a) {
a.removeListener();
a = d.getFrameDocument();
a.write(b);
c.focusManager.add(a.getBody());
CKEDITOR.env.air && h.call(this, a.getWindow().$)
}, a);
d.setCustomData("dialog", a);
a = this.getElement();
a.setHtml("");
a.append(d);
if (CKEDITOR.env.ie) {
var g = CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute" role="presentation"></span>');
g.on("focus", function () {
setTimeout(function () {
d.$.contentWindow.focus()
})
});
a.append(g);
this.focus = function () {
g.focus();
this.fire("focus")
}
}
this.getInputElement = function () {
return d
};
CKEDITOR.env.ie && (a.setStyle("display", "block"), a.setStyle("height",
d.$.offsetHeight + 2 + "px"))
}, commit: function () {
var a = this.getDialog().getParentEditor(), b = this.getInputElement().getFrameDocument().getBody(), c = b.getBogus(), d;
c && c.remove();
d = b.getHtml();
setTimeout(function () {
a.fire("pasteDialogCommit", d)
}, 0)
}}
]}
]}
});

View File

@ -1,13 +1,145 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("colordialog",function(t){function n(){f.getById(o).removeStyle("background-color");p.getContentElement("picker","selectedColor").setValue("");j&&j.removeAttribute("aria-selected");j=null}function u(a){var a=a.data.getTarget(),b;if("td"==a.getName()&&(b=a.getChild(0).getHtml()))j=a,j.setAttribute("aria-selected",!0),p.getContentElement("picker","selectedColor").setValue(b)}function y(a){for(var a=a.replace(/^#/,""),b=0,c=[];2>=b;b++)c[b]=parseInt(a.substr(2*b,2),16);return"#"+
(165<=0.2126*c[0]+0.7152*c[1]+0.0722*c[2]?"000":"fff")}function v(a){!a.name&&(a=new CKEDITOR.event(a));var b=!/mouse/.test(a.name),c=a.data.getTarget(),e;if("td"==c.getName()&&(e=c.getChild(0).getHtml()))q(a),b?g=c:w=c,b&&(c.setStyle("border-color",y(e)),c.setStyle("border-style","dotted")),f.getById(k).setStyle("background-color",e),f.getById(l).setHtml(e)}function q(a){if(a=!/mouse/.test(a.name)&&g){var b=a.getChild(0).getHtml();a.setStyle("border-color",b);a.setStyle("border-style","solid")}!g&&
!w&&(f.getById(k).removeStyle("background-color"),f.getById(l).setHtml("&nbsp;"))}function z(a){var b=a.data,c=b.getTarget(),e=b.getKeystroke(),d="rtl"==t.lang.dir;switch(e){case 38:if(a=c.getParent().getPrevious())a=a.getChild([c.getIndex()]),a.focus();b.preventDefault();break;case 40:if(a=c.getParent().getNext())(a=a.getChild([c.getIndex()]))&&1==a.type&&a.focus();b.preventDefault();break;case 32:case 13:u(a);b.preventDefault();break;case d?37:39:if(a=c.getNext())1==a.type&&(a.focus(),b.preventDefault(!0));
else if(a=c.getParent().getNext())if((a=a.getChild([0]))&&1==a.type)a.focus(),b.preventDefault(!0);break;case d?39:37:if(a=c.getPrevious())a.focus(),b.preventDefault(!0);else if(a=c.getParent().getPrevious())a=a.getLast(),a.focus(),b.preventDefault(!0)}}var r=CKEDITOR.dom.element,f=CKEDITOR.document,h=t.lang.colordialog,p,x={type:"html",html:"&nbsp;"},j,g,w,m=function(a){return CKEDITOR.tools.getNextId()+"_"+a},k=m("hicolor"),l=m("hicolortext"),o=m("selhicolor"),i;(function(){function a(a,d){for(var s=
a;s<a+3;s++){var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var f=d;f<d+3;f++)for(var g=0;6>g;g++)b(e.$,"#"+c[f]+c[g]+c[s])}}function b(a,c){var b=new r(a.insertCell(-1));b.setAttribute("class","ColorCell");b.setAttribute("tabIndex",-1);b.setAttribute("role","gridcell");b.on("keydown",z);b.on("click",u);b.on("focus",v);b.on("blur",q);b.setStyle("background-color",c);b.setStyle("border","1px solid "+c);b.setStyle("width","14px");b.setStyle("height","14px");var d=m("color_table_cell");
b.setAttribute("aria-labelledby",d);b.append(CKEDITOR.dom.element.createFromHtml('<span id="'+d+'" class="cke_voice_label">'+c+"</span>",CKEDITOR.document))}i=CKEDITOR.dom.element.createFromHtml('<table tabIndex="-1" aria-label="'+h.options+'" role="grid" style="border-collapse:separate;" cellspacing="0"><caption class="cke_voice_label">'+h.options+'</caption><tbody role="presentation"></tbody></table>');i.on("mouseover",v);i.on("mouseout",q);var c="00 33 66 99 cc ff".split(" ");a(0,0);a(3,0);a(0,
3);a(3,3);var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var d=0;6>d;d++)b(e.$,"#"+c[d]+c[d]+c[d]);for(d=0;12>d;d++)b(e.$,"#000000")})();return{title:h.title,minWidth:360,minHeight:220,onLoad:function(){p=this},onHide:function(){n();var a=g.getChild(0).getHtml();g.setStyle("border-color",a);g.setStyle("border-style","solid");f.getById(k).removeStyle("background-color");f.getById(l).setHtml("&nbsp;");g=null},contents:[{id:"picker",label:h.title,accessKey:"I",elements:[{type:"hbox",
padding:0,widths:["70%","10%","30%"],children:[{type:"html",html:"<div></div>",onLoad:function(){CKEDITOR.document.getById(this.domId).append(i)},focus:function(){(g||this.getElement().getElementsByTag("td").getItem(0)).focus()}},x,{type:"vbox",padding:0,widths:["70%","5%","25%"],children:[{type:"html",html:"<span>"+h.highlight+'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+k+'" style="border: 1px solid; height: 74px; width: 74px;"></div>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+l+'">&nbsp;</div><span>'+h.selected+
'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+o+'" style="border: 1px solid; height: 20px; width: 74px;"></div>'},{type:"text",label:h.selected,labelStyle:"display:none",id:"selectedColor",style:"width: 74px",onChange:function(){try{f.getById(o).setStyle("background-color",this.getValue())}catch(a){n()}}},x,{type:"button",id:"clear",style:"margin-top: 5px",label:h.clear,onClick:n}]}]}]}]}});
*/
CKEDITOR.dialog.add("colordialog", function (t) {
function n() {
f.getById(o).removeStyle("background-color");
p.getContentElement("picker", "selectedColor").setValue("");
j && j.removeAttribute("aria-selected");
j = null
}
function u(a) {
var a = a.data.getTarget(), b;
if ("td" == a.getName() && (b = a.getChild(0).getHtml()))j = a, j.setAttribute("aria-selected", !0), p.getContentElement("picker", "selectedColor").setValue(b)
}
function y(a) {
for (var a = a.replace(/^#/, ""), b = 0, c = []; 2 >= b; b++)c[b] = parseInt(a.substr(2 * b, 2), 16);
return"#" +
(165 <= 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2] ? "000" : "fff")
}
function v(a) {
!a.name && (a = new CKEDITOR.event(a));
var b = !/mouse/.test(a.name), c = a.data.getTarget(), e;
if ("td" == c.getName() && (e = c.getChild(0).getHtml()))q(a), b ? g = c : w = c, b && (c.setStyle("border-color", y(e)), c.setStyle("border-style", "dotted")), f.getById(k).setStyle("background-color", e), f.getById(l).setHtml(e)
}
function q(a) {
if (a = !/mouse/.test(a.name) && g) {
var b = a.getChild(0).getHtml();
a.setStyle("border-color", b);
a.setStyle("border-style", "solid")
}
!g && !w && (f.getById(k).removeStyle("background-color"), f.getById(l).setHtml("&nbsp;"))
}
function z(a) {
var b = a.data, c = b.getTarget(), e = b.getKeystroke(), d = "rtl" == t.lang.dir;
switch (e) {
case 38:
if (a = c.getParent().getPrevious())a = a.getChild([c.getIndex()]), a.focus();
b.preventDefault();
break;
case 40:
if (a = c.getParent().getNext())(a = a.getChild([c.getIndex()])) && 1 == a.type && a.focus();
b.preventDefault();
break;
case 32:
case 13:
u(a);
b.preventDefault();
break;
case d ? 37 : 39:
if (a = c.getNext())1 == a.type && (a.focus(), b.preventDefault(!0));
else if (a = c.getParent().getNext())if ((a = a.getChild([0])) && 1 == a.type)a.focus(), b.preventDefault(!0);
break;
case d ? 39 : 37:
if (a = c.getPrevious())a.focus(), b.preventDefault(!0); else if (a = c.getParent().getPrevious())a = a.getLast(), a.focus(), b.preventDefault(!0)
}
}
var r = CKEDITOR.dom.element, f = CKEDITOR.document, h = t.lang.colordialog, p, x = {type: "html", html: "&nbsp;"}, j, g, w, m = function (a) {
return CKEDITOR.tools.getNextId() + "_" + a
}, k = m("hicolor"), l = m("hicolortext"), o = m("selhicolor"), i;
(function () {
function a(a, d) {
for (var s =
a; s < a + 3; s++) {
var e = new r(i.$.insertRow(-1));
e.setAttribute("role", "row");
for (var f = d; f < d + 3; f++)for (var g = 0; 6 > g; g++)b(e.$, "#" + c[f] + c[g] + c[s])
}
}
function b(a, c) {
var b = new r(a.insertCell(-1));
b.setAttribute("class", "ColorCell");
b.setAttribute("tabIndex", -1);
b.setAttribute("role", "gridcell");
b.on("keydown", z);
b.on("click", u);
b.on("focus", v);
b.on("blur", q);
b.setStyle("background-color", c);
b.setStyle("border", "1px solid " + c);
b.setStyle("width", "14px");
b.setStyle("height", "14px");
var d = m("color_table_cell");
b.setAttribute("aria-labelledby", d);
b.append(CKEDITOR.dom.element.createFromHtml('<span id="' + d + '" class="cke_voice_label">' + c + "</span>", CKEDITOR.document))
}
i = CKEDITOR.dom.element.createFromHtml('<table tabIndex="-1" aria-label="' + h.options + '" role="grid" style="border-collapse:separate;" cellspacing="0"><caption class="cke_voice_label">' + h.options + '</caption><tbody role="presentation"></tbody></table>');
i.on("mouseover", v);
i.on("mouseout", q);
var c = "00 33 66 99 cc ff".split(" ");
a(0, 0);
a(3, 0);
a(0,
3);
a(3, 3);
var e = new r(i.$.insertRow(-1));
e.setAttribute("role", "row");
for (var d = 0; 6 > d; d++)b(e.$, "#" + c[d] + c[d] + c[d]);
for (d = 0; 12 > d; d++)b(e.$, "#000000")
})();
return{title: h.title, minWidth: 360, minHeight: 220, onLoad: function () {
p = this
}, onHide: function () {
n();
var a = g.getChild(0).getHtml();
g.setStyle("border-color", a);
g.setStyle("border-style", "solid");
f.getById(k).removeStyle("background-color");
f.getById(l).setHtml("&nbsp;");
g = null
}, contents: [
{id: "picker", label: h.title, accessKey: "I", elements: [
{type: "hbox",
padding: 0, widths: ["70%", "10%", "30%"], children: [
{type: "html", html: "<div></div>", onLoad: function () {
CKEDITOR.document.getById(this.domId).append(i)
}, focus: function () {
(g || this.getElement().getElementsByTag("td").getItem(0)).focus()
}},
x,
{type: "vbox", padding: 0, widths: ["70%", "5%", "25%"], children: [
{type: "html", html: "<span>" + h.highlight + '</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="' + k + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\t\t\t\t\t\t\t\t\t\t\t\t<div id="' + l + '">&nbsp;</div><span>' + h.selected +
'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="' + o + '" style="border: 1px solid; height: 20px; width: 74px;"></div>'},
{type: "text", label: h.selected, labelStyle: "display:none", id: "selectedColor", style: "width: 74px", onChange: function () {
try {
f.getById(o).setStyle("background-color", this.getValue())
} catch (a) {
n()
}
}},
x,
{type: "button", id: "clear", style: "margin-top: 5px", label: h.clear, onClick: n}
]}
]}
]}
]}
});

View File

@ -1,9 +1,127 @@
(function(){function p(a,k,o){if(!k.is||!k.getCustomData("block_processed"))k.is&&CKEDITOR.dom.element.setMarker(o,k,"block_processed",!0),a.push(k)}function n(a,k){function o(){this.foreach(function(d){if(/^(?!vbox|hbox)/.test(d.type)&&(d.setup||(d.setup=function(c){d.setValue(c.getAttribute(d.id)||"",1)}),!d.commit))d.commit=function(c){var a=this.getValue();"dir"==d.id&&c.getComputedStyle("direction")==a||(a?c.setAttribute(d.id,a):c.removeAttribute(d.id))}})}var n=function(){var d=CKEDITOR.tools.extend({},
CKEDITOR.dtd.$blockLimit);a.config.div_wrapTable&&(delete d.td,delete d.th);return d}(),q=CKEDITOR.dtd.div,l={},m=[];return{title:a.lang.div.title,minWidth:400,minHeight:165,contents:[{id:"info",label:a.lang.common.generalTab,title:a.lang.common.generalTab,elements:[{type:"hbox",widths:["50%","50%"],children:[{id:"elementStyle",type:"select",style:"width: 100%;",label:a.lang.div.styleSelectLabel,"default":"",items:[[a.lang.common.notSet,""]],onChange:function(){var d=["info:elementStyle","info:class",
"advanced:dir","advanced:style"],c=this.getDialog(),h=c._element&&c._element.clone()||new CKEDITOR.dom.element("div",a.document);this.commit(h,!0);for(var d=[].concat(d),b=d.length,i,f=0;f<b;f++)(i=c.getContentElement.apply(c,d[f].split(":")))&&i.setup&&i.setup(h,!0)},setup:function(a){for(var c in l)l[c].checkElementRemovable(a,!0)&&this.setValue(c,1)},commit:function(a){var c;(c=this.getValue())?l[c].applyToObject(a):a.removeAttribute("style")}},{id:"class",type:"text",requiredContent:"div(cke-xyz)",
label:a.lang.common.cssClass,"default":""}]}]},{id:"advanced",label:a.lang.common.advancedTab,title:a.lang.common.advancedTab,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"id",requiredContent:"div[id]",label:a.lang.common.id,"default":""},{type:"text",id:"lang",requiredContent:"div[lang]",label:a.lang.common.langCode,"default":""}]},{type:"hbox",children:[{type:"text",id:"style",requiredContent:"div{cke-xyz}",style:"width: 100%;",label:a.lang.common.cssStyle,
"default":"",commit:function(a){a.setAttribute("style",this.getValue())}}]},{type:"hbox",children:[{type:"text",id:"title",requiredContent:"div[title]",style:"width: 100%;",label:a.lang.common.advisoryTitle,"default":""}]},{type:"select",id:"dir",requiredContent:"div[dir]",style:"width: 100%;",label:a.lang.common.langDir,"default":"",items:[[a.lang.common.notSet,""],[a.lang.common.langDirLtr,"ltr"],[a.lang.common.langDirRtl,"rtl"]]}]}]}],onLoad:function(){o.call(this);var d=this,c=this.getContentElement("info",
"elementStyle");a.getStylesSet(function(h){var b,i;if(h)for(var f=0;f<h.length;f++)i=h[f],i.element&&"div"==i.element&&(b=i.name,l[b]=i=new CKEDITOR.style(i),a.filter.check(i)&&(c.items.push([b,b]),c.add(b,b)));c[1<c.items.length?"enable":"disable"]();setTimeout(function(){d._element&&c.setup(d._element)},0)})},onShow:function(){"editdiv"==k&&this.setupContent(this._element=CKEDITOR.plugins.div.getSurroundDiv(a))},onOk:function(){if("editdiv"==k)m=[this._element];else{var d=[],c={},h=[],b,i=a.getSelection(),
f=i.getRanges(),l=i.createBookmarks(),g,j;for(g=0;g<f.length;g++)for(j=f[g].createIterator();b=j.getNextParagraph();)if(b.getName()in n&&!b.isReadOnly()){var e=b.getChildren();for(b=0;b<e.count();b++)p(h,e.getItem(b),c)}else{for(;!q[b.getName()]&&!b.equals(f[g].root);)b=b.getParent();p(h,b,c)}CKEDITOR.dom.element.clearAllMarkers(c);f=[];g=null;for(j=0;j<h.length;j++)b=h[j],e=a.elementPath(b).blockLimit,e.isReadOnly()&&(e=e.getParent()),a.config.div_wrapTable&&e.is(["td","th"])&&(e=a.elementPath(e.getParent()).blockLimit),
e.equals(g)||(g=e,f.push([])),f[f.length-1].push(b);for(g=0;g<f.length;g++){e=f[g][0];h=e.getParent();for(b=1;b<f[g].length;b++)h=h.getCommonAncestor(f[g][b]);j=new CKEDITOR.dom.element("div",a.document);for(b=0;b<f[g].length;b++){for(e=f[g][b];!e.getParent().equals(h);)e=e.getParent();f[g][b]=e}for(b=0;b<f[g].length;b++)if(e=f[g][b],!e.getCustomData||!e.getCustomData("block_processed"))e.is&&CKEDITOR.dom.element.setMarker(c,e,"block_processed",!0),b||j.insertBefore(e),j.append(e);CKEDITOR.dom.element.clearAllMarkers(c);
d.push(j)}i.selectBookmarks(l);m=d}d=m.length;for(c=0;c<d;c++)this.commitContent(m[c]),!m[c].getAttribute("style")&&m[c].removeAttribute("style");this.hide()},onHide:function(){"editdiv"==k&&this._element.removeCustomData("elementStyle");delete this._element}}}CKEDITOR.dialog.add("creatediv",function(a){return n(a,"creatediv")});CKEDITOR.dialog.add("editdiv",function(a){return n(a,"editdiv")})})();
(function () {
function p(a, k, o) {
if (!k.is || !k.getCustomData("block_processed"))k.is && CKEDITOR.dom.element.setMarker(o, k, "block_processed", !0), a.push(k)
}
function n(a, k) {
function o() {
this.foreach(function (d) {
if (/^(?!vbox|hbox)/.test(d.type) && (d.setup || (d.setup = function (c) {
d.setValue(c.getAttribute(d.id) || "", 1)
}), !d.commit))d.commit = function (c) {
var a = this.getValue();
"dir" == d.id && c.getComputedStyle("direction") == a || (a ? c.setAttribute(d.id, a) : c.removeAttribute(d.id))
}
})
}
var n = function () {
var d = CKEDITOR.tools.extend({},
CKEDITOR.dtd.$blockLimit);
a.config.div_wrapTable && (delete d.td, delete d.th);
return d
}(), q = CKEDITOR.dtd.div, l = {}, m = [];
return{title: a.lang.div.title, minWidth: 400, minHeight: 165, contents: [
{id: "info", label: a.lang.common.generalTab, title: a.lang.common.generalTab, elements: [
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "elementStyle", type: "select", style: "width: 100%;", label: a.lang.div.styleSelectLabel, "default": "", items: [
[a.lang.common.notSet, ""]
], onChange: function () {
var d = ["info:elementStyle", "info:class",
"advanced:dir", "advanced:style"], c = this.getDialog(), h = c._element && c._element.clone() || new CKEDITOR.dom.element("div", a.document);
this.commit(h, !0);
for (var d = [].concat(d), b = d.length, i, f = 0; f < b; f++)(i = c.getContentElement.apply(c, d[f].split(":"))) && i.setup && i.setup(h, !0)
}, setup: function (a) {
for (var c in l)l[c].checkElementRemovable(a, !0) && this.setValue(c, 1)
}, commit: function (a) {
var c;
(c = this.getValue()) ? l[c].applyToObject(a) : a.removeAttribute("style")
}},
{id: "class", type: "text", requiredContent: "div(cke-xyz)",
label: a.lang.common.cssClass, "default": ""}
]}
]},
{id: "advanced", label: a.lang.common.advancedTab, title: a.lang.common.advancedTab, elements: [
{type: "vbox", padding: 1, children: [
{type: "hbox", widths: ["50%", "50%"], children: [
{type: "text", id: "id", requiredContent: "div[id]", label: a.lang.common.id, "default": ""},
{type: "text", id: "lang", requiredContent: "div[lang]", label: a.lang.common.langCode, "default": ""}
]},
{type: "hbox", children: [
{type: "text", id: "style", requiredContent: "div{cke-xyz}", style: "width: 100%;", label: a.lang.common.cssStyle,
"default": "", commit: function (a) {
a.setAttribute("style", this.getValue())
}}
]},
{type: "hbox", children: [
{type: "text", id: "title", requiredContent: "div[title]", style: "width: 100%;", label: a.lang.common.advisoryTitle, "default": ""}
]},
{type: "select", id: "dir", requiredContent: "div[dir]", style: "width: 100%;", label: a.lang.common.langDir, "default": "", items: [
[a.lang.common.notSet, ""],
[a.lang.common.langDirLtr, "ltr"],
[a.lang.common.langDirRtl, "rtl"]
]}
]}
]}
], onLoad: function () {
o.call(this);
var d = this, c = this.getContentElement("info",
"elementStyle");
a.getStylesSet(function (h) {
var b, i;
if (h)for (var f = 0; f < h.length; f++)i = h[f], i.element && "div" == i.element && (b = i.name, l[b] = i = new CKEDITOR.style(i), a.filter.check(i) && (c.items.push([b, b]), c.add(b, b)));
c[1 < c.items.length ? "enable" : "disable"]();
setTimeout(function () {
d._element && c.setup(d._element)
}, 0)
})
}, onShow: function () {
"editdiv" == k && this.setupContent(this._element = CKEDITOR.plugins.div.getSurroundDiv(a))
}, onOk: function () {
if ("editdiv" == k)m = [this._element]; else {
var d = [], c = {}, h = [], b, i = a.getSelection(),
f = i.getRanges(), l = i.createBookmarks(), g, j;
for (g = 0; g < f.length; g++)for (j = f[g].createIterator(); b = j.getNextParagraph();)if (b.getName()in n && !b.isReadOnly()) {
var e = b.getChildren();
for (b = 0; b < e.count(); b++)p(h, e.getItem(b), c)
} else {
for (; !q[b.getName()] && !b.equals(f[g].root);)b = b.getParent();
p(h, b, c)
}
CKEDITOR.dom.element.clearAllMarkers(c);
f = [];
g = null;
for (j = 0; j < h.length; j++)b = h[j], e = a.elementPath(b).blockLimit, e.isReadOnly() && (e = e.getParent()), a.config.div_wrapTable && e.is(["td", "th"]) && (e = a.elementPath(e.getParent()).blockLimit),
e.equals(g) || (g = e, f.push([])), f[f.length - 1].push(b);
for (g = 0; g < f.length; g++) {
e = f[g][0];
h = e.getParent();
for (b = 1; b < f[g].length; b++)h = h.getCommonAncestor(f[g][b]);
j = new CKEDITOR.dom.element("div", a.document);
for (b = 0; b < f[g].length; b++) {
for (e = f[g][b]; !e.getParent().equals(h);)e = e.getParent();
f[g][b] = e
}
for (b = 0; b < f[g].length; b++)if (e = f[g][b], !e.getCustomData || !e.getCustomData("block_processed"))e.is && CKEDITOR.dom.element.setMarker(c, e, "block_processed", !0), b || j.insertBefore(e), j.append(e);
CKEDITOR.dom.element.clearAllMarkers(c);
d.push(j)
}
i.selectBookmarks(l);
m = d
}
d = m.length;
for (c = 0; c < d; c++)this.commitContent(m[c]), !m[c].getAttribute("style") && m[c].removeAttribute("style");
this.hide()
}, onHide: function () {
"editdiv" == k && this._element.removeCustomData("elementStyle");
delete this._element
}}
}
CKEDITOR.dialog.add("creatediv", function (a) {
return n(a, "creatediv")
});
CKEDITOR.dialog.add("editdiv", function (a) {
return n(a, "editdiv")
})
})();

View File

@ -1,24 +1,300 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){function y(c){return c.type==CKEDITOR.NODE_TEXT&&0<c.getLength()&&(!o||!c.isReadOnly())}function s(c){return!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)))}var o,t=function(){return{textNode:this.textNode,offset:this.offset,character:this.textNode?this.textNode.getText().charAt(this.offset):null,hitMatchBoundary:this._.matchBoundary}},u=["find","replace"],p=[["txtFindFind","txtFindReplace"],["txtFindCaseChk",
"txtReplaceCaseChk"],["txtFindWordChk","txtReplaceWordChk"],["txtFindCyclic","txtReplaceCyclic"]],n=function(c,g){function n(a,b){var d=c.createRange();d.setStart(a.textNode,b?a.offset:a.offset+1);d.setEndAt(c.editable(),CKEDITOR.POSITION_BEFORE_END);return d}function q(a){var b=c.getSelection(),d=c.editable();b&&!a?(a=b.getRanges()[0].clone(),a.collapse(!0)):(a=c.createRange(),a.setStartAt(d,CKEDITOR.POSITION_AFTER_START));a.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);return a}var v=new CKEDITOR.style(CKEDITOR.tools.extend({attributes:{"data-cke-highlight":1},
fullMatch:1,ignoreReadonly:1,childRule:function(){return 0}},c.config.find_highlight,!0)),l=function(a,b){var d=this,c=new CKEDITOR.dom.walker(a);c.guard=b?s:function(a){!s(a)&&(d._.matchBoundary=!0)};c.evaluator=y;c.breakOnFalse=1;a.startContainer.type==CKEDITOR.NODE_TEXT&&(this.textNode=a.startContainer,this.offset=a.startOffset-1);this._={matchWord:b,walker:c,matchBoundary:!1}};l.prototype={next:function(){return this.move()},back:function(){return this.move(!0)},move:function(a){var b=this.textNode;
if(null===b)return t.call(this);this._.matchBoundary=!1;if(b&&a&&0<this.offset)this.offset--;else if(b&&this.offset<b.getLength()-1)this.offset++;else{for(b=null;!b&&!(b=this._.walker[a?"previous":"next"].call(this._.walker),this._.matchWord&&!b||this._.walker._.end););this.offset=(this.textNode=b)?a?b.getLength()-1:0:0}return t.call(this)}};var r=function(a,b){this._={walker:a,cursors:[],rangeLength:b,highlightRange:null,isMatched:0}};r.prototype={toDomRange:function(){var a=c.createRange(),b=this._.cursors;
if(1>b.length){var d=this._.walker.textNode;if(d)a.setStartAfter(d);else return null}else d=b[0],b=b[b.length-1],a.setStart(d.textNode,d.offset),a.setEnd(b.textNode,b.offset+1);return a},updateFromDomRange:function(a){var b=new l(a);this._.cursors=[];do a=b.next(),a.character&&this._.cursors.push(a);while(a.character);this._.rangeLength=this._.cursors.length},setMatched:function(){this._.isMatched=!0},clearMatched:function(){this._.isMatched=!1},isMatched:function(){return this._.isMatched},highlight:function(){if(!(1>
this._.cursors.length)){this._.highlightRange&&this.removeHighlight();var a=this.toDomRange(),b=a.createBookmark();v.applyToRange(a);a.moveToBookmark(b);this._.highlightRange=a;b=a.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b.scrollIntoView();this.updateFromDomRange(a)}},removeHighlight:function(){if(this._.highlightRange){var a=this._.highlightRange.createBookmark();v.removeFromRange(this._.highlightRange);this._.highlightRange.moveToBookmark(a);this.updateFromDomRange(this._.highlightRange);
this._.highlightRange=null}},isReadOnly:function(){return!this._.highlightRange?0:this._.highlightRange.startContainer.isReadOnly()},moveBack:function(){var a=this._.walker.back(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.unshift(a);b.length>this._.rangeLength&&b.pop();return a},moveNext:function(){var a=this._.walker.next(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.push(a);b.length>this._.rangeLength&&b.shift();return a},getEndCharacter:function(){var a=this._.cursors;
return 1>a.length?null:a[a.length-1].character},getNextCharacterRange:function(a){var b,d;d=this._.cursors;d=(b=d[d.length-1])&&b.textNode?new l(n(b)):this._.walker;return new r(d,a)},getCursors:function(){return this._.cursors}};var w=function(a,b){var d=[-1];b&&(a=a.toLowerCase());for(var c=0;c<a.length;c++)for(d.push(d[c]+1);0<d[c+1]&&a.charAt(c)!=a.charAt(d[c+1]-1);)d[c+1]=d[d[c+1]-1]+1;this._={overlap:d,state:0,ignoreCase:!!b,pattern:a}};w.prototype={feedCharacter:function(a){for(this._.ignoreCase&&
(a=a.toLowerCase());;){if(a==this._.pattern.charAt(this._.state))return this._.state++,this._.state==this._.pattern.length?(this._.state=0,2):1;if(this._.state)this._.state=this._.overlap[this._.state];else return 0}return null},reset:function(){this._.state=0}};var z=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,x=function(a){if(!a)return!0;var b=a.charCodeAt(0);return 9<=b&&13>=b||8192<=b&&8202>=b||z.test(a)},e={searchRange:null,matchRange:null,find:function(a,b,d,f,e,A){this.matchRange?
(this.matchRange.removeHighlight(),this.matchRange=this.matchRange.getNextCharacterRange(a.length)):this.matchRange=new r(new l(this.searchRange),a.length);for(var i=new w(a,!b),j=0,k="%";null!==k;){for(this.matchRange.moveNext();k=this.matchRange.getEndCharacter();){j=i.feedCharacter(k);if(2==j)break;this.matchRange.moveNext().hitMatchBoundary&&i.reset()}if(2==j){if(d){var h=this.matchRange.getCursors(),m=h[h.length-1],h=h[0],g=c.createRange();g.setStartAt(c.editable(),CKEDITOR.POSITION_AFTER_START);
g.setEnd(h.textNode,h.offset);h=g;m=n(m);h.trim();m.trim();h=new l(h,!0);m=new l(m,!0);if(!x(h.back().character)||!x(m.next().character))continue}this.matchRange.setMatched();!1!==e&&this.matchRange.highlight();return!0}}this.matchRange.clearMatched();this.matchRange.removeHighlight();return f&&!A?(this.searchRange=q(1),this.matchRange=null,arguments.callee.apply(this,Array.prototype.slice.call(arguments).concat([!0]))):!1},replaceCounter:0,replace:function(a,b,d,f,e,g,i){o=1;a=0;if(this.matchRange&&
this.matchRange.isMatched()&&!this.matchRange._.isReplaced&&!this.matchRange.isReadOnly()){this.matchRange.removeHighlight();b=this.matchRange.toDomRange();d=c.document.createText(d);if(!i){var j=c.getSelection();j.selectRanges([b]);c.fire("saveSnapshot")}b.deleteContents();b.insertNode(d);i||(j.selectRanges([b]),c.fire("saveSnapshot"));this.matchRange.updateFromDomRange(b);i||this.matchRange.highlight();this.matchRange._.isReplaced=!0;this.replaceCounter++;a=1}else a=this.find(b,f,e,g,!i);o=0;return a}},
f=c.lang.find;return{title:f.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton(c,{label:c.lang.common.close})],contents:[{id:"find",label:f.find,title:f.find,accessKey:"",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindFind",label:f.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFind",align:"left",style:"width:100%",label:f.find,onClick:function(){var a=this.getDialog();
e.find(a.getValueOf("find","txtFindFind"),a.getValueOf("find","txtFindCaseChk"),a.getValueOf("find","txtFindWordChk"),a.getValueOf("find","txtFindCyclic"))||alert(f.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(f.findOptions),style:"margin-top:29px",children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtFindCaseChk",isChanged:!1,label:f.matchCase},{type:"checkbox",id:"txtFindWordChk",isChanged:!1,label:f.matchWord},{type:"checkbox",id:"txtFindCyclic",isChanged:!1,"default":!0,
label:f.matchCyclic}]}]}]},{id:"replace",label:f.replace,accessKey:"M",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindReplace",label:f.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFindReplace",align:"left",style:"width:100%",label:f.replace,onClick:function(){var a=this.getDialog();e.replace(a,a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace",
"txtReplaceWordChk"),a.getValueOf("replace","txtReplaceCyclic"))||alert(f.notFoundMsg)}}]},{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtReplace",label:f.replaceWith,isChanged:!1,labelLayout:"horizontal",accessKey:"R"},{type:"button",id:"btnReplaceAll",align:"left",style:"width:100%",label:f.replaceAll,isChanged:!1,onClick:function(){var a=this.getDialog();e.replaceCounter=0;e.searchRange=q(1);e.matchRange&&(e.matchRange.removeHighlight(),e.matchRange=null);for(c.fire("saveSnapshot");e.replace(a,
a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace","txtReplaceWordChk"),!1,!0););e.replaceCounter?(alert(f.replaceSuccessMsg.replace(/%1/,e.replaceCounter)),c.fire("saveSnapshot")):alert(f.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(f.findOptions),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtReplaceCaseChk",isChanged:!1,label:f.matchCase},{type:"checkbox",id:"txtReplaceWordChk",
isChanged:!1,label:f.matchWord},{type:"checkbox",id:"txtReplaceCyclic",isChanged:!1,"default":!0,label:f.matchCyclic}]}]}]}],onLoad:function(){var a=this,b,c=0;this.on("hide",function(){c=0});this.on("show",function(){c=1});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(f){return function(e){f.call(a,e);var g=a._.tabs[e],i;i="find"===e?"txtFindWordChk":"txtReplaceWordChk";b=a.getContentElement(e,"find"===e?"txtFindFind":"txtFindReplace");a.getContentElement(e,i);g.initialized||(CKEDITOR.document.getById(b._.inputId),
g.initialized=!0);if(c){var j,e="find"===e?1:0,g=1-e,k,h=p.length;for(k=0;k<h;k++)i=this.getContentElement(u[e],p[k][e]),j=this.getContentElement(u[g],p[k][g]),j.setValue(i.getValue())}}})},onShow:function(){e.searchRange=q();var a=this.getParentEditor().getSelection().getSelectedText(),b=this.getContentElement(g,"find"==g?"txtFindFind":"txtFindReplace");b.setValue(a);b.select();this.selectPage(g);this[("find"==g&&this._.editor.readOnly?"hide":"show")+"Page"]("replace")},onHide:function(){var a;e.matchRange&&
e.matchRange.isMatched()&&(e.matchRange.removeHighlight(),c.focus(),(a=e.matchRange.toDomRange())&&c.getSelection().selectRanges([a]));delete e.matchRange},onFocus:function(){return"replace"==g?this.getContentElement("replace","txtFindReplace"):this.getContentElement("find","txtFindFind")}}};CKEDITOR.dialog.add("find",function(c){return n(c,"find")});CKEDITOR.dialog.add("replace",function(c){return n(c,"replace")})})();
*/
(function () {
function y(c) {
return c.type == CKEDITOR.NODE_TEXT && 0 < c.getLength() && (!o || !c.isReadOnly())
}
function s(c) {
return!(c.type == CKEDITOR.NODE_ELEMENT && c.isBlockBoundary(CKEDITOR.tools.extend({}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable)))
}
var o, t = function () {
return{textNode: this.textNode, offset: this.offset, character: this.textNode ? this.textNode.getText().charAt(this.offset) : null, hitMatchBoundary: this._.matchBoundary}
}, u = ["find", "replace"], p = [
["txtFindFind", "txtFindReplace"],
["txtFindCaseChk",
"txtReplaceCaseChk"],
["txtFindWordChk", "txtReplaceWordChk"],
["txtFindCyclic", "txtReplaceCyclic"]
], n = function (c, g) {
function n(a, b) {
var d = c.createRange();
d.setStart(a.textNode, b ? a.offset : a.offset + 1);
d.setEndAt(c.editable(), CKEDITOR.POSITION_BEFORE_END);
return d
}
function q(a) {
var b = c.getSelection(), d = c.editable();
b && !a ? (a = b.getRanges()[0].clone(), a.collapse(!0)) : (a = c.createRange(), a.setStartAt(d, CKEDITOR.POSITION_AFTER_START));
a.setEndAt(d, CKEDITOR.POSITION_BEFORE_END);
return a
}
var v = new CKEDITOR.style(CKEDITOR.tools.extend({attributes: {"data-cke-highlight": 1},
fullMatch: 1, ignoreReadonly: 1, childRule: function () {
return 0
}}, c.config.find_highlight, !0)), l = function (a, b) {
var d = this, c = new CKEDITOR.dom.walker(a);
c.guard = b ? s : function (a) {
!s(a) && (d._.matchBoundary = !0)
};
c.evaluator = y;
c.breakOnFalse = 1;
a.startContainer.type == CKEDITOR.NODE_TEXT && (this.textNode = a.startContainer, this.offset = a.startOffset - 1);
this._ = {matchWord: b, walker: c, matchBoundary: !1}
};
l.prototype = {next: function () {
return this.move()
}, back: function () {
return this.move(!0)
}, move: function (a) {
var b = this.textNode;
if (null === b)return t.call(this);
this._.matchBoundary = !1;
if (b && a && 0 < this.offset)this.offset--; else if (b && this.offset < b.getLength() - 1)this.offset++; else {
for (b = null; !b && !(b = this._.walker[a ? "previous" : "next"].call(this._.walker), this._.matchWord && !b || this._.walker._.end););
this.offset = (this.textNode = b) ? a ? b.getLength() - 1 : 0 : 0
}
return t.call(this)
}};
var r = function (a, b) {
this._ = {walker: a, cursors: [], rangeLength: b, highlightRange: null, isMatched: 0}
};
r.prototype = {toDomRange: function () {
var a = c.createRange(), b = this._.cursors;
if (1 > b.length) {
var d = this._.walker.textNode;
if (d)a.setStartAfter(d); else return null
} else d = b[0], b = b[b.length - 1], a.setStart(d.textNode, d.offset), a.setEnd(b.textNode, b.offset + 1);
return a
}, updateFromDomRange: function (a) {
var b = new l(a);
this._.cursors = [];
do a = b.next(), a.character && this._.cursors.push(a); while (a.character);
this._.rangeLength = this._.cursors.length
}, setMatched: function () {
this._.isMatched = !0
}, clearMatched: function () {
this._.isMatched = !1
}, isMatched: function () {
return this._.isMatched
}, highlight: function () {
if (!(1 >
this._.cursors.length)) {
this._.highlightRange && this.removeHighlight();
var a = this.toDomRange(), b = a.createBookmark();
v.applyToRange(a);
a.moveToBookmark(b);
this._.highlightRange = a;
b = a.startContainer;
b.type != CKEDITOR.NODE_ELEMENT && (b = b.getParent());
b.scrollIntoView();
this.updateFromDomRange(a)
}
}, removeHighlight: function () {
if (this._.highlightRange) {
var a = this._.highlightRange.createBookmark();
v.removeFromRange(this._.highlightRange);
this._.highlightRange.moveToBookmark(a);
this.updateFromDomRange(this._.highlightRange);
this._.highlightRange = null
}
}, isReadOnly: function () {
return!this._.highlightRange ? 0 : this._.highlightRange.startContainer.isReadOnly()
}, moveBack: function () {
var a = this._.walker.back(), b = this._.cursors;
a.hitMatchBoundary && (this._.cursors = b = []);
b.unshift(a);
b.length > this._.rangeLength && b.pop();
return a
}, moveNext: function () {
var a = this._.walker.next(), b = this._.cursors;
a.hitMatchBoundary && (this._.cursors = b = []);
b.push(a);
b.length > this._.rangeLength && b.shift();
return a
}, getEndCharacter: function () {
var a = this._.cursors;
return 1 > a.length ? null : a[a.length - 1].character
}, getNextCharacterRange: function (a) {
var b, d;
d = this._.cursors;
d = (b = d[d.length - 1]) && b.textNode ? new l(n(b)) : this._.walker;
return new r(d, a)
}, getCursors: function () {
return this._.cursors
}};
var w = function (a, b) {
var d = [-1];
b && (a = a.toLowerCase());
for (var c = 0; c < a.length; c++)for (d.push(d[c] + 1); 0 < d[c + 1] && a.charAt(c) != a.charAt(d[c + 1] - 1);)d[c + 1] = d[d[c + 1] - 1] + 1;
this._ = {overlap: d, state: 0, ignoreCase: !!b, pattern: a}
};
w.prototype = {feedCharacter: function (a) {
for (this._.ignoreCase &&
(a = a.toLowerCase()); ;) {
if (a == this._.pattern.charAt(this._.state))return this._.state++, this._.state == this._.pattern.length ? (this._.state = 0, 2) : 1;
if (this._.state)this._.state = this._.overlap[this._.state]; else return 0
}
return null
}, reset: function () {
this._.state = 0
}};
var z = /[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/, x = function (a) {
if (!a)return!0;
var b = a.charCodeAt(0);
return 9 <= b && 13 >= b || 8192 <= b && 8202 >= b || z.test(a)
}, e = {searchRange: null, matchRange: null, find: function (a, b, d, f, e, A) {
this.matchRange ?
(this.matchRange.removeHighlight(), this.matchRange = this.matchRange.getNextCharacterRange(a.length)) : this.matchRange = new r(new l(this.searchRange), a.length);
for (var i = new w(a, !b), j = 0, k = "%"; null !== k;) {
for (this.matchRange.moveNext(); k = this.matchRange.getEndCharacter();) {
j = i.feedCharacter(k);
if (2 == j)break;
this.matchRange.moveNext().hitMatchBoundary && i.reset()
}
if (2 == j) {
if (d) {
var h = this.matchRange.getCursors(), m = h[h.length - 1], h = h[0], g = c.createRange();
g.setStartAt(c.editable(), CKEDITOR.POSITION_AFTER_START);
g.setEnd(h.textNode, h.offset);
h = g;
m = n(m);
h.trim();
m.trim();
h = new l(h, !0);
m = new l(m, !0);
if (!x(h.back().character) || !x(m.next().character))continue
}
this.matchRange.setMatched();
!1 !== e && this.matchRange.highlight();
return!0
}
}
this.matchRange.clearMatched();
this.matchRange.removeHighlight();
return f && !A ? (this.searchRange = q(1), this.matchRange = null, arguments.callee.apply(this, Array.prototype.slice.call(arguments).concat([!0]))) : !1
}, replaceCounter: 0, replace: function (a, b, d, f, e, g, i) {
o = 1;
a = 0;
if (this.matchRange &&
this.matchRange.isMatched() && !this.matchRange._.isReplaced && !this.matchRange.isReadOnly()) {
this.matchRange.removeHighlight();
b = this.matchRange.toDomRange();
d = c.document.createText(d);
if (!i) {
var j = c.getSelection();
j.selectRanges([b]);
c.fire("saveSnapshot")
}
b.deleteContents();
b.insertNode(d);
i || (j.selectRanges([b]), c.fire("saveSnapshot"));
this.matchRange.updateFromDomRange(b);
i || this.matchRange.highlight();
this.matchRange._.isReplaced = !0;
this.replaceCounter++;
a = 1
} else a = this.find(b, f, e, g, !i);
o = 0;
return a
}},
f = c.lang.find;
return{title: f.title, resizable: CKEDITOR.DIALOG_RESIZE_NONE, minWidth: 350, minHeight: 170, buttons: [CKEDITOR.dialog.cancelButton(c, {label: c.lang.common.close})], contents: [
{id: "find", label: f.find, title: f.find, accessKey: "", elements: [
{type: "hbox", widths: ["230px", "90px"], children: [
{type: "text", id: "txtFindFind", label: f.findWhat, isChanged: !1, labelLayout: "horizontal", accessKey: "F"},
{type: "button", id: "btnFind", align: "left", style: "width:100%", label: f.find, onClick: function () {
var a = this.getDialog();
e.find(a.getValueOf("find", "txtFindFind"), a.getValueOf("find", "txtFindCaseChk"), a.getValueOf("find", "txtFindWordChk"), a.getValueOf("find", "txtFindCyclic")) || alert(f.notFoundMsg)
}}
]},
{type: "fieldset", label: CKEDITOR.tools.htmlEncode(f.findOptions), style: "margin-top:29px", children: [
{type: "vbox", padding: 0, children: [
{type: "checkbox", id: "txtFindCaseChk", isChanged: !1, label: f.matchCase},
{type: "checkbox", id: "txtFindWordChk", isChanged: !1, label: f.matchWord},
{type: "checkbox", id: "txtFindCyclic", isChanged: !1, "default": !0,
label: f.matchCyclic}
]}
]}
]},
{id: "replace", label: f.replace, accessKey: "M", elements: [
{type: "hbox", widths: ["230px", "90px"], children: [
{type: "text", id: "txtFindReplace", label: f.findWhat, isChanged: !1, labelLayout: "horizontal", accessKey: "F"},
{type: "button", id: "btnFindReplace", align: "left", style: "width:100%", label: f.replace, onClick: function () {
var a = this.getDialog();
e.replace(a, a.getValueOf("replace", "txtFindReplace"), a.getValueOf("replace", "txtReplace"), a.getValueOf("replace", "txtReplaceCaseChk"), a.getValueOf("replace",
"txtReplaceWordChk"), a.getValueOf("replace", "txtReplaceCyclic")) || alert(f.notFoundMsg)
}}
]},
{type: "hbox", widths: ["230px", "90px"], children: [
{type: "text", id: "txtReplace", label: f.replaceWith, isChanged: !1, labelLayout: "horizontal", accessKey: "R"},
{type: "button", id: "btnReplaceAll", align: "left", style: "width:100%", label: f.replaceAll, isChanged: !1, onClick: function () {
var a = this.getDialog();
e.replaceCounter = 0;
e.searchRange = q(1);
e.matchRange && (e.matchRange.removeHighlight(), e.matchRange = null);
for (c.fire("saveSnapshot"); e.replace(a,
a.getValueOf("replace", "txtFindReplace"), a.getValueOf("replace", "txtReplace"), a.getValueOf("replace", "txtReplaceCaseChk"), a.getValueOf("replace", "txtReplaceWordChk"), !1, !0););
e.replaceCounter ? (alert(f.replaceSuccessMsg.replace(/%1/, e.replaceCounter)), c.fire("saveSnapshot")) : alert(f.notFoundMsg)
}}
]},
{type: "fieldset", label: CKEDITOR.tools.htmlEncode(f.findOptions), children: [
{type: "vbox", padding: 0, children: [
{type: "checkbox", id: "txtReplaceCaseChk", isChanged: !1, label: f.matchCase},
{type: "checkbox", id: "txtReplaceWordChk",
isChanged: !1, label: f.matchWord},
{type: "checkbox", id: "txtReplaceCyclic", isChanged: !1, "default": !0, label: f.matchCyclic}
]}
]}
]}
], onLoad: function () {
var a = this, b, c = 0;
this.on("hide", function () {
c = 0
});
this.on("show", function () {
c = 1
});
this.selectPage = CKEDITOR.tools.override(this.selectPage, function (f) {
return function (e) {
f.call(a, e);
var g = a._.tabs[e], i;
i = "find" === e ? "txtFindWordChk" : "txtReplaceWordChk";
b = a.getContentElement(e, "find" === e ? "txtFindFind" : "txtFindReplace");
a.getContentElement(e, i);
g.initialized || (CKEDITOR.document.getById(b._.inputId),
g.initialized = !0);
if (c) {
var j, e = "find" === e ? 1 : 0, g = 1 - e, k, h = p.length;
for (k = 0; k < h; k++)i = this.getContentElement(u[e], p[k][e]), j = this.getContentElement(u[g], p[k][g]), j.setValue(i.getValue())
}
}
})
}, onShow: function () {
e.searchRange = q();
var a = this.getParentEditor().getSelection().getSelectedText(), b = this.getContentElement(g, "find" == g ? "txtFindFind" : "txtFindReplace");
b.setValue(a);
b.select();
this.selectPage(g);
this[("find" == g && this._.editor.readOnly ? "hide" : "show") + "Page"]("replace")
}, onHide: function () {
var a;
e.matchRange &&
e.matchRange.isMatched() && (e.matchRange.removeHighlight(), c.focus(), (a = e.matchRange.toDomRange()) && c.getSelection().selectRanges([a]));
delete e.matchRange
}, onFocus: function () {
return"replace" == g ? this.getContentElement("replace", "txtFindReplace") : this.getContentElement("find", "txtFindFind")
}}
};
CKEDITOR.dialog.add("find", function (c) {
return n(c, "find")
});
CKEDITOR.dialog.add("replace", function (c) {
return n(c, "replace")
})
})();

View File

@ -1,24 +1,265 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){function b(a,b,c){var k=n[this.id];if(k)for(var f=this instanceof CKEDITOR.ui.dialog.checkbox,e=0;e<k.length;e++){var d=k[e];switch(d.type){case g:if(!a)continue;if(null!==a.getAttribute(d.name)){a=a.getAttribute(d.name);f?this.setValue("true"==a.toLowerCase()):this.setValue(a);return}f&&this.setValue(!!d["default"]);break;case o:if(!a)continue;if(d.name in c){a=c[d.name];f?this.setValue("true"==a.toLowerCase()):this.setValue(a);return}f&&this.setValue(!!d["default"]);break;case i:if(!b)continue;
if(b.getAttribute(d.name)){a=b.getAttribute(d.name);f?this.setValue("true"==a.toLowerCase()):this.setValue(a);return}f&&this.setValue(!!d["default"])}}}function c(a,b,c){var k=n[this.id];if(k)for(var f=""===this.getValue(),e=this instanceof CKEDITOR.ui.dialog.checkbox,d=0;d<k.length;d++){var h=k[d];switch(h.type){case g:if(!a||"data"==h.name&&b&&!a.hasAttribute("data"))continue;var l=this.getValue();f||e&&l===h["default"]?a.removeAttribute(h.name):a.setAttribute(h.name,l);break;case o:if(!a)continue;
l=this.getValue();if(f||e&&l===h["default"])h.name in c&&c[h.name].remove();else if(h.name in c)c[h.name].setAttribute("value",l);else{var p=CKEDITOR.dom.element.createFromHtml("<cke:param></cke:param>",a.getDocument());p.setAttributes({name:h.name,value:l});1>a.getChildCount()?p.appendTo(a):p.insertBefore(a.getFirst())}break;case i:if(!b)continue;l=this.getValue();f||e&&l===h["default"]?b.removeAttribute(h.name):b.setAttribute(h.name,l)}}}for(var g=1,o=2,i=4,n={id:[{type:g,name:"id"}],classid:[{type:g,
name:"classid"}],codebase:[{type:g,name:"codebase"}],pluginspage:[{type:i,name:"pluginspage"}],src:[{type:o,name:"movie"},{type:i,name:"src"},{type:g,name:"data"}],name:[{type:i,name:"name"}],align:[{type:g,name:"align"}],"class":[{type:g,name:"class"},{type:i,name:"class"}],width:[{type:g,name:"width"},{type:i,name:"width"}],height:[{type:g,name:"height"},{type:i,name:"height"}],hSpace:[{type:g,name:"hSpace"},{type:i,name:"hSpace"}],vSpace:[{type:g,name:"vSpace"},{type:i,name:"vSpace"}],style:[{type:g,
name:"style"},{type:i,name:"style"}],type:[{type:i,name:"type"}]},m="play loop menu quality scale salign wmode bgcolor base flashvars allowScriptAccess allowFullScreen".split(" "),j=0;j<m.length;j++)n[m[j]]=[{type:i,name:m[j]},{type:o,name:m[j]}];m=["allowFullScreen","play","loop","menu"];for(j=0;j<m.length;j++)n[m[j]][0]["default"]=n[m[j]][1]["default"]=!0;CKEDITOR.dialog.add("flash",function(a){var g=!a.config.flashEmbedTagOnly,i=a.config.flashAddEmbedTag||a.config.flashEmbedTagOnly,k,f="<div>"+
CKEDITOR.tools.htmlEncode(a.lang.common.preview)+'<br><div id="cke_FlashPreviewLoader'+CKEDITOR.tools.getNextNumber()+'" style="display:none"><div class="loading">&nbsp;</div></div><div id="cke_FlashPreviewBox'+CKEDITOR.tools.getNextNumber()+'" class="FlashPreviewBox"></div></div>';return{title:a.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){this.fakeImage=this.objectNode=this.embedNode=null;k=new CKEDITOR.dom.element("embed",a.document);var e=this.getSelectedElement();if(e&&e.data("cke-real-element-type")&&
"flash"==e.data("cke-real-element-type")){this.fakeImage=e;var d=a.restoreRealElement(e),h=null,b=null,c={};if("cke:object"==d.getName()){h=d;d=h.getElementsByTag("embed","cke");0<d.count()&&(b=d.getItem(0));for(var d=h.getElementsByTag("param","cke"),g=0,i=d.count();g<i;g++){var f=d.getItem(g),j=f.getAttribute("name"),f=f.getAttribute("value");c[j]=f}}else"cke:embed"==d.getName()&&(b=d);this.objectNode=h;this.embedNode=b;this.setupContent(h,b,c,e)}},onOk:function(){var e=null,d=null,b=null;if(this.fakeImage)e=
this.objectNode,d=this.embedNode;else if(g&&(e=CKEDITOR.dom.element.createFromHtml("<cke:object></cke:object>",a.document),e.setAttributes({classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"})),i)d=CKEDITOR.dom.element.createFromHtml("<cke:embed></cke:embed>",a.document),d.setAttributes({type:"application/x-shockwave-flash",pluginspage:"http://www.macromedia.com/go/getflashplayer"}),e&&d.appendTo(e);
if(e)for(var b={},c=e.getElementsByTag("param","cke"),f=0,j=c.count();f<j;f++)b[c.getItem(f).getAttribute("name")]=c.getItem(f);c={};f={};this.commitContent(e,d,b,c,f);e=a.createFakeElement(e||d,"cke_flash","flash",!0);e.setAttributes(f);e.setStyles(c);this.fakeImage?(e.replace(this.fakeImage),a.getSelection().selectElement(e)):a.insertElement(e)},onHide:function(){this.preview&&this.preview.setHtml("")},contents:[{id:"info",label:a.lang.common.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,
children:[{type:"hbox",widths:["280px","110px"],align:"right",children:[{id:"src",type:"text",label:a.lang.common.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(a.lang.flash.validateSrc),setup:b,commit:c,onLoad:function(){var a=this.getDialog(),b=function(b){k.setAttribute("src",b);a.preview.setHtml('<embed height="100%" width="100%" src="'+CKEDITOR.tools.htmlEncode(k.getAttribute("src"))+'" type="application/x-shockwave-flash"></embed>')};a.preview=a.getContentElement("info","preview").getElement().getChild(3);
this.on("change",function(a){a.data&&a.data.value&&b(a.data.value)});this.getInputElement().on("change",function(){b(this.getValue())},this)}},{type:"button",id:"browse",filebrowser:"info:src",hidden:!0,style:"display:inline-block;margin-top:10px;",label:a.lang.common.browseServer}]}]},{type:"hbox",widths:["25%","25%","25%","25%","25%"],children:[{type:"text",id:"width",requiredContent:"embed[width]",style:"width:95px",label:a.lang.common.width,validate:CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1",
a.lang.common.width)),setup:b,commit:c},{type:"text",id:"height",requiredContent:"embed[height]",style:"width:95px",label:a.lang.common.height,validate:CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1",a.lang.common.height)),setup:b,commit:c},{type:"text",id:"hSpace",requiredContent:"embed[hspace]",style:"width:95px",label:a.lang.flash.hSpace,validate:CKEDITOR.dialog.validate.integer(a.lang.flash.validateHSpace),setup:b,commit:c},{type:"text",id:"vSpace",requiredContent:"embed[vspace]",
style:"width:95px",label:a.lang.flash.vSpace,validate:CKEDITOR.dialog.validate.integer(a.lang.flash.validateVSpace),setup:b,commit:c}]},{type:"vbox",children:[{type:"html",id:"preview",style:"width:95%;",html:f}]}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:a.lang.common.upload,elements:[{type:"file",id:"upload",label:a.lang.common.upload,size:38},{type:"fileButton",id:"uploadButton",label:a.lang.common.uploadSubmit,filebrowser:"info:src","for":["Upload","upload"]}]},{id:"properties",
label:a.lang.flash.propertiesTab,elements:[{type:"hbox",widths:["50%","50%"],children:[{id:"scale",type:"select",requiredContent:"embed[scale]",label:a.lang.flash.scale,"default":"",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.flash.scaleAll,"showall"],[a.lang.flash.scaleNoBorder,"noborder"],[a.lang.flash.scaleFit,"exactfit"]],setup:b,commit:c},{id:"allowScriptAccess",type:"select",requiredContent:"embed[allowscriptaccess]",label:a.lang.flash.access,"default":"",style:"width : 100%;",
items:[[a.lang.common.notSet,""],[a.lang.flash.accessAlways,"always"],[a.lang.flash.accessSameDomain,"samedomain"],[a.lang.flash.accessNever,"never"]],setup:b,commit:c}]},{type:"hbox",widths:["50%","50%"],children:[{id:"wmode",type:"select",requiredContent:"embed[wmode]",label:a.lang.flash.windowMode,"default":"",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.flash.windowModeWindow,"window"],[a.lang.flash.windowModeOpaque,"opaque"],[a.lang.flash.windowModeTransparent,"transparent"]],
setup:b,commit:c},{id:"quality",type:"select",requiredContent:"embed[quality]",label:a.lang.flash.quality,"default":"high",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.flash.qualityBest,"best"],[a.lang.flash.qualityHigh,"high"],[a.lang.flash.qualityAutoHigh,"autohigh"],[a.lang.flash.qualityMedium,"medium"],[a.lang.flash.qualityAutoLow,"autolow"],[a.lang.flash.qualityLow,"low"]],setup:b,commit:c}]},{type:"hbox",widths:["50%","50%"],children:[{id:"align",type:"select",requiredContent:"object[align]",
label:a.lang.common.align,"default":"",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.common.alignLeft,"left"],[a.lang.flash.alignAbsBottom,"absBottom"],[a.lang.flash.alignAbsMiddle,"absMiddle"],[a.lang.flash.alignBaseline,"baseline"],[a.lang.common.alignBottom,"bottom"],[a.lang.common.alignMiddle,"middle"],[a.lang.common.alignRight,"right"],[a.lang.flash.alignTextTop,"textTop"],[a.lang.common.alignTop,"top"]],setup:b,commit:function(a,b,f,g,i){var j=this.getValue();c.apply(this,arguments);
j&&(i.align=j)}},{type:"html",html:"<div></div>"}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(a.lang.flash.flashvars),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"menu",label:a.lang.flash.chkMenu,"default":!0,setup:b,commit:c},{type:"checkbox",id:"play",label:a.lang.flash.chkPlay,"default":!0,setup:b,commit:c},{type:"checkbox",id:"loop",label:a.lang.flash.chkLoop,"default":!0,setup:b,commit:c},{type:"checkbox",id:"allowFullScreen",label:a.lang.flash.chkFull,"default":!0,
setup:b,commit:c}]}]}]},{id:"advanced",label:a.lang.common.advancedTab,elements:[{type:"hbox",children:[{type:"text",id:"id",requiredContent:"object[id]",label:a.lang.common.id,setup:b,commit:c}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",id:"bgcolor",requiredContent:"embed[bgcolor]",label:a.lang.flash.bgcolor,setup:b,commit:c},{type:"text",id:"class",requiredContent:"embed(cke-xyz)",label:a.lang.common.cssClass,setup:b,commit:c}]},{type:"text",id:"style",requiredContent:"embed{cke-xyz}",
validate:CKEDITOR.dialog.validate.inlineStyle(a.lang.common.invalidInlineStyle),label:a.lang.common.cssStyle,setup:b,commit:c}]}]}})})();
*/
(function () {
function b(a, b, c) {
var k = n[this.id];
if (k)for (var f = this instanceof CKEDITOR.ui.dialog.checkbox, e = 0; e < k.length; e++) {
var d = k[e];
switch (d.type) {
case g:
if (!a)continue;
if (null !== a.getAttribute(d.name)) {
a = a.getAttribute(d.name);
f ? this.setValue("true" == a.toLowerCase()) : this.setValue(a);
return
}
f && this.setValue(!!d["default"]);
break;
case o:
if (!a)continue;
if (d.name in c) {
a = c[d.name];
f ? this.setValue("true" == a.toLowerCase()) : this.setValue(a);
return
}
f && this.setValue(!!d["default"]);
break;
case i:
if (!b)continue;
if (b.getAttribute(d.name)) {
a = b.getAttribute(d.name);
f ? this.setValue("true" == a.toLowerCase()) : this.setValue(a);
return
}
f && this.setValue(!!d["default"])
}
}
}
function c(a, b, c) {
var k = n[this.id];
if (k)for (var f = "" === this.getValue(), e = this instanceof CKEDITOR.ui.dialog.checkbox, d = 0; d < k.length; d++) {
var h = k[d];
switch (h.type) {
case g:
if (!a || "data" == h.name && b && !a.hasAttribute("data"))continue;
var l = this.getValue();
f || e && l === h["default"] ? a.removeAttribute(h.name) : a.setAttribute(h.name, l);
break;
case o:
if (!a)continue;
l = this.getValue();
if (f || e && l === h["default"])h.name in c && c[h.name].remove(); else if (h.name in c)c[h.name].setAttribute("value", l); else {
var p = CKEDITOR.dom.element.createFromHtml("<cke:param></cke:param>", a.getDocument());
p.setAttributes({name: h.name, value: l});
1 > a.getChildCount() ? p.appendTo(a) : p.insertBefore(a.getFirst())
}
break;
case i:
if (!b)continue;
l = this.getValue();
f || e && l === h["default"] ? b.removeAttribute(h.name) : b.setAttribute(h.name, l)
}
}
}
for (var g = 1, o = 2, i = 4, n = {id: [
{type: g, name: "id"}
], classid: [
{type: g,
name: "classid"}
], codebase: [
{type: g, name: "codebase"}
], pluginspage: [
{type: i, name: "pluginspage"}
], src: [
{type: o, name: "movie"},
{type: i, name: "src"},
{type: g, name: "data"}
], name: [
{type: i, name: "name"}
], align: [
{type: g, name: "align"}
], "class": [
{type: g, name: "class"},
{type: i, name: "class"}
], width: [
{type: g, name: "width"},
{type: i, name: "width"}
], height: [
{type: g, name: "height"},
{type: i, name: "height"}
], hSpace: [
{type: g, name: "hSpace"},
{type: i, name: "hSpace"}
], vSpace: [
{type: g, name: "vSpace"},
{type: i, name: "vSpace"}
], style: [
{type: g,
name: "style"},
{type: i, name: "style"}
], type: [
{type: i, name: "type"}
]}, m = "play loop menu quality scale salign wmode bgcolor base flashvars allowScriptAccess allowFullScreen".split(" "), j = 0; j < m.length; j++)n[m[j]] = [
{type: i, name: m[j]},
{type: o, name: m[j]}
];
m = ["allowFullScreen", "play", "loop", "menu"];
for (j = 0; j < m.length; j++)n[m[j]][0]["default"] = n[m[j]][1]["default"] = !0;
CKEDITOR.dialog.add("flash", function (a) {
var g = !a.config.flashEmbedTagOnly, i = a.config.flashAddEmbedTag || a.config.flashEmbedTagOnly, k, f = "<div>" +
CKEDITOR.tools.htmlEncode(a.lang.common.preview) + '<br><div id="cke_FlashPreviewLoader' + CKEDITOR.tools.getNextNumber() + '" style="display:none"><div class="loading">&nbsp;</div></div><div id="cke_FlashPreviewBox' + CKEDITOR.tools.getNextNumber() + '" class="FlashPreviewBox"></div></div>';
return{title: a.lang.flash.title, minWidth: 420, minHeight: 310, onShow: function () {
this.fakeImage = this.objectNode = this.embedNode = null;
k = new CKEDITOR.dom.element("embed", a.document);
var e = this.getSelectedElement();
if (e && e.data("cke-real-element-type") &&
"flash" == e.data("cke-real-element-type")) {
this.fakeImage = e;
var d = a.restoreRealElement(e), h = null, b = null, c = {};
if ("cke:object" == d.getName()) {
h = d;
d = h.getElementsByTag("embed", "cke");
0 < d.count() && (b = d.getItem(0));
for (var d = h.getElementsByTag("param", "cke"), g = 0, i = d.count(); g < i; g++) {
var f = d.getItem(g), j = f.getAttribute("name"), f = f.getAttribute("value");
c[j] = f
}
} else"cke:embed" == d.getName() && (b = d);
this.objectNode = h;
this.embedNode = b;
this.setupContent(h, b, c, e)
}
}, onOk: function () {
var e = null, d = null, b = null;
if (this.fakeImage)e =
this.objectNode, d = this.embedNode; else if (g && (e = CKEDITOR.dom.element.createFromHtml("<cke:object></cke:object>", a.document), e.setAttributes({classid: "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", codebase: "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"})), i)d = CKEDITOR.dom.element.createFromHtml("<cke:embed></cke:embed>", a.document), d.setAttributes({type: "application/x-shockwave-flash", pluginspage: "http://www.macromedia.com/go/getflashplayer"}), e && d.appendTo(e);
if (e)for (var b = {}, c = e.getElementsByTag("param", "cke"), f = 0, j = c.count(); f < j; f++)b[c.getItem(f).getAttribute("name")] = c.getItem(f);
c = {};
f = {};
this.commitContent(e, d, b, c, f);
e = a.createFakeElement(e || d, "cke_flash", "flash", !0);
e.setAttributes(f);
e.setStyles(c);
this.fakeImage ? (e.replace(this.fakeImage), a.getSelection().selectElement(e)) : a.insertElement(e)
}, onHide: function () {
this.preview && this.preview.setHtml("")
}, contents: [
{id: "info", label: a.lang.common.generalTab, accessKey: "I", elements: [
{type: "vbox", padding: 0,
children: [
{type: "hbox", widths: ["280px", "110px"], align: "right", children: [
{id: "src", type: "text", label: a.lang.common.url, required: !0, validate: CKEDITOR.dialog.validate.notEmpty(a.lang.flash.validateSrc), setup: b, commit: c, onLoad: function () {
var a = this.getDialog(), b = function (b) {
k.setAttribute("src", b);
a.preview.setHtml('<embed height="100%" width="100%" src="' + CKEDITOR.tools.htmlEncode(k.getAttribute("src")) + '" type="application/x-shockwave-flash"></embed>')
};
a.preview = a.getContentElement("info", "preview").getElement().getChild(3);
this.on("change", function (a) {
a.data && a.data.value && b(a.data.value)
});
this.getInputElement().on("change", function () {
b(this.getValue())
}, this)
}},
{type: "button", id: "browse", filebrowser: "info:src", hidden: !0, style: "display:inline-block;margin-top:10px;", label: a.lang.common.browseServer}
]}
]},
{type: "hbox", widths: ["25%", "25%", "25%", "25%", "25%"], children: [
{type: "text", id: "width", requiredContent: "embed[width]", style: "width:95px", label: a.lang.common.width, validate: CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1",
a.lang.common.width)), setup: b, commit: c},
{type: "text", id: "height", requiredContent: "embed[height]", style: "width:95px", label: a.lang.common.height, validate: CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1", a.lang.common.height)), setup: b, commit: c},
{type: "text", id: "hSpace", requiredContent: "embed[hspace]", style: "width:95px", label: a.lang.flash.hSpace, validate: CKEDITOR.dialog.validate.integer(a.lang.flash.validateHSpace), setup: b, commit: c},
{type: "text", id: "vSpace", requiredContent: "embed[vspace]",
style: "width:95px", label: a.lang.flash.vSpace, validate: CKEDITOR.dialog.validate.integer(a.lang.flash.validateVSpace), setup: b, commit: c}
]},
{type: "vbox", children: [
{type: "html", id: "preview", style: "width:95%;", html: f}
]}
]},
{id: "Upload", hidden: !0, filebrowser: "uploadButton", label: a.lang.common.upload, elements: [
{type: "file", id: "upload", label: a.lang.common.upload, size: 38},
{type: "fileButton", id: "uploadButton", label: a.lang.common.uploadSubmit, filebrowser: "info:src", "for": ["Upload", "upload"]}
]},
{id: "properties",
label: a.lang.flash.propertiesTab, elements: [
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "scale", type: "select", requiredContent: "embed[scale]", label: a.lang.flash.scale, "default": "", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.flash.scaleAll, "showall"],
[a.lang.flash.scaleNoBorder, "noborder"],
[a.lang.flash.scaleFit, "exactfit"]
], setup: b, commit: c},
{id: "allowScriptAccess", type: "select", requiredContent: "embed[allowscriptaccess]", label: a.lang.flash.access, "default": "", style: "width : 100%;",
items: [
[a.lang.common.notSet, ""],
[a.lang.flash.accessAlways, "always"],
[a.lang.flash.accessSameDomain, "samedomain"],
[a.lang.flash.accessNever, "never"]
], setup: b, commit: c}
]},
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "wmode", type: "select", requiredContent: "embed[wmode]", label: a.lang.flash.windowMode, "default": "", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.flash.windowModeWindow, "window"],
[a.lang.flash.windowModeOpaque, "opaque"],
[a.lang.flash.windowModeTransparent, "transparent"]
],
setup: b, commit: c},
{id: "quality", type: "select", requiredContent: "embed[quality]", label: a.lang.flash.quality, "default": "high", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.flash.qualityBest, "best"],
[a.lang.flash.qualityHigh, "high"],
[a.lang.flash.qualityAutoHigh, "autohigh"],
[a.lang.flash.qualityMedium, "medium"],
[a.lang.flash.qualityAutoLow, "autolow"],
[a.lang.flash.qualityLow, "low"]
], setup: b, commit: c}
]},
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "align", type: "select", requiredContent: "object[align]",
label: a.lang.common.align, "default": "", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.common.alignLeft, "left"],
[a.lang.flash.alignAbsBottom, "absBottom"],
[a.lang.flash.alignAbsMiddle, "absMiddle"],
[a.lang.flash.alignBaseline, "baseline"],
[a.lang.common.alignBottom, "bottom"],
[a.lang.common.alignMiddle, "middle"],
[a.lang.common.alignRight, "right"],
[a.lang.flash.alignTextTop, "textTop"],
[a.lang.common.alignTop, "top"]
], setup: b, commit: function (a, b, f, g, i) {
var j = this.getValue();
c.apply(this, arguments);
j && (i.align = j)
}},
{type: "html", html: "<div></div>"}
]},
{type: "fieldset", label: CKEDITOR.tools.htmlEncode(a.lang.flash.flashvars), children: [
{type: "vbox", padding: 0, children: [
{type: "checkbox", id: "menu", label: a.lang.flash.chkMenu, "default": !0, setup: b, commit: c},
{type: "checkbox", id: "play", label: a.lang.flash.chkPlay, "default": !0, setup: b, commit: c},
{type: "checkbox", id: "loop", label: a.lang.flash.chkLoop, "default": !0, setup: b, commit: c},
{type: "checkbox", id: "allowFullScreen", label: a.lang.flash.chkFull, "default": !0,
setup: b, commit: c}
]}
]}
]},
{id: "advanced", label: a.lang.common.advancedTab, elements: [
{type: "hbox", children: [
{type: "text", id: "id", requiredContent: "object[id]", label: a.lang.common.id, setup: b, commit: c}
]},
{type: "hbox", widths: ["45%", "55%"], children: [
{type: "text", id: "bgcolor", requiredContent: "embed[bgcolor]", label: a.lang.flash.bgcolor, setup: b, commit: c},
{type: "text", id: "class", requiredContent: "embed(cke-xyz)", label: a.lang.common.cssClass, setup: b, commit: c}
]},
{type: "text", id: "style", requiredContent: "embed{cke-xyz}",
validate: CKEDITOR.dialog.validate.inlineStyle(a.lang.common.invalidInlineStyle), label: a.lang.common.cssStyle, setup: b, commit: c}
]}
]}
})
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,45 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("a11yHelp",function(j){var a=j.lang.a11yhelp,l=CKEDITOR.tools.getNextId(),e={8:a.backspace,9:a.tab,13:a.enter,16:a.shift,17:a.ctrl,18:a.alt,19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:a.end,36:a.home,37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:a["delete"],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,
105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=a.alt;e[CKEDITOR.SHIFT]=a.shift;e[CKEDITOR.CTRL]=a.ctrl;var f=[CKEDITOR.ALT,CKEDITOR.SHIFT,
CKEDITOR.CTRL],m=/\$\{(.*?)\}/g,p=function(){var a=j.keystrokeHandler.keystrokes,g={},c;for(c in a)g[a[c]]=c;return function(a,c){var b;if(g[c]){b=g[c];for(var h,i,k=[],d=0;d<f.length;d++)i=f[d],h=b/f[d],1<h&&2>=h&&(b-=i,k.push(e[i]));k.push(e[b]||String.fromCharCode(b));b=k.join("+")}else b=a;return b}}();return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:j.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},
html:function(){for(var e='<div class="cke_accessibility_legend" role="document" aria-labelledby="'+l+'_arialbl" tabIndex="-1">%1</div><span id="'+l+'_arialbl" class="cke_voice_label">'+a.contents+" </span>",g=[],c=a.legend,j=c.length,f=0;f<j;f++){for(var b=c[f],h=[],i=b.items,k=i.length,d=0;d<k;d++){var n=i[d],o=n.legend.replace(m,p);o.match(m)||h.push("<dt>%1</dt><dd>%2</dd>".replace("%1",n.name).replace("%2",o))}g.push("<h1>%1</h1><dl>%2</dl>".replace("%1",b.name).replace("%2",h.join("")))}return e.replace("%1",
g.join(""))}()+'<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,.cke_browser_ie6 .cke_accessibility_legend{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}]}],
buttons:[CKEDITOR.dialog.cancelButton]}});
*/
CKEDITOR.dialog.add("a11yHelp", function (j) {
var a = j.lang.a11yhelp, l = CKEDITOR.tools.getNextId(), e = {8: a.backspace, 9: a.tab, 13: a.enter, 16: a.shift, 17: a.ctrl, 18: a.alt, 19: a.pause, 20: a.capslock, 27: a.escape, 33: a.pageUp, 34: a.pageDown, 35: a.end, 36: a.home, 37: a.leftArrow, 38: a.upArrow, 39: a.rightArrow, 40: a.downArrow, 45: a.insert, 46: a["delete"], 91: a.leftWindowKey, 92: a.rightWindowKey, 93: a.selectKey, 96: a.numpad0, 97: a.numpad1, 98: a.numpad2, 99: a.numpad3, 100: a.numpad4, 101: a.numpad5, 102: a.numpad6, 103: a.numpad7, 104: a.numpad8,
105: a.numpad9, 106: a.multiply, 107: a.add, 109: a.subtract, 110: a.decimalPoint, 111: a.divide, 112: a.f1, 113: a.f2, 114: a.f3, 115: a.f4, 116: a.f5, 117: a.f6, 118: a.f7, 119: a.f8, 120: a.f9, 121: a.f10, 122: a.f11, 123: a.f12, 144: a.numLock, 145: a.scrollLock, 186: a.semiColon, 187: a.equalSign, 188: a.comma, 189: a.dash, 190: a.period, 191: a.forwardSlash, 192: a.graveAccent, 219: a.openBracket, 220: a.backSlash, 221: a.closeBracket, 222: a.singleQuote};
e[CKEDITOR.ALT] = a.alt;
e[CKEDITOR.SHIFT] = a.shift;
e[CKEDITOR.CTRL] = a.ctrl;
var f = [CKEDITOR.ALT, CKEDITOR.SHIFT,
CKEDITOR.CTRL], m = /\$\{(.*?)\}/g, p = function () {
var a = j.keystrokeHandler.keystrokes, g = {}, c;
for (c in a)g[a[c]] = c;
return function (a, c) {
var b;
if (g[c]) {
b = g[c];
for (var h, i, k = [], d = 0; d < f.length; d++)i = f[d], h = b / f[d], 1 < h && 2 >= h && (b -= i, k.push(e[i]));
k.push(e[b] || String.fromCharCode(b));
b = k.join("+")
} else b = a;
return b
}
}();
return{title: a.title, minWidth: 600, minHeight: 400, contents: [
{id: "info", label: j.lang.common.generalTab, expand: !0, elements: [
{type: "html", id: "legends", style: "white-space:normal;", focus: function () {
this.getElement().focus()
},
html: function () {
for (var e = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + l + '_arialbl" tabIndex="-1">%1</div><span id="' + l + '_arialbl" class="cke_voice_label">' + a.contents + " </span>", g = [], c = a.legend, j = c.length, f = 0; f < j; f++) {
for (var b = c[f], h = [], i = b.items, k = i.length, d = 0; d < k; d++) {
var n = i[d], o = n.legend.replace(m, p);
o.match(m) || h.push("<dt>%1</dt><dd>%2</dd>".replace("%1", n.name).replace("%2", o))
}
g.push("<h1>%1</h1><dl>%2</dl>".replace("%1", b.name).replace("%2", h.join("")))
}
return e.replace("%1",
g.join(""))
}() + '<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,.cke_browser_ie6 .cke_accessibility_legend{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}
]}
],
buttons: [CKEDITOR.dialog.cancelButton]}
});

View File

@ -1,11 +1,30 @@
/*

/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","ar",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"عام",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert","delete":"Delete",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",
graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
*/
CKEDITOR.plugins.setLang("a11yhelp", "ar", {title: "Accessibility Instructions", contents: "Help Contents. To close this dialog press ESC.", legend: [
{name: "عام", items: [
{name: "Editor Toolbar", legend: "Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},
{name: "Editor Dialog", legend: "Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name: "Editor Context Menu", legend: "Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},
{name: "Editor List Box", legend: "Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name: "Editor Element Path Bar", legend: "Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}
]},
{name: "Commands", items: [
{name: " Undo command", legend: "Press ${undo}"},
{name: " Redo command", legend: "Press ${redo}"},
{name: " Bold command", legend: "Press ${bold}"},
{name: " Italic command", legend: "Press ${italic}"},
{name: " Underline command",
legend: "Press ${underline}"},
{name: " Link command", legend: "Press ${link}"},
{name: " Toolbar Collapse command", legend: "Press ${toolbarCollapse}"},
{name: " Access previous focus space command", legend: "Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name: " Access next focus space command", legend: "Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name: " Accessibility Help", legend: "Press ${a11yHelp}"}
]}
], backspace: "Backspace", tab: "Tab", enter: "Enter", shift: "Shift", ctrl: "Ctrl", alt: "Alt", pause: "Pause", capslock: "Caps Lock", escape: "Escape", pageUp: "Page Up", pageDown: "Page Down", end: "End", home: "Home", leftArrow: "Left Arrow", upArrow: "Up Arrow", rightArrow: "Right Arrow", downArrow: "Down Arrow", insert: "Insert", "delete": "Delete", leftWindowKey: "Left Windows key", rightWindowKey: "Right Windows key", selectKey: "Select key", numpad0: "Numpad 0", numpad1: "Numpad 1",
numpad2: "Numpad 2", numpad3: "Numpad 3", numpad4: "Numpad 4", numpad5: "Numpad 5", numpad6: "Numpad 6", numpad7: "Numpad 7", numpad8: "Numpad 8", numpad9: "Numpad 9", multiply: "Multiply", add: "Add", subtract: "Subtract", decimalPoint: "Decimal Point", divide: "Divide", f1: "F1", f2: "F2", f3: "F3", f4: "F4", f5: "F5", f6: "F6", f7: "F7", f8: "F8", f9: "F9", f10: "F10", f11: "F11", f12: "F12", numLock: "Num Lock", scrollLock: "Scroll Lock", semiColon: "Semicolon", equalSign: "Equal Sign", comma: "Comma", dash: "Dash", period: "Period", forwardSlash: "Forward Slash",
graveAccent: "Grave Accent", openBracket: "Open Bracket", backSlash: "Backslash", closeBracket: "Close Bracket", singleQuote: "Single Quote"});

View File

@ -1,7 +1,14 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("about",function(a){var a=a.lang.about,b=CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png";return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'<style type="text/css">.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
b+");"+(CKEDITOR.env.hidpi?"background-size:163px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}</style><div class="cke_about_container"><div class="cke_about_logo"></div><p>CKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+')<br><a href="http://ckeditor.com/">http://ckeditor.com</a></p><p>'+a.help.replace("$1",'<a href="http://docs.ckeditor.com/user">'+
a.userGuide+"</a>")+"</p><p>"+a.moreInfo+'<br><a href="http://ckeditor.com/about/license">http://ckeditor.com/about/license</a></p><p>'+a.copy.replace("$1",'<a href="http://cksource.com/">CKSource</a> - Frederico Knabben')+"</p></div>"}]}],buttons:[CKEDITOR.dialog.cancelButton]}});
*/
CKEDITOR.dialog.add("about", function (a) {
var a = a.lang.about, b = CKEDITOR.plugins.get("about").path + "dialogs/" + (CKEDITOR.env.hidpi ? "hidpi/" : "") + "logo_ckeditor.png";
return{title: CKEDITOR.env.ie ? a.dlgTitle : a.title, minWidth: 390, minHeight: 230, contents: [
{id: "tab1", label: "", title: "", expand: !0, padding: 0, elements: [
{type: "html", html: '<style type="text/css">.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url(' +
b + ");" + (CKEDITOR.env.hidpi ? "background-size:163px 58px;" : "") + 'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}</style><div class="cke_about_container"><div class="cke_about_logo"></div><p>CKEditor ' + CKEDITOR.version + " (revision " + CKEDITOR.revision + ')<br><a href="http://ckeditor.com/">http://ckeditor.com</a></p><p>' + a.help.replace("$1", '<a href="http://docs.ckeditor.com/user">' +
a.userGuide + "</a>") + "</p><p>" + a.moreInfo + '<br><a href="http://ckeditor.com/about/license">http://ckeditor.com/about/license</a></p><p>' + a.copy.replace("$1", '<a href="http://cksource.com/">CKSource</a> - Frederico Knabben') + "</p></div>"}
]}
], buttons: [CKEDITOR.dialog.cancelButton]}
});

View File

@ -1,11 +1,94 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("paste",function(c){function h(a){var b=new CKEDITOR.dom.document(a.document),f=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();f.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));
b.getWindow().getFrame().removeCustomData("pendingFocus")&&f.focus()}var e=c.lang.clipboard;c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data})},null,null,1E3);return{title:e.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this.parts.title.setHtml(this.customTitle||e.title);this.customTitle=null},onLoad:function(){(CKEDITOR.env.ie7Compat||
CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"securityMsg",html:'<div style="white-space:normal;width:340px">'+e.securityMsg+"</div>"},{type:"html",id:"pasteMsg",html:'<div style="white-space:normal;width:340px">'+e.pasteMsg+"</div>"},{type:"html",id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(),
b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='<html dir="'+c.config.contentsLangDirection+'" lang="'+(c.config.contentsLanguage||c.langCode)+'"><head><style>body{margin:3px;height:95%}</style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction('+CKEDITOR.tools.addFunction(h,a)+",this);<\/script></body></html>",f=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?
"javascript:void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+'})())"':"",d=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="'+f+'" role="region" aria-label="'+e.pasteArea+'" aria-describedby="'+a.getContentElement("general","pasteMsg").domId+'" aria-multiple="true"></iframe>');d.on("load",function(a){a.removeListener();a=d.getFrameDocument();a.write(b);c.focusManager.add(a.getBody());
CKEDITOR.env.air&&h.call(this,a.getWindow().$)},a);d.setCustomData("dialog",a);a=this.getElement();a.setHtml("");a.append(d);if(CKEDITOR.env.ie){var g=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute" role="presentation"></span>');g.on("focus",function(){setTimeout(function(){d.$.contentWindow.focus()})});a.append(g);this.focus=function(){g.focus();this.fire("focus")}}this.getInputElement=function(){return d};CKEDITOR.env.ie&&(a.setStyle("display","block"),a.setStyle("height",
d.$.offsetHeight+2+"px"))},commit:function(){var a=this.getDialog().getParentEditor(),b=this.getInputElement().getFrameDocument().getBody(),c=b.getBogus(),d;c&&c.remove();d=b.getHtml();setTimeout(function(){a.fire("pasteDialogCommit",d)},0)}}]}]}});
*/
CKEDITOR.dialog.add("paste", function (c) {
function h(a) {
var b = new CKEDITOR.dom.document(a.document), f = b.getBody(), d = b.getById("cke_actscrpt");
d && d.remove();
f.setAttribute("contenteditable", !0);
if (CKEDITOR.env.ie && 8 > CKEDITOR.env.version)b.getWindow().on("blur", function () {
b.$.selection.empty()
});
b.on("keydown", function (a) {
var a = a.data, b;
switch (a.getKeystroke()) {
case 27:
this.hide();
b = 1;
break;
case 9:
case CKEDITOR.SHIFT + 9:
this.changeFocus(1), b = 1
}
b && a.preventDefault()
}, this);
c.fire("ariaWidget", new CKEDITOR.dom.element(a.frameElement));
b.getWindow().getFrame().removeCustomData("pendingFocus") && f.focus()
}
var e = c.lang.clipboard;
c.on("pasteDialogCommit", function (a) {
a.data && c.fire("paste", {type: "auto", dataValue: a.data})
}, null, null, 1E3);
return{title: e.title, minWidth: CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350, minHeight: CKEDITOR.env.quirks ? 250 : 245, onShow: function () {
this.parts.dialog.$.offsetHeight;
this.setupContent();
this.parts.title.setHtml(this.customTitle || e.title);
this.customTitle = null
}, onLoad: function () {
(CKEDITOR.env.ie7Compat ||
CKEDITOR.env.ie6Compat) && "rtl" == c.lang.dir && this.parts.contents.setStyle("overflow", "hidden")
}, onOk: function () {
this.commitContent()
}, contents: [
{id: "general", label: c.lang.common.generalTab, elements: [
{type: "html", id: "securityMsg", html: '<div style="white-space:normal;width:340px">' + e.securityMsg + "</div>"},
{type: "html", id: "pasteMsg", html: '<div style="white-space:normal;width:340px">' + e.pasteMsg + "</div>"},
{type: "html", id: "editing_area", style: "width:100%;height:100%", html: "", focus: function () {
var a = this.getInputElement(),
b = a.getFrameDocument().getBody();
!b || b.isReadOnly() ? a.setCustomData("pendingFocus", 1) : b.focus()
}, setup: function () {
var a = this.getDialog(), b = '<html dir="' + c.config.contentsLangDirection + '" lang="' + (c.config.contentsLanguage || c.langCode) + '"><head><style>body{margin:3px;height:95%}</style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction(' + CKEDITOR.tools.addFunction(h, a) + ",this);<\/script></body></html>", f = CKEDITOR.env.air ? "javascript:void(0)" : CKEDITOR.env.ie ?
"javascript:void((function(){" + encodeURIComponent("document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();") + '})())"' : "", d = CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="' + f + '" role="region" aria-label="' + e.pasteArea + '" aria-describedby="' + a.getContentElement("general", "pasteMsg").domId + '" aria-multiple="true"></iframe>');
d.on("load", function (a) {
a.removeListener();
a = d.getFrameDocument();
a.write(b);
c.focusManager.add(a.getBody());
CKEDITOR.env.air && h.call(this, a.getWindow().$)
}, a);
d.setCustomData("dialog", a);
a = this.getElement();
a.setHtml("");
a.append(d);
if (CKEDITOR.env.ie) {
var g = CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute" role="presentation"></span>');
g.on("focus", function () {
setTimeout(function () {
d.$.contentWindow.focus()
})
});
a.append(g);
this.focus = function () {
g.focus();
this.fire("focus")
}
}
this.getInputElement = function () {
return d
};
CKEDITOR.env.ie && (a.setStyle("display", "block"), a.setStyle("height",
d.$.offsetHeight + 2 + "px"))
}, commit: function () {
var a = this.getDialog().getParentEditor(), b = this.getInputElement().getFrameDocument().getBody(), c = b.getBogus(), d;
c && c.remove();
d = b.getHtml();
setTimeout(function () {
a.fire("pasteDialogCommit", d)
}, 0)
}}
]}
]}
});

View File

@ -1,13 +1,145 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("colordialog",function(t){function n(){f.getById(o).removeStyle("background-color");p.getContentElement("picker","selectedColor").setValue("");j&&j.removeAttribute("aria-selected");j=null}function u(a){var a=a.data.getTarget(),b;if("td"==a.getName()&&(b=a.getChild(0).getHtml()))j=a,j.setAttribute("aria-selected",!0),p.getContentElement("picker","selectedColor").setValue(b)}function y(a){for(var a=a.replace(/^#/,""),b=0,c=[];2>=b;b++)c[b]=parseInt(a.substr(2*b,2),16);return"#"+
(165<=0.2126*c[0]+0.7152*c[1]+0.0722*c[2]?"000":"fff")}function v(a){!a.name&&(a=new CKEDITOR.event(a));var b=!/mouse/.test(a.name),c=a.data.getTarget(),e;if("td"==c.getName()&&(e=c.getChild(0).getHtml()))q(a),b?g=c:w=c,b&&(c.setStyle("border-color",y(e)),c.setStyle("border-style","dotted")),f.getById(k).setStyle("background-color",e),f.getById(l).setHtml(e)}function q(a){if(a=!/mouse/.test(a.name)&&g){var b=a.getChild(0).getHtml();a.setStyle("border-color",b);a.setStyle("border-style","solid")}!g&&
!w&&(f.getById(k).removeStyle("background-color"),f.getById(l).setHtml("&nbsp;"))}function z(a){var b=a.data,c=b.getTarget(),e=b.getKeystroke(),d="rtl"==t.lang.dir;switch(e){case 38:if(a=c.getParent().getPrevious())a=a.getChild([c.getIndex()]),a.focus();b.preventDefault();break;case 40:if(a=c.getParent().getNext())(a=a.getChild([c.getIndex()]))&&1==a.type&&a.focus();b.preventDefault();break;case 32:case 13:u(a);b.preventDefault();break;case d?37:39:if(a=c.getNext())1==a.type&&(a.focus(),b.preventDefault(!0));
else if(a=c.getParent().getNext())if((a=a.getChild([0]))&&1==a.type)a.focus(),b.preventDefault(!0);break;case d?39:37:if(a=c.getPrevious())a.focus(),b.preventDefault(!0);else if(a=c.getParent().getPrevious())a=a.getLast(),a.focus(),b.preventDefault(!0)}}var r=CKEDITOR.dom.element,f=CKEDITOR.document,h=t.lang.colordialog,p,x={type:"html",html:"&nbsp;"},j,g,w,m=function(a){return CKEDITOR.tools.getNextId()+"_"+a},k=m("hicolor"),l=m("hicolortext"),o=m("selhicolor"),i;(function(){function a(a,d){for(var s=
a;s<a+3;s++){var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var f=d;f<d+3;f++)for(var g=0;6>g;g++)b(e.$,"#"+c[f]+c[g]+c[s])}}function b(a,c){var b=new r(a.insertCell(-1));b.setAttribute("class","ColorCell");b.setAttribute("tabIndex",-1);b.setAttribute("role","gridcell");b.on("keydown",z);b.on("click",u);b.on("focus",v);b.on("blur",q);b.setStyle("background-color",c);b.setStyle("border","1px solid "+c);b.setStyle("width","14px");b.setStyle("height","14px");var d=m("color_table_cell");
b.setAttribute("aria-labelledby",d);b.append(CKEDITOR.dom.element.createFromHtml('<span id="'+d+'" class="cke_voice_label">'+c+"</span>",CKEDITOR.document))}i=CKEDITOR.dom.element.createFromHtml('<table tabIndex="-1" aria-label="'+h.options+'" role="grid" style="border-collapse:separate;" cellspacing="0"><caption class="cke_voice_label">'+h.options+'</caption><tbody role="presentation"></tbody></table>');i.on("mouseover",v);i.on("mouseout",q);var c="00 33 66 99 cc ff".split(" ");a(0,0);a(3,0);a(0,
3);a(3,3);var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var d=0;6>d;d++)b(e.$,"#"+c[d]+c[d]+c[d]);for(d=0;12>d;d++)b(e.$,"#000000")})();return{title:h.title,minWidth:360,minHeight:220,onLoad:function(){p=this},onHide:function(){n();var a=g.getChild(0).getHtml();g.setStyle("border-color",a);g.setStyle("border-style","solid");f.getById(k).removeStyle("background-color");f.getById(l).setHtml("&nbsp;");g=null},contents:[{id:"picker",label:h.title,accessKey:"I",elements:[{type:"hbox",
padding:0,widths:["70%","10%","30%"],children:[{type:"html",html:"<div></div>",onLoad:function(){CKEDITOR.document.getById(this.domId).append(i)},focus:function(){(g||this.getElement().getElementsByTag("td").getItem(0)).focus()}},x,{type:"vbox",padding:0,widths:["70%","5%","25%"],children:[{type:"html",html:"<span>"+h.highlight+'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+k+'" style="border: 1px solid; height: 74px; width: 74px;"></div>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+l+'">&nbsp;</div><span>'+h.selected+
'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+o+'" style="border: 1px solid; height: 20px; width: 74px;"></div>'},{type:"text",label:h.selected,labelStyle:"display:none",id:"selectedColor",style:"width: 74px",onChange:function(){try{f.getById(o).setStyle("background-color",this.getValue())}catch(a){n()}}},x,{type:"button",id:"clear",style:"margin-top: 5px",label:h.clear,onClick:n}]}]}]}]}});
*/
CKEDITOR.dialog.add("colordialog", function (t) {
function n() {
f.getById(o).removeStyle("background-color");
p.getContentElement("picker", "selectedColor").setValue("");
j && j.removeAttribute("aria-selected");
j = null
}
function u(a) {
var a = a.data.getTarget(), b;
if ("td" == a.getName() && (b = a.getChild(0).getHtml()))j = a, j.setAttribute("aria-selected", !0), p.getContentElement("picker", "selectedColor").setValue(b)
}
function y(a) {
for (var a = a.replace(/^#/, ""), b = 0, c = []; 2 >= b; b++)c[b] = parseInt(a.substr(2 * b, 2), 16);
return"#" +
(165 <= 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2] ? "000" : "fff")
}
function v(a) {
!a.name && (a = new CKEDITOR.event(a));
var b = !/mouse/.test(a.name), c = a.data.getTarget(), e;
if ("td" == c.getName() && (e = c.getChild(0).getHtml()))q(a), b ? g = c : w = c, b && (c.setStyle("border-color", y(e)), c.setStyle("border-style", "dotted")), f.getById(k).setStyle("background-color", e), f.getById(l).setHtml(e)
}
function q(a) {
if (a = !/mouse/.test(a.name) && g) {
var b = a.getChild(0).getHtml();
a.setStyle("border-color", b);
a.setStyle("border-style", "solid")
}
!g && !w && (f.getById(k).removeStyle("background-color"), f.getById(l).setHtml("&nbsp;"))
}
function z(a) {
var b = a.data, c = b.getTarget(), e = b.getKeystroke(), d = "rtl" == t.lang.dir;
switch (e) {
case 38:
if (a = c.getParent().getPrevious())a = a.getChild([c.getIndex()]), a.focus();
b.preventDefault();
break;
case 40:
if (a = c.getParent().getNext())(a = a.getChild([c.getIndex()])) && 1 == a.type && a.focus();
b.preventDefault();
break;
case 32:
case 13:
u(a);
b.preventDefault();
break;
case d ? 37 : 39:
if (a = c.getNext())1 == a.type && (a.focus(), b.preventDefault(!0));
else if (a = c.getParent().getNext())if ((a = a.getChild([0])) && 1 == a.type)a.focus(), b.preventDefault(!0);
break;
case d ? 39 : 37:
if (a = c.getPrevious())a.focus(), b.preventDefault(!0); else if (a = c.getParent().getPrevious())a = a.getLast(), a.focus(), b.preventDefault(!0)
}
}
var r = CKEDITOR.dom.element, f = CKEDITOR.document, h = t.lang.colordialog, p, x = {type: "html", html: "&nbsp;"}, j, g, w, m = function (a) {
return CKEDITOR.tools.getNextId() + "_" + a
}, k = m("hicolor"), l = m("hicolortext"), o = m("selhicolor"), i;
(function () {
function a(a, d) {
for (var s =
a; s < a + 3; s++) {
var e = new r(i.$.insertRow(-1));
e.setAttribute("role", "row");
for (var f = d; f < d + 3; f++)for (var g = 0; 6 > g; g++)b(e.$, "#" + c[f] + c[g] + c[s])
}
}
function b(a, c) {
var b = new r(a.insertCell(-1));
b.setAttribute("class", "ColorCell");
b.setAttribute("tabIndex", -1);
b.setAttribute("role", "gridcell");
b.on("keydown", z);
b.on("click", u);
b.on("focus", v);
b.on("blur", q);
b.setStyle("background-color", c);
b.setStyle("border", "1px solid " + c);
b.setStyle("width", "14px");
b.setStyle("height", "14px");
var d = m("color_table_cell");
b.setAttribute("aria-labelledby", d);
b.append(CKEDITOR.dom.element.createFromHtml('<span id="' + d + '" class="cke_voice_label">' + c + "</span>", CKEDITOR.document))
}
i = CKEDITOR.dom.element.createFromHtml('<table tabIndex="-1" aria-label="' + h.options + '" role="grid" style="border-collapse:separate;" cellspacing="0"><caption class="cke_voice_label">' + h.options + '</caption><tbody role="presentation"></tbody></table>');
i.on("mouseover", v);
i.on("mouseout", q);
var c = "00 33 66 99 cc ff".split(" ");
a(0, 0);
a(3, 0);
a(0,
3);
a(3, 3);
var e = new r(i.$.insertRow(-1));
e.setAttribute("role", "row");
for (var d = 0; 6 > d; d++)b(e.$, "#" + c[d] + c[d] + c[d]);
for (d = 0; 12 > d; d++)b(e.$, "#000000")
})();
return{title: h.title, minWidth: 360, minHeight: 220, onLoad: function () {
p = this
}, onHide: function () {
n();
var a = g.getChild(0).getHtml();
g.setStyle("border-color", a);
g.setStyle("border-style", "solid");
f.getById(k).removeStyle("background-color");
f.getById(l).setHtml("&nbsp;");
g = null
}, contents: [
{id: "picker", label: h.title, accessKey: "I", elements: [
{type: "hbox",
padding: 0, widths: ["70%", "10%", "30%"], children: [
{type: "html", html: "<div></div>", onLoad: function () {
CKEDITOR.document.getById(this.domId).append(i)
}, focus: function () {
(g || this.getElement().getElementsByTag("td").getItem(0)).focus()
}},
x,
{type: "vbox", padding: 0, widths: ["70%", "5%", "25%"], children: [
{type: "html", html: "<span>" + h.highlight + '</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="' + k + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\t\t\t\t\t\t\t\t\t\t\t\t<div id="' + l + '">&nbsp;</div><span>' + h.selected +
'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="' + o + '" style="border: 1px solid; height: 20px; width: 74px;"></div>'},
{type: "text", label: h.selected, labelStyle: "display:none", id: "selectedColor", style: "width: 74px", onChange: function () {
try {
f.getById(o).setStyle("background-color", this.getValue())
} catch (a) {
n()
}
}},
x,
{type: "button", id: "clear", style: "margin-top: 5px", label: h.clear, onClick: n}
]}
]}
]}
]}
});

View File

@ -1,9 +1,127 @@
(function(){function p(a,k,o){if(!k.is||!k.getCustomData("block_processed"))k.is&&CKEDITOR.dom.element.setMarker(o,k,"block_processed",!0),a.push(k)}function n(a,k){function o(){this.foreach(function(d){if(/^(?!vbox|hbox)/.test(d.type)&&(d.setup||(d.setup=function(c){d.setValue(c.getAttribute(d.id)||"",1)}),!d.commit))d.commit=function(c){var a=this.getValue();"dir"==d.id&&c.getComputedStyle("direction")==a||(a?c.setAttribute(d.id,a):c.removeAttribute(d.id))}})}var n=function(){var d=CKEDITOR.tools.extend({},
CKEDITOR.dtd.$blockLimit);a.config.div_wrapTable&&(delete d.td,delete d.th);return d}(),q=CKEDITOR.dtd.div,l={},m=[];return{title:a.lang.div.title,minWidth:400,minHeight:165,contents:[{id:"info",label:a.lang.common.generalTab,title:a.lang.common.generalTab,elements:[{type:"hbox",widths:["50%","50%"],children:[{id:"elementStyle",type:"select",style:"width: 100%;",label:a.lang.div.styleSelectLabel,"default":"",items:[[a.lang.common.notSet,""]],onChange:function(){var d=["info:elementStyle","info:class",
"advanced:dir","advanced:style"],c=this.getDialog(),h=c._element&&c._element.clone()||new CKEDITOR.dom.element("div",a.document);this.commit(h,!0);for(var d=[].concat(d),b=d.length,i,f=0;f<b;f++)(i=c.getContentElement.apply(c,d[f].split(":")))&&i.setup&&i.setup(h,!0)},setup:function(a){for(var c in l)l[c].checkElementRemovable(a,!0)&&this.setValue(c,1)},commit:function(a){var c;(c=this.getValue())?l[c].applyToObject(a):a.removeAttribute("style")}},{id:"class",type:"text",requiredContent:"div(cke-xyz)",
label:a.lang.common.cssClass,"default":""}]}]},{id:"advanced",label:a.lang.common.advancedTab,title:a.lang.common.advancedTab,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"id",requiredContent:"div[id]",label:a.lang.common.id,"default":""},{type:"text",id:"lang",requiredContent:"div[lang]",label:a.lang.common.langCode,"default":""}]},{type:"hbox",children:[{type:"text",id:"style",requiredContent:"div{cke-xyz}",style:"width: 100%;",label:a.lang.common.cssStyle,
"default":"",commit:function(a){a.setAttribute("style",this.getValue())}}]},{type:"hbox",children:[{type:"text",id:"title",requiredContent:"div[title]",style:"width: 100%;",label:a.lang.common.advisoryTitle,"default":""}]},{type:"select",id:"dir",requiredContent:"div[dir]",style:"width: 100%;",label:a.lang.common.langDir,"default":"",items:[[a.lang.common.notSet,""],[a.lang.common.langDirLtr,"ltr"],[a.lang.common.langDirRtl,"rtl"]]}]}]}],onLoad:function(){o.call(this);var d=this,c=this.getContentElement("info",
"elementStyle");a.getStylesSet(function(h){var b,i;if(h)for(var f=0;f<h.length;f++)i=h[f],i.element&&"div"==i.element&&(b=i.name,l[b]=i=new CKEDITOR.style(i),a.filter.check(i)&&(c.items.push([b,b]),c.add(b,b)));c[1<c.items.length?"enable":"disable"]();setTimeout(function(){d._element&&c.setup(d._element)},0)})},onShow:function(){"editdiv"==k&&this.setupContent(this._element=CKEDITOR.plugins.div.getSurroundDiv(a))},onOk:function(){if("editdiv"==k)m=[this._element];else{var d=[],c={},h=[],b,i=a.getSelection(),
f=i.getRanges(),l=i.createBookmarks(),g,j;for(g=0;g<f.length;g++)for(j=f[g].createIterator();b=j.getNextParagraph();)if(b.getName()in n&&!b.isReadOnly()){var e=b.getChildren();for(b=0;b<e.count();b++)p(h,e.getItem(b),c)}else{for(;!q[b.getName()]&&!b.equals(f[g].root);)b=b.getParent();p(h,b,c)}CKEDITOR.dom.element.clearAllMarkers(c);f=[];g=null;for(j=0;j<h.length;j++)b=h[j],e=a.elementPath(b).blockLimit,e.isReadOnly()&&(e=e.getParent()),a.config.div_wrapTable&&e.is(["td","th"])&&(e=a.elementPath(e.getParent()).blockLimit),
e.equals(g)||(g=e,f.push([])),f[f.length-1].push(b);for(g=0;g<f.length;g++){e=f[g][0];h=e.getParent();for(b=1;b<f[g].length;b++)h=h.getCommonAncestor(f[g][b]);j=new CKEDITOR.dom.element("div",a.document);for(b=0;b<f[g].length;b++){for(e=f[g][b];!e.getParent().equals(h);)e=e.getParent();f[g][b]=e}for(b=0;b<f[g].length;b++)if(e=f[g][b],!e.getCustomData||!e.getCustomData("block_processed"))e.is&&CKEDITOR.dom.element.setMarker(c,e,"block_processed",!0),b||j.insertBefore(e),j.append(e);CKEDITOR.dom.element.clearAllMarkers(c);
d.push(j)}i.selectBookmarks(l);m=d}d=m.length;for(c=0;c<d;c++)this.commitContent(m[c]),!m[c].getAttribute("style")&&m[c].removeAttribute("style");this.hide()},onHide:function(){"editdiv"==k&&this._element.removeCustomData("elementStyle");delete this._element}}}CKEDITOR.dialog.add("creatediv",function(a){return n(a,"creatediv")});CKEDITOR.dialog.add("editdiv",function(a){return n(a,"editdiv")})})();
(function () {
function p(a, k, o) {
if (!k.is || !k.getCustomData("block_processed"))k.is && CKEDITOR.dom.element.setMarker(o, k, "block_processed", !0), a.push(k)
}
function n(a, k) {
function o() {
this.foreach(function (d) {
if (/^(?!vbox|hbox)/.test(d.type) && (d.setup || (d.setup = function (c) {
d.setValue(c.getAttribute(d.id) || "", 1)
}), !d.commit))d.commit = function (c) {
var a = this.getValue();
"dir" == d.id && c.getComputedStyle("direction") == a || (a ? c.setAttribute(d.id, a) : c.removeAttribute(d.id))
}
})
}
var n = function () {
var d = CKEDITOR.tools.extend({},
CKEDITOR.dtd.$blockLimit);
a.config.div_wrapTable && (delete d.td, delete d.th);
return d
}(), q = CKEDITOR.dtd.div, l = {}, m = [];
return{title: a.lang.div.title, minWidth: 400, minHeight: 165, contents: [
{id: "info", label: a.lang.common.generalTab, title: a.lang.common.generalTab, elements: [
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "elementStyle", type: "select", style: "width: 100%;", label: a.lang.div.styleSelectLabel, "default": "", items: [
[a.lang.common.notSet, ""]
], onChange: function () {
var d = ["info:elementStyle", "info:class",
"advanced:dir", "advanced:style"], c = this.getDialog(), h = c._element && c._element.clone() || new CKEDITOR.dom.element("div", a.document);
this.commit(h, !0);
for (var d = [].concat(d), b = d.length, i, f = 0; f < b; f++)(i = c.getContentElement.apply(c, d[f].split(":"))) && i.setup && i.setup(h, !0)
}, setup: function (a) {
for (var c in l)l[c].checkElementRemovable(a, !0) && this.setValue(c, 1)
}, commit: function (a) {
var c;
(c = this.getValue()) ? l[c].applyToObject(a) : a.removeAttribute("style")
}},
{id: "class", type: "text", requiredContent: "div(cke-xyz)",
label: a.lang.common.cssClass, "default": ""}
]}
]},
{id: "advanced", label: a.lang.common.advancedTab, title: a.lang.common.advancedTab, elements: [
{type: "vbox", padding: 1, children: [
{type: "hbox", widths: ["50%", "50%"], children: [
{type: "text", id: "id", requiredContent: "div[id]", label: a.lang.common.id, "default": ""},
{type: "text", id: "lang", requiredContent: "div[lang]", label: a.lang.common.langCode, "default": ""}
]},
{type: "hbox", children: [
{type: "text", id: "style", requiredContent: "div{cke-xyz}", style: "width: 100%;", label: a.lang.common.cssStyle,
"default": "", commit: function (a) {
a.setAttribute("style", this.getValue())
}}
]},
{type: "hbox", children: [
{type: "text", id: "title", requiredContent: "div[title]", style: "width: 100%;", label: a.lang.common.advisoryTitle, "default": ""}
]},
{type: "select", id: "dir", requiredContent: "div[dir]", style: "width: 100%;", label: a.lang.common.langDir, "default": "", items: [
[a.lang.common.notSet, ""],
[a.lang.common.langDirLtr, "ltr"],
[a.lang.common.langDirRtl, "rtl"]
]}
]}
]}
], onLoad: function () {
o.call(this);
var d = this, c = this.getContentElement("info",
"elementStyle");
a.getStylesSet(function (h) {
var b, i;
if (h)for (var f = 0; f < h.length; f++)i = h[f], i.element && "div" == i.element && (b = i.name, l[b] = i = new CKEDITOR.style(i), a.filter.check(i) && (c.items.push([b, b]), c.add(b, b)));
c[1 < c.items.length ? "enable" : "disable"]();
setTimeout(function () {
d._element && c.setup(d._element)
}, 0)
})
}, onShow: function () {
"editdiv" == k && this.setupContent(this._element = CKEDITOR.plugins.div.getSurroundDiv(a))
}, onOk: function () {
if ("editdiv" == k)m = [this._element]; else {
var d = [], c = {}, h = [], b, i = a.getSelection(),
f = i.getRanges(), l = i.createBookmarks(), g, j;
for (g = 0; g < f.length; g++)for (j = f[g].createIterator(); b = j.getNextParagraph();)if (b.getName()in n && !b.isReadOnly()) {
var e = b.getChildren();
for (b = 0; b < e.count(); b++)p(h, e.getItem(b), c)
} else {
for (; !q[b.getName()] && !b.equals(f[g].root);)b = b.getParent();
p(h, b, c)
}
CKEDITOR.dom.element.clearAllMarkers(c);
f = [];
g = null;
for (j = 0; j < h.length; j++)b = h[j], e = a.elementPath(b).blockLimit, e.isReadOnly() && (e = e.getParent()), a.config.div_wrapTable && e.is(["td", "th"]) && (e = a.elementPath(e.getParent()).blockLimit),
e.equals(g) || (g = e, f.push([])), f[f.length - 1].push(b);
for (g = 0; g < f.length; g++) {
e = f[g][0];
h = e.getParent();
for (b = 1; b < f[g].length; b++)h = h.getCommonAncestor(f[g][b]);
j = new CKEDITOR.dom.element("div", a.document);
for (b = 0; b < f[g].length; b++) {
for (e = f[g][b]; !e.getParent().equals(h);)e = e.getParent();
f[g][b] = e
}
for (b = 0; b < f[g].length; b++)if (e = f[g][b], !e.getCustomData || !e.getCustomData("block_processed"))e.is && CKEDITOR.dom.element.setMarker(c, e, "block_processed", !0), b || j.insertBefore(e), j.append(e);
CKEDITOR.dom.element.clearAllMarkers(c);
d.push(j)
}
i.selectBookmarks(l);
m = d
}
d = m.length;
for (c = 0; c < d; c++)this.commitContent(m[c]), !m[c].getAttribute("style") && m[c].removeAttribute("style");
this.hide()
}, onHide: function () {
"editdiv" == k && this._element.removeCustomData("elementStyle");
delete this._element
}}
}
CKEDITOR.dialog.add("creatediv", function (a) {
return n(a, "creatediv")
});
CKEDITOR.dialog.add("editdiv", function (a) {
return n(a, "editdiv")
})
})();

View File

@ -1,24 +1,300 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){function y(c){return c.type==CKEDITOR.NODE_TEXT&&0<c.getLength()&&(!o||!c.isReadOnly())}function s(c){return!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)))}var o,t=function(){return{textNode:this.textNode,offset:this.offset,character:this.textNode?this.textNode.getText().charAt(this.offset):null,hitMatchBoundary:this._.matchBoundary}},u=["find","replace"],p=[["txtFindFind","txtFindReplace"],["txtFindCaseChk",
"txtReplaceCaseChk"],["txtFindWordChk","txtReplaceWordChk"],["txtFindCyclic","txtReplaceCyclic"]],n=function(c,g){function n(a,b){var d=c.createRange();d.setStart(a.textNode,b?a.offset:a.offset+1);d.setEndAt(c.editable(),CKEDITOR.POSITION_BEFORE_END);return d}function q(a){var b=c.getSelection(),d=c.editable();b&&!a?(a=b.getRanges()[0].clone(),a.collapse(!0)):(a=c.createRange(),a.setStartAt(d,CKEDITOR.POSITION_AFTER_START));a.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);return a}var v=new CKEDITOR.style(CKEDITOR.tools.extend({attributes:{"data-cke-highlight":1},
fullMatch:1,ignoreReadonly:1,childRule:function(){return 0}},c.config.find_highlight,!0)),l=function(a,b){var d=this,c=new CKEDITOR.dom.walker(a);c.guard=b?s:function(a){!s(a)&&(d._.matchBoundary=!0)};c.evaluator=y;c.breakOnFalse=1;a.startContainer.type==CKEDITOR.NODE_TEXT&&(this.textNode=a.startContainer,this.offset=a.startOffset-1);this._={matchWord:b,walker:c,matchBoundary:!1}};l.prototype={next:function(){return this.move()},back:function(){return this.move(!0)},move:function(a){var b=this.textNode;
if(null===b)return t.call(this);this._.matchBoundary=!1;if(b&&a&&0<this.offset)this.offset--;else if(b&&this.offset<b.getLength()-1)this.offset++;else{for(b=null;!b&&!(b=this._.walker[a?"previous":"next"].call(this._.walker),this._.matchWord&&!b||this._.walker._.end););this.offset=(this.textNode=b)?a?b.getLength()-1:0:0}return t.call(this)}};var r=function(a,b){this._={walker:a,cursors:[],rangeLength:b,highlightRange:null,isMatched:0}};r.prototype={toDomRange:function(){var a=c.createRange(),b=this._.cursors;
if(1>b.length){var d=this._.walker.textNode;if(d)a.setStartAfter(d);else return null}else d=b[0],b=b[b.length-1],a.setStart(d.textNode,d.offset),a.setEnd(b.textNode,b.offset+1);return a},updateFromDomRange:function(a){var b=new l(a);this._.cursors=[];do a=b.next(),a.character&&this._.cursors.push(a);while(a.character);this._.rangeLength=this._.cursors.length},setMatched:function(){this._.isMatched=!0},clearMatched:function(){this._.isMatched=!1},isMatched:function(){return this._.isMatched},highlight:function(){if(!(1>
this._.cursors.length)){this._.highlightRange&&this.removeHighlight();var a=this.toDomRange(),b=a.createBookmark();v.applyToRange(a);a.moveToBookmark(b);this._.highlightRange=a;b=a.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b.scrollIntoView();this.updateFromDomRange(a)}},removeHighlight:function(){if(this._.highlightRange){var a=this._.highlightRange.createBookmark();v.removeFromRange(this._.highlightRange);this._.highlightRange.moveToBookmark(a);this.updateFromDomRange(this._.highlightRange);
this._.highlightRange=null}},isReadOnly:function(){return!this._.highlightRange?0:this._.highlightRange.startContainer.isReadOnly()},moveBack:function(){var a=this._.walker.back(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.unshift(a);b.length>this._.rangeLength&&b.pop();return a},moveNext:function(){var a=this._.walker.next(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.push(a);b.length>this._.rangeLength&&b.shift();return a},getEndCharacter:function(){var a=this._.cursors;
return 1>a.length?null:a[a.length-1].character},getNextCharacterRange:function(a){var b,d;d=this._.cursors;d=(b=d[d.length-1])&&b.textNode?new l(n(b)):this._.walker;return new r(d,a)},getCursors:function(){return this._.cursors}};var w=function(a,b){var d=[-1];b&&(a=a.toLowerCase());for(var c=0;c<a.length;c++)for(d.push(d[c]+1);0<d[c+1]&&a.charAt(c)!=a.charAt(d[c+1]-1);)d[c+1]=d[d[c+1]-1]+1;this._={overlap:d,state:0,ignoreCase:!!b,pattern:a}};w.prototype={feedCharacter:function(a){for(this._.ignoreCase&&
(a=a.toLowerCase());;){if(a==this._.pattern.charAt(this._.state))return this._.state++,this._.state==this._.pattern.length?(this._.state=0,2):1;if(this._.state)this._.state=this._.overlap[this._.state];else return 0}return null},reset:function(){this._.state=0}};var z=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,x=function(a){if(!a)return!0;var b=a.charCodeAt(0);return 9<=b&&13>=b||8192<=b&&8202>=b||z.test(a)},e={searchRange:null,matchRange:null,find:function(a,b,d,f,e,A){this.matchRange?
(this.matchRange.removeHighlight(),this.matchRange=this.matchRange.getNextCharacterRange(a.length)):this.matchRange=new r(new l(this.searchRange),a.length);for(var i=new w(a,!b),j=0,k="%";null!==k;){for(this.matchRange.moveNext();k=this.matchRange.getEndCharacter();){j=i.feedCharacter(k);if(2==j)break;this.matchRange.moveNext().hitMatchBoundary&&i.reset()}if(2==j){if(d){var h=this.matchRange.getCursors(),m=h[h.length-1],h=h[0],g=c.createRange();g.setStartAt(c.editable(),CKEDITOR.POSITION_AFTER_START);
g.setEnd(h.textNode,h.offset);h=g;m=n(m);h.trim();m.trim();h=new l(h,!0);m=new l(m,!0);if(!x(h.back().character)||!x(m.next().character))continue}this.matchRange.setMatched();!1!==e&&this.matchRange.highlight();return!0}}this.matchRange.clearMatched();this.matchRange.removeHighlight();return f&&!A?(this.searchRange=q(1),this.matchRange=null,arguments.callee.apply(this,Array.prototype.slice.call(arguments).concat([!0]))):!1},replaceCounter:0,replace:function(a,b,d,f,e,g,i){o=1;a=0;if(this.matchRange&&
this.matchRange.isMatched()&&!this.matchRange._.isReplaced&&!this.matchRange.isReadOnly()){this.matchRange.removeHighlight();b=this.matchRange.toDomRange();d=c.document.createText(d);if(!i){var j=c.getSelection();j.selectRanges([b]);c.fire("saveSnapshot")}b.deleteContents();b.insertNode(d);i||(j.selectRanges([b]),c.fire("saveSnapshot"));this.matchRange.updateFromDomRange(b);i||this.matchRange.highlight();this.matchRange._.isReplaced=!0;this.replaceCounter++;a=1}else a=this.find(b,f,e,g,!i);o=0;return a}},
f=c.lang.find;return{title:f.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton(c,{label:c.lang.common.close})],contents:[{id:"find",label:f.find,title:f.find,accessKey:"",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindFind",label:f.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFind",align:"left",style:"width:100%",label:f.find,onClick:function(){var a=this.getDialog();
e.find(a.getValueOf("find","txtFindFind"),a.getValueOf("find","txtFindCaseChk"),a.getValueOf("find","txtFindWordChk"),a.getValueOf("find","txtFindCyclic"))||alert(f.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(f.findOptions),style:"margin-top:29px",children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtFindCaseChk",isChanged:!1,label:f.matchCase},{type:"checkbox",id:"txtFindWordChk",isChanged:!1,label:f.matchWord},{type:"checkbox",id:"txtFindCyclic",isChanged:!1,"default":!0,
label:f.matchCyclic}]}]}]},{id:"replace",label:f.replace,accessKey:"M",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindReplace",label:f.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFindReplace",align:"left",style:"width:100%",label:f.replace,onClick:function(){var a=this.getDialog();e.replace(a,a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace",
"txtReplaceWordChk"),a.getValueOf("replace","txtReplaceCyclic"))||alert(f.notFoundMsg)}}]},{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtReplace",label:f.replaceWith,isChanged:!1,labelLayout:"horizontal",accessKey:"R"},{type:"button",id:"btnReplaceAll",align:"left",style:"width:100%",label:f.replaceAll,isChanged:!1,onClick:function(){var a=this.getDialog();e.replaceCounter=0;e.searchRange=q(1);e.matchRange&&(e.matchRange.removeHighlight(),e.matchRange=null);for(c.fire("saveSnapshot");e.replace(a,
a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace","txtReplaceWordChk"),!1,!0););e.replaceCounter?(alert(f.replaceSuccessMsg.replace(/%1/,e.replaceCounter)),c.fire("saveSnapshot")):alert(f.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(f.findOptions),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtReplaceCaseChk",isChanged:!1,label:f.matchCase},{type:"checkbox",id:"txtReplaceWordChk",
isChanged:!1,label:f.matchWord},{type:"checkbox",id:"txtReplaceCyclic",isChanged:!1,"default":!0,label:f.matchCyclic}]}]}]}],onLoad:function(){var a=this,b,c=0;this.on("hide",function(){c=0});this.on("show",function(){c=1});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(f){return function(e){f.call(a,e);var g=a._.tabs[e],i;i="find"===e?"txtFindWordChk":"txtReplaceWordChk";b=a.getContentElement(e,"find"===e?"txtFindFind":"txtFindReplace");a.getContentElement(e,i);g.initialized||(CKEDITOR.document.getById(b._.inputId),
g.initialized=!0);if(c){var j,e="find"===e?1:0,g=1-e,k,h=p.length;for(k=0;k<h;k++)i=this.getContentElement(u[e],p[k][e]),j=this.getContentElement(u[g],p[k][g]),j.setValue(i.getValue())}}})},onShow:function(){e.searchRange=q();var a=this.getParentEditor().getSelection().getSelectedText(),b=this.getContentElement(g,"find"==g?"txtFindFind":"txtFindReplace");b.setValue(a);b.select();this.selectPage(g);this[("find"==g&&this._.editor.readOnly?"hide":"show")+"Page"]("replace")},onHide:function(){var a;e.matchRange&&
e.matchRange.isMatched()&&(e.matchRange.removeHighlight(),c.focus(),(a=e.matchRange.toDomRange())&&c.getSelection().selectRanges([a]));delete e.matchRange},onFocus:function(){return"replace"==g?this.getContentElement("replace","txtFindReplace"):this.getContentElement("find","txtFindFind")}}};CKEDITOR.dialog.add("find",function(c){return n(c,"find")});CKEDITOR.dialog.add("replace",function(c){return n(c,"replace")})})();
*/
(function () {
function y(c) {
return c.type == CKEDITOR.NODE_TEXT && 0 < c.getLength() && (!o || !c.isReadOnly())
}
function s(c) {
return!(c.type == CKEDITOR.NODE_ELEMENT && c.isBlockBoundary(CKEDITOR.tools.extend({}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable)))
}
var o, t = function () {
return{textNode: this.textNode, offset: this.offset, character: this.textNode ? this.textNode.getText().charAt(this.offset) : null, hitMatchBoundary: this._.matchBoundary}
}, u = ["find", "replace"], p = [
["txtFindFind", "txtFindReplace"],
["txtFindCaseChk",
"txtReplaceCaseChk"],
["txtFindWordChk", "txtReplaceWordChk"],
["txtFindCyclic", "txtReplaceCyclic"]
], n = function (c, g) {
function n(a, b) {
var d = c.createRange();
d.setStart(a.textNode, b ? a.offset : a.offset + 1);
d.setEndAt(c.editable(), CKEDITOR.POSITION_BEFORE_END);
return d
}
function q(a) {
var b = c.getSelection(), d = c.editable();
b && !a ? (a = b.getRanges()[0].clone(), a.collapse(!0)) : (a = c.createRange(), a.setStartAt(d, CKEDITOR.POSITION_AFTER_START));
a.setEndAt(d, CKEDITOR.POSITION_BEFORE_END);
return a
}
var v = new CKEDITOR.style(CKEDITOR.tools.extend({attributes: {"data-cke-highlight": 1},
fullMatch: 1, ignoreReadonly: 1, childRule: function () {
return 0
}}, c.config.find_highlight, !0)), l = function (a, b) {
var d = this, c = new CKEDITOR.dom.walker(a);
c.guard = b ? s : function (a) {
!s(a) && (d._.matchBoundary = !0)
};
c.evaluator = y;
c.breakOnFalse = 1;
a.startContainer.type == CKEDITOR.NODE_TEXT && (this.textNode = a.startContainer, this.offset = a.startOffset - 1);
this._ = {matchWord: b, walker: c, matchBoundary: !1}
};
l.prototype = {next: function () {
return this.move()
}, back: function () {
return this.move(!0)
}, move: function (a) {
var b = this.textNode;
if (null === b)return t.call(this);
this._.matchBoundary = !1;
if (b && a && 0 < this.offset)this.offset--; else if (b && this.offset < b.getLength() - 1)this.offset++; else {
for (b = null; !b && !(b = this._.walker[a ? "previous" : "next"].call(this._.walker), this._.matchWord && !b || this._.walker._.end););
this.offset = (this.textNode = b) ? a ? b.getLength() - 1 : 0 : 0
}
return t.call(this)
}};
var r = function (a, b) {
this._ = {walker: a, cursors: [], rangeLength: b, highlightRange: null, isMatched: 0}
};
r.prototype = {toDomRange: function () {
var a = c.createRange(), b = this._.cursors;
if (1 > b.length) {
var d = this._.walker.textNode;
if (d)a.setStartAfter(d); else return null
} else d = b[0], b = b[b.length - 1], a.setStart(d.textNode, d.offset), a.setEnd(b.textNode, b.offset + 1);
return a
}, updateFromDomRange: function (a) {
var b = new l(a);
this._.cursors = [];
do a = b.next(), a.character && this._.cursors.push(a); while (a.character);
this._.rangeLength = this._.cursors.length
}, setMatched: function () {
this._.isMatched = !0
}, clearMatched: function () {
this._.isMatched = !1
}, isMatched: function () {
return this._.isMatched
}, highlight: function () {
if (!(1 >
this._.cursors.length)) {
this._.highlightRange && this.removeHighlight();
var a = this.toDomRange(), b = a.createBookmark();
v.applyToRange(a);
a.moveToBookmark(b);
this._.highlightRange = a;
b = a.startContainer;
b.type != CKEDITOR.NODE_ELEMENT && (b = b.getParent());
b.scrollIntoView();
this.updateFromDomRange(a)
}
}, removeHighlight: function () {
if (this._.highlightRange) {
var a = this._.highlightRange.createBookmark();
v.removeFromRange(this._.highlightRange);
this._.highlightRange.moveToBookmark(a);
this.updateFromDomRange(this._.highlightRange);
this._.highlightRange = null
}
}, isReadOnly: function () {
return!this._.highlightRange ? 0 : this._.highlightRange.startContainer.isReadOnly()
}, moveBack: function () {
var a = this._.walker.back(), b = this._.cursors;
a.hitMatchBoundary && (this._.cursors = b = []);
b.unshift(a);
b.length > this._.rangeLength && b.pop();
return a
}, moveNext: function () {
var a = this._.walker.next(), b = this._.cursors;
a.hitMatchBoundary && (this._.cursors = b = []);
b.push(a);
b.length > this._.rangeLength && b.shift();
return a
}, getEndCharacter: function () {
var a = this._.cursors;
return 1 > a.length ? null : a[a.length - 1].character
}, getNextCharacterRange: function (a) {
var b, d;
d = this._.cursors;
d = (b = d[d.length - 1]) && b.textNode ? new l(n(b)) : this._.walker;
return new r(d, a)
}, getCursors: function () {
return this._.cursors
}};
var w = function (a, b) {
var d = [-1];
b && (a = a.toLowerCase());
for (var c = 0; c < a.length; c++)for (d.push(d[c] + 1); 0 < d[c + 1] && a.charAt(c) != a.charAt(d[c + 1] - 1);)d[c + 1] = d[d[c + 1] - 1] + 1;
this._ = {overlap: d, state: 0, ignoreCase: !!b, pattern: a}
};
w.prototype = {feedCharacter: function (a) {
for (this._.ignoreCase &&
(a = a.toLowerCase()); ;) {
if (a == this._.pattern.charAt(this._.state))return this._.state++, this._.state == this._.pattern.length ? (this._.state = 0, 2) : 1;
if (this._.state)this._.state = this._.overlap[this._.state]; else return 0
}
return null
}, reset: function () {
this._.state = 0
}};
var z = /[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/, x = function (a) {
if (!a)return!0;
var b = a.charCodeAt(0);
return 9 <= b && 13 >= b || 8192 <= b && 8202 >= b || z.test(a)
}, e = {searchRange: null, matchRange: null, find: function (a, b, d, f, e, A) {
this.matchRange ?
(this.matchRange.removeHighlight(), this.matchRange = this.matchRange.getNextCharacterRange(a.length)) : this.matchRange = new r(new l(this.searchRange), a.length);
for (var i = new w(a, !b), j = 0, k = "%"; null !== k;) {
for (this.matchRange.moveNext(); k = this.matchRange.getEndCharacter();) {
j = i.feedCharacter(k);
if (2 == j)break;
this.matchRange.moveNext().hitMatchBoundary && i.reset()
}
if (2 == j) {
if (d) {
var h = this.matchRange.getCursors(), m = h[h.length - 1], h = h[0], g = c.createRange();
g.setStartAt(c.editable(), CKEDITOR.POSITION_AFTER_START);
g.setEnd(h.textNode, h.offset);
h = g;
m = n(m);
h.trim();
m.trim();
h = new l(h, !0);
m = new l(m, !0);
if (!x(h.back().character) || !x(m.next().character))continue
}
this.matchRange.setMatched();
!1 !== e && this.matchRange.highlight();
return!0
}
}
this.matchRange.clearMatched();
this.matchRange.removeHighlight();
return f && !A ? (this.searchRange = q(1), this.matchRange = null, arguments.callee.apply(this, Array.prototype.slice.call(arguments).concat([!0]))) : !1
}, replaceCounter: 0, replace: function (a, b, d, f, e, g, i) {
o = 1;
a = 0;
if (this.matchRange &&
this.matchRange.isMatched() && !this.matchRange._.isReplaced && !this.matchRange.isReadOnly()) {
this.matchRange.removeHighlight();
b = this.matchRange.toDomRange();
d = c.document.createText(d);
if (!i) {
var j = c.getSelection();
j.selectRanges([b]);
c.fire("saveSnapshot")
}
b.deleteContents();
b.insertNode(d);
i || (j.selectRanges([b]), c.fire("saveSnapshot"));
this.matchRange.updateFromDomRange(b);
i || this.matchRange.highlight();
this.matchRange._.isReplaced = !0;
this.replaceCounter++;
a = 1
} else a = this.find(b, f, e, g, !i);
o = 0;
return a
}},
f = c.lang.find;
return{title: f.title, resizable: CKEDITOR.DIALOG_RESIZE_NONE, minWidth: 350, minHeight: 170, buttons: [CKEDITOR.dialog.cancelButton(c, {label: c.lang.common.close})], contents: [
{id: "find", label: f.find, title: f.find, accessKey: "", elements: [
{type: "hbox", widths: ["230px", "90px"], children: [
{type: "text", id: "txtFindFind", label: f.findWhat, isChanged: !1, labelLayout: "horizontal", accessKey: "F"},
{type: "button", id: "btnFind", align: "left", style: "width:100%", label: f.find, onClick: function () {
var a = this.getDialog();
e.find(a.getValueOf("find", "txtFindFind"), a.getValueOf("find", "txtFindCaseChk"), a.getValueOf("find", "txtFindWordChk"), a.getValueOf("find", "txtFindCyclic")) || alert(f.notFoundMsg)
}}
]},
{type: "fieldset", label: CKEDITOR.tools.htmlEncode(f.findOptions), style: "margin-top:29px", children: [
{type: "vbox", padding: 0, children: [
{type: "checkbox", id: "txtFindCaseChk", isChanged: !1, label: f.matchCase},
{type: "checkbox", id: "txtFindWordChk", isChanged: !1, label: f.matchWord},
{type: "checkbox", id: "txtFindCyclic", isChanged: !1, "default": !0,
label: f.matchCyclic}
]}
]}
]},
{id: "replace", label: f.replace, accessKey: "M", elements: [
{type: "hbox", widths: ["230px", "90px"], children: [
{type: "text", id: "txtFindReplace", label: f.findWhat, isChanged: !1, labelLayout: "horizontal", accessKey: "F"},
{type: "button", id: "btnFindReplace", align: "left", style: "width:100%", label: f.replace, onClick: function () {
var a = this.getDialog();
e.replace(a, a.getValueOf("replace", "txtFindReplace"), a.getValueOf("replace", "txtReplace"), a.getValueOf("replace", "txtReplaceCaseChk"), a.getValueOf("replace",
"txtReplaceWordChk"), a.getValueOf("replace", "txtReplaceCyclic")) || alert(f.notFoundMsg)
}}
]},
{type: "hbox", widths: ["230px", "90px"], children: [
{type: "text", id: "txtReplace", label: f.replaceWith, isChanged: !1, labelLayout: "horizontal", accessKey: "R"},
{type: "button", id: "btnReplaceAll", align: "left", style: "width:100%", label: f.replaceAll, isChanged: !1, onClick: function () {
var a = this.getDialog();
e.replaceCounter = 0;
e.searchRange = q(1);
e.matchRange && (e.matchRange.removeHighlight(), e.matchRange = null);
for (c.fire("saveSnapshot"); e.replace(a,
a.getValueOf("replace", "txtFindReplace"), a.getValueOf("replace", "txtReplace"), a.getValueOf("replace", "txtReplaceCaseChk"), a.getValueOf("replace", "txtReplaceWordChk"), !1, !0););
e.replaceCounter ? (alert(f.replaceSuccessMsg.replace(/%1/, e.replaceCounter)), c.fire("saveSnapshot")) : alert(f.notFoundMsg)
}}
]},
{type: "fieldset", label: CKEDITOR.tools.htmlEncode(f.findOptions), children: [
{type: "vbox", padding: 0, children: [
{type: "checkbox", id: "txtReplaceCaseChk", isChanged: !1, label: f.matchCase},
{type: "checkbox", id: "txtReplaceWordChk",
isChanged: !1, label: f.matchWord},
{type: "checkbox", id: "txtReplaceCyclic", isChanged: !1, "default": !0, label: f.matchCyclic}
]}
]}
]}
], onLoad: function () {
var a = this, b, c = 0;
this.on("hide", function () {
c = 0
});
this.on("show", function () {
c = 1
});
this.selectPage = CKEDITOR.tools.override(this.selectPage, function (f) {
return function (e) {
f.call(a, e);
var g = a._.tabs[e], i;
i = "find" === e ? "txtFindWordChk" : "txtReplaceWordChk";
b = a.getContentElement(e, "find" === e ? "txtFindFind" : "txtFindReplace");
a.getContentElement(e, i);
g.initialized || (CKEDITOR.document.getById(b._.inputId),
g.initialized = !0);
if (c) {
var j, e = "find" === e ? 1 : 0, g = 1 - e, k, h = p.length;
for (k = 0; k < h; k++)i = this.getContentElement(u[e], p[k][e]), j = this.getContentElement(u[g], p[k][g]), j.setValue(i.getValue())
}
}
})
}, onShow: function () {
e.searchRange = q();
var a = this.getParentEditor().getSelection().getSelectedText(), b = this.getContentElement(g, "find" == g ? "txtFindFind" : "txtFindReplace");
b.setValue(a);
b.select();
this.selectPage(g);
this[("find" == g && this._.editor.readOnly ? "hide" : "show") + "Page"]("replace")
}, onHide: function () {
var a;
e.matchRange &&
e.matchRange.isMatched() && (e.matchRange.removeHighlight(), c.focus(), (a = e.matchRange.toDomRange()) && c.getSelection().selectRanges([a]));
delete e.matchRange
}, onFocus: function () {
return"replace" == g ? this.getContentElement("replace", "txtFindReplace") : this.getContentElement("find", "txtFindFind")
}}
};
CKEDITOR.dialog.add("find", function (c) {
return n(c, "find")
});
CKEDITOR.dialog.add("replace", function (c) {
return n(c, "replace")
})
})();

View File

@ -1,24 +1,265 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){function b(a,b,c){var k=n[this.id];if(k)for(var f=this instanceof CKEDITOR.ui.dialog.checkbox,e=0;e<k.length;e++){var d=k[e];switch(d.type){case g:if(!a)continue;if(null!==a.getAttribute(d.name)){a=a.getAttribute(d.name);f?this.setValue("true"==a.toLowerCase()):this.setValue(a);return}f&&this.setValue(!!d["default"]);break;case o:if(!a)continue;if(d.name in c){a=c[d.name];f?this.setValue("true"==a.toLowerCase()):this.setValue(a);return}f&&this.setValue(!!d["default"]);break;case i:if(!b)continue;
if(b.getAttribute(d.name)){a=b.getAttribute(d.name);f?this.setValue("true"==a.toLowerCase()):this.setValue(a);return}f&&this.setValue(!!d["default"])}}}function c(a,b,c){var k=n[this.id];if(k)for(var f=""===this.getValue(),e=this instanceof CKEDITOR.ui.dialog.checkbox,d=0;d<k.length;d++){var h=k[d];switch(h.type){case g:if(!a||"data"==h.name&&b&&!a.hasAttribute("data"))continue;var l=this.getValue();f||e&&l===h["default"]?a.removeAttribute(h.name):a.setAttribute(h.name,l);break;case o:if(!a)continue;
l=this.getValue();if(f||e&&l===h["default"])h.name in c&&c[h.name].remove();else if(h.name in c)c[h.name].setAttribute("value",l);else{var p=CKEDITOR.dom.element.createFromHtml("<cke:param></cke:param>",a.getDocument());p.setAttributes({name:h.name,value:l});1>a.getChildCount()?p.appendTo(a):p.insertBefore(a.getFirst())}break;case i:if(!b)continue;l=this.getValue();f||e&&l===h["default"]?b.removeAttribute(h.name):b.setAttribute(h.name,l)}}}for(var g=1,o=2,i=4,n={id:[{type:g,name:"id"}],classid:[{type:g,
name:"classid"}],codebase:[{type:g,name:"codebase"}],pluginspage:[{type:i,name:"pluginspage"}],src:[{type:o,name:"movie"},{type:i,name:"src"},{type:g,name:"data"}],name:[{type:i,name:"name"}],align:[{type:g,name:"align"}],"class":[{type:g,name:"class"},{type:i,name:"class"}],width:[{type:g,name:"width"},{type:i,name:"width"}],height:[{type:g,name:"height"},{type:i,name:"height"}],hSpace:[{type:g,name:"hSpace"},{type:i,name:"hSpace"}],vSpace:[{type:g,name:"vSpace"},{type:i,name:"vSpace"}],style:[{type:g,
name:"style"},{type:i,name:"style"}],type:[{type:i,name:"type"}]},m="play loop menu quality scale salign wmode bgcolor base flashvars allowScriptAccess allowFullScreen".split(" "),j=0;j<m.length;j++)n[m[j]]=[{type:i,name:m[j]},{type:o,name:m[j]}];m=["allowFullScreen","play","loop","menu"];for(j=0;j<m.length;j++)n[m[j]][0]["default"]=n[m[j]][1]["default"]=!0;CKEDITOR.dialog.add("flash",function(a){var g=!a.config.flashEmbedTagOnly,i=a.config.flashAddEmbedTag||a.config.flashEmbedTagOnly,k,f="<div>"+
CKEDITOR.tools.htmlEncode(a.lang.common.preview)+'<br><div id="cke_FlashPreviewLoader'+CKEDITOR.tools.getNextNumber()+'" style="display:none"><div class="loading">&nbsp;</div></div><div id="cke_FlashPreviewBox'+CKEDITOR.tools.getNextNumber()+'" class="FlashPreviewBox"></div></div>';return{title:a.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){this.fakeImage=this.objectNode=this.embedNode=null;k=new CKEDITOR.dom.element("embed",a.document);var e=this.getSelectedElement();if(e&&e.data("cke-real-element-type")&&
"flash"==e.data("cke-real-element-type")){this.fakeImage=e;var d=a.restoreRealElement(e),h=null,b=null,c={};if("cke:object"==d.getName()){h=d;d=h.getElementsByTag("embed","cke");0<d.count()&&(b=d.getItem(0));for(var d=h.getElementsByTag("param","cke"),g=0,i=d.count();g<i;g++){var f=d.getItem(g),j=f.getAttribute("name"),f=f.getAttribute("value");c[j]=f}}else"cke:embed"==d.getName()&&(b=d);this.objectNode=h;this.embedNode=b;this.setupContent(h,b,c,e)}},onOk:function(){var e=null,d=null,b=null;if(this.fakeImage)e=
this.objectNode,d=this.embedNode;else if(g&&(e=CKEDITOR.dom.element.createFromHtml("<cke:object></cke:object>",a.document),e.setAttributes({classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"})),i)d=CKEDITOR.dom.element.createFromHtml("<cke:embed></cke:embed>",a.document),d.setAttributes({type:"application/x-shockwave-flash",pluginspage:"http://www.macromedia.com/go/getflashplayer"}),e&&d.appendTo(e);
if(e)for(var b={},c=e.getElementsByTag("param","cke"),f=0,j=c.count();f<j;f++)b[c.getItem(f).getAttribute("name")]=c.getItem(f);c={};f={};this.commitContent(e,d,b,c,f);e=a.createFakeElement(e||d,"cke_flash","flash",!0);e.setAttributes(f);e.setStyles(c);this.fakeImage?(e.replace(this.fakeImage),a.getSelection().selectElement(e)):a.insertElement(e)},onHide:function(){this.preview&&this.preview.setHtml("")},contents:[{id:"info",label:a.lang.common.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,
children:[{type:"hbox",widths:["280px","110px"],align:"right",children:[{id:"src",type:"text",label:a.lang.common.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(a.lang.flash.validateSrc),setup:b,commit:c,onLoad:function(){var a=this.getDialog(),b=function(b){k.setAttribute("src",b);a.preview.setHtml('<embed height="100%" width="100%" src="'+CKEDITOR.tools.htmlEncode(k.getAttribute("src"))+'" type="application/x-shockwave-flash"></embed>')};a.preview=a.getContentElement("info","preview").getElement().getChild(3);
this.on("change",function(a){a.data&&a.data.value&&b(a.data.value)});this.getInputElement().on("change",function(){b(this.getValue())},this)}},{type:"button",id:"browse",filebrowser:"info:src",hidden:!0,style:"display:inline-block;margin-top:10px;",label:a.lang.common.browseServer}]}]},{type:"hbox",widths:["25%","25%","25%","25%","25%"],children:[{type:"text",id:"width",requiredContent:"embed[width]",style:"width:95px",label:a.lang.common.width,validate:CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1",
a.lang.common.width)),setup:b,commit:c},{type:"text",id:"height",requiredContent:"embed[height]",style:"width:95px",label:a.lang.common.height,validate:CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1",a.lang.common.height)),setup:b,commit:c},{type:"text",id:"hSpace",requiredContent:"embed[hspace]",style:"width:95px",label:a.lang.flash.hSpace,validate:CKEDITOR.dialog.validate.integer(a.lang.flash.validateHSpace),setup:b,commit:c},{type:"text",id:"vSpace",requiredContent:"embed[vspace]",
style:"width:95px",label:a.lang.flash.vSpace,validate:CKEDITOR.dialog.validate.integer(a.lang.flash.validateVSpace),setup:b,commit:c}]},{type:"vbox",children:[{type:"html",id:"preview",style:"width:95%;",html:f}]}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:a.lang.common.upload,elements:[{type:"file",id:"upload",label:a.lang.common.upload,size:38},{type:"fileButton",id:"uploadButton",label:a.lang.common.uploadSubmit,filebrowser:"info:src","for":["Upload","upload"]}]},{id:"properties",
label:a.lang.flash.propertiesTab,elements:[{type:"hbox",widths:["50%","50%"],children:[{id:"scale",type:"select",requiredContent:"embed[scale]",label:a.lang.flash.scale,"default":"",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.flash.scaleAll,"showall"],[a.lang.flash.scaleNoBorder,"noborder"],[a.lang.flash.scaleFit,"exactfit"]],setup:b,commit:c},{id:"allowScriptAccess",type:"select",requiredContent:"embed[allowscriptaccess]",label:a.lang.flash.access,"default":"",style:"width : 100%;",
items:[[a.lang.common.notSet,""],[a.lang.flash.accessAlways,"always"],[a.lang.flash.accessSameDomain,"samedomain"],[a.lang.flash.accessNever,"never"]],setup:b,commit:c}]},{type:"hbox",widths:["50%","50%"],children:[{id:"wmode",type:"select",requiredContent:"embed[wmode]",label:a.lang.flash.windowMode,"default":"",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.flash.windowModeWindow,"window"],[a.lang.flash.windowModeOpaque,"opaque"],[a.lang.flash.windowModeTransparent,"transparent"]],
setup:b,commit:c},{id:"quality",type:"select",requiredContent:"embed[quality]",label:a.lang.flash.quality,"default":"high",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.flash.qualityBest,"best"],[a.lang.flash.qualityHigh,"high"],[a.lang.flash.qualityAutoHigh,"autohigh"],[a.lang.flash.qualityMedium,"medium"],[a.lang.flash.qualityAutoLow,"autolow"],[a.lang.flash.qualityLow,"low"]],setup:b,commit:c}]},{type:"hbox",widths:["50%","50%"],children:[{id:"align",type:"select",requiredContent:"object[align]",
label:a.lang.common.align,"default":"",style:"width : 100%;",items:[[a.lang.common.notSet,""],[a.lang.common.alignLeft,"left"],[a.lang.flash.alignAbsBottom,"absBottom"],[a.lang.flash.alignAbsMiddle,"absMiddle"],[a.lang.flash.alignBaseline,"baseline"],[a.lang.common.alignBottom,"bottom"],[a.lang.common.alignMiddle,"middle"],[a.lang.common.alignRight,"right"],[a.lang.flash.alignTextTop,"textTop"],[a.lang.common.alignTop,"top"]],setup:b,commit:function(a,b,f,g,i){var j=this.getValue();c.apply(this,arguments);
j&&(i.align=j)}},{type:"html",html:"<div></div>"}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(a.lang.flash.flashvars),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"menu",label:a.lang.flash.chkMenu,"default":!0,setup:b,commit:c},{type:"checkbox",id:"play",label:a.lang.flash.chkPlay,"default":!0,setup:b,commit:c},{type:"checkbox",id:"loop",label:a.lang.flash.chkLoop,"default":!0,setup:b,commit:c},{type:"checkbox",id:"allowFullScreen",label:a.lang.flash.chkFull,"default":!0,
setup:b,commit:c}]}]}]},{id:"advanced",label:a.lang.common.advancedTab,elements:[{type:"hbox",children:[{type:"text",id:"id",requiredContent:"object[id]",label:a.lang.common.id,setup:b,commit:c}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",id:"bgcolor",requiredContent:"embed[bgcolor]",label:a.lang.flash.bgcolor,setup:b,commit:c},{type:"text",id:"class",requiredContent:"embed(cke-xyz)",label:a.lang.common.cssClass,setup:b,commit:c}]},{type:"text",id:"style",requiredContent:"embed{cke-xyz}",
validate:CKEDITOR.dialog.validate.inlineStyle(a.lang.common.invalidInlineStyle),label:a.lang.common.cssStyle,setup:b,commit:c}]}]}})})();
*/
(function () {
function b(a, b, c) {
var k = n[this.id];
if (k)for (var f = this instanceof CKEDITOR.ui.dialog.checkbox, e = 0; e < k.length; e++) {
var d = k[e];
switch (d.type) {
case g:
if (!a)continue;
if (null !== a.getAttribute(d.name)) {
a = a.getAttribute(d.name);
f ? this.setValue("true" == a.toLowerCase()) : this.setValue(a);
return
}
f && this.setValue(!!d["default"]);
break;
case o:
if (!a)continue;
if (d.name in c) {
a = c[d.name];
f ? this.setValue("true" == a.toLowerCase()) : this.setValue(a);
return
}
f && this.setValue(!!d["default"]);
break;
case i:
if (!b)continue;
if (b.getAttribute(d.name)) {
a = b.getAttribute(d.name);
f ? this.setValue("true" == a.toLowerCase()) : this.setValue(a);
return
}
f && this.setValue(!!d["default"])
}
}
}
function c(a, b, c) {
var k = n[this.id];
if (k)for (var f = "" === this.getValue(), e = this instanceof CKEDITOR.ui.dialog.checkbox, d = 0; d < k.length; d++) {
var h = k[d];
switch (h.type) {
case g:
if (!a || "data" == h.name && b && !a.hasAttribute("data"))continue;
var l = this.getValue();
f || e && l === h["default"] ? a.removeAttribute(h.name) : a.setAttribute(h.name, l);
break;
case o:
if (!a)continue;
l = this.getValue();
if (f || e && l === h["default"])h.name in c && c[h.name].remove(); else if (h.name in c)c[h.name].setAttribute("value", l); else {
var p = CKEDITOR.dom.element.createFromHtml("<cke:param></cke:param>", a.getDocument());
p.setAttributes({name: h.name, value: l});
1 > a.getChildCount() ? p.appendTo(a) : p.insertBefore(a.getFirst())
}
break;
case i:
if (!b)continue;
l = this.getValue();
f || e && l === h["default"] ? b.removeAttribute(h.name) : b.setAttribute(h.name, l)
}
}
}
for (var g = 1, o = 2, i = 4, n = {id: [
{type: g, name: "id"}
], classid: [
{type: g,
name: "classid"}
], codebase: [
{type: g, name: "codebase"}
], pluginspage: [
{type: i, name: "pluginspage"}
], src: [
{type: o, name: "movie"},
{type: i, name: "src"},
{type: g, name: "data"}
], name: [
{type: i, name: "name"}
], align: [
{type: g, name: "align"}
], "class": [
{type: g, name: "class"},
{type: i, name: "class"}
], width: [
{type: g, name: "width"},
{type: i, name: "width"}
], height: [
{type: g, name: "height"},
{type: i, name: "height"}
], hSpace: [
{type: g, name: "hSpace"},
{type: i, name: "hSpace"}
], vSpace: [
{type: g, name: "vSpace"},
{type: i, name: "vSpace"}
], style: [
{type: g,
name: "style"},
{type: i, name: "style"}
], type: [
{type: i, name: "type"}
]}, m = "play loop menu quality scale salign wmode bgcolor base flashvars allowScriptAccess allowFullScreen".split(" "), j = 0; j < m.length; j++)n[m[j]] = [
{type: i, name: m[j]},
{type: o, name: m[j]}
];
m = ["allowFullScreen", "play", "loop", "menu"];
for (j = 0; j < m.length; j++)n[m[j]][0]["default"] = n[m[j]][1]["default"] = !0;
CKEDITOR.dialog.add("flash", function (a) {
var g = !a.config.flashEmbedTagOnly, i = a.config.flashAddEmbedTag || a.config.flashEmbedTagOnly, k, f = "<div>" +
CKEDITOR.tools.htmlEncode(a.lang.common.preview) + '<br><div id="cke_FlashPreviewLoader' + CKEDITOR.tools.getNextNumber() + '" style="display:none"><div class="loading">&nbsp;</div></div><div id="cke_FlashPreviewBox' + CKEDITOR.tools.getNextNumber() + '" class="FlashPreviewBox"></div></div>';
return{title: a.lang.flash.title, minWidth: 420, minHeight: 310, onShow: function () {
this.fakeImage = this.objectNode = this.embedNode = null;
k = new CKEDITOR.dom.element("embed", a.document);
var e = this.getSelectedElement();
if (e && e.data("cke-real-element-type") &&
"flash" == e.data("cke-real-element-type")) {
this.fakeImage = e;
var d = a.restoreRealElement(e), h = null, b = null, c = {};
if ("cke:object" == d.getName()) {
h = d;
d = h.getElementsByTag("embed", "cke");
0 < d.count() && (b = d.getItem(0));
for (var d = h.getElementsByTag("param", "cke"), g = 0, i = d.count(); g < i; g++) {
var f = d.getItem(g), j = f.getAttribute("name"), f = f.getAttribute("value");
c[j] = f
}
} else"cke:embed" == d.getName() && (b = d);
this.objectNode = h;
this.embedNode = b;
this.setupContent(h, b, c, e)
}
}, onOk: function () {
var e = null, d = null, b = null;
if (this.fakeImage)e =
this.objectNode, d = this.embedNode; else if (g && (e = CKEDITOR.dom.element.createFromHtml("<cke:object></cke:object>", a.document), e.setAttributes({classid: "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", codebase: "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"})), i)d = CKEDITOR.dom.element.createFromHtml("<cke:embed></cke:embed>", a.document), d.setAttributes({type: "application/x-shockwave-flash", pluginspage: "http://www.macromedia.com/go/getflashplayer"}), e && d.appendTo(e);
if (e)for (var b = {}, c = e.getElementsByTag("param", "cke"), f = 0, j = c.count(); f < j; f++)b[c.getItem(f).getAttribute("name")] = c.getItem(f);
c = {};
f = {};
this.commitContent(e, d, b, c, f);
e = a.createFakeElement(e || d, "cke_flash", "flash", !0);
e.setAttributes(f);
e.setStyles(c);
this.fakeImage ? (e.replace(this.fakeImage), a.getSelection().selectElement(e)) : a.insertElement(e)
}, onHide: function () {
this.preview && this.preview.setHtml("")
}, contents: [
{id: "info", label: a.lang.common.generalTab, accessKey: "I", elements: [
{type: "vbox", padding: 0,
children: [
{type: "hbox", widths: ["280px", "110px"], align: "right", children: [
{id: "src", type: "text", label: a.lang.common.url, required: !0, validate: CKEDITOR.dialog.validate.notEmpty(a.lang.flash.validateSrc), setup: b, commit: c, onLoad: function () {
var a = this.getDialog(), b = function (b) {
k.setAttribute("src", b);
a.preview.setHtml('<embed height="100%" width="100%" src="' + CKEDITOR.tools.htmlEncode(k.getAttribute("src")) + '" type="application/x-shockwave-flash"></embed>')
};
a.preview = a.getContentElement("info", "preview").getElement().getChild(3);
this.on("change", function (a) {
a.data && a.data.value && b(a.data.value)
});
this.getInputElement().on("change", function () {
b(this.getValue())
}, this)
}},
{type: "button", id: "browse", filebrowser: "info:src", hidden: !0, style: "display:inline-block;margin-top:10px;", label: a.lang.common.browseServer}
]}
]},
{type: "hbox", widths: ["25%", "25%", "25%", "25%", "25%"], children: [
{type: "text", id: "width", requiredContent: "embed[width]", style: "width:95px", label: a.lang.common.width, validate: CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1",
a.lang.common.width)), setup: b, commit: c},
{type: "text", id: "height", requiredContent: "embed[height]", style: "width:95px", label: a.lang.common.height, validate: CKEDITOR.dialog.validate.htmlLength(a.lang.common.invalidHtmlLength.replace("%1", a.lang.common.height)), setup: b, commit: c},
{type: "text", id: "hSpace", requiredContent: "embed[hspace]", style: "width:95px", label: a.lang.flash.hSpace, validate: CKEDITOR.dialog.validate.integer(a.lang.flash.validateHSpace), setup: b, commit: c},
{type: "text", id: "vSpace", requiredContent: "embed[vspace]",
style: "width:95px", label: a.lang.flash.vSpace, validate: CKEDITOR.dialog.validate.integer(a.lang.flash.validateVSpace), setup: b, commit: c}
]},
{type: "vbox", children: [
{type: "html", id: "preview", style: "width:95%;", html: f}
]}
]},
{id: "Upload", hidden: !0, filebrowser: "uploadButton", label: a.lang.common.upload, elements: [
{type: "file", id: "upload", label: a.lang.common.upload, size: 38},
{type: "fileButton", id: "uploadButton", label: a.lang.common.uploadSubmit, filebrowser: "info:src", "for": ["Upload", "upload"]}
]},
{id: "properties",
label: a.lang.flash.propertiesTab, elements: [
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "scale", type: "select", requiredContent: "embed[scale]", label: a.lang.flash.scale, "default": "", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.flash.scaleAll, "showall"],
[a.lang.flash.scaleNoBorder, "noborder"],
[a.lang.flash.scaleFit, "exactfit"]
], setup: b, commit: c},
{id: "allowScriptAccess", type: "select", requiredContent: "embed[allowscriptaccess]", label: a.lang.flash.access, "default": "", style: "width : 100%;",
items: [
[a.lang.common.notSet, ""],
[a.lang.flash.accessAlways, "always"],
[a.lang.flash.accessSameDomain, "samedomain"],
[a.lang.flash.accessNever, "never"]
], setup: b, commit: c}
]},
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "wmode", type: "select", requiredContent: "embed[wmode]", label: a.lang.flash.windowMode, "default": "", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.flash.windowModeWindow, "window"],
[a.lang.flash.windowModeOpaque, "opaque"],
[a.lang.flash.windowModeTransparent, "transparent"]
],
setup: b, commit: c},
{id: "quality", type: "select", requiredContent: "embed[quality]", label: a.lang.flash.quality, "default": "high", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.flash.qualityBest, "best"],
[a.lang.flash.qualityHigh, "high"],
[a.lang.flash.qualityAutoHigh, "autohigh"],
[a.lang.flash.qualityMedium, "medium"],
[a.lang.flash.qualityAutoLow, "autolow"],
[a.lang.flash.qualityLow, "low"]
], setup: b, commit: c}
]},
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "align", type: "select", requiredContent: "object[align]",
label: a.lang.common.align, "default": "", style: "width : 100%;", items: [
[a.lang.common.notSet, ""],
[a.lang.common.alignLeft, "left"],
[a.lang.flash.alignAbsBottom, "absBottom"],
[a.lang.flash.alignAbsMiddle, "absMiddle"],
[a.lang.flash.alignBaseline, "baseline"],
[a.lang.common.alignBottom, "bottom"],
[a.lang.common.alignMiddle, "middle"],
[a.lang.common.alignRight, "right"],
[a.lang.flash.alignTextTop, "textTop"],
[a.lang.common.alignTop, "top"]
], setup: b, commit: function (a, b, f, g, i) {
var j = this.getValue();
c.apply(this, arguments);
j && (i.align = j)
}},
{type: "html", html: "<div></div>"}
]},
{type: "fieldset", label: CKEDITOR.tools.htmlEncode(a.lang.flash.flashvars), children: [
{type: "vbox", padding: 0, children: [
{type: "checkbox", id: "menu", label: a.lang.flash.chkMenu, "default": !0, setup: b, commit: c},
{type: "checkbox", id: "play", label: a.lang.flash.chkPlay, "default": !0, setup: b, commit: c},
{type: "checkbox", id: "loop", label: a.lang.flash.chkLoop, "default": !0, setup: b, commit: c},
{type: "checkbox", id: "allowFullScreen", label: a.lang.flash.chkFull, "default": !0,
setup: b, commit: c}
]}
]}
]},
{id: "advanced", label: a.lang.common.advancedTab, elements: [
{type: "hbox", children: [
{type: "text", id: "id", requiredContent: "object[id]", label: a.lang.common.id, setup: b, commit: c}
]},
{type: "hbox", widths: ["45%", "55%"], children: [
{type: "text", id: "bgcolor", requiredContent: "embed[bgcolor]", label: a.lang.flash.bgcolor, setup: b, commit: c},
{type: "text", id: "class", requiredContent: "embed(cke-xyz)", label: a.lang.common.cssClass, setup: b, commit: c}
]},
{type: "text", id: "style", requiredContent: "embed{cke-xyz}",
validate: CKEDITOR.dialog.validate.inlineStyle(a.lang.common.invalidInlineStyle), label: a.lang.common.cssStyle, setup: b, commit: c}
]}
]}
})
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2170,7 +2170,7 @@ ul.messages-for-user-reply li {
left: 115px;
padding-bottom: 5px;
position: absolute;
top: 40px;
top: 0px;
font-size: 1.1em;
margin: 0px auto;
padding: 0px 0px;