# HG changeset patch # User ymh # Date 1441797001 -7200 # Node ID 3ba7920facf4571e7dcf5fd0bd4aba5982fd466b # Parent 6934ee02bbae79a8b84e16868b4e8c067a49618a Correct dependency and loading problem for ckeditor with dojo diff -r 6934ee02bbae -r 3ba7920facf4 .hgignore --- a/.hgignore Mon Sep 07 16:34:42 2015 +0200 +++ b/.hgignore Wed Sep 09 13:10:01 2015 +0200 @@ -28,3 +28,4 @@ ^server/python/django/MANIFEST\.in$ ^server/php/basic/resources/config.php$ ^server/php/basic/data +.orig$ diff -r 6934ee02bbae -r 3ba7920facf4 client/gruntfile.js --- a/client/gruntfile.js Mon Sep 07 16:34:42 2015 +0200 +++ b/client/gruntfile.js Wed Sep 09 13:10:01 2015 +0200 @@ -2,215 +2,294 @@ module.exports = function(grunt) { - 'use strict'; + 'use strict'; - var renkan_src = [ - 'dist/js/templates.js', - 'js/main.js', - 'js/router.js', - 'js/dataloader.js', - 'js/models.js', - 'js/defaults.js', - 'js/i18n.js', - 'js/full-json.js', - 'js/save-once.js', - 'js/ldtjson-bin.js', - 'js/list-bin.js', - 'js/wikipedia-bin.js', - 'dist/js/paper-renderer.js', - ]; + var renkan_src = [ + 'dist/js/templates.js', + 'js/main.js', + 'js/router.js', + 'js/dataloader.js', + 'js/models.js', + 'js/defaults.js', + 'js/i18n.js', + 'js/full-json.js', + 'js/save-once.js', + 'js/ldtjson-bin.js', + 'js/list-bin.js', + 'js/wikipedia-bin.js', + 'dist/js/paper-renderer.js', + ]; - var renkan_banner = grunt.file.read('js/header.js').toString() + - '\n/*! <%= pkg.name %> - v<%= pkg.version %> - Copyright © IRI ' + - '<%= grunt.template.today("yyyy") %> */\n\n'; + var renkan_banner = grunt.file.read('js/header.js').toString() + + '\n/*! <%= pkg.name %> - v<%= pkg.version %> - Copyright © IRI ' + + '<%= grunt.template.today("yyyy") %> */\n\n'; - // Project configuration. - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - requirejs: { - renderer: { - options: { - baseUrl: "js/", - name: "main-renderer", - out: "dist/js/paper-renderer.js", - optimize: "none", - beautify: true, - paths: { - requtils: "require-utils", - jquery: "empty:", - underscore: "empty:", - filesaver: "empty:", - 'ckeditor-core': "empty:", - 'ckeditor-jquery': "empty:" - } - } - } - }, - jst: { - compile: { + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + requirejs: { + renderer: { + options: { + baseUrl: "js/", + name: "main-renderer", + out: "dist/js/paper-renderer.js", + optimize: "none", + beautify: true, + paths: { + requtils: "require-utils", + jquery: "empty:", + underscore: "empty:", + filesaver: "empty:", + 'ckeditor-core': "empty:", + 'ckeditor-jquery': "empty:" + } + } + } + }, + jst: { + compile: { + options: { + namespace: 'renkanJST', + //amd: true + }, + files: { + "dist/js/templates.js": ["templates/**/*.html"] + } + } + }, + uglify: { + options: { + banner: renkan_banner, + sourceMap: true, + sourceMapIncludeSources: true + }, + renkan: { + files: { + 'dist/js/renkan.min.js': renkan_src + } + } + }, + concat: { + options: { + banner: renkan_banner + }, + renkan: { + files: { + 'dist/js/renkan.js': renkan_src + } + } + }, + clean: { + options: { + force: true + }, + renderer: ["dist/js/paper-renderer.js"], + jst: ["dist/js/templates.js"], + renkan: ["dist/"], + lib: ["lib/"], + bower: ["bower_components/"] + }, + cssmin: { options: { - namespace: 'renkanJST', - //amd: true + banner: renkan_banner + }, + renkan: { + expand: true, + cwd: 'css/', + src: ['*.css'], + dest: 'dist/css', + ext: '.min.css' + } + }, + copy: { + vendors: { + files: [{ + expand: true, + cwd: 'vendors/', + src: ['**'], + dest: 'lib/' + }], + }, + renkan: { + files: [{ + expand: true, + cwd: '', + src: ['img/*'], + dest: 'dist/', + filter: 'isFile' + }, { + expand: true, + cwd: '', + src: ['data/properties.json'], + dest: 'dist/', + filter: 'isFile' + }, { + expand: true, + cwd: '', + src: ['lib/**'], + dest: 'dist/' + }] + }, + renkan_css: { + options: { + process: function(content, srcpath) { + return grunt.template.process(renkan_banner) + content; + } + }, + files: [{ + expand: true, + cwd: '', + src: ['css/*'], + dest: 'dist/', + filter: 'isFile' + }] }, - files: { - "dist/js/templates.js": ["templates/**/*.html"] + renkan_server: { + files: [{ + expand: true, + cwd: 'dist', + src: ['**', '!data/*', '!lib/**'], + dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/renkan/', + filter: 'isFile' + }, { + expand: true, + cwd: 'dist/lib', + src: ['**'], + dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/', + filter: 'isFile' + }, { + expand: true, + cwd: 'dist', + src: ['**', '!data/*', '!lib/**'], + dest: '../server/php/basic/public_html/static/lib/renkan/', + filter: 'isFile' + }, { + expand: true, + cwd: 'dist/lib', + src: ['**'], + dest: '../server/php/basic/public_html/static/lib/', + filter: 'isFile' + }] + } + }, + jshint: { + options: { + curly: true, + eqeqeq: true, + eqnull: true, + browser: true, + globals: { + jQuery: true + }, + }, + all: ['Gruntfile.js', 'js/**/*.js', 'data/simple-persist.js'] + }, + bower: { + install: { + options: { + targetDir: './lib', + layout: 'byComponent', + install: true, + verbose: false, + cleanTargetDir: true, + cleanBowerDir: false, + bowerOptions: {} + } + } + }, + watch: { + css: { + files: ['css/**/*.css'], + tasks: ['cssmin', 'copy:renkan_css'], + }, + js: { + files: ['js/**/*.js', 'templates/**/*.html'], + tasks: ['jshint', 'requirejs', 'jst', 'concat', 'uglify', 'copy:renkan', 'clean:renderer'], + }, + lib: { + files: ['bower.json'], + tasks: ['bower:install', 'copy:vendors', 'copy:renkan'], + }, + vendors: { + files: ['vendors/**'], + tasks: ['copy:vendors', 'copy:renkan'], + }, + options: { + interrupt: true, + }, + }, + connect: { + server: { + options: { + port: 9001, + base: '.', + useAvailablePort: true, + debug: true, + middleware: function(connect, options, middlewares) { + middlewares.push(simplePersist.middleware); + return middlewares; + } + }, + } + }, + umd: { + 'ckeditor-core': { + options: { + src: 'dist/lib/ckeditor/ckeditor.js', + dest: 'dist/lib/ckeditor/ckeditor-umd.js', + objectToExport: 'CKEDITOR', + amdModuleId: 'ckeditor' + } + }, + 'ckeditor-jquery': { + options: { + src: 'dist/lib/ckeditor/adapters/jquery.js', + dest: 'dist/lib/ckeditor/adapters/jquery-umd.js', + amdModuleId: 'ckeditor-jquery', + deps: { + 'default': ['jquery', 'ckeditor'], + } + } } } - }, - uglify: { - options: { - banner: renkan_banner, - sourceMap: true, - sourceMapIncludeSources: true - }, - renkan: { - files : { - 'dist/js/renkan.min.js' : renkan_src - } - } - }, - concat: { - options: { - banner: renkan_banner - }, - renkan: { - files : { - 'dist/js/renkan.js' : renkan_src - } - } - }, - clean: { - options: { - force: true - }, - renderer: ["dist/js/paper-renderer.js"], - jst:["dist/js/templates.js"], - renkan: ["dist/"], - lib: ["lib/"], - bower: ["bower_components/"] - }, - cssmin: { - options: { - banner: renkan_banner - }, - renkan: { - expand: true, - cwd: 'css/', - src: ['*.css'], - dest: 'dist/css', - ext: '.min.css' - } - }, - copy: { - vendors: { - files: [{expand: true, cwd: 'vendors/', src: ['**'], dest: 'lib/'}], - }, - renkan: { - files: [ - {expand: true, cwd: '', src: ['img/*'], dest: 'dist/', filter: 'isFile'}, - {expand: true, cwd: '', src: ['data/properties.json'], dest: 'dist/', filter: 'isFile'}, - {expand: true, cwd: '', src: ['lib/**'], dest: 'dist/'} - ] - }, - renkan_css: { - options: { - process: function (content, srcpath) { - return grunt.template.process(renkan_banner) + content; - } - }, - files: [{expand: true, cwd: '', src: ['css/*'], dest: 'dist/', filter: 'isFile'}] - }, - renkan_server: { - files: [ - {expand: true, cwd: 'dist', src: ['**', '!data/*', '!lib/**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/renkan/', filter: 'isFile'}, - {expand: true, cwd: 'dist/lib', src: ['**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/', filter: 'isFile'}, - {expand: true, cwd: 'dist', src: ['**', '!data/*', '!lib/**'], dest: '../server/php/basic/public_html/static/lib/renkan/', filter: 'isFile'}, - {expand: true, cwd: 'dist/lib', src: ['**'], dest: '../server/php/basic/public_html/static/lib/', filter: 'isFile'} - ] - } - }, - jshint: { - options: { - curly: true, - eqeqeq: true, - eqnull: true, - browser: true, - globals: { - jQuery: true - }, - }, - all: ['Gruntfile.js', 'js/**/*.js', 'data/simple-persist.js'] - }, - bower: { - install: { - options: { - targetDir: './lib', - layout: 'byComponent', - install: true, - verbose: false, - cleanTargetDir: true, - cleanBowerDir: false, - bowerOptions: {} - } - } - }, - watch: { - css:{ - files: ['css/**/*.css'], - tasks: ['cssmin', 'copy:renkan_css'], - }, - js:{ - files: ['js/**/*.js', 'templates/**/*.html'], - tasks: ['jshint', 'requirejs', 'jst', 'concat', 'uglify', 'copy:renkan', 'clean:renderer'], - }, - lib:{ - files: ['bower.json'], - tasks: ['bower:install', 'copy:vendors', 'copy:renkan'], - }, - vendors: { - files: ['vendors/**'], - tasks: ['copy:vendors', 'copy:renkan'], - }, - options: { - interrupt: true, - }, - }, - connect: { - server: { - options: { - port: 9001, - base: '.', - useAvailablePort: true, - debug: true, - middleware: function(connect, options, middlewares) { - middlewares.push(simplePersist.middleware); - return middlewares; - } - }, - } - } - }); + }); + + // Load the plugins. + grunt.loadNpmTasks('grunt-contrib-requirejs'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-bower-task'); + grunt.loadNpmTasks('grunt-contrib-jst'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-umd'); - // Load the plugin that provides the "uglify" task. - grunt.loadNpmTasks('grunt-contrib-requirejs'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-bower-task'); - grunt.loadNpmTasks('grunt-contrib-jst'); - grunt.loadNpmTasks('grunt-contrib-watch'); - - // Default task(s). - grunt.registerTask('base', ['jshint', 'bower:install', 'copy:vendors', 'clean:renkan', 'requirejs', 'jst', 'concat', 'uglify', 'cssmin', 'copy:renkan', 'copy:renkan_css', 'clean:renderer']); - grunt.registerTask('default', ['base', 'clean:jst']); - grunt.registerTask('copy-server', 'copy files to server part', function(){ - grunt.task.run(['copy:renkan_server']); - }); - grunt.registerTask('dev', [ 'base', 'connect:server', 'watch']); + // Default task(s). + grunt.registerTask('base', [ + 'jshint', + 'bower:install', + 'copy:vendors', + 'clean:renkan', + 'requirejs', + 'jst', + 'concat', + 'uglify', + 'cssmin', + 'copy:renkan', + 'copy:renkan_css', + 'clean:renderer', + 'umd:ckeditor-core', + 'umd:ckeditor-jquery' + ]); + grunt.registerTask('default', ['base', 'clean:jst']); + grunt.registerTask('copy-server', 'copy files to server part', function() { + grunt.task.run(['copy:renkan_server']); + }); + grunt.registerTask('dev', ['base', 'connect:server', 'watch']); }; diff -r 6934ee02bbae -r 3ba7920facf4 client/package.json --- a/client/package.json Mon Sep 07 16:34:42 2015 +0200 +++ b/client/package.json Wed Sep 09 13:10:01 2015 +0200 @@ -21,6 +21,7 @@ "grunt-contrib-requirejs": "^0.4.4", "grunt-contrib-uglify": "^0.4.0", "grunt-contrib-watch": "^0.6.1", + "grunt-umd": "^2.3.3", "jshint-stylish": "^0.2.0" }, "author": "IRI" diff -r 6934ee02bbae -r 3ba7920facf4 server/java/renkan-web/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html --- a/server/java/renkan-web/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html Mon Sep 07 16:34:42 2015 +0200 +++ b/server/java/renkan-web/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html Wed Sep 09 13:10:01 2015 +0200 @@ -20,6 +20,7 @@ var require = { baseUrl: /*[[@{/static/js/}]]*/"" }; + window.CKEDITOR_BASEPATH = /*[[@{/static/lib/ckeditor/}]]*/""; /*]]>*/ @@ -76,6 +77,7 @@ property_files: [ /*[[@{/static/data/properties.json}]]*/ "data/properties.json", ], + show_node_editor_description_richtext: true, }; var space_config = /*[[${space.binConfig}?${space.binConfig}:'{}']]*/"{}"; space_config = JSON.parse(space_config || "{}"); diff -r 6934ee02bbae -r 3ba7920facf4 server/java/renkan-web/src/main/webapp/static/js/config.js --- a/server/java/renkan-web/src/main/webapp/static/js/config.js Mon Sep 07 16:34:42 2015 +0200 +++ b/server/java/renkan-web/src/main/webapp/static/js/config.js Wed Sep 09 13:10:01 2015 +0200 @@ -16,7 +16,8 @@ underscore: 'static/lib/lodash/lodash', jquery: 'static/lib/jquery/jquery', filesaver: 'static/lib/FileSaver/FileSaver', - 'ckeditor-jquery': 'static/lib/ckeditor/adapters/jquery', + 'ckeditor': 'static/lib/ckeditor/ckeditor-umd', + 'ckeditor-jquery': 'static/lib/ckeditor/adapters/jquery-umd', }, packages:[{ name: 'dojo', diff -r 6934ee02bbae -r 3ba7920facf4 server/php/basic/public_html/static/lib/ckeditor/adapters/jquery-umd.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/lib/ckeditor/adapters/jquery-umd.js Wed Sep 09 13:10:01 2015 +0200 @@ -0,0 +1,28 @@ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module unless amdModuleId is set + define('ckeditor-jquery', ["jquery","ckeditor"], function (a0,b1) { + return (factory(a0,b1)); + }); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require("jquery"),require("ckeditor")); + } else { + factory(jquery,ckeditor); + } +}(this, function (jquery, ckeditor) { + +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b= +a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock", +!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit(); +return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee, +100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise()); +return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery); + +})); diff -r 6934ee02bbae -r 3ba7920facf4 server/php/basic/public_html/static/lib/ckeditor/ckeditor-umd.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/php/basic/public_html/static/lib/ckeditor/ckeditor-umd.js Wed Sep 09 13:10:01 2015 +0200 @@ -0,0 +1,960 @@ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module unless amdModuleId is set + define('ckeditor', [], function () { + return (root['CKEDITOR'] = factory()); + }); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + root['CKEDITOR'] = factory(); + } +}(this, function () { + +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,e={timestamp:"F61C",version:"4.4.8 (Standard)",revision:"ccd0038",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var c=window.CKEDITOR_BASEPATH||"";if(!c)for(var d=document.getElementsByTagName("script"),b=0;b=0;o--)if(k[o].priority<=f){k.splice(o+1,0,h);return{removeListener:e}}k.unshift(h)}return{removeListener:e}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this, +arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},d=0,b=function(){d=1};return function(f,h,j){var k=e(this)[f],f=a,n=d;a=d=0;if(k){var o=k.listeners;if(o.length)for(var o=o.slice(0),p,m=0;m=0&&d.listeners.splice(b,1)}},removeAllListeners:function(){var a=e(this),c;for(c in a)delete a[c]},hasListeners:function(a){return(a=e(this)[a])&&a.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={ie:a.indexOf("trident/")>-1,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 a=document.domain,d=window.location.hostname;return a!=d&&a!="["+d+"]"},secure:location.protocol=="https:"};e.gecko=navigator.product=="Gecko"&&!e.webkit&&!e.ie;if(e.webkit)a.indexOf("chrome")>-1?e.chrome=true:e.safari=true;var b=0;if(e.ie){b=e.quirks||!document.documentMode? +parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;e.ie9Compat=b==9;e.ie8Compat=b==8;e.ie7Compat=b==7;e.ie6Compat=b<7||e.quirks}if(e.gecko){var g=a.match(/rv:([\d\.]+)/);if(g){g=g[1].split(".");b=g[0]*1E4+(g[1]||0)*100+(g[2]||0)*1}}e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));e.version=b;e.isCompatible=e.iOS&&b>=534||!e.mobile&&(e.ie&&b>6||e.gecko&&b>=2E4||e.air&&b>=1||e.webkit&&b>=522||false);e.hidpi=window.devicePixelRatio>= +2;e.needsBrFiller=e.gecko||e.webkit||e.ie&&b>10;e.needsNbspFiller=e.ie&&b<11;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");if(e.quirks)e.cssClass=e.cssClass+" cke_browser_quirks";if(e.ie)e.cssClass=e.cssClass+(" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));if(e.air)e.cssClass=e.cssClass+" cke_browser_air";if(e.iOS)e.cssClass=e.cssClass+" cke_browser_ios";if(e.hidpi)e.cssClass=e.cssClass+" cke_hidpi";return e}()),"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.ie?"-ms-":"",b=/&/g,g=/>/g,c=/"+ +c+""):d.push('');return d.join("")},htmlEncode:function(a){return(""+a).replace(b,"&").replace(g,">").replace(c,"<")},htmlDecode:function(a){return a.replace(i,"&").replace(f,">").replace(h,"<")},htmlEncodeAttr:function(a){return a.replace(d,""").replace(c,"<").replace(g,">")},htmlDecodeAttr:function(a){return a.replace(j,'"').replace(h,"<").replace(f,">")},getNextNumber:function(){var a=0;return function(){return++a}}(), +getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,c){var d=c(a);d.prototype=a.prototype;return d},setTimeout:function(a,c,d,b,f){f||(f=window);d||(d=f);return f.setTimeout(function(){b?a.apply(d,[].concat(b)):a.apply(d)},c||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(c){return c.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(c){return c.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(c){return c.replace(a, +"")}}(),indexOf:function(a,c){if(typeof c=="function")for(var d=0,b=a.length;d=0?a[d]:null},bind:function(a,c){return function(){return a.apply(c,arguments)}},createClass:function(a){var c=a.$,d=a.base,b=a.privates||a._,f=a.proto,a=a.statics;!c&&(c=function(){d&&this.base.apply(this,arguments)});if(b)var g=c,c=function(){var a= +this._||(this._={}),c;for(c in b){var d=b[c];a[c]=typeof d=="function"?CKEDITOR.tools.bind(d,this):d}g.apply(this,arguments)};if(d){c.prototype=this.prototypedCopy(d.prototype);c.prototype.constructor=c;c.base=d;c.baseProto=d.prototype;c.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}f&&this.extend(c.prototype,f,true);a&&this.extend(c,a,true);return c},addFunction:function(c,d){return a.push(function(){return c.apply(d||this,arguments)})-1}, +removeFunction:function(c){a[c]=null},callFunction:function(c){var d=a[c];return d&&d.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]*?>)|^/i, +'$&\n