GitlabVersion
nwb 11 years ago
commit 62af03debd

@ -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
#增加作业按评分排序,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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 one or more lines are too long

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

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

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

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

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

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

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save