From c2ff861fbaca5d6c879745da81d3fa042075abd3 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 22 Jul 2014 14:29:45 +0800
Subject: [PATCH 1/6] =?UTF-8?q?1.=E5=BD=93=E4=BD=9C=E4=B8=9A=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E5=88=97=E8=A1=A8=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=8A=A5?=
=?UTF-8?q?403=E9=94=99=E6=8F=90=E7=A4=BA=E6=94=B9=E4=B8=BAalert=E6=8F=90?=
=?UTF-8?q?=E7=A4=BA=202.=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E5=90=8E=E7=BB=99=E5=87=BAjs=E6=8F=90=E7=A4=BA?=
=?UTF-8?q?=EF=BC=9A=E6=9A=82=E6=97=B6=E4=B8=8D=E8=83=BD=E4=B8=8B=E8=BD=BD?=
=?UTF-8?q?=E6=AD=A4=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/zipdown_controller.rb | 4 ++--
app/views/bids/_homework_list.html.erb | 2 +-
app/views/zipdown/file_not_fond.js.erb | 1 +
app/views/zipdown/no_file_dowmload.js.erb | 1 +
4 files changed, 5 insertions(+), 3 deletions(-)
create mode 100644 app/views/zipdown/file_not_fond.js.erb
create mode 100644 app/views/zipdown/no_file_dowmload.js.erb
diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb
index 16e6ea870..9e1676474 100644
--- a/app/controllers/zipdown_controller.rb
+++ b/app/controllers/zipdown_controller.rb
@@ -43,7 +43,7 @@ class ZipdownController < ApplicationController
zipfile = zip_homework_by_user homework
send_file zipfile, :filename => homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile)
else
- render_403 :message => :no_file_dowmload
+ render file: 'zipdown/no_file_dowmload.js.erb'
end
else
render_403 :message =>:notice_file_not_found
@@ -52,7 +52,7 @@ class ZipdownController < ApplicationController
render_403 :message => :notice_not_authorized
end
rescue => e
- render file: 'public/file_not_found.html'
+ render file: 'zipdown/file_not_fond.js.erb'
end
private
diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb
index b58f918df..2009d1252 100644
--- a/app/views/bids/_homework_list.html.erb
+++ b/app/views/bids/_homework_list.html.erb
@@ -106,7 +106,7 @@
提交文件:
<% if is_evaluation || is_teacher%>
- <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
+ <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework, :remote => true%>
<% else %>
未开启互评功能作业不允许下载
<% end %>
diff --git a/app/views/zipdown/file_not_fond.js.erb b/app/views/zipdown/file_not_fond.js.erb
new file mode 100644
index 000000000..28b6d886f
--- /dev/null
+++ b/app/views/zipdown/file_not_fond.js.erb
@@ -0,0 +1 @@
+alert("对不起,这个文件暂时不能下载。 ");
\ No newline at end of file
diff --git a/app/views/zipdown/no_file_dowmload.js.erb b/app/views/zipdown/no_file_dowmload.js.erb
new file mode 100644
index 000000000..372da5ac5
--- /dev/null
+++ b/app/views/zipdown/no_file_dowmload.js.erb
@@ -0,0 +1 @@
+alert('<%=l(:no_file_dowmload)%>');
\ No newline at end of file
From a7debdae98dad13b4aca0c55543fc997c6ae6dfe Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 23 Jul 2014 09:16:06 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_users.html.erb | 42 +-
app/views/memos/show.html.erb | 10 +-
app/views/users/_score_new_index.html.erb | 44 +-
app/views/users/_show_new_score.html.erb | 42 +-
.../assets/javascripts/application.js | 16612 +++++++++++++++-
5 files changed, 15661 insertions(+), 1089 deletions(-)
diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb
index 45d76a57c..aa0e66ed8 100644
--- a/app/views/layouts/base_users.html.erb
+++ b/app/views/layouts/base_users.html.erb
@@ -93,30 +93,30 @@
- <% messages_count = @user.messages.count %>
- <% messages_score = messages_count * 0.05%>
- <% finall_messages_score = messages_score %>
+ <%# messages_count = @user.messages.count %>
+ <%# messages_score = messages_count * 0.05%>
+ <%# finall_messages_score = messages_score %>
- <% journals_count = @user.journals.count %>
- <% journals_score = journals_count * 0.1 %>
- <% user_changesets_count = @user.changesets.count %>
- <% user_changesets_score = user_changesets_count * 0.3 %>
- <% finall_user_project_score = journals_score + user_changesets_score %>
+ <%# journals_count = @user.journals.count %>
+ <%# journals_score = journals_count * 0.1 %>
+ <%# user_changesets_count = @user.changesets.count %>
+ <%# user_changesets_score = user_changesets_count * 0.3 %>
+ <%# finall_user_project_score = journals_score + user_changesets_score %>
- <% journals_for_messages_count = @user.journals_messages.count %>
- <% activities_count = @user.activities.count %>
- <% journals_for_messages_score = journals_for_messages_count * 0.05 %>
- <% activities_score = activities_count * 0.2 %>
- <% finall_activity_score = journals_for_messages_score + activities_score %>
+ <%# journals_for_messages_count = @user.journals_messages.count %>
+ <%# activities_count = @user.activities.count %>
+ <%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
+ <%# activities_score = activities_count * 0.2 %>
+ <%# finall_activity_score = journals_for_messages_score + activities_score %>
- <% news_count = @user.news.count %>
- <% news_score = news_count * 0.1 %>
- <% wiki_contents_count = @user.wiki_contents.count %>
- <% wiki_contents_score = wiki_contents_count * 0.1 %>
- <% comments_count = @user.comments.count %>
- <% comments_score = comments_count * 0.1 %>
- <% finall_influence_score = news_score + wiki_contents_score + comments_score %>
- <% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
+ <%# news_count = @user.news.count %>
+ <%# news_score = news_count * 0.1 %>
+ <%# wiki_contents_count = @user.wiki_contents.count %>
+ <%# wiki_contents_score = wiki_contents_count * 0.1 %>
+ <%# comments_count = @user.comments.count %>
+ <%# comments_score = comments_count * 0.1 %>
+ <%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
+ <%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 830f18d85..2c3248d06 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -7,7 +7,7 @@
-
+
-
-<% messages_count = @user.messages.count %>
-<% messages_score = messages_count * 0.05%>
-<% finall_messages_score = messages_score %>
+<%# messages_count = @user.messages.count %>
+<%# messages_score = messages_count * 0.05%>
+<%# finall_messages_score = messages_score %>
-<% journals_count = @user.journals.count %>
-<% journals_score = journals_count * 0.1 %>
-<% user_changesets_count = @user.changesets.count %>
-<% user_changesets_score = user_changesets_count * 0.3 %>
-<% finall_user_project_score = journals_score + user_changesets_score %>
+<%# journals_count = @user.journals.count %>
+<%# journals_score = journals_count * 0.1 %>
+<%# user_changesets_count = @user.changesets.count %>
+<%# user_changesets_score = user_changesets_count * 0.3 %>
+<%# finall_user_project_score = journals_score + user_changesets_score %>
-<% journals_for_messages_count = @user.journals_messages.count %>
-<% activities_count = @user.activities.count %>
-<% journals_for_messages_score = journals_for_messages_count * 0.05 %>
-<% activities_score = activities_count * 0.2 %>
-<% finall_activity_score = journals_for_messages_score + activities_score %>
+<%# journals_for_messages_count = @user.journals_messages.count %>
+<%# activities_count = @user.activities.count %>
+<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
+<%# activities_score = activities_count * 0.2 %>
+<%# finall_activity_score = journals_for_messages_score + activities_score %>
-<% news_count = @user.news.count %>
-<% news_score = news_count * 0.1 %>
-<% wiki_contents_count = @user.wiki_contents.count %>
-<% wiki_contents_score = wiki_contents_count * 0.1 %>
-<% comments_count = @user.comments.count %>
-<% comments_score = comments_count * 0.1 %>
-<% finall_influence_score = news_score + wiki_contents_score + comments_score %>
-<% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
+<%# news_count = @user.news.count %>
+<%# news_score = news_count * 0.1 %>
+<%# wiki_contents_count = @user.wiki_contents.count %>
+<%# wiki_contents_score = wiki_contents_count * 0.1 %>
+<%# comments_count = @user.comments.count %>
+<%# comments_score = comments_count * 0.1 %>
+<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
+<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
<%= l(:label_user_score) %>
= <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> +
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %>
-
+
= <%= format("%.2f" ,@user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_i %> + <%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence ).to_i %>
+ <%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_i %> + <%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_i %>
= <%= format("%.2f" ,@user.user_score_attr.total_score.nil? ? 0:@user.user_score_attr.total_score).to_i %>
diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb
index fddca46ac..e9ca499f4 100644
--- a/app/views/users/_show_new_score.html.erb
+++ b/app/views/users/_show_new_score.html.erb
@@ -1,28 +1,28 @@
-<% messages_count = @user.messages.count %>
-<% messages_score = messages_count * 0.05%>
-<% finall_messages_score = messages_score %>
+<%# messages_count = @user.messages.count %>
+<%# messages_score = messages_count * 0.05%>
+<%# finall_messages_score = messages_score %>
-<% journals_count = @user.journals.count %>
-<% journals_score = journals_count * 0.1 %>
-<% user_changesets_count = @user.changesets.count %>
-<% user_changesets_score = user_changesets_count * 0.3 %>
-<% finall_user_project_score = journals_score + user_changesets_score %>
+<%# journals_count = @user.journals.count %>
+<%# journals_score = journals_count * 0.1 %>
+<%# user_changesets_count = @user.changesets.count %>
+<%# user_changesets_score = user_changesets_count * 0.3 %>
+<%# finall_user_project_score = journals_score + user_changesets_score %>
-<% journals_for_messages_count = @user.journals_messages.count %>
-<% activities_count = @user.activities.count %>
-<% journals_for_messages_score = journals_for_messages_count * 0.05 %>
-<% activities_score = activities_count * 0.2 %>
-<% finall_activity_score = journals_for_messages_score + activities_score %>
+<%# journals_for_messages_count = @user.journals_messages.count %>
+<%# activities_count = @user.activities.count %>
+<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
+<%# activities_score = activities_count * 0.2 %>
+<%# finall_activity_score = journals_for_messages_score + activities_score %>
-<% news_count = @user.news.count %>
-<% news_score = news_count * 0.1 %>
-<% wiki_contents_count = @user.wiki_contents.count %>
-<% wiki_contents_score = wiki_contents_count * 0.1 %>
-<% comments_count = @user.comments.count %>
-<% comments_score = comments_count * 0.1 %>
-<% finall_influence_score = news_score + wiki_contents_score + comments_score %>
-<% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
+<%# news_count = @user.news.count %>
+<%# news_score = news_count * 0.1 %>
+<%# wiki_contents_count = @user.wiki_contents.count %>
+<%# wiki_contents_score = wiki_contents_count * 0.1 %>
+<%# comments_count = @user.comments.count %>
+<%# comments_score = comments_count * 0.1 %>
+<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
+<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
<%= l(:label_user_score) %>
diff --git a/plugins/redmine_ckeditor/assets/javascripts/application.js b/plugins/redmine_ckeditor/assets/javascripts/application.js
index 03752bc9c..f7ca07ce9 100644
--- a/plugins/redmine_ckeditor/assets/javascripts/application.js
+++ b/plugins/redmine_ckeditor/assets/javascripts/application.js
@@ -1,992 +1,15566 @@
-
/*
-Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
-For licensing, see LICENSE.html or http://ckeditor.com/license
-*/
-
-(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E0LB",version:"4.3.2",revision:"ba625e6",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var d=document.getElementsByTagName("script"),a=0;a =0;o--)if(n[o].priority<=m){n.splice(o+1,0,j);return{removeListener:i}}n.unshift(j)}return{removeListener:i}},
-once:function(){var b=arguments[1];arguments[1]=function(d){d.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,d=function(){b=1},a=0,h=function(){a=1};return function(m,j,i){var n=e(this)[m],m=b,r=a;b=a=0;if(n){var o=n.listeners;if(o.length)for(var o=o.slice(0),u,f=0;f=0&&a.listeners.splice(h,1)}},removeAllListeners:function(){var b=e(this),d;for(d in b)delete b[d]},hasListeners:function(b){return(b=e(this)[b])&&b.listeners.length>0}}}());
-CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
-CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e=window.opera,b={ie:a.indexOf("trident/")>-1,opera:!!e&&e.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var d=document.domain,b=window.location.hostname;return d!=
-b&&d!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko){var d=a.match(/rv:([\d\.]+)/);if(d){d=d[1].split(".");c=d[0]*1E4+(d[1]||0)*100+(d[2]||0)*1}}b.opera&&(c=parseFloat(e.version()));
-b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=b.iOS&&c>=534||!b.mobile&&(b.ie&&c>6||b.gecko&&c>=10801||b.opera&&c>=9.5||b.air&&c>=1||b.webkit&&c>=522||false);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";
-if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(c<10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(c<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}());
-"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=
-CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={};
-(function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var d=0;d"+a+""):d.push('');return d.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var d=a(b);d.prototype=b.prototype;return d},setTimeout:function(b,a,d,g,e){e||(e=window);d||(d=e);return e.setTimeout(function(){g?b.apply(d,[].concat(g)):
-b.apply(d)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var d=0,g=b.length;d=0?b[d]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,d=b.base,g=b.privates||b._,e=b.proto,b=b.statics;!a&&(a=function(){d&&this.base.apply(this,arguments)});if(g)var m=a,a=function(){var d=this._||(this._={}),a;for(a in g){var b=g[a];d[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}m.apply(this,arguments)};if(d){a.prototype=this.prototypedCopy(d.prototype);a.prototype.constructor=a;a.base=
-d;a.baseProto=d.prototype;a.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}e&&this.extend(a.prototype,e,true);b&&this.extend(a,b,true);return a},addFunction:function(b,c){return a.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var c=a[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(d){c=
-CKEDITOR.tools.trim(d+"")+"px";return a.test(c)?c:d||""}}(),convertToPx:function(){var a;return function(c){if(!a){a=CKEDITOR.dom.element.createFromHtml('',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(c)){a.setStyle("width",c);return a.$.clientWidth}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,d=arguments.length;c8)&&e)a=e+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=
-a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$&\n
+ <%#= f.text_area :description, :rows => 15, :class => 'wiki-edit', :id => 'editor01' %>
+ -->
+
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
From 37802e81de1caddf79b2ce38cba60bd9b2c53bb8 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 24 Jul 2014 14:03:43 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCKEditor=E6=8F=92?=
=?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../assets/javascripts/application.js | 16552 +---------------
.../javascripts/application.js | 2026 +-
2 files changed, 2003 insertions(+), 16575 deletions(-)
diff --git a/plugins/redmine_ckeditor/assets/javascripts/application.js b/plugins/redmine_ckeditor/assets/javascripts/application.js
index f7ca07ce9..b5679d111 100644
--- a/plugins/redmine_ckeditor/assets/javascripts/application.js
+++ b/plugins/redmine_ckeditor/assets/javascripts/application.js
@@ -1,15566 +1,992 @@
-/*
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
- For licensing, see LICENSE.html or http://ckeditor.com/license
- */
-
-(function () {
- if (window.CKEDITOR && window.CKEDITOR.dom)return;
- window.CKEDITOR || (window.CKEDITOR = function () {
- var a = {timestamp: "E0LB", version: "4.3.2", revision: "ba625e6", rnd: Math.floor(900 * Math.random()) + 100, _: {pending: []}, status: "unloaded", basePath: function () {
- var b = window.CKEDITOR_BASEPATH || "";
- if (!b)for (var d = document.getElementsByTagName("script"), a = 0; a < d.length; a++) {
- var e = d[a].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);
- if (e) {
- b = e[1];
- break
- }
- }
- -1 == b.indexOf(":/") && "//" != b.slice(0, 2) && (b = 0 === b.indexOf("/") ? location.href.match(/^.*?:\/\/[^\/]*/)[0] +
- b : location.href.match(/^[^\?]*\/(?:)/)[0] + b);
- if (!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';
- return b
- }(), getUrl: function (b) {
- -1 == b.indexOf(":/") && 0 !== b.indexOf("/") && (b = this.basePath + b);
- this.timestamp && ("/" != b.charAt(b.length - 1) && !/[&?]t=/.test(b)) && (b += (0 <= b.indexOf("?") ? "&" : "?") + "t=" + this.timestamp);
- return b
- }, domReady: function () {
- function b() {
- try {
- document.addEventListener ? (document.removeEventListener("DOMContentLoaded",
- b, !1), d()) : document.attachEvent && "complete" === document.readyState && (document.detachEvent("onreadystatechange", b), d())
- } catch (a) {
- }
- }
-
- function d() {
- for (var d; d = a.shift();)d()
- }
-
- var a = [];
- return function (d) {
- a.push(d);
- "complete" === document.readyState && setTimeout(b, 1);
- if (1 == a.length)if (document.addEventListener)document.addEventListener("DOMContentLoaded", b, !1), window.addEventListener("load", b, !1); else if (document.attachEvent) {
- document.attachEvent("onreadystatechange", b);
- window.attachEvent("onload", b);
- d = !1;
- try {
- d = !window.frameElement
- } catch (e) {
- }
- if (document.documentElement.doScroll && d) {
- var j = function () {
- try {
- document.documentElement.doScroll("left")
- } catch (d) {
- setTimeout(j, 1);
- return
- }
- b()
- };
- j()
- }
- }
- }
- }()}, e = window.CKEDITOR_GETURL;
- if (e) {
- var b = a.getUrl;
- a.getUrl = function (c) {
- return e.call(a, c) || b.call(a, c)
- }
- }
- return a
- }());
- CKEDITOR.event || (CKEDITOR.event = function () {
- }, CKEDITOR.event.implementOn = function (a) {
- var e = CKEDITOR.event.prototype, b;
- for (b in e)a[b] == void 0 && (a[b] = e[b])
- }, CKEDITOR.event.prototype = function () {
- function a(a) {
- var d = e(this);
- return d[a] || (d[a] = new b(a))
- }
-
- var e = function (b) {
- b = b.getPrivate && b.getPrivate() || b._ || (b._ = {});
- return b.events || (b.events = {})
- }, b = function (b) {
- this.name = b;
- this.listeners = []
- };
- b.prototype = {getListenerIndex: function (b) {
- for (var d = 0, a = this.listeners; d < a.length; d++)if (a[d].fn == b)return d;
- return-1
- }};
- return{define: function (b, d) {
- var g = a.call(this, b);
- CKEDITOR.tools.extend(g, d, true)
- }, on: function (b, d, g, e, m) {
- function j(a, f, n, r) {
- a = {name: b, sender: this, editor: a, data: f, listenerData: e, stop: n, cancel: r, removeListener: i};
- return d.call(g, a) === false ? false : a.data
- }
-
- function i() {
- r.removeListener(b, d)
- }
-
- var n = a.call(this, b);
- if (n.getListenerIndex(d) < 0) {
- n = n.listeners;
- g || (g = this);
- isNaN(m) && (m = 10);
- var r = this;
- j.fn = d;
- j.priority = m;
- for (var o = n.length - 1; o >= 0; o--)if (n[o].priority <= m) {
- n.splice(o + 1, 0, j);
- return{removeListener: i}
- }
- n.unshift(j)
- }
- return{removeListener: i}
- },
- once: function () {
- var b = arguments[1];
- arguments[1] = function (d) {
- d.removeListener();
- return b.apply(this, arguments)
- };
- return this.on.apply(this, arguments)
- }, capture: function () {
- CKEDITOR.event.useCapture = 1;
- var b = this.on.apply(this, arguments);
- CKEDITOR.event.useCapture = 0;
- return b
- }, fire: function () {
- var b = 0, d = function () {
- b = 1
- }, a = 0, h = function () {
- a = 1
- };
- return function (m, j, i) {
- var n = e(this)[m], m = b, r = a;
- b = a = 0;
- if (n) {
- var o = n.listeners;
- if (o.length)for (var o = o.slice(0), u, f = 0; f < o.length; f++) {
- if (n.errorProof)try {
- u = o[f].call(this,
- i, j, d, h)
- } catch (s) {
- } else u = o[f].call(this, i, j, d, h);
- u === false ? a = 1 : typeof u != "undefined" && (j = u);
- if (b || a)break
- }
- }
- j = a ? false : typeof j == "undefined" ? true : j;
- b = m;
- a = r;
- return j
- }
- }(), fireOnce: function (b, d, a) {
- d = this.fire(b, d, a);
- delete e(this)[b];
- return d
- }, removeListener: function (b, d) {
- var a = e(this)[b];
- if (a) {
- var h = a.getListenerIndex(d);
- h >= 0 && a.listeners.splice(h, 1)
- }
- }, removeAllListeners: function () {
- var b = e(this), d;
- for (d in b)delete b[d]
- }, hasListeners: function (b) {
- return(b = e(this)[b]) && b.listeners.length > 0
- }}
- }());
- CKEDITOR.editor || (CKEDITOR.editor = function () {
- CKEDITOR._.pending.push([this, arguments]);
- CKEDITOR.event.call(this)
- }, CKEDITOR.editor.prototype.fire = function (a, e) {
- a in{instanceReady: 1, loaded: 1} && (this[a] = true);
- return CKEDITOR.event.prototype.fire.call(this, a, e, this)
- }, CKEDITOR.editor.prototype.fireOnce = function (a, e) {
- a in{instanceReady: 1, loaded: 1} && (this[a] = true);
- return CKEDITOR.event.prototype.fireOnce.call(this, a, e, this)
- }, CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
- CKEDITOR.env || (CKEDITOR.env = function () {
- var a = navigator.userAgent.toLowerCase(), e = window.opera, b = {ie: a.indexOf("trident/") > -1, opera: !!e && e.version, webkit: a.indexOf(" applewebkit/") > -1, air: a.indexOf(" adobeair/") > -1, mac: a.indexOf("macintosh") > -1, quirks: document.compatMode == "BackCompat" && (!document.documentMode || document.documentMode < 10), mobile: a.indexOf("mobile") > -1, iOS: /(ipad|iphone|ipod)/.test(a), isCustomDomain: function () {
- if (!this.ie)return false;
- var d = document.domain, b = window.location.hostname;
- return d !=
- b && d != "[" + b + "]"
- }, secure: location.protocol == "https:"};
- b.gecko = navigator.product == "Gecko" && !b.webkit && !b.opera && !b.ie;
- if (b.webkit)a.indexOf("chrome") > -1 ? b.chrome = true : b.safari = true;
- var c = 0;
- if (b.ie) {
- c = b.quirks || !document.documentMode ? parseFloat(a.match(/msie (\d+)/)[1]) : document.documentMode;
- b.ie9Compat = c == 9;
- b.ie8Compat = c == 8;
- b.ie7Compat = c == 7;
- b.ie6Compat = c < 7 || b.quirks
- }
- if (b.gecko) {
- var d = a.match(/rv:([\d\.]+)/);
- if (d) {
- d = d[1].split(".");
- c = d[0] * 1E4 + (d[1] || 0) * 100 + (d[2] || 0) * 1
- }
- }
- b.opera && (c = parseFloat(e.version()));
- b.air && (c = parseFloat(a.match(/ adobeair\/(\d+)/)[1]));
- b.webkit && (c = parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));
- b.version = c;
- b.isCompatible = b.iOS && c >= 534 || !b.mobile && (b.ie && c > 6 || b.gecko && c >= 10801 || b.opera && c >= 9.5 || b.air && c >= 1 || b.webkit && c >= 522 || false);
- b.hidpi = window.devicePixelRatio >= 2;
- b.needsBrFiller = b.gecko || b.webkit || b.ie && c > 10;
- b.needsNbspFiller = b.ie && c < 11;
- b.cssClass = "cke_browser_" + (b.ie ? "ie" : b.gecko ? "gecko" : b.opera ? "opera" : b.webkit ? "webkit" : "unknown");
- if (b.quirks)b.cssClass = b.cssClass + " cke_browser_quirks";
- if (b.ie) {
- b.cssClass = b.cssClass + (" cke_browser_ie" + (b.quirks || b.version < 7 ? "6" : b.version));
- if (b.quirks)b.cssClass = b.cssClass + " cke_browser_iequirks"
- }
- if (b.gecko)if (c < 10900)b.cssClass = b.cssClass + " cke_browser_gecko18"; else if (c <= 11E3)b.cssClass = b.cssClass + " cke_browser_gecko19";
- if (b.air)b.cssClass = b.cssClass + " cke_browser_air";
- if (b.iOS)b.cssClass = b.cssClass + " cke_browser_ios";
- if (b.hidpi)b.cssClass = b.cssClass + " cke_hidpi";
- return b
- }());
- "unloaded" == CKEDITOR.status && function () {
- CKEDITOR.event.implementOn(CKEDITOR);
- CKEDITOR.loadFullCore = function () {
- if (CKEDITOR.status != "basic_ready")CKEDITOR.loadFullCore._load = 1; else {
- delete CKEDITOR.loadFullCore;
- var a = document.createElement("script");
- a.type = "text/javascript";
- a.src = CKEDITOR.basePath + "ckeditor.js";
- document.getElementsByTagName("head")[0].appendChild(a)
- }
- };
- CKEDITOR.loadFullCoreTimeout = 0;
- CKEDITOR.add = function (a) {
- (this._.pending || (this._.pending = [])).push(a)
- };
- (function () {
- CKEDITOR.domReady(function () {
- var a =
- CKEDITOR.loadFullCore, e = CKEDITOR.loadFullCoreTimeout;
- if (a) {
- CKEDITOR.status = "basic_ready";
- a && a._load ? a() : e && setTimeout(function () {
- CKEDITOR.loadFullCore && CKEDITOR.loadFullCore()
- }, e * 1E3)
- }
- })
- })();
- CKEDITOR.status = "basic_loaded"
- }();
- CKEDITOR.dom = {};
- (function () {
- var a = [], e = CKEDITOR.env.gecko ? "-moz-" : CKEDITOR.env.webkit ? "-webkit-" : CKEDITOR.env.opera ? "-o-" : CKEDITOR.env.ie ? "-ms-" : "";
- CKEDITOR.on("reset", function () {
- a = []
- });
- CKEDITOR.tools = {arrayCompare: function (b, a) {
- if (!b && !a)return true;
- if (!b || !a || b.length != a.length)return false;
- for (var d = 0; d < b.length; d++)if (b[d] != a[d])return false;
- return true
- }, clone: function (b) {
- var a;
- if (b && b instanceof Array) {
- a = [];
- for (var d = 0; d < b.length; d++)a[d] = CKEDITOR.tools.clone(b[d]);
- return a
- }
- if (b === null || typeof b != "object" ||
- b instanceof String || b instanceof Number || b instanceof Boolean || b instanceof Date || b instanceof RegExp)return b;
- a = new b.constructor;
- for (d in b)a[d] = CKEDITOR.tools.clone(b[d]);
- return a
- }, capitalize: function (b, a) {
- return b.charAt(0).toUpperCase() + (a ? b.slice(1) : b.slice(1).toLowerCase())
- }, extend: function (b) {
- var a = arguments.length, d, g;
- if (typeof(d = arguments[a - 1]) == "boolean")a--; else if (typeof(d = arguments[a - 2]) == "boolean") {
- g = arguments[a - 1];
- a = a - 2
- }
- for (var e = 1; e < a; e++) {
- var m = arguments[e], j;
- for (j in m)if (d ===
- true || b[j] == void 0)if (!g || j in g)b[j] = m[j]
- }
- return b
- }, prototypedCopy: function (b) {
- var a = function () {
- };
- a.prototype = b;
- return new a
- }, copy: function (b) {
- var a = {}, d;
- for (d in b)a[d] = b[d];
- return a
- }, isArray: function (b) {
- return Object.prototype.toString.call(b) == "[object Array]"
- }, isEmpty: function (b) {
- for (var a in b)if (b.hasOwnProperty(a))return false;
- return true
- }, cssVendorPrefix: function (b, a, d) {
- if (d)return e + b + ":" + a + ";" + b + ":" + a;
- d = {};
- d[b] = a;
- d[e + b] = a;
- return d
- }, cssStyleToDomStyle: function () {
- var b = document.createElement("div").style,
- a = typeof b.cssFloat != "undefined" ? "cssFloat" : typeof b.styleFloat != "undefined" ? "styleFloat" : "float";
- return function (d) {
- return d == "float" ? a : d.replace(/-./g, function (d) {
- return d.substr(1).toUpperCase()
- })
- }
- }(), buildStyleHtml: function (b) {
- for (var b = [].concat(b), a, d = [], g = 0; g < b.length; g++)if (a = b[g])/
- @
- import|
- [
- {}
- ] /
- .
- test(a) ? d.push("") : d.push('');
- return d.join("")
- }, htmlEncode: function (b) {
- return("" + b).replace(/&/g, "&").replace(/>/g, ">").replace(//g, ">")
- }, htmlDecodeAttr: function (b) {
- return b.replace(/"/g, '"').replace(/</g, "<").replace(/>/g, ">")
- }, getNextNumber: function () {
- var b = 0;
- return function () {
- return++b
- }
- }(), getNextId: function () {
- return"cke_" + this.getNextNumber()
- }, override: function (b, a) {
- var d = a(b);
- d.prototype = b.prototype;
- return d
- }, setTimeout: function (b, a, d, g, e) {
- e || (e = window);
- d || (d = e);
- return e.setTimeout(function () {
- g ? b.apply(d, [].concat(g)) :
- b.apply(d)
- }, a || 0)
- }, trim: function () {
- var b = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
- return function (a) {
- return a.replace(b, "")
- }
- }(), ltrim: function () {
- var b = /^[ \t\n\r]+/g;
- return function (a) {
- return a.replace(b, "")
- }
- }(), rtrim: function () {
- var b = /[ \t\n\r]+$/g;
- return function (a) {
- return a.replace(b, "")
- }
- }(), indexOf: function (b, a) {
- if (typeof a == "function")for (var d = 0, g = b.length; d < g; d++) {
- if (a(b[d]))return d
- } else {
- if (b.indexOf)return b.indexOf(a);
- d = 0;
- for (g = b.length; d < g; d++)if (b[d] === a)return d
- }
- return-1
- }, search: function (b, a) {
- var d = CKEDITOR.tools.indexOf(b, a);
- return d >= 0 ? b[d] : null
- }, bind: function (b, a) {
- return function () {
- return b.apply(a, arguments)
- }
- }, createClass: function (b) {
- var a = b.$, d = b.base, g = b.privates || b._, e = b.proto, b = b.statics;
- !a && (a = function () {
- d && this.base.apply(this, arguments)
- });
- if (g)var m = a, a = function () {
- var d = this._ || (this._ = {}), a;
- for (a in g) {
- var b = g[a];
- d[a] = typeof b == "function" ? CKEDITOR.tools.bind(b, this) : b
- }
- m.apply(this, arguments)
- };
- if (d) {
- a.prototype = this.prototypedCopy(d.prototype);
- a.prototype.constructor = a;
- a.base =
- d;
- a.baseProto = d.prototype;
- a.prototype.base = function () {
- this.base = d.prototype.base;
- d.apply(this, arguments);
- this.base = arguments.callee
- }
- }
- e && this.extend(a.prototype, e, true);
- b && this.extend(a, b, true);
- return a
- }, addFunction: function (b, c) {
- return a.push(function () {
- return b.apply(c || this, arguments)
- }) - 1
- }, removeFunction: function (b) {
- a[b] = null
- }, callFunction: function (b) {
- var c = a[b];
- return c && c.apply(window, Array.prototype.slice.call(arguments, 1))
- }, cssLength: function () {
- var a = /^-?\d+\.?\d*px$/, c;
- return function (d) {
- c =
- CKEDITOR.tools.trim(d + "") + "px";
- return a.test(c) ? c : d || ""
- }
- }(), convertToPx: function () {
- var a;
- return function (c) {
- if (!a) {
- a = CKEDITOR.dom.element.createFromHtml('', CKEDITOR.document);
- CKEDITOR.document.getBody().append(a)
- }
- if (!/%$/.test(c)) {
- a.setStyle("width", c);
- return a.$.clientWidth
- }
- return c
- }
- }(), repeat: function (a, c) {
- return Array(c + 1).join(a)
- }, tryThese: function () {
- for (var a, c = 0, d = arguments.length; c < d; c++) {
- var g =
- arguments[c];
- try {
- a = g();
- break
- } catch (e) {
- }
- }
- return a
- }, genKey: function () {
- return Array.prototype.slice.call(arguments).join("-")
- }, defer: function (a) {
- return function () {
- var c = arguments, d = this;
- window.setTimeout(function () {
- a.apply(d, c)
- }, 0)
- }
- }, normalizeCssText: function (a, c) {
- var d = [], g, e = CKEDITOR.tools.parseCssText(a, true, c);
- for (g in e)d.push(g + ":" + e[g]);
- d.sort();
- return d.length ? d.join(";") + ";" : ""
- }, convertRgbToHex: function (a) {
- return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function (a, d, b, e) {
- a =
- [d, b, e];
- for (d = 0; d < 3; d++)a[d] = ("0" + parseInt(a[d], 10).toString(16)).slice(-2);
- return"#" + a.join("")
- })
- }, parseCssText: function (a, c, d) {
- var g = {};
- if (d) {
- d = new CKEDITOR.dom.element("span");
- d.setAttribute("style", a);
- a = CKEDITOR.tools.convertRgbToHex(d.getAttribute("style") || "")
- }
- if (!a || a == ";")return g;
- a.replace(/"/g, '"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function (a, d, b) {
- if (c) {
- d = d.toLowerCase();
- d == "font-family" && (b = b.toLowerCase().replace(/["']/g, "").replace(/\s*,\s*/g, ","));
- b = CKEDITOR.tools.trim(b)
- }
- g[d] =
- b
- });
- return g
- }, writeCssText: function (a, c) {
- var d, g = [];
- for (d in a)g.push(d + ":" + a[d]);
- c && g.sort();
- return g.join("; ")
- }, objectCompare: function (a, c, d) {
- var g;
- if (!a && !c)return true;
- if (!a || !c)return false;
- for (g in a)if (a[g] != c[g])return false;
- if (!d)for (g in c)if (a[g] != c[g])return false;
- return true
- }, objectKeys: function (a) {
- var c = [], d;
- for (d in a)c.push(d);
- return c
- }, convertArrayToObject: function (a, c) {
- var d = {};
- arguments.length == 1 && (c = true);
- for (var g = 0, e = a.length; g < e; ++g)d[a[g]] = c;
- return d
- }, fixDomain: function () {
- for (var a; ;)try {
- a =
- window.parent.document.domain;
- break
- } catch (c) {
- a = a ? a.replace(/.+?(?:\.|$)/, "") : document.domain;
- if (!a)break;
- document.domain = a
- }
- return!!a
- }, eventsBuffer: function (a, c) {
- function d() {
- e = (new Date).getTime();
- g = false;
- c()
- }
-
- var g, e = 0;
- return{input: function () {
- if (!g) {
- var c = (new Date).getTime() - e;
- c < a ? g = setTimeout(d, a - c) : d()
- }
- }, reset: function () {
- g && clearTimeout(g);
- g = e = 0
- }}
- }, enableHtml5Elements: function (a, c) {
- for (var d = ["abbr", "article", "aside", "audio", "bdi", "canvas", "data", "datalist", "details", "figcaption", "figure", "footer",
- "header", "hgroup", "mark", "meter", "nav", "output", "progress", "section", "summary", "time", "video"], g = d.length, e; g--;) {
- e = a.createElement(d[g]);
- c && a.appendChild(e)
- }
- }}
- })();
- CKEDITOR.dtd = function () {
- var a = CKEDITOR.tools.extend, e = function (a, d) {
- for (var b = CKEDITOR.tools.clone(a), g = 1; g < arguments.length; g++) {
- var d = arguments[g], c;
- for (c in d)delete b[c]
- }
- return b
- }, b = {}, c = {}, d = {address: 1, article: 1, aside: 1, blockquote: 1, details: 1, div: 1, dl: 1, fieldset: 1, figure: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, hr: 1, menu: 1, nav: 1, ol: 1, p: 1, pre: 1, section: 1, table: 1, ul: 1}, g = {command: 1, link: 1, meta: 1, noscript: 1, script: 1, style: 1}, h = {}, m = {"#": 1}, j = {center: 1, dir: 1, noframes: 1};
- a(b, {a: 1, abbr: 1, area: 1, audio: 1, b: 1, bdi: 1, bdo: 1, br: 1, button: 1, canvas: 1, cite: 1, code: 1, command: 1, datalist: 1, del: 1, dfn: 1, em: 1, embed: 1, i: 1, iframe: 1, img: 1, input: 1, ins: 1, kbd: 1, keygen: 1, label: 1, map: 1, mark: 1, meter: 1, noscript: 1, object: 1, output: 1, progress: 1, q: 1, ruby: 1, s: 1, samp: 1, script: 1, select: 1, small: 1, span: 1, strong: 1, sub: 1, sup: 1, textarea: 1, time: 1, u: 1, "var": 1, video: 1, wbr: 1}, m, {acronym: 1, applet: 1, basefont: 1, big: 1, font: 1, isindex: 1, strike: 1, style: 1, tt: 1});
- a(c, d, b, j);
- e = {a: e(b, {a: 1, button: 1}), abbr: b, address: c,
- area: h, article: a({style: 1}, c), aside: a({style: 1}, c), audio: a({source: 1, track: 1}, c), b: b, base: h, bdi: b, bdo: b, blockquote: c, body: c, br: h, button: e(b, {a: 1, button: 1}), canvas: b, caption: c, cite: b, code: b, col: h, colgroup: {col: 1}, command: h, datalist: a({option: 1}, b), dd: c, del: b, details: a({summary: 1}, c), dfn: b, div: a({style: 1}, c), dl: {dt: 1, dd: 1}, dt: c, em: b, embed: h, fieldset: a({legend: 1}, c), figcaption: c, figure: a({figcaption: 1}, c), footer: c, form: c, h1: b, h2: b, h3: b, h4: b, h5: b, h6: b, head: a({title: 1, base: 1}, g), header: c, hgroup: {h1: 1,
- h2: 1, h3: 1, h4: 1, h5: 1, h6: 1}, hr: h, html: a({head: 1, body: 1}, c, g), i: b, iframe: m, img: h, input: h, ins: b, kbd: b, keygen: h, label: b, legend: b, li: c, link: h, map: c, mark: b, menu: a({li: 1}, c), meta: h, meter: e(b, {meter: 1}), nav: c, noscript: a({link: 1, meta: 1, style: 1}, b), object: a({param: 1}, b), ol: {li: 1}, optgroup: {option: 1}, option: m, output: b, p: b, param: h, pre: b, progress: e(b, {progress: 1}), q: b, rp: b, rt: b, ruby: a({rp: 1, rt: 1}, b), s: b, samp: b, script: m, section: a({style: 1}, c), select: {optgroup: 1, option: 1}, small: b, source: h, span: b, strong: b, style: m,
- sub: b, summary: b, sup: b, table: {caption: 1, colgroup: 1, thead: 1, tfoot: 1, tbody: 1, tr: 1}, tbody: {tr: 1}, td: c, textarea: m, tfoot: {tr: 1}, th: c, thead: {tr: 1}, time: e(b, {time: 1}), title: m, tr: {th: 1, td: 1}, track: h, u: b, ul: {li: 1}, "var": b, video: a({source: 1, track: 1}, c), wbr: h, acronym: b, applet: a({param: 1}, c), basefont: h, big: b, center: c, dialog: h, dir: {li: 1}, font: b, isindex: h, noframes: c, strike: b, tt: b};
- a(e, {$block: a({audio: 1, dd: 1, dt: 1, figcaption: 1, li: 1, video: 1}, d, j), $blockLimit: {article: 1, aside: 1, audio: 1, body: 1, caption: 1, details: 1, dir: 1,
- div: 1, dl: 1, fieldset: 1, figcaption: 1, figure: 1, footer: 1, form: 1, header: 1, hgroup: 1, menu: 1, nav: 1, ol: 1, section: 1, table: 1, td: 1, th: 1, tr: 1, ul: 1, video: 1}, $cdata: {script: 1, style: 1}, $editable: {address: 1, article: 1, aside: 1, blockquote: 1, body: 1, details: 1, div: 1, fieldset: 1, figcaption: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, nav: 1, p: 1, pre: 1, section: 1}, $empty: {area: 1, base: 1, basefont: 1, br: 1, col: 1, command: 1, dialog: 1, embed: 1, hr: 1, img: 1, input: 1, isindex: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1,
- wbr: 1}, $inline: b, $list: {dl: 1, ol: 1, ul: 1}, $listItem: {dd: 1, dt: 1, li: 1}, $nonBodyContent: a({body: 1, head: 1, html: 1}, e.head), $nonEditable: {applet: 1, audio: 1, button: 1, embed: 1, iframe: 1, map: 1, object: 1, option: 1, param: 1, script: 1, textarea: 1, video: 1}, $object: {applet: 1, audio: 1, button: 1, hr: 1, iframe: 1, img: 1, input: 1, object: 1, select: 1, table: 1, textarea: 1, video: 1}, $removeEmpty: {abbr: 1, acronym: 1, b: 1, bdi: 1, bdo: 1, big: 1, cite: 1, code: 1, del: 1, dfn: 1, em: 1, font: 1, i: 1, ins: 1, label: 1, kbd: 1, mark: 1, meter: 1, output: 1, q: 1, ruby: 1, s: 1, samp: 1,
- small: 1, span: 1, strike: 1, strong: 1, sub: 1, sup: 1, time: 1, tt: 1, u: 1, "var": 1}, $tabIndex: {a: 1, area: 1, button: 1, input: 1, object: 1, select: 1, textarea: 1}, $tableContent: {caption: 1, col: 1, colgroup: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1}, $transparent: {a: 1, audio: 1, canvas: 1, del: 1, ins: 1, map: 1, noscript: 1, object: 1, video: 1}, $intermediate: {caption: 1, colgroup: 1, dd: 1, dt: 1, figcaption: 1, legend: 1, li: 1, optgroup: 1, option: 1, rp: 1, rt: 1, summary: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1}});
- return e
- }();
- CKEDITOR.dom.event = function (a) {
- this.$ = a
- };
- CKEDITOR.dom.event.prototype = {getKey: function () {
- return this.$.keyCode || this.$.which
- }, getKeystroke: function () {
- var a = this.getKey();
- if (this.$.ctrlKey || this.$.metaKey)a = a + CKEDITOR.CTRL;
- this.$.shiftKey && (a = a + CKEDITOR.SHIFT);
- this.$.altKey && (a = a + CKEDITOR.ALT);
- return a
- }, preventDefault: function (a) {
- var e = this.$;
- e.preventDefault ? e.preventDefault() : e.returnValue = false;
- a && this.stopPropagation()
- }, stopPropagation: function () {
- var a = this.$;
- a.stopPropagation ? a.stopPropagation() : a.cancelBubble = true
- }, getTarget: function () {
- var a =
- this.$.target || this.$.srcElement;
- return a ? new CKEDITOR.dom.node(a) : null
- }, getPhase: function () {
- return this.$.eventPhase || 2
- }, getPageOffset: function () {
- var a = this.getTarget().getDocument().$;
- return{x: this.$.pageX || this.$.clientX + (a.documentElement.scrollLeft || a.body.scrollLeft), y: this.$.pageY || this.$.clientY + (a.documentElement.scrollTop || a.body.scrollTop)}
- }};
- CKEDITOR.CTRL = 1114112;
- CKEDITOR.SHIFT = 2228224;
- CKEDITOR.ALT = 4456448;
- CKEDITOR.EVENT_PHASE_CAPTURING = 1;
- CKEDITOR.EVENT_PHASE_AT_TARGET = 2;
- CKEDITOR.EVENT_PHASE_BUBBLING = 3;
- CKEDITOR.dom.domObject = function (a) {
- if (a)this.$ = a
- };
- CKEDITOR.dom.domObject.prototype = function () {
- var a = function (a, b) {
- return function (c) {
- typeof CKEDITOR != "undefined" && a.fire(b, new CKEDITOR.dom.event(c))
- }
- };
- return{getPrivate: function () {
- var a;
- if (!(a = this.getCustomData("_")))this.setCustomData("_", a = {});
- return a
- }, on: function (e) {
- var b = this.getCustomData("_cke_nativeListeners");
- if (!b) {
- b = {};
- this.setCustomData("_cke_nativeListeners", b)
- }
- if (!b[e]) {
- b = b[e] = a(this, e);
- this.$.addEventListener ? this.$.addEventListener(e, b, !!CKEDITOR.event.useCapture) : this.$.attachEvent &&
- this.$.attachEvent("on" + e, b)
- }
- return CKEDITOR.event.prototype.on.apply(this, arguments)
- }, removeListener: function (a) {
- CKEDITOR.event.prototype.removeListener.apply(this, arguments);
- if (!this.hasListeners(a)) {
- var b = this.getCustomData("_cke_nativeListeners"), c = b && b[a];
- if (c) {
- this.$.removeEventListener ? this.$.removeEventListener(a, c, false) : this.$.detachEvent && this.$.detachEvent("on" + a, c);
- delete b[a]
- }
- }
- }, removeAllListeners: function () {
- var a = this.getCustomData("_cke_nativeListeners"), b;
- for (b in a) {
- var c = a[b];
- this.$.detachEvent ?
- this.$.detachEvent("on" + b, c) : this.$.removeEventListener && this.$.removeEventListener(b, c, false);
- delete a[b]
- }
- }}
- }();
- (function (a) {
- var e = {};
- CKEDITOR.on("reset", function () {
- e = {}
- });
- a.equals = function (a) {
- try {
- return a && a.$ === this.$
- } catch (c) {
- return false
- }
- };
- a.setCustomData = function (a, c) {
- var d = this.getUniqueId();
- (e[d] || (e[d] = {}))[a] = c;
- return this
- };
- a.getCustomData = function (a) {
- var c = this.$["data-cke-expando"];
- return(c = c && e[c]) && a in c ? c[a] : null
- };
- a.removeCustomData = function (a) {
- var c = this.$["data-cke-expando"], c = c && e[c], d, g;
- if (c) {
- d = c[a];
- g = a in c;
- delete c[a]
- }
- return g ? d : null
- };
- a.clearCustomData = function () {
- this.removeAllListeners();
- var a = this.$["data-cke-expando"];
- a && delete e[a]
- };
- a.getUniqueId = function () {
- return this.$["data-cke-expando"] || (this.$["data-cke-expando"] = CKEDITOR.tools.getNextNumber())
- };
- CKEDITOR.event.implementOn(a)
- })(CKEDITOR.dom.domObject.prototype);
- CKEDITOR.dom.node = function (a) {
- return a ? new CKEDITOR.dom[a.nodeType == CKEDITOR.NODE_DOCUMENT ? "document" : a.nodeType == CKEDITOR.NODE_ELEMENT ? "element" : a.nodeType == CKEDITOR.NODE_TEXT ? "text" : a.nodeType == CKEDITOR.NODE_COMMENT ? "comment" : a.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? "documentFragment" : "domObject"](a) : this
- };
- CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject;
- CKEDITOR.NODE_ELEMENT = 1;
- CKEDITOR.NODE_DOCUMENT = 9;
- CKEDITOR.NODE_TEXT = 3;
- CKEDITOR.NODE_COMMENT = 8;
- CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11;
- CKEDITOR.POSITION_IDENTICAL = 0;
- CKEDITOR.POSITION_DISCONNECTED = 1;
- CKEDITOR.POSITION_FOLLOWING = 2;
- CKEDITOR.POSITION_PRECEDING = 4;
- CKEDITOR.POSITION_IS_CONTAINED = 8;
- CKEDITOR.POSITION_CONTAINS = 16;
- CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype, {appendTo: function (a, e) {
- a.append(this, e);
- return a
- }, clone: function (a, e) {
- var b = this.$.cloneNode(a), c = function (d) {
- d["data-cke-expando"] && (d["data-cke-expando"] = false);
- if (d.nodeType == CKEDITOR.NODE_ELEMENT) {
- e || d.removeAttribute("id", false);
- if (a)for (var d = d.childNodes, b = 0; b < d.length; b++)c(d[b])
- }
- };
- c(b);
- return new CKEDITOR.dom.node(b)
- }, hasPrevious: function () {
- return!!this.$.previousSibling
- }, hasNext: function () {
- return!!this.$.nextSibling
- }, insertAfter: function (a) {
- a.$.parentNode.insertBefore(this.$,
- a.$.nextSibling);
- return a
- }, insertBefore: function (a) {
- a.$.parentNode.insertBefore(this.$, a.$);
- return a
- }, insertBeforeMe: function (a) {
- this.$.parentNode.insertBefore(a.$, this.$);
- return a
- }, getAddress: function (a) {
- for (var e = [], b = this.getDocument().$.documentElement, c = this.$; c && c != b;) {
- var d = c.parentNode;
- d && e.unshift(this.getIndex.call({$: c}, a));
- c = d
- }
- return e
- }, getDocument: function () {
- return new CKEDITOR.dom.document(this.$.ownerDocument || this.$.parentNode.ownerDocument)
- }, getIndex: function (a) {
- var e = this.$, b = -1,
- c;
- if (!this.$.parentNode)return b;
- do if (!a || !(e != this.$ && e.nodeType == CKEDITOR.NODE_TEXT && (c || !e.nodeValue))) {
- b++;
- c = e.nodeType == CKEDITOR.NODE_TEXT
- } while (e = e.previousSibling);
- return b
- }, getNextSourceNode: function (a, e, b) {
- if (b && !b.call)var c = b, b = function (a) {
- return!a.equals(c)
- };
- var a = !a && this.getFirst && this.getFirst(), d;
- if (!a) {
- if (this.type == CKEDITOR.NODE_ELEMENT && b && b(this, true) === false)return null;
- a = this.getNext()
- }
- for (; !a && (d = (d || this).getParent());) {
- if (b && b(d, true) === false)return null;
- a = d.getNext()
- }
- return!a ||
- b && b(a) === false ? null : e && e != a.type ? a.getNextSourceNode(false, e, b) : a
- }, getPreviousSourceNode: function (a, e, b) {
- if (b && !b.call)var c = b, b = function (a) {
- return!a.equals(c)
- };
- var a = !a && this.getLast && this.getLast(), d;
- if (!a) {
- if (this.type == CKEDITOR.NODE_ELEMENT && b && b(this, true) === false)return null;
- a = this.getPrevious()
- }
- for (; !a && (d = (d || this).getParent());) {
- if (b && b(d, true) === false)return null;
- a = d.getPrevious()
- }
- return!a || b && b(a) === false ? null : e && a.type != e ? a.getPreviousSourceNode(false, e, b) : a
- }, getPrevious: function (a) {
- var e =
- this.$, b;
- do b = (e = e.previousSibling) && e.nodeType != 10 && new CKEDITOR.dom.node(e); while (b && a && !a(b));
- return b
- }, getNext: function (a) {
- var e = this.$, b;
- do b = (e = e.nextSibling) && new CKEDITOR.dom.node(e); while (b && a && !a(b));
- return b
- }, getParent: function (a) {
- var e = this.$.parentNode;
- return e && (e.nodeType == CKEDITOR.NODE_ELEMENT || a && e.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT) ? new CKEDITOR.dom.node(e) : null
- }, getParents: function (a) {
- var e = this, b = [];
- do b[a ? "push" : "unshift"](e); while (e = e.getParent());
- return b
- }, getCommonAncestor: function (a) {
- if (a.equals(this))return this;
- if (a.contains && a.contains(this))return a;
- var e = this.contains ? this : this.getParent();
- do if (e.contains(a))return e; while (e = e.getParent());
- return null
- }, getPosition: function (a) {
- var e = this.$, b = a.$;
- if (e.compareDocumentPosition)return e.compareDocumentPosition(b);
- if (e == b)return CKEDITOR.POSITION_IDENTICAL;
- if (this.type == CKEDITOR.NODE_ELEMENT && a.type == CKEDITOR.NODE_ELEMENT) {
- if (e.contains) {
- if (e.contains(b))return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING;
- if (b.contains(e))return CKEDITOR.POSITION_IS_CONTAINED +
- CKEDITOR.POSITION_FOLLOWING
- }
- if ("sourceIndex"in e)return e.sourceIndex < 0 || b.sourceIndex < 0 ? CKEDITOR.POSITION_DISCONNECTED : e.sourceIndex < b.sourceIndex ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING
- }
- for (var e = this.getAddress(), a = a.getAddress(), b = Math.min(e.length, a.length), c = 0; c <= b - 1; c++)if (e[c] != a[c]) {
- if (c < b)return e[c] < a[c] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING;
- break
- }
- return e.length < a.length ? CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_IS_CONTAINED +
- CKEDITOR.POSITION_FOLLOWING
- }, getAscendant: function (a, e) {
- var b = this.$, c;
- if (!e)b = b.parentNode;
- for (; b;) {
- if (b.nodeName && (c = b.nodeName.toLowerCase(), typeof a == "string" ? c == a : c in a))return new CKEDITOR.dom.node(b);
- try {
- b = b.parentNode
- } catch (d) {
- b = null
- }
- }
- return null
- }, hasAscendant: function (a, e) {
- var b = this.$;
- if (!e)b = b.parentNode;
- for (; b;) {
- if (b.nodeName && b.nodeName.toLowerCase() == a)return true;
- b = b.parentNode
- }
- return false
- }, move: function (a, e) {
- a.append(this.remove(), e)
- }, remove: function (a) {
- var e = this.$, b = e.parentNode;
- if (b) {
- if (a)for (; a = e.firstChild;)b.insertBefore(e.removeChild(a), e);
- b.removeChild(e)
- }
- return this
- }, replace: function (a) {
- this.insertBefore(a);
- a.remove()
- }, trim: function () {
- this.ltrim();
- this.rtrim()
- }, ltrim: function () {
- for (var a; this.getFirst && (a = this.getFirst());) {
- if (a.type == CKEDITOR.NODE_TEXT) {
- var e = CKEDITOR.tools.ltrim(a.getText()), b = a.getLength();
- if (e) {
- if (e.length < b) {
- a.split(b - e.length);
- this.$.removeChild(this.$.firstChild)
- }
- } else {
- a.remove();
- continue
- }
- }
- break
- }
- }, rtrim: function () {
- for (var a; this.getLast && (a =
- this.getLast());) {
- if (a.type == CKEDITOR.NODE_TEXT) {
- var e = CKEDITOR.tools.rtrim(a.getText()), b = a.getLength();
- if (e) {
- if (e.length < b) {
- a.split(e.length);
- this.$.lastChild.parentNode.removeChild(this.$.lastChild)
- }
- } else {
- a.remove();
- continue
- }
- }
- break
- }
- if (CKEDITOR.env.needsBrFiller)(a = this.$.lastChild) && (a.type == 1 && a.nodeName.toLowerCase() == "br") && a.parentNode.removeChild(a)
- }, isReadOnly: function () {
- var a = this;
- this.type != CKEDITOR.NODE_ELEMENT && (a = this.getParent());
- if (a && typeof a.$.isContentEditable != "undefined")return!(a.$.isContentEditable ||
- a.data("cke-editable"));
- for (; a;) {
- if (a.data("cke-editable"))break;
- if (a.getAttribute("contentEditable") == "false")return true;
- if (a.getAttribute("contentEditable") == "true")break;
- a = a.getParent()
- }
- return!a
- }});
- CKEDITOR.dom.window = function (a) {
- CKEDITOR.dom.domObject.call(this, a)
- };
- CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject;
- CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype, {focus: function () {
- this.$.focus()
- }, getViewPaneSize: function () {
- var a = this.$.document, e = a.compatMode == "CSS1Compat";
- return{width: (e ? a.documentElement.clientWidth : a.body.clientWidth) || 0, height: (e ? a.documentElement.clientHeight : a.body.clientHeight) || 0}
- }, getScrollPosition: function () {
- var a = this.$;
- if ("pageXOffset"in a)return{x: a.pageXOffset || 0, y: a.pageYOffset || 0};
- a = a.document;
- return{x: a.documentElement.scrollLeft || a.body.scrollLeft || 0, y: a.documentElement.scrollTop ||
- a.body.scrollTop || 0}
- }, getFrame: function () {
- var a = this.$.frameElement;
- return a ? new CKEDITOR.dom.element.get(a) : null
- }});
- CKEDITOR.dom.document = function (a) {
- CKEDITOR.dom.domObject.call(this, a)
- };
- CKEDITOR.dom.document.prototype = new CKEDITOR.dom.domObject;
- CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype, {type: CKEDITOR.NODE_DOCUMENT, appendStyleSheet: function (a) {
- if (this.$.createStyleSheet)this.$.createStyleSheet(a); else {
- var e = new CKEDITOR.dom.element("link");
- e.setAttributes({rel: "stylesheet", type: "text/css", href: a});
- this.getHead().append(e)
- }
- }, appendStyleText: function (a) {
- if (this.$.createStyleSheet) {
- var e = this.$.createStyleSheet("");
- e.cssText = a
- } else {
- var b = new CKEDITOR.dom.element("style", this);
- b.append(new CKEDITOR.dom.text(a, this));
- this.getHead().append(b)
- }
- return e ||
- b.$.sheet
- }, createElement: function (a, e) {
- var b = new CKEDITOR.dom.element(a, this);
- if (e) {
- e.attributes && b.setAttributes(e.attributes);
- e.styles && b.setStyles(e.styles)
- }
- return b
- }, createText: function (a) {
- return new CKEDITOR.dom.text(a, this)
- }, focus: function () {
- this.getWindow().focus()
- }, getActive: function () {
- return new CKEDITOR.dom.element(this.$.activeElement)
- }, getById: function (a) {
- return(a = this.$.getElementById(a)) ? new CKEDITOR.dom.element(a) : null
- }, getByAddress: function (a, e) {
- for (var b = this.$.documentElement, c =
- 0; b && c < a.length; c++) {
- var d = a[c];
- if (e)for (var g = -1, h = 0; h < b.childNodes.length; h++) {
- var m = b.childNodes[h];
- if (!(e === true && m.nodeType == 3 && m.previousSibling && m.previousSibling.nodeType == 3)) {
- g++;
- if (g == d) {
- b = m;
- break
- }
- }
- } else b = b.childNodes[d]
- }
- return b ? new CKEDITOR.dom.node(b) : null
- }, getElementsByTag: function (a, e) {
- if ((!CKEDITOR.env.ie || document.documentMode > 8) && e)a = e + ":" + a;
- return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))
- }, getHead: function () {
- var a = this.$.getElementsByTagName("head")[0];
- return a =
- a ? new CKEDITOR.dom.element(a) : this.getDocumentElement().append(new CKEDITOR.dom.element("head"), true)
- }, getBody: function () {
- return new CKEDITOR.dom.element(this.$.body)
- }, getDocumentElement: function () {
- return new CKEDITOR.dom.element(this.$.documentElement)
- }, getWindow: function () {
- return new CKEDITOR.dom.window(this.$.parentWindow || this.$.defaultView)
- }, write: function (a) {
- this.$.open("text/html", "replace");
- CKEDITOR.env.ie && (a = a.replace(/(?:^\s*]*?>)|^/i, '$&\n | |