diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index c1c4dd0b4..bb0850623 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -80,6 +80,61 @@ Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstrans */ Globals.sAnimationType = ''; +/** + * @type {Object} + */ +Globals.oHtmlEditorDefaultConfig = { + 'title': false, + 'stylesSet': false, + 'customConfig': '', + 'toolbarGroups': [ + {name: 'styles'}, + {name: 'basicstyles', groups: ['basicstyles', 'cleanup']}, + {name: 'colors'}, + {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi']}, + {name: 'links'}, + {name: 'insert'} +// {name: 'document', groups: ['mode', 'document', 'doctools']} + ], + 'removeButtons': 'Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,Indent,Outdent', + 'removeDialogTabs': 'link:advanced;link:target;image:advanced', + + 'allowedContent': false, + 'autoParagraph': false, + + 'enterMode': window.CKEDITOR.ENTER_BR, + 'shiftEnterMode': window.CKEDITOR.ENTER_P, +// 'floatSpaceDockedOffsetY': 1, + + 'font_defaultLabel': 'Arial', + 'fontSize_defaultLabel': '12px', + 'fontSize_sizes': '10/10px;12/12px;14/14px;16/16px;18/18px;20/20px;24/24px;28/28px;36/36px;48/48px' +}; + +/** + * @type {Object} + */ +Globals.oHtmlEditorLangsMap = { + 'de': 'de', + 'es': 'es', + 'fr': 'fr', + 'hu': 'hu', + 'is': 'is', + 'it': 'it', + 'ko': 'ko', + 'ko-kr': 'ko', + 'lv': 'lv', + 'nl': 'nl', + 'no': 'no', + 'pl': 'pl', + 'pt': 'pt', + 'pt-pt': 'pt', + 'pt-br': 'pt-br', + 'ru': 'ru', + 'zh': 'zh', + 'zh-cn': 'zh-cn' +}; + if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes) { Globals.bAllowPdfPreview = !!_.find(navigator.mimeTypes, function (oType) { diff --git a/dev/Common/HtmlEditorWrapper.js b/dev/Common/HtmlEditorWrapper.js index 12332d4e5..62d6f0b44 100644 --- a/dev/Common/HtmlEditorWrapper.js +++ b/dev/Common/HtmlEditorWrapper.js @@ -293,7 +293,12 @@ HtmlEditorWrapper.prototype.init = function () { if (this.$element && this.$element[0]) { - var self = this; + var + self = this, + oConfig = Globals.oHtmlEditorDefaultConfig, + sLanguage = RL.settingsGet('Language'), + bSource = !!RL.settingsGet('AllowHtmlEditorSourceButton') + ; self.$toolbar = $('
') .addClass('html-editor-wrapper-toolbar') @@ -338,7 +343,15 @@ HtmlEditorWrapper.prototype.init = function () .append(self.$html) ; - self.editor = window.CKEDITOR.inline(self.$html[0]); + if (bSource && oConfig.toolbarGroups && !oConfig.toolbarGroups.__SourceInited) + { + oConfig.toolbarGroups.__SourceInited = true; + oConfig.toolbarGroups.push({name: 'document', groups: ['mode', 'document', 'doctools']}); + } + + oConfig.language = Globals.oHtmlEditorLangsMap[sLanguage] || 'en'; + self.editor = window.CKEDITOR.inline(self.$html[0], oConfig); + if (self.fOnReady) { self.editor.on('instanceReady', function () { @@ -415,4 +428,6 @@ HtmlEditorWrapper.prototype.modeToggle = function (bFocus) { this.focus(); } + + this.blurTrigger(); }; diff --git a/dev/Styles/HtmlEditorWrapper.less b/dev/Styles/HtmlEditorWrapper.less index b0ee4c409..2cda6ad33 100644 --- a/dev/Styles/HtmlEditorWrapper.less +++ b/dev/Styles/HtmlEditorWrapper.less @@ -151,3 +151,7 @@ html.html-editor-wrapper-fullscreen .html-editor-wrapper-html.styled, html.html- .html-editor-wrapper-html img { vertical-align: bottom; } + +.cke_button__sourcedialog_label { + display: none !important; +} \ No newline at end of file diff --git a/package.json b/package.json index 236ff4998..20cb8970f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "RainLoop", "title": "RainLoop Webmail", "version": "1.6.3", - "release": "701", + "release": "705", "description": "Simple, modern & fast web-based email client", "homepage": "http://rainloop.net", "main": "Gruntfile.js", diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index b8960e055..abb0e9f78 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -909,6 +909,7 @@ class Actions 'OpenPGP' => $oConfig->Get('security', 'openpgp', false), 'InIframe' => (bool) $oConfig->Get('labs', 'in_iframe', false), 'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true), + 'AllowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false), 'CustomLoginLink' => $oConfig->Get('labs', 'custom_login_link', ''), 'CustomLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''), 'AllowAdditionalAccounts' => (bool) $oConfig->Get('webmail', 'allow_additional_accounts', true), diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 2e7779db1..30f84b387 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -1,252 +1,253 @@ -Set('security', 'admin_password', \md5(APP_SALT.$sPassword.APP_SALT)); - } - - /** - * @param string $sPassword - * - * @return bool - */ - public function ValidatePassword($sPassword) - { - $sPassword = (string) $sPassword; - $sConfigPassword = (string) $this->Get('security', 'admin_password', ''); - - return 0 < \strlen($sPassword) && - ($sPassword === $sConfigPassword || \md5(APP_SALT.$sPassword.APP_SALT) === $sConfigPassword); - } - - /** - * @return bool - */ - public function Save() - { - $this->Set('version', 'current', APP_VERSION); - $this->Set('version', 'saved', \gmdate('r')); - - return parent::Save(); - } - - /** - * @return array - */ - protected function defaultValues() - { - return array( - 'webmail' => array( - - 'title' => array('RainLoop Webmail', 'Text displayed as page title'), - 'loading_description' => array('RainLoop', 'Text displayed on startup'), - - 'theme' => array('Default', 'Theme used by default'), - 'allow_themes' => array(true, 'Allow theme selection on settings screen'), - 'allow_custom_theme' => array(true, ''), - - 'language' => array('en', 'Language used by default'), - 'allow_languages_on_settings' => array(true, 'Allow language selection on settings screen'), - - 'allow_additional_accounts' => array(true, ''), - 'allow_identities' => array(true, ''), - - 'messages_per_page' => array(20, ' Number of messages displayed on page by default'), - - 'editor_default_type' => array('Html', 'Editor mode used by default (Html or Plain)'), - - 'attachment_size_limit' => array(5, - 'File size limit (MB) for file upload on compose screen -0 for unlimited.') - ), - - 'branding' => array( - 'login_logo' => array(''), - 'login_desc' => array(''), - 'login_css' => array(''), - ), - - 'contacts' => array( - 'enable' => array(false, 'Enable contacts'), - 'allow_sharing' => array(true), - 'allow_sync' => array(false), - 'suggestions_limit' => array(30), - 'type' => array('sqlite', ''), - 'pdo_dsn' => array('mysql:host=127.0.0.1;port=3306;dbname=rainloop', ''), - 'pdo_user' => array('root', ''), - 'pdo_password' => array('', ''), - ), - - 'security' => array( - 'csrf_protection' => array(true, - 'Enable CSRF protection (http://en.wikipedia.org/wiki/Cross-site_request_forgery)'), - - 'custom_server_signature' => array('RainLoop'), - 'openpgp' => array(false), - 'admin_login' => array('admin', 'Login and password for web admin panel'), - 'admin_password' => array('12345'), - 'allow_admin_panel' => array(true, 'Access settings'), - 'admin_panel_host' => array(''), - 'core_install_access_domains' => array('') - ), - - 'login' => array( - - 'allow_custom_login' => array(false, - 'Enable additional Login field on webmail login screen'), - - 'default_domain' => array('', ''), - - 'allow_languages_on_login' => array(true, - 'Allow language selection on webmail login screen'), - - 'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAILT_OFF, - 'This option allows webmail to remember the logged in user -once they closed the browser window. - -Values: - "DefaultOff" - can be used, disabled by default; - "DefaultOn" - can be used, enabled by default; - "Unused" - cannot be used') - ), - - 'plugins' => array( - 'enable' => array(false, 'Enable plugin support'), - 'enabled_list' => array('', 'List of enabled plugins'), - ), - - 'logs' => array( - - 'enable' => array(false, 'Enable logging'), - - 'write_on_error_only' => array(false, 'Logs entire request only if error occured'), - - 'filename' => array('log-{date:Y-m-d}.txt', - 'Log filename. -For security reasons, some characters are removed from filename. -Allows for pattern-based folder creation (see examples below). - -Patterns: - {date:Y-m-d} - Replaced by pattern-based date - Detailed info: http://www.php.net/manual/en/function.date.php - {user:email} - Replaced by user\'s email address - If user is not logged in, value is set to "unknown" - {user:login} - Replaced by user\'s login - If user is not logged in, value is set to "unknown" - {user:domain} - Replaced by user\'s domain name - If user is not logged in, value is set to "unknown" - {user:uid} - Replaced by user\'s UID regardless of account currently used - -Examples: - filename = "log-{date:Y-m-d}.txt" - filename = "{date:Y-m-d}/{user:domain}/{user:email}_{user:uid}.log" - filename = "{user:email}-{date:Y-m-d}.txt"') - ), - - 'debug' => array( - 'enable' => array(false, 'Special option required for development purposes'), - ), - - 'version' => array( - 'current' => array(''), - 'saved' => array('') - ), - - 'social' => array( - 'google_enable' => array(false, 'Google'), - 'google_client_id' => array(''), - 'google_client_secret' => array(''), - - 'fb_enable' => array(false, 'Facebook'), - 'fb_app_id' => array(''), - 'fb_app_secret' => array(''), - - 'twitter_enable' => array(false, 'Twitter'), - 'twitter_consumer_key' => array(''), - 'twitter_consumer_secret' => array(''), - - 'dropbox_enable' => array(false, 'Dropbox'), - 'dropbox_api_key' => array(''), - ), - - 'cache' => array( - 'enable' => array(true, - 'The section controls caching of the entire application. - -Enables caching in the system'), - - 'index' => array('v1', 'Additional caching key. If changed, cache is purged'), - - 'fast_cache_driver' => array('files', 'Can be: files, APC, memcache'), - 'fast_cache_index' => array('v1', 'Additional caching key. If changed, fast cache is purged'), - - 'http' => array(true, 'Browser-level cache. If enabled, caching is maintainted without using files'), - 'server_uids' => array(false, 'Caching message UIDs when searching and sorting (threading)') - ), - - 'labs' => array( - 'ignore_folders_subscription' => array(false, - 'Experimental settings. Handle with care. -'), - 'allow_prefetch' => array(true), - 'allow_smart_html_links' => array(true), - 'cache_system_data' => array(true), - 'date_from_headers' => array(false), - 'autocreate_system_folders' => array(true), - 'allow_message_append' => array(false), - 'determine_user_language' => array(true), - 'login_fault_delay' => array(1), - 'log_ajax_response_write_limit' => array(300), - 'sync_dav_digest_auth' => array(true), - 'sync_dav_domain' => array(''), - 'sync_use_dav_browser' => array(true), - 'use_app_debug_js' => array(false), - 'use_app_debug_css' => array(false), - 'use_imap_sort' => array(false), - 'use_imap_force_selection' => array(false), - 'use_imap_list_subscribe' => array(true), - 'use_imap_thread' => array(true), - 'use_imap_move' => array(true), - 'use_imap_auth_plain' => array(false), - 'imap_forwarded_flag' => array('$Forwarded'), - 'imap_read_receipt_flag' => array('$ReadReceipt'), - 'smtp_show_server_errors' => array(false), - 'repo_type' => array('stable'), - 'custom_repo' => array(''), - 'additional_repo' => array(''), - 'cdn_static_domain' => array(''), - 'curl_proxy' => array(''), - 'curl_proxy_auth' => array(''), - 'in_iframe' => array(false), - 'custom_login_link' => array(''), - 'custom_logout_link' => array(''), - 'allow_external_login' => array(false), - 'fast_cache_memcache_host' => array('127.0.0.1'), - 'fast_cache_memcache_port' => array(11211), - 'fast_cache_memcache_expire' => array(43200), - 'dev_email' => array(''), - 'dev_login' => array(''), - 'dev_password' => array('') - ) - ); - } -} +Set('security', 'admin_password', \md5(APP_SALT.$sPassword.APP_SALT)); + } + + /** + * @param string $sPassword + * + * @return bool + */ + public function ValidatePassword($sPassword) + { + $sPassword = (string) $sPassword; + $sConfigPassword = (string) $this->Get('security', 'admin_password', ''); + + return 0 < \strlen($sPassword) && + ($sPassword === $sConfigPassword || \md5(APP_SALT.$sPassword.APP_SALT) === $sConfigPassword); + } + + /** + * @return bool + */ + public function Save() + { + $this->Set('version', 'current', APP_VERSION); + $this->Set('version', 'saved', \gmdate('r')); + + return parent::Save(); + } + + /** + * @return array + */ + protected function defaultValues() + { + return array( + 'webmail' => array( + + 'title' => array('RainLoop Webmail', 'Text displayed as page title'), + 'loading_description' => array('RainLoop', 'Text displayed on startup'), + + 'theme' => array('Default', 'Theme used by default'), + 'allow_themes' => array(true, 'Allow theme selection on settings screen'), + 'allow_custom_theme' => array(true, ''), + + 'language' => array('en', 'Language used by default'), + 'allow_languages_on_settings' => array(true, 'Allow language selection on settings screen'), + + 'allow_additional_accounts' => array(true, ''), + 'allow_identities' => array(true, ''), + + 'messages_per_page' => array(20, ' Number of messages displayed on page by default'), + + 'editor_default_type' => array('Html', 'Editor mode used by default (Html or Plain)'), + + 'attachment_size_limit' => array(5, + 'File size limit (MB) for file upload on compose screen +0 for unlimited.') + ), + + 'branding' => array( + 'login_logo' => array(''), + 'login_desc' => array(''), + 'login_css' => array(''), + ), + + 'contacts' => array( + 'enable' => array(false, 'Enable contacts'), + 'allow_sharing' => array(true), + 'allow_sync' => array(false), + 'suggestions_limit' => array(30), + 'type' => array('sqlite', ''), + 'pdo_dsn' => array('mysql:host=127.0.0.1;port=3306;dbname=rainloop', ''), + 'pdo_user' => array('root', ''), + 'pdo_password' => array('', ''), + ), + + 'security' => array( + 'csrf_protection' => array(true, + 'Enable CSRF protection (http://en.wikipedia.org/wiki/Cross-site_request_forgery)'), + + 'custom_server_signature' => array('RainLoop'), + 'openpgp' => array(false), + 'admin_login' => array('admin', 'Login and password for web admin panel'), + 'admin_password' => array('12345'), + 'allow_admin_panel' => array(true, 'Access settings'), + 'admin_panel_host' => array(''), + 'core_install_access_domains' => array('') + ), + + 'login' => array( + + 'allow_custom_login' => array(false, + 'Enable additional Login field on webmail login screen'), + + 'default_domain' => array('', ''), + + 'allow_languages_on_login' => array(true, + 'Allow language selection on webmail login screen'), + + 'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAILT_OFF, + 'This option allows webmail to remember the logged in user +once they closed the browser window. + +Values: + "DefaultOff" - can be used, disabled by default; + "DefaultOn" - can be used, enabled by default; + "Unused" - cannot be used') + ), + + 'plugins' => array( + 'enable' => array(false, 'Enable plugin support'), + 'enabled_list' => array('', 'List of enabled plugins'), + ), + + 'logs' => array( + + 'enable' => array(false, 'Enable logging'), + + 'write_on_error_only' => array(false, 'Logs entire request only if error occured'), + + 'filename' => array('log-{date:Y-m-d}.txt', + 'Log filename. +For security reasons, some characters are removed from filename. +Allows for pattern-based folder creation (see examples below). + +Patterns: + {date:Y-m-d} - Replaced by pattern-based date + Detailed info: http://www.php.net/manual/en/function.date.php + {user:email} - Replaced by user\'s email address + If user is not logged in, value is set to "unknown" + {user:login} - Replaced by user\'s login + If user is not logged in, value is set to "unknown" + {user:domain} - Replaced by user\'s domain name + If user is not logged in, value is set to "unknown" + {user:uid} - Replaced by user\'s UID regardless of account currently used + +Examples: + filename = "log-{date:Y-m-d}.txt" + filename = "{date:Y-m-d}/{user:domain}/{user:email}_{user:uid}.log" + filename = "{user:email}-{date:Y-m-d}.txt"') + ), + + 'debug' => array( + 'enable' => array(false, 'Special option required for development purposes'), + ), + + 'version' => array( + 'current' => array(''), + 'saved' => array('') + ), + + 'social' => array( + 'google_enable' => array(false, 'Google'), + 'google_client_id' => array(''), + 'google_client_secret' => array(''), + + 'fb_enable' => array(false, 'Facebook'), + 'fb_app_id' => array(''), + 'fb_app_secret' => array(''), + + 'twitter_enable' => array(false, 'Twitter'), + 'twitter_consumer_key' => array(''), + 'twitter_consumer_secret' => array(''), + + 'dropbox_enable' => array(false, 'Dropbox'), + 'dropbox_api_key' => array(''), + ), + + 'cache' => array( + 'enable' => array(true, + 'The section controls caching of the entire application. + +Enables caching in the system'), + + 'index' => array('v1', 'Additional caching key. If changed, cache is purged'), + + 'fast_cache_driver' => array('files', 'Can be: files, APC, memcache'), + 'fast_cache_index' => array('v1', 'Additional caching key. If changed, fast cache is purged'), + + 'http' => array(true, 'Browser-level cache. If enabled, caching is maintainted without using files'), + 'server_uids' => array(false, 'Caching message UIDs when searching and sorting (threading)') + ), + + 'labs' => array( + 'ignore_folders_subscription' => array(false, + 'Experimental settings. Handle with care. +'), + 'allow_prefetch' => array(true), + 'allow_smart_html_links' => array(true), + 'cache_system_data' => array(true), + 'date_from_headers' => array(false), + 'autocreate_system_folders' => array(true), + 'allow_message_append' => array(false), + 'determine_user_language' => array(true), + 'login_fault_delay' => array(1), + 'log_ajax_response_write_limit' => array(300), + 'allow_html_editor_source_button' => array(false), + 'sync_dav_digest_auth' => array(true), + 'sync_dav_domain' => array(''), + 'sync_use_dav_browser' => array(true), + 'use_app_debug_js' => array(false), + 'use_app_debug_css' => array(false), + 'use_imap_sort' => array(false), + 'use_imap_force_selection' => array(false), + 'use_imap_list_subscribe' => array(true), + 'use_imap_thread' => array(true), + 'use_imap_move' => array(true), + 'use_imap_auth_plain' => array(false), + 'imap_forwarded_flag' => array('$Forwarded'), + 'imap_read_receipt_flag' => array('$ReadReceipt'), + 'smtp_show_server_errors' => array(false), + 'repo_type' => array('stable'), + 'custom_repo' => array(''), + 'additional_repo' => array(''), + 'cdn_static_domain' => array(''), + 'curl_proxy' => array(''), + 'curl_proxy_auth' => array(''), + 'in_iframe' => array(false), + 'custom_login_link' => array(''), + 'custom_logout_link' => array(''), + 'allow_external_login' => array(false), + 'fast_cache_memcache_host' => array('127.0.0.1'), + 'fast_cache_memcache_port' => array(11211), + 'fast_cache_memcache_expire' => array(43200), + 'dev_email' => array(''), + 'dev_login' => array(''), + 'dev_password' => array('') + ) + ); + } +} diff --git a/rainloop/v/0.0.0/static/ckeditor/build-config.js b/rainloop/v/0.0.0/static/ckeditor/build-config.js index 2cf8eb45c..951d6f568 100644 --- a/rainloop/v/0.0.0/static/ckeditor/build-config.js +++ b/rainloop/v/0.0.0/static/ckeditor/build-config.js @@ -13,10 +13,10 @@ * (1) http://ckeditor.com/builder * Visit online builder to build CKEditor from scratch. * - * (2) http://ckeditor.com/builder/ecd32dcd1211bb2756f9a2746d8e0ca1 + * (2) http://ckeditor.com/builder/327368eb3879dd55bb1e95e8dd1cd012 * Visit online builder to build CKEditor, starting with the same setup as before. * - * (3) http://ckeditor.com/builder/download/ecd32dcd1211bb2756f9a2746d8e0ca1 + * (3) http://ckeditor.com/builder/download/327368eb3879dd55bb1e95e8dd1cd012 * Straight download link to the latest version of CKEditor (Optimized) with the same setup as before. * * NOTE: @@ -43,15 +43,83 @@ var CKBUILDER_CONFIG = { 'enterkey' : 1, 'entities' : 1, 'floatingspace' : 1, + 'floatpanel' : 1, 'font' : 1, 'image' : 1, + 'indent' : 1, 'link' : 1, 'list' : 1, + 'panelbutton' : 1, 'removeformat' : 1, + 'sourcedialog' : 1, 'toolbar' : 1, 'undo' : 1 }, languages : { - 'en' : 1 + 'af' : 1, + 'ar' : 1, + 'bg' : 1, + 'bn' : 1, + 'bs' : 1, + 'ca' : 1, + 'cs' : 1, + 'cy' : 1, + 'da' : 1, + 'de' : 1, + 'el' : 1, + 'en' : 1, + 'en-au' : 1, + 'en-ca' : 1, + 'en-gb' : 1, + 'eo' : 1, + 'es' : 1, + 'et' : 1, + 'eu' : 1, + 'fa' : 1, + 'fi' : 1, + 'fo' : 1, + 'fr' : 1, + 'fr-ca' : 1, + 'gl' : 1, + 'gu' : 1, + 'he' : 1, + 'hi' : 1, + 'hr' : 1, + 'hu' : 1, + 'id' : 1, + 'is' : 1, + 'it' : 1, + 'ja' : 1, + 'ka' : 1, + 'km' : 1, + 'ko' : 1, + 'ku' : 1, + 'lt' : 1, + 'lv' : 1, + 'mk' : 1, + 'mn' : 1, + 'ms' : 1, + 'nb' : 1, + 'nl' : 1, + 'no' : 1, + 'pl' : 1, + 'pt' : 1, + 'pt-br' : 1, + 'ro' : 1, + 'ru' : 1, + 'si' : 1, + 'sk' : 1, + 'sl' : 1, + 'sq' : 1, + 'sr' : 1, + 'sr-latn' : 1, + 'sv' : 1, + 'th' : 1, + 'tr' : 1, + 'ug' : 1, + 'uk' : 1, + 'vi' : 1, + 'zh' : 1, + 'zh-cn' : 1 } }; \ No newline at end of file diff --git a/rainloop/v/0.0.0/static/ckeditor/ckeditor.js b/rainloop/v/0.0.0/static/ckeditor/ckeditor.js index df9d16068..1c5e13380 100644 --- a/rainloop/v/0.0.0/static/ckeditor/ckeditor.js +++ b/rainloop/v/0.0.0/static/ckeditor/ckeditor.js @@ -461,7 +461,30 @@ return function(g,e){var a=g.uiColor,a={id:"."+g.id,defaultBorder:b(a,-0.1),defa "{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(c){var e=0,d=function(g,d,b,a){if(a){var a=new CKEDITOR.style(a),f=h[b];f.unshift(a);c.attachStyleStateChange(a,function(a){!c.readOnly&&c.getCommand(b).setState(a)});c.addCommand(b,new CKEDITOR.styleCommand(a,{contentForms:f}));c.ui.addButton&&c.ui.addButton(g,{label:d,command:b,toolbar:"basicstyles,"+(e+=10)})}},h={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"== a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},b=c.config,a=c.lang.basicstyles;d("Bold",a.bold,"bold",b.coreStyles_bold);d("Italic",a.italic,"italic",b.coreStyles_italic);d("Underline",a.underline,"underline",b.coreStyles_underline);d("Strike",a.strike,"strike",b.coreStyles_strike);d("Subscript",a.subscript, "subscript",b.coreStyles_subscript);d("Superscript",a.superscript,"superscript",b.coreStyles_superscript);c.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"}; -CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){function l(e,c,b){b=e.config.forceEnterMode||b;"wysiwyg"==e.mode&&(c||(c=e.activeEnterMode),e.elementPath().isContextFor("p")||(c=CKEDITOR.ENTER_BR,b=1),e.fire("saveSnapshot"),c==CKEDITOR.ENTER_BR?o(e,c,null,b):p(e,c,null,b),e.fire("saveSnapshot"))}function q(e){for(var e=e.getSelection().getRanges(!0),c=e.length-1;0 {label}{arrowHtml}', +m=CKEDITOR.addTemplate("buttonArrow",''+(CKEDITOR.env.hc?"▼":"")+""),n=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}}; +CKEDITOR.ui.button.prototype={render:function(a,b){var c=CKEDITOR.env,i=this._.id=CKEDITOR.tools.getNextId(),f="",e=this.command,l;this._.editor=a;var d={id:i,button:this,editor:a,focus:function(){CKEDITOR.document.getById(i).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},o=CKEDITOR.tools.addFunction(function(a){if(d.onkey)return a=new CKEDITOR.dom.event(a),!1!==d.onkey(d,a.getKeystroke())}),p=CKEDITOR.tools.addFunction(function(a){var b;d.onfocus&&(b= +!1!==d.onfocus(d,new CKEDITOR.dom.event(a)));CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&a.preventBubble();return b}),j=0,q=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var b=a.editable();b.isInline()&&b.hasFocus&&(a.lockSelection(),j=1)}});d.clickFn=l=CKEDITOR.tools.addFunction(function(){j&&(a.unlockSelection(1),j=0);d.execute()});if(this.modes){var k={},g=function(){var b=a.mode;b&&(b=this.modes[b]?void 0!=k[b]?k[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&& +!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(k[a.mode]=this._.state)},this);a.on("activeFilterChange",g,this);a.on("mode",g,this);!this.readOnly&&a.on("readOnly",g,this)}else if(e&&(e=a.getCommand(e)))e.on("state",function(){this.setState(e.state)},this),f+=e.state==CKEDITOR.TRISTATE_ON?"on":e.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";if(this.directional)a.on("contentDirChanged", +function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst(),b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(h,"rtl"==b,this.icon,this.iconOffset))},this);e||(f+="off");var h=g=this.name||this.command;this.icon&&!/\./.test(this.icon)&&(h=this.icon,this.icon=null);c={id:i,name:g,iconName:h,label:this.label,cls:this.className||"",state:f,ariaDisabled:"disabled"==f?"true":"false",title:this.title,titleJs:c.gecko&& +10900<=c.version&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:o,mousedownFn:q,focusFn:p,clickFn:l,style:CKEDITOR.skin.getIconStyle(h,"rtl"==a.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?m.output():""};n.output(c,b);if(this.onRender)this.onRender();return d},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled", +!0):b.removeAttribute("aria-disabled"),this.hasArrow?(a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(a)):a==CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;!this.allowedContent&&(!this.requiredContent&&this.command)&&(b=a.getCommand(this.command)|| +b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}})();(function(){function w(a){function d(){for(var b=g(),e=CKEDITOR.tools.clone(a.config.toolbarGroups)||n(a),f=0;fa.order?-1:0>b.order?1:b.order',a.lang.toolbar.toolbars,"",''],d=!1!==a.config.toolbarStartupExpanded,e,j;a.config.toolbarCanCollapse&&a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&b.push('":' style="display:none">'));for(var o=a.toolbox.toolbars,f=w(a),k=0;k"),j=e=0),"/"===m)b.push('');else{s=m.items||m;for(var t=0;t');r&&b.push('',r,"");b.push('');var q=o.push(l)-1;0'),e=1):e&&(b.push(""),e=0);i=function(c){c=c.render(a,b);q=l.items.push(c)-1;if(q>0){c.previous=l.items[q-1];c.previous.next=c}c.toolbar=l;c.onkey=g;c.onfocus=function(){a.toolbox.focusCommandExecuted||a.focus()}}; +j&&(i(j),j=0);i(p)}}e&&(b.push(""),j=e=0);l&&b.push('')}}a.config.toolbarCanCollapse&&b.push("");if(a.config.toolbarCanCollapse&&a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var v=CKEDITOR.tools.addFunction(function(){a.execCommand("toolbarCollapse")});a.on("destroy",function(){CKEDITOR.tools.removeFunction(v)});a.addCommand("toolbarCollapse",{readOnly:1,exec:function(b){var a=b.ui.space("toolbar_collapser"),c=a.getPrevious(),e=b.ui.space("contents"), +d=c.getParent(),f=parseInt(e.$.style.height,10),h=d.$.offsetHeight,g=a.hasClass("cke_toolbox_collapser_min");g?(c.show(),a.removeClass("cke_toolbox_collapser_min"),a.setAttribute("title",b.lang.toolbar.toolbarCollapse)):(c.hide(),a.addClass("cke_toolbox_collapser_min"),a.setAttribute("title",b.lang.toolbar.toolbarExpand));a.getFirst().setText(g?"▲":"◀");e.setStyle("height",f-(d.$.offsetHeight-h)+"px");b.fire("resize")},modes:{wysiwyg:1,source:1}});a.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit? +189:109),"toolbarCollapse");b.push('','',"")}b.push("");c.data.html+=b.join("")}});a.on("destroy",function(){if(this.toolbox){var a,d=0,b,e,g;for(a=this.toolbox.toolbars;d');return{}}}}})}}); +CKEDITOR.ui.prototype.addToolbarGroup=function(a,d,g){var c=n(this.editor),h=0===d,b={name:a};if(g){if(g=CKEDITOR.tools.search(c,function(a){return a.name==g})){!g.groups&&(g.groups=[]);if(d&&(d=CKEDITOR.tools.indexOf(g.groups,d),0<=d)){g.groups.splice(d+1,0,a);return}h?g.groups.splice(0,0,a):g.groups.push(a);return}d=null}d&&(d=CKEDITOR.tools.indexOf(c,function(a){return a.name==d}));h?c.splice(0,0,a):"number"==typeof d?c.splice(d+1,0,b):c.push(a)}})();CKEDITOR.UI_SEPARATOR="separator"; +CKEDITOR.config.toolbarLocation="top";(function(){function l(e,c,b){b=e.config.forceEnterMode||b;"wysiwyg"==e.mode&&(c||(c=e.activeEnterMode),e.elementPath().isContextFor("p")||(c=CKEDITOR.ENTER_BR,b=1),e.fire("saveSnapshot"),c==CKEDITOR.ENTER_BR?o(e,c,null,b):p(e,c,null,b),e.fire("saveSnapshot"))}function q(e){for(var e=e.getSelection().getRanges(!0),c=e.length-1;0CKEDITOR.env.version?f.createText("\r"):f.createElement("br"),b.deleteContents(),b.insertNode(a),CKEDITOR.env.needsBrFiller?(f.createText("").insertAfter(a),j&&a.getParent().appendBogus(),a.getNext().$.nodeValue="",b.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):b.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),b.collapse(!0),b.select(),b.scrollIntoView())}}};var s=CKEDITOR.plugins.enterkey,o=s.enterBr,p=s.enterBlock,r=/^h[1-6]$/})();(function(){function q(a){var i=a.config,l=a.fire("uiSpace",{space:"top",html:""}).html,o=function(){function f(a,c,e){b.setStyle(c,t(e));b.setStyle("position",a)}function e(a){var b=r.getDocumentPosition();switch(a){case "top":f("absolute","top",b.y-m-n);break;case "pin":f("fixed","top",q);break;case "bottom":f("absolute","top",b.y+(c.height||c.bottom-c.top)+n)}j=a}var j,r,k,c,h,m,s,l=i.floatSpaceDockedOffsetX||0,n=i.floatSpaceDockedOffsetY||0,p=i.floatSpacePinnedOffsetX||0,q=i.floatSpacePinnedOffsetY|| +8>CKEDITOR.env.version?f.createText("\r"):f.createElement("br"),b.deleteContents(),b.insertNode(a),CKEDITOR.env.needsBrFiller?(f.createText("").insertAfter(a),j&&a.getParent().appendBogus(),a.getNext().$.nodeValue="",b.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):b.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),b.collapse(!0),b.select(),b.scrollIntoView())}}};var s=CKEDITOR.plugins.enterkey,o=s.enterBr,p=s.enterBlock,r=/^h[1-6]$/})();(function(){function j(a,b){var d={},e=[],f={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,h){var c=b?"&"+h+";":f[h];d[c]=b?f[h]:"&"+h+";";e.push(c);return""});if(!b&&a){var a=a.split(","),c=document.createElement("div"),g;c.innerHTML="&"+a.join(";&")+";";g=c.innerHTML;c=null;for(c=0;ch.height-c.bottom?e("pin"):e("bottom");var d=h.width/2,d=0k.width?"rtl"==a.config.contentsLangDirection?"right":"left":d-c.left>c.right-d?"left":"right",f;k.width>h.width? (d="left",f=0):(f="left"==d?0h.width&&(d="left"==d?"right":"left",f=0));b.setStyle(d,t(("pin"==j?p:l)+f+("pin"==j?0:"left"==d?s:-s)))}else j="pin",e("pin"),o(d)}}();if(l){var b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(u.output({content:l,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(i.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.lang.editorPanel+", "+ a.name}))),p=CKEDITOR.tools.eventsBuffer(500,o),e=CKEDITOR.tools.eventsBuffer(100,o);b.unselectable();b.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){o(b);a.on("change",p.input);g.on("scroll",e.input);g.on("resize",e.input)});a.on("blur",function(){b.hide();a.removeListener("change",p.input);g.removeListener("scroll",e.input);g.removeListener("resize",e.input)});a.on("destroy",function(){g.removeListener("scroll",e.input);g.removeListener("resize", e.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b,1)}}var u=CKEDITOR.addTemplate("floatcontainer",'
{voiceLabel}
'), -g=CKEDITOR.document.getWindow(),t=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){q(this)},null,null,20)}})})();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var i=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;darguments.length)){var c=i.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null,{role:"presentation"},function(){var f=[],d=a.required?" cke_required":"";"horizontal"!= a.labelLayout?f.push('",'
',e.call(this,b,a),"
"):(d={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'