diff --git a/CHANGELOG.md b/CHANGELOG.md index e609918af..17bc36b07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ -* **Build 15x** (2014-09-xx) - - Moved `ViewMaker` trait to live under system, it can be useful for Models too. +* **Build 15x** (2014-10-xx) + - Plugins are now updated in order of their dependency definitions. + - Moved `ViewMaker` trait now lives under system, it can be useful for Models too. * **Build 149** (2014-09-29) - Added new `hint` form field type (see Backend > Forms docs). diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index 7f640857d..e87683a2c 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -572,6 +572,20 @@ class FormController extends ControllerBehavior */ public function formExtendQuery($query) {} + /** + * Static helper for extending form fields. + * @param callable $callback + * @return void + */ + public static function extendFormFields($callback) + { + $calledClass = self::getCalledExtensionClass(); + Event::listen('backend.form.extendFields', function($widget) use ($calledClass, $callback) { + if (!is_a($widget->getController(), $calledClass)) return; + $callback($widget, $widget->model, $widget->getContext()); + }); + } + // // Internals // diff --git a/modules/backend/behaviors/ListController.php b/modules/backend/behaviors/ListController.php index 5509127f5..f700ce21d 100644 --- a/modules/backend/behaviors/ListController.php +++ b/modules/backend/behaviors/ListController.php @@ -313,4 +313,18 @@ class ListController extends ControllerBehavior */ public function listOverrideHeaderValue($columnName, $definition = null) {} + /** + * Static helper for extending form fields. + * @param callable $callback + * @return void + */ + public static function extendListColumns($callback) + { + $calledClass = self::getCalledExtensionClass(); + Event::listen('backend.list.extendColumns', function($widget) use ($calledClass, $callback) { + if (!is_a($widget->getController(), $calledClass)) return; + $callback($widget, $widget->model, $widget->getContext()); + }); + } + } \ No newline at end of file diff --git a/modules/backend/controllers/Auth.php b/modules/backend/controllers/Auth.php index 105f2a6cf..8015d892f 100644 --- a/modules/backend/controllers/Auth.php +++ b/modules/backend/controllers/Auth.php @@ -9,7 +9,7 @@ use BackendAuth; use Backend\Models\User; use Backend\Models\AccessLog; use Backend\Classes\Controller; -use System\Classes\VersionManager; +use System\Classes\UpdateManager; use System\Classes\ApplicationException; use October\Rain\Support\ValidationException; use Exception; @@ -75,7 +75,7 @@ class Auth extends Controller ], true); // Load version updates - VersionManager::instance()->updateAll(); + UpdateManager::instance()->update(); // Log the sign in event AccessLog::add($user); diff --git a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css index c130bbe0d..fde1cb191 100644 --- a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css +++ b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css @@ -1,3 +1,6 @@ +/* + Icon font +*/ @font-face { font-family: 'RedactorFont'; src: url('../vendor/redactor/redactor-font.eot'); @@ -8,247 +11,126 @@ font-weight: normal; font-style: normal; } -.redactor_box::selection { - background: #ffff9e; -} -.redactor_box::-moz-selection { - background: #ffff9e; -} -.redactor_box img::selection { - background: transparent; -} -.redactor_box img::-moz-selection { - background: transparent; -} -.redactor_box { +/* + Box +*/ +.redactor-box { position: relative; overflow: visible; background: #fff; + margin-bottom: 24px; } -.redactor_box iframe { +.redactor-box iframe, +.redactor-box textarea { display: block; - margin: 0; - padding: 0; - border: none; -} -.redactor_box textarea { position: relative; - display: block; - overflow: auto; margin: 0; padding: 0; width: 100%; +} +.redactor-box iframe { + border: 1px solid #eee; +} +.redactor-box textarea { + overflow: auto; outline: none; border: none; - background-color: #222; + background-color: #111; box-shadow: none; color: #ccc; font-size: 13px; font-family: Menlo, Monaco, monospace, sans-serif; resize: none; } -.redactor_box textarea:focus { +.redactor-box textarea:focus { outline: none; } -.redactor_box, -.redactor_box textarea { +/* + Z-index setup +*/ +.redactor-editor, +.redactor-box, +.redactor-box textarea { z-index: auto !important; } -.redactor_box_fullscreen { - z-index: 300 !important; - width: 100%!important; +.redactor-box-fullscreen { + z-index: 99 !important; } -#redactor_modal_overlay, -#redactor_modal, -.redactor_dropdown { - z-index: 302 !important; +.redactor-toolbar, +.redactor-dropdown { + z-index: 1050 !important; } -body .redactor_air { - position: absolute; - z-index: 502; +#redactor-modal-overlay, +#redactor-modal-box, +#redactor-modal { + z-index: 1051 !important; } -body .redactor_box_fullscreen { +/* + Resize +*/ +.redactor-resize { + background: #f4f4f4; + padding: 4px 0 3px 0; + cursor: move; + border: 1px solid #e3e3e3; + border-top: none; +} +.redactor-resize div { + width: 30px; + margin: auto; + border-top: 1px solid #bbb; + border-bottom: 1px solid #fff; +} +/* + Fullscreen +*/ +body .redactor-box-fullscreen { position: fixed; top: 0; left: 0; width: 100%; - background: #f9f9f9; - overflow-y: scroll !important; } -body .redactor_box_fullscreen .redactor_editor { - max-width: 960px; - margin: 20px auto !important; - padding: 20px; -} -.redactor-link-tooltip { - position: absolute; - z-index: 49999; - padding: 10px; - line-height: 1; - display: inline-block; - background-color: #000; - color: #555 !important; -} -.redactor-link-tooltip, -.redactor-link-tooltip a { - font-size: 12px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; -} -.redactor-link-tooltip a { - color: #ccc; - margin: 0 5px; - text-decoration: none; -} -.redactor-link-tooltip a:hover { - color: #fff; -} -#redactor-image-box img { - width: 100%; -} -.redactor_editor { +/* + Editor +*/ +.redactor-editor { position: relative; overflow: auto; margin: 0 !important; - padding: 10px 20px; - padding-bottom: 5px; + padding: 20px; outline: none; - background: none; - background: #fff; - box-shadow: none !important; white-space: normal; - border: none; + border: 1px solid #eee; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + font-size: 14px; + line-height: 1.6em; } -.redactor_editor:focus { +.redactor-editor:focus { outline: none; } -.redactor_editor a { - color: #15c !important; - text-decoration: underline !important; +/* + Placeholder +*/ +.redactor-placeholder { + position: relative; } -.redactor_editor .redactor_placeholder { +.redactor-placeholder:after { + position: absolute; + top: 20px; + left: 20px; + content: attr(placeholder); color: #999 !important; - display: block !important; + font-weight: normal !important; } -.redactor_editor { - font-family: Helvetica, Arial, sans-serif; - line-height: 170%; +/* Placeholder in linebreaks mode */ +.redactor-linebreaks.redactor-placeholder:after { + top: 10px; + left: 10px; } -.redactor_editor object, -.redactor_editor embed, -.redactor_editor video, -.redactor_editor img { - max-width: 100%; - width: auto; -} -.redactor_editor video, -.redactor_editor img { - height: auto; -} -.redactor_editor div, -.redactor_editor p, -.redactor_editor ul, -.redactor_editor ol, -.redactor_editor dl, -.redactor_editor blockquote, -.redactor_editor pre { - margin: 0; - margin-bottom: 10px !important; - border: none; - background: none !important; - box-shadow: none !important; -} -.redactor_editor iframe, -.redactor_editor object, -.redactor_editor hr { - margin-bottom: 15px !important; -} -.redactor_editor blockquote { - margin-left: 1.5em !important; - padding-left: 0 !important; - color: #777; - font-style: italic !important; -} -.redactor_editor ul, -.redactor_editor ol { - padding-left: 2em !important; -} -.redactor_editor ul ul, -.redactor_editor ol ol, -.redactor_editor ul ol, -.redactor_editor ol ul { - margin: 2px !important; - padding: 0 !important; - padding-left: 2em !important; - border: none; -} -.redactor_editor dl dt { - font-weight: bold; -} -.redactor_editor dd { - margin-left: 1em; -} -.redactor_editor code { - background-color: #d8d7d7 !important; -} -.redactor_editor pre { - overflow: auto; - padding: 1em !important; - border: 1px solid #ddd !important; - border-radius: 3px !important; - background: #f8f8f8 !important; - white-space: pre; - font-size: 90% !important; -} -.redactor_editor hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid #ccc; -} -.redactor_editor h1, -.redactor_editor h2, -.redactor_editor h3, -.redactor_editor h4, -.redactor_editor h5, -.redactor_editor h6 { - margin-top: 0 !important; - padding: 0 !important; - background: none; - color: #000; - font-weight: bold; -} -.redactor_editor h1 { - font-size: 36px !important; - line-height: 1.111em !important; - margin-bottom: .15em !important; -} -.redactor_editor h2 { - font-size: 30px !important; - line-height: 1.111em !important; - margin-bottom: .25em !important; -} -.redactor_editor h3 { - font-size: 24px !important; - line-height: 1.333em !important; - margin-bottom: .2em !important; -} -.redactor_editor h4 { - font-size: 18px !important; - line-height: 1.5em !important; - margin-bottom: .2em !important; -} -.redactor_editor h5 { - font-size: 1em !important; - line-height: 1.6em !important; - margin-bottom: .25em !important; -} -.redactor_editor h6 { - font-size: .8em !important; - line-height: 1.6em !important; - text-transform: uppercase; - margin-bottom: .3em !important; -} -.redactor_toolbar { +/* + Toolbar +*/ +.redactor-toolbar { position: relative; top: 0; left: 0; @@ -256,32 +138,35 @@ body .redactor_box_fullscreen .redactor_editor { padding: 0 !important; list-style: none !important; font-size: 14px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; line-height: 1 !important; + background: #fff; border: none; - background: #dddddd; - z-index: 301; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } -.redactor_toolbar:after { +.redactor-toolbar:before, +.redactor-toolbar:after { + content: " "; + display: table; +} +.redactor-toolbar:after { + clear: both; +} +.redactor-toolbar:after { content: ""; display: table; clear: both; } -.redactor_toolbar.redactor-toolbar-overflow { +.redactor-toolbar.redactor-toolbar-overflow { overflow-y: auto; height: 29px; white-space: nowrap; } -.redactor_toolbar.redactor-toolbar-external { +.redactor-toolbar.redactor-toolbar-external { z-index: 999; box-shadow: none; border: 1px solid rgba(0, 0, 0, 0.1); } -.redactor_toolbar li.redactor_btn_right { - float: right; - margin-right: 2px; -} -.redactor_toolbar li { +.redactor-toolbar li { vertical-align: top; display: inline-block; margin: 0 !important; @@ -292,12 +177,9 @@ body .redactor_box_fullscreen .redactor_editor { -moz-box-sizing: content-box; box-sizing: content-box; } -.redactor_toolbar li a { +.redactor-toolbar li a { display: block; - color: #404040; - font-size: 14px; - width: 20px; - line-height: 20px; + color: #333; text-align: center; padding: 9px 10px; outline: none; @@ -309,59 +191,47 @@ body .redactor_box_fullscreen .redactor_editor { -moz-box-sizing: content-box; box-sizing: content-box; } -.redactor_toolbar li a:hover { +.redactor-toolbar li a:hover { outline: none; - background-color: #999999; - color: #ffffff; -} -.redactor_toolbar li a:hover i:before { + background-color: #1f78d8; color: #fff; } -.redactor_toolbar li a:active, -.redactor_toolbar li a.redactor_act { - outline: none; - background-color: #404040; - color: #ffffff; +.redactor-toolbar li a:hover i:before { + color: #fff; } -.redactor_toolbar li a.redactor-btn-image { +.redactor-toolbar li a:active, +.redactor-toolbar li a.redactor-act { + outline: none; + background-color: #ccc; + color: #444; +} +.redactor-toolbar li a.redactor-btn-image { width: 14px; height: 14px; background-position: center center; background-repeat: no-repeat; } -.redactor_toolbar li a.fa-redactor-btn { +.redactor-toolbar li a.fa-redactor-btn { display: inline-block; padding: 9px 10px 8px 10px; line-height: 1; } -.redactor_toolbar.redactor-toolbar-typewriter { - box-shadow: none; - background: rgba(240, 240, 240, 0.9); -} -.redactor_toolbar.redactor-toolbar-typewriter li a:hover { - outline: none; - background-color: #1f78d8; - color: #fff; -} -.redactor_toolbar.redactor-toolbar-typewriter li a:active, -.redactor_toolbar.redactor-toolbar-typewriter li a.redactor_act { - outline: none; - background-color: #ccc; - color: #444; -} -body .redactor_air .redactor_toolbar { - padding-right: 2px !important; -} -.redactor_button_disabled { +.redactor-toolbar li a.redactor-button-disabled { + opacity: 30; + filter: alpha(opacity=3000); filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3; } -.redactor_button_disabled:hover { +.redactor-toolbar li a.redactor-button-disabled:hover { + color: #333; outline: none; background-color: transparent !important; cursor: default; } +/* + Icons +*/ .re-icon { font-family: 'RedactorFont'; speak: none; @@ -474,392 +344,103 @@ body .redactor_air .redactor_toolbar { .re-gallery:before { content: "\e61f"; } -.redactor_format_blockquote { - padding-left: 10px; - color: #666 !important; - font-style: italic; +/* + Toolbar tooltip +*/ +.redactor-toolbar-tooltip { + position: absolute; + z-index: 100; + text-align: center; + top: 0; + left: 0; + background: #000; + color: #fff; + padding: 5px 8px; + line-height: 1; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + font-size: 12px; + border-radius: 2px; } -.redactor_format_pre { - font-family: monospace, sans-serif; -} -.redactor_format_h1, -.redactor_format_h2, -.redactor_format_h3, -.redactor_format_h4, -.redactor_format_h5 { - font-weight: bold; -} -.redactor_format_h1 { - font-size: 30px; - line-height: 36px; -} -.redactor_format_h2 { - font-size: 24px; - line-height: 36px; -} -.redactor_format_h3 { - font-size: 20px; - line-height: 30px; -} -.redactor_format_h4 { - font-size: 16px; - line-height: 26px; -} -.redactor_format_h5 { - font-size: 14px; - line-height: 23px; -} -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h1, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h3, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h4, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h5 { - font-size: 1em; - line-height: 1.6em; - text-transform: uppercase; -} -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2 { - font-size: .85em; -} -.redactor_editor.redactor-editor-typewriter { - background: #f5f5f5 !important; - padding: 25px 50px !important; -} -.redactor_editor.redactor-editor-typewriter div, -.redactor_editor.redactor-editor-typewriter p, -.redactor_editor.redactor-editor-typewriter ul, -.redactor_editor.redactor-editor-typewriter ol, -.redactor_editor.redactor-editor-typewriter table, -.redactor_editor.redactor-editor-typewriter dl, -.redactor_editor.redactor-editor-typewriter blockquote, -.redactor_editor.redactor-editor-typewriter pre, -.redactor_editor.redactor-editor-typewriter h1, -.redactor_editor.redactor-editor-typewriter h2, -.redactor_editor.redactor-editor-typewriter h3, -.redactor_editor.redactor-editor-typewriter h4, -.redactor_editor.redactor-editor-typewriter h5, -.redactor_editor.redactor-editor-typewriter h6 { - font-family: 'Courier New', 'Lucida Console', Consolas, Monaco, monospace, sans-serif; - font-size: 18px !important; - line-height: 1.5em !important; - margin-bottom: 1.5em !important; -} -.redactor_editor.redactor-editor-typewriter h2 { - font-size: 14px !important; -} -.redactor_editor.redactor-editor-typewriter h1, -.redactor_editor.redactor-editor-typewriter h2, -.redactor_editor.redactor-editor-typewriter h3, -.redactor_editor.redactor-editor-typewriter h4, -.redactor_editor.redactor-editor-typewriter h5, -.redactor_editor.redactor-editor-typewriter h6 { - text-transform: uppercase; -} -.redactor_editor.redactor-editor-typewriter a { - color: #000 !important; - text-decoration: underline !important; -} -.redactor_editor.redactor_editor_wym { - padding: 10px 7px 0 7px !important; - background: #f6f6f6 !important; -} -.redactor_editor.redactor_editor_wym div, -.redactor_editor.redactor_editor_wym p, -.redactor_editor.redactor_editor_wym ul, -.redactor_editor.redactor_editor_wym ol, -.redactor_editor.redactor_editor_wym table, -.redactor_editor.redactor_editor_wym dl, -.redactor_editor.redactor_editor_wym pre, -.redactor_editor.redactor_editor_wym h1, -.redactor_editor.redactor_editor_wym h2, -.redactor_editor.redactor_editor_wym h3, -.redactor_editor.redactor_editor_wym h4, -.redactor_editor.redactor_editor_wym h5, -.redactor_editor.redactor_editor_wym h6, -.redactor_editor.redactor_editor_wym blockquote { - margin-top: 0; - margin-bottom: 5px !important; - padding: 10px !important; - border: 1px solid #e4e4e4 !important; - background-color: #fff !important; - z-index: 0; -} -.redactor_editor.redactor_editor_wym blockquote:before { - content: ''; -} -.redactor_editor.redactor_editor_wym img { - position: relative; - z-index: 1; -} -.redactor_editor.redactor_editor_wym div { - border: 1px dotted #aaa !important; -} -.redactor_editor.redactor_editor_wym pre { - border: 2px dashed #e4e4e4 !important; - background-color: #f8f8f8 !important; -} -.redactor_editor.redactor_editor_wym ul, -.redactor_editor.redactor_editor_wym ol { - padding-left: 2em !important; -} -.redactor_editor.redactor_editor_wym ul li ul, -.redactor_editor.redactor_editor_wym ol li ul, -.redactor_editor.redactor_editor_wym ul li ol, -.redactor_editor.redactor_editor_wym ol li ol { - border: none !important; -} -.redactor_dropdown { +/* + Dropdown +*/ +.redactor-dropdown { position: absolute; top: 28px; left: 0; - padding: 10px; - width: 200px; - background-color: #fff; - box-shadow: 0 1px 5px #bbb; - font-size: 13px; - font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; - line-height: 21px; -} -.redactor-toolbar-typewriter .redactor_dropdown { - font-family: 'Courier New', 'Lucida Console', Consolas, Monaco, monospace, sans-serif; - background-color: #f5f5f5; -} -.redactor_separator_drop { - padding: 0 !important; - border-top: 1px solid #ddd; - font-size: 0; - line-height: 0; -} -.redactor_dropdown a { - display: block; - padding: 3px 5px; - color: #000; - text-decoration: none; -} -.redactor_dropdown a:hover { - background-color: #dde4ef; - color: #444 !important; - text-decoration: none; -} -#redactor_modal_overlay { - position: fixed; - top: 0; - left: 0; - margin: auto; - width: 100%; - height: 100%; - background-color: #000 !important; - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; -} -#redactor_modal { - position: fixed; - top: 50%; - left: 50%; padding: 0; - background: #fff; - color: #000; - font-size: 12px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); -} -#redactor_modal header { - padding: 20px 30px 5px 30px; - font-size: 16px; -} -#redactor_modal section { - padding: 20px 30px; -} -#redactor_modal label { - display: block !important; - float: none !important; - margin: 10px 0 3px 0 !important; - padding: 0 !important; - font-size: 12px !important; -} -#redactor_modal footer:after { - content: ""; - display: table; - clear: both; -} -#redactor_modal footer div { - float: left; -} -#redactor_modal input[type="radio"], -#redactor_modal input[type="checkbox"] { - position: relative; - top: -1px; -} -#redactor_modal input[type="text"], -#redactor_modal input[type="password"], -#redactor_modal input[type="email"], -#redactor_modal textarea { - position: relative; - z-index: 2; - margin: 0; - padding: 1px 2px; - height: 23px; - border: 1px solid #ccc; - border-radius: 1px; - background-color: white; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; - color: #333; - font-size: 13px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - line-height: 1; - -moz-transition: border 0.3s ease-in; - transition: border 0.3s ease-in; -} -#redactor_modal textarea { - display: block; - margin-top: 4px; - line-height: 1.4em; -} -#redactor_modal input:focus, -#redactor_modal textarea:focus { - outline: none; - border-color: #5ca9e4; - box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; -} -#redactor_modal_close { - position: absolute; - top: 5px; - right: 3px; - width: 20px; - height: 20px; - color: #999; - font-size: 26px; - cursor: pointer; -} -#redactor_modal_close:hover { - color: #000; -} -.redactor_input { - width: 99%; + min-width: 220px; + max-height: 254px; + overflow: auto; + background-color: #fff; + box-shadow: 0 1px 7px rgba(0, 0, 0, 0.25); font-size: 14px; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + line-height: 1.6em; } -.redactor_modal_box { - overflow: auto; - margin-bottom: 10px; - height: 350px; -} -#redactor_image_box { - overflow: auto; - margin-bottom: 10px; - height: 270px; -} -#redactor_image_box_select { +.redactor-dropdown a { display: block; - margin-bottom: 15px !important; - width: 200px; -} -#redactor_image_box img { - margin-right: 10px; - margin-bottom: 10px; - max-width: 100px; - cursor: pointer; -} -#redactor_tabs { - margin-bottom: 18px; -} -#redactor_tabs a { - display: inline-block; - margin-right: 2px; - padding: 4px 14px; - border: 1px solid #d2d2d2; - border-radius: 3px; - background: #fff; + padding: 10px 15px; color: #000; text-decoration: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.07); +} +.redactor-dropdown a:last-child { + border-bottom: none; +} +.redactor-dropdown a:hover { + background-color: #1f78d8; + color: #fff !important; + text-decoration: none; +} +/* + LINK TOOLTIP +*/ +.redactor-link-tooltip { + position: absolute; + z-index: 49999; + padding: 10px; line-height: 1; + display: inline-block; + background-color: #000; + color: #555 !important; } -#redactor_tabs a:hover, -#redactor_tabs a.redactor_tabs_act { - border-color: #eee; - color: #999 !important; - text-decoration: none !important; -} -.redactor_modal_btn_hidden { - display: none; -} -#redactor_modal footer button { - position: relative; - width: 100%; - padding: 10px 16px; - margin: 0; - outline: none; - border: none; - background-color: #ddd; - color: #000; - text-align: center; - text-decoration: none; - font-weight: normal; +.redactor-link-tooltip, +.redactor-link-tooltip a { font-size: 12px; font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - line-height: 1; - cursor: pointer; } -#redactor_modal footer button:hover { - color: #777; - background: none; - background: #bbb; +.redactor-link-tooltip a { + color: #ccc; + margin: 0 5px; text-decoration: none; } -#redactor_modal footer button.redactor_modal_delete_btn { - background: none; +.redactor-link-tooltip a:hover { color: #fff; - background-color: #b52525; } -#redactor_modal footer button.redactor_modal_delete_btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #881b1b; -} -#redactor_modal footer button.redactor_modal_action_btn { - background: none; - color: #fff; - background-color: #2461b5; -} -#redactor_modal footer button.redactor_modal_action_btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #1a4580; -} -/* Drag and Drop Area */ -.redactor_droparea { +/* + DROPAREA +*/ +#redactor-droparea { position: relative; - margin: auto; - margin-bottom: 5px; - width: 100%; + overflow: hidden; + padding: 140px 20px; + border: 3px dashed rgba(0, 0, 0, 0.1); } -.redactor_droparea .redactor_dropareabox { - position: relative; - z-index: 1; - padding: 60px 0; - width: 99%; - border: 1px dashed #ddd; - background: #fff; +#redactor-droparea.drag-hover { + background: rgba(200, 222, 250, 0.75); +} +#redactor-droparea.drag-drop { + background: rgba(250, 248, 200, 0.5); +} +#redactor-droparea-placeholder { text-align: center; -} -.redactor_droparea .redactor_dropareabox, -.redactor_dropalternative { - color: #555; font-size: 12px; + color: rgba(0, 0, 0, 0.7); } -.redactor_dropalternative { - margin: 4px 0 2px 0; -} -.redactor_dropareabox.hover { - border-color: #aaa; - background: #efe3b8; -} -.redactor_dropareabox.error { - border-color: #dcc3c3; - background: #f7e5e5; -} -.redactor_dropareabox.drop { - border-color: #e0e5d6; - background: #f4f4ee; -} +/* + PROGRESS +*/ #redactor-progress { position: fixed; top: 0; @@ -905,27 +486,406 @@ body .redactor_air .redactor_toolbar { background-position: 0 0; } } -.redactor_editor figure { +/* + MODAL +*/ +#redactor-modal-overlay { + position: fixed; + top: 0; + left: 0; + margin: auto; + overflow: auto; + width: 100%; + height: 100%; + background-color: #000 !important; + opacity: 30; + filter: alpha(opacity=3000); + filter: alpha(opacity=30); + -moz-opacity: 0.3; + opacity: 0.3; +} +#redactor-modal-box { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + overflow-x: hidden; + overflow-y: auto; +} +#redactor-modal { + position: relative; + margin: auto; + margin-bottom: 20px; + padding: 0; + background: #fff; + color: #000; + font-size: 14px !important; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + box-shadow: 0 1px 70px rgba(0, 0, 0, 0.5); +} +#redactor-modal header { + padding: 30px 40px 5px 40px; + font-size: 18px; + font-weight: bold; +} +#redactor-modal section { + padding: 30px 40px 50px 40px; +} +#redactor-modal label { + display: block; + float: none !important; + margin: 15px 0 3px 0 !important; + padding: 0; +} +#redactor-modal input[type="radio"], +#redactor-modal input[type="checkbox"] { + position: relative; + top: -1px; +} +#redactor-modal select { + width: 100%; +} +#redactor-modal input[type="text"], +#redactor-modal input[type="password"], +#redactor-modal input[type="email"], +#redactor-modal input[type="url"], +#redactor-modal textarea { + position: relative; + z-index: 2; + margin: 0; + padding: 5px 4px; + height: 28px; + border: 1px solid #ccc; + border-radius: 1px; + background-color: white; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; + color: #333; + width: 100%; + font-size: 14px; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + -webkit-transition: border 0.3s ease-in; + -moz-transition: border 0.3s ease-in; + transition: border 0.3s ease-in; +} +#redactor-modal input[type="text"]:focus, +#redactor-modal input[type="password"]:focus, +#redactor-modal input[type="email"]:focus, +#redactor-modal input[type="url"]:focus, +#redactor-modal textarea:focus { + outline: none; + border-color: #5ca9e4; + box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; +} +#redactor-modal input[type="text"].redactor-input-error, +#redactor-modal input[type="password"].redactor-input-error, +#redactor-modal input[type="email"].redactor-input-error, +#redactor-modal input[type="url"].redactor-input-error, +#redactor-modal textarea.redactor-input-error { + border-color: #e82f2f; + box-shadow: 0 0 0 2px rgba(232, 47, 47, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; +} +#redactor-modal textarea { + display: block; + margin-top: 4px; + line-height: 1.4em; +} +/* + Tabs in Modal +*/ +#redactor-modal-tabber { + margin-bottom: 15px; + font-size: 12px; +} +#redactor-modal-tabber a { + border: 1px solid #ddd; + line-height: 1; + padding: 8px 15px; + margin-right: -1px; + text-decoration: none; + color: #000; +} +#redactor-modal-tabber a:hover { + background-color: #1f78d8; + border-color: #1f78d8; + color: #fff; +} +#redactor-modal-tabber a.active { + cursor: default; + background-color: #ddd; + border-color: #ddd; + color: rgba(0, 0, 0, 0.6); +} +/* + List in Modal +*/ +#redactor-modal #redactor-modal-list { + margin-left: 0; + padding-left: 0; + list-style: none; + max-height: 250px; + overflow-x: scroll; +} +#redactor-modal #redactor-modal-list li { + border-bottom: 1px solid #ddd; +} +#redactor-modal #redactor-modal-list li:last-child { + border-bottom: none; +} +#redactor-modal #redactor-modal-list a { + padding: 10px 5px; + color: #000; + text-decoration: none; + font-size: 13px; + display: block; position: relative; } -.redactor_editor figcaption { +#redactor-modal #redactor-modal-list a:hover { + background-color: #eee; +} +#redactor-modal-close { + position: absolute; + top: 10px; + right: 10px; + width: 30px; + height: 30px; + text-align: right; + color: #bbb; + font-size: 30px; + font-weight: 300; + cursor: pointer; +} +#redactor-modal-close:hover { + color: #000; +} +#redactor-modal footer button { + position: relative; + width: 100%; + padding: 14px 16px; + margin: 0; + outline: none; + border: none; + background-color: #ddd; + color: #000; + text-align: center; + text-decoration: none; + font-weight: normal; + font-size: 12px; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + line-height: 1; + cursor: pointer; +} +#redactor-modal footer button:hover { + color: #777; + background: none; + background: #bbb; + text-decoration: none; +} +#redactor-modal footer button.redactor-modal-delete-btn { + background: none; + color: #fff; + background-color: #b52525; +} +#redactor-modal footer button.redactor-modal-delete-btn:hover { + color: rgba(255, 255, 255, 0.6); + background-color: #881b1b; +} +#redactor-modal footer button.redactor-modal-action-btn { + background: none; + color: #fff; + background-color: #2461b5; +} +#redactor-modal footer button.redactor-modal-action-btn:hover { + color: rgba(255, 255, 255, 0.6); + background-color: #1a4580; +} +/* + ############################################## + + DROPDOWN FORMATTING + + ############################################## +*/ +.redactor-dropdown .redactor-formatting-blockquote { + color: rgba(0, 0, 0, 0.4); + font-style: italic; +} +.redactor-dropdown .redactor-formatting-pre { + font-family: monospace, sans-serif; +} +.redactor-dropdown .redactor-formatting-h1 { + font-size: 36px; + line-height: 36px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h2 { + font-size: 24px; + line-height: 36px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h3 { + font-size: 21px; + line-height: 30px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h4 { + font-size: 18px; + line-height: 26px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h5 { + font-size: 16px; + line-height: 23px; + font-weight: bold; +} +/* + ############################################## + + CONTENT STYLES + + ############################################## +*/ +.redactor-editor a { + color: #15c; + text-decoration: underline; +} +.redactor-editor object, +.redactor-editor embed, +.redactor-editor video, +.redactor-editor img { + max-width: 100%; + width: auto; +} +.redactor-editor video, +.redactor-editor img { + height: auto; +} +.redactor-editor div, +.redactor-editor p, +.redactor-editor ul, +.redactor-editor ol, +.redactor-editor table, +.redactor-editor dl, +.redactor-editor figure, +.redactor-editor blockquote, +.redactor-editor pre { + margin: 0; + margin-bottom: 15px; + border: none; + background: none; + box-shadow: none; +} +.redactor-editor iframe, +.redactor-editor object, +.redactor-editor hr { + margin-bottom: 15px; +} +.redactor-editor iframe { + width: auto; +} +.redactor-editor blockquote { + margin-left: 1.6em !important; + padding-left: 0; + color: #777; + font-style: italic; +} +.redactor-editor ul, +.redactor-editor ol { + padding-left: 2em; +} +.redactor-editor ul ul, +.redactor-editor ol ol, +.redactor-editor ul ol, +.redactor-editor ol ul { + margin: 2px; + padding: 0; + padding-left: 2em; + border: none; +} +.redactor-editor dl dt { + font-weight: bold; +} +.redactor-editor dd { + margin-left: 1em; +} +.redactor-editor code { + background-color: #d8d7d7; +} +.redactor-editor pre { + overflow: auto; + padding: 1em; + border: 1px solid #ddd; + border-radius: 3px; + background: #f8f8f8; + white-space: pre; + font-size: 90%; +} +.redactor-editor hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; +} +.redactor-editor h1, +.redactor-editor h2, +.redactor-editor h3, +.redactor-editor h4, +.redactor-editor h5, +.redactor-editor h6 { + font-weight: bold; + color: #0000; + padding: 0; + background: none; + text-rendering: optimizeLegibility; + margin: 0 0 .5em 0; +} +.redactor-editor h1, +.redactor-editor h2, +.redactor-editor h3, +.redactor-editor h4 { + line-height: 1.3; +} +.redactor-editor h1 { + font-size: 36px; +} +.redactor-editor h2 { + font-size: 24px; + margin-bottom: .7em; +} +.redactor-editor h3 { + font-size: 21px; +} +.redactor-editor h4 { + font-size: 18px; +} +.redactor-editor h5 { + font-size: 16px; +} +.redactor-editor h6 { + font-size: 12px; + text-transform: uppercase; +} +.redactor-editor figure { + position: relative; +} +.redactor-editor figcaption { text-align: center; line-height: 20px; font-size: 14px; } -.redactor_editor figure[data-type=table] { +.redactor-editor figure[data-type=table] { clear: both; } -.redactor_editor figure[data-type=video] { +.redactor-editor figure[data-type=video] { position: relative; margin-bottom: 20px; text-align: center; clear: both; } -.redactor_editor figure[data-type=video] p { +.redactor-editor figure[data-type=video] p { margin: 0; } -.redactor_editor figure[data-type=video].oc-figure-full:before { +.redactor-editor figure[data-type=video].oc-figure-full:before { position: relative; padding-bottom: 51%; width: 100%; @@ -933,34 +893,34 @@ body .redactor_air .redactor_toolbar { content: ""; display: block; } -.redactor_editor figure[data-type=video].oc-figure-full iframe { +.redactor-editor figure[data-type=video].oc-figure-full iframe { width: 100%; height: 100%; position: absolute; left: 0; top: 0; } -.redactor_editor figure[data-type=image] { +.redactor-editor figure[data-type=image] { position: relative; margin-bottom: 20px; } -.redactor_editor figure[data-type=image] .oc-figure-controls { +.redactor-editor figure[data-type=image] .oc-figure-controls { top: 0px; } -.redactor_editor figure[data-type=image] img { +.redactor-editor figure[data-type=image] img { width: 100%; } -.redactor_editor figure[data-type=image].oc-figure-large { +.redactor-editor figure[data-type=image].oc-figure-large { width: 100%; clear: both; } -.redactor_editor figure[data-type=image].oc-figure-medium { +.redactor-editor figure[data-type=image].oc-figure-medium { width: 50%; } -.redactor_editor figure[data-type=image].oc-figure-small { +.redactor-editor figure[data-type=image].oc-figure-small { width: 33%; } -.redactor_editor figure[data-type=quote] { +.redactor-editor figure[data-type=quote] { font-family: Georgia, serif; margin-bottom: 20px; margin-left: 20px; @@ -969,25 +929,25 @@ body .redactor_air .redactor_toolbar { border-left: solid 4px #cccccc; padding-left: 20px; } -.redactor_editor figure[data-type=quote] figcaption { +.redactor-editor figure[data-type=quote] figcaption { font-weight: bold; text-align: left; } -.redactor_editor figure[data-type=quote] .oc-figure-controls { +.redactor-editor figure[data-type=quote] .oc-figure-controls { margin-left: -5px; } -.redactor_editor figure[data-type=quote].oc-figure-medium, -.redactor_editor figure[data-type=quote].oc-figure-medium blockquote { +.redactor-editor figure[data-type=quote].oc-figure-medium, +.redactor-editor figure[data-type=quote].oc-figure-medium blockquote { font-size: 20px; } -.redactor_editor figure[data-type=quote].oc-figure-large, -.redactor_editor figure[data-type=quote].oc-figure-large blockquote { +.redactor-editor figure[data-type=quote].oc-figure-large, +.redactor-editor figure[data-type=quote].oc-figure-large blockquote { font-size: 24px; } -.redactor_editor figure[data-type=quote].oc-figure-right { +.redactor-editor figure[data-type=quote].oc-figure-right { width: 33%; } -.redactor_editor figure[data-type=quote].oc-figure-left { +.redactor-editor figure[data-type=quote].oc-figure-left { width: 33%; border-left: none; border-right: solid 4px #cccccc; @@ -996,30 +956,27 @@ body .redactor_air .redactor_toolbar { margin-left: 0; margin-right: 20px; } -.redactor_editor figure[data-type=quote].oc-figure-left .oc-figure-controls { +.redactor-editor figure[data-type=quote].oc-figure-left .oc-figure-controls { margin-left: 0; margin-right: -5px; } -.redactor_editor figure[data-type=quote] cite { +.redactor-editor figure[data-type=quote] cite { display: block; text-align: left; font-weight: bold; } -.redactor_editor figure[data-type=quote] cite:before { +.redactor-editor figure[data-type=quote] cite:before { content: "\2014\00a0"; } -.redactor_editor figure[data-type=quote] cite:empty:before { +.redactor-editor figure[data-type=quote] cite:empty:before { opacity: 0.4; content: "\2014 Type to add citation (optional)"; } -.redactor_box figure:hover .oc-figure-controls { - display: block; -} -.redactor_box figcaption:empty:before { +.redactor-box figcaption:empty:before { opacity: .4; content: "Type to add caption (optional)"; } -.redactor_box .oc-figure-controls { +.redactor-box .oc-figure-controls { background: #dddddd !important; padding: 0; position: absolute; @@ -1036,7 +993,10 @@ body .redactor_air .redactor_toolbar { z-index: 800; text-align: center; } -.redactor_box .oc-figure-controls span { +.redactor-box figure:hover .oc-figure-controls { + display: block; +} +.redactor-box .oc-figure-controls span { display: inline-block; border: none; background: none; @@ -1049,35 +1009,35 @@ body .redactor_air .redactor_toolbar { text-align: center; cursor: pointer; } -.redactor_box .oc-figure-controls span:before { +.redactor-box .oc-figure-controls span:before { line-height: 24px; } -.redactor_box .oc-figure-controls span:hover { +.redactor-box .oc-figure-controls span:hover { background: rgba(255, 255, 255, 0.3); color: #fff; background: #999999; color: #ffffff; } -.redactor_box .oc-figure-controls span.on { +.redactor-box .oc-figure-controls span.on { background: #fff; color: #555555; background-color: #404040; color: #ffffff; } -.redactor_box .oc-figure-controls span.oc-figure-controls-divider { +.redactor-box .oc-figure-controls span.oc-figure-controls-divider { width: 1px; background: #cccccc; padding: 0; margin: 0 4px; cursor: normal; } -.redactor_box .oc-figure-controls span.oc-figure-controls-small { +.redactor-box .oc-figure-controls span.oc-figure-controls-small { font-size: 7px; } -.redactor_box .oc-figure-controls span.oc-figure-controls-medium { +.redactor-box .oc-figure-controls span.oc-figure-controls-medium { font-size: 10px; } -.redactor_box .oc-figure-controls span.oc-figure-controls-arrow-left:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-arrow-left:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1086,7 +1046,7 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f060"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-arrow-right:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-arrow-right:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1095,7 +1055,7 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f061"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-arrow-up:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-arrow-up:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1104,7 +1064,7 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f062"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-arrow-down:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-arrow-down:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1113,7 +1073,7 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f063"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-resize-full:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-resize-full:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1122,7 +1082,7 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f065"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-resize-small:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-resize-small:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1131,10 +1091,10 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f066"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-delete { +.redactor-box .oc-figure-controls span.oc-figure-controls-delete { margin-left: 20px; } -.redactor_box .oc-figure-controls span.oc-figure-controls-delete:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-delete:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1143,16 +1103,16 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f014"; } -.redactor_box .oc-figure-controls span.oc-figure-controls-delete:hover { +.redactor-box .oc-figure-controls span.oc-figure-controls-delete:hover { background: #c63e26; } -.redactor_box .oc-figure-controls span.oc-figure-controls-table { +.redactor-box .oc-figure-controls span.oc-figure-controls-table { width: auto; padding-left: 10px; padding-right: 10px; text-align: left; } -.redactor_box .oc-figure-controls span.oc-figure-controls-table:before { +.redactor-box .oc-figure-controls span.oc-figure-controls-table:before { font-family: FontAwesome; font-weight: normal; font-style: normal; @@ -1161,42 +1121,42 @@ body .redactor_air .redactor_toolbar { *margin-right: .3em; content: "\f0ce"; } -.redactor_box .oc-figure-right { +.redactor-box .oc-figure-right { float: right; margin-left: 20px; } -.redactor_box .oc-figure-right .oc-figure-controls { +.redactor-box .oc-figure-right .oc-figure-controls { right: 0; } -.redactor_box .oc-figure-left { +.redactor-box .oc-figure-left { float: left; margin-right: 20px; } -.redactor_box .oc-dropdown-menu, -.redactor_box .oc-dropdown-menu ul { +.redactor-box .oc-dropdown-menu, +.redactor-box .oc-dropdown-menu ul { padding: 0 !important; } -.redactor_box .oc-dropdown-menu ul { +.redactor-box .oc-dropdown-menu ul { background-color: #ffffff !important; } -.redactor_box .oc-dropdown-menu a { +.redactor-box .oc-dropdown-menu a { text-decoration: none; padding: 0 15px !important; color: #39454a !important; text-decoration: none !important; } -.redactor_box .oc-dropdown-menu a:hover, -.redactor_box .oc-dropdown-menu a:focus { +.redactor-box .oc-dropdown-menu a:hover, +.redactor-box .oc-dropdown-menu a:focus { color: #ffffff !important; } @media (max-width: 769px) { - .redactor_box figure[data-type=image] { + .redactor-box figure[data-type=image] { width: 100% !important; float: none !important; margin-left: 0; margin-right: 0; } - .redactor_box figure[data-type=video] iframe { + .redactor-box figure[data-type=video] iframe { width: 100% !important; height: auto !important; } @@ -1305,61 +1265,120 @@ body .redactor_air .redactor_toolbar { border: 1px solid #e0e0e0; } .field-richeditor, -.field-richeditor .redactor_box { +.field-richeditor .redactor-box { -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } -.field-richeditor .redactor_toolbar { +.field-richeditor .redactor-toolbar { border-top-right-radius: 3px; border-top-left-radius: 3px; } .field-richeditor.editor-focus { border-color: #808c8d; } -.field-richeditor.size-tiny .redactor_editor { +.field-richeditor.size-tiny .redactor-editor { height: 20px !important; } -.field-richeditor.size-small .redactor_editor { +.field-richeditor.size-small .redactor-editor { height: 70px !important; } -.field-richeditor.size-large .redactor_editor { +.field-richeditor.size-large .redactor-editor { height: 170px !important; } -.field-richeditor.size-huge .redactor_editor { +.field-richeditor.size-huge .redactor-editor { height: 220px !important; } -.field-richeditor.size-giant .redactor_editor { +.field-richeditor.size-giant .redactor-editor { height: 320px !important; } -.field-richeditor.stretch .redactor_box { +.redactor-box { + margin-bottom: 0; +} +.redactor-box iframe { + border: none; +} +.redactor-box-fullscreen { + z-index: 399 !important; +} +.redactor-toolbar, +.redactor-dropdown { + z-index: 1350 !important; +} +#redactor-modal-overlay, +#redactor-modal-box, +#redactor-modal { + z-index: 1351 !important; +} +.redactor-toolbar { + background: #dddddd; + -webkit-box-shadow: none; + box-shadow: none; +} +.redactor-toolbar li.redactor-btn-right { + float: right; + margin-right: 2px; +} +.redactor-toolbar li a { + color: #404040; + font-size: 14px; + width: 20px; + line-height: 20px; +} +.redactor-toolbar li a:hover { + background-color: #999999; + color: #ffffff; +} +.redactor-toolbar li a:active, +.redactor-toolbar li a.redactor-act { + background-color: #404040; + color: #ffffff; +} +.redactor-editor { + border: none; +} +body .redactor-box-fullscreen { + background: #f9f9f9; + overflow-y: scroll !important; + width: 100%!important; +} +body .redactor-box-fullscreen .redactor-editor { + background: #fff; + max-width: 960px; + margin: 20px auto !important; + padding: 20px; +} +.field-richeditor.stretch .redactor-box { display: block; position: relative; - height: 100%!important; - width: 100%!important; + height: 100% !important; + width: 100% !important; + -webkit-border-radius: 0 !important; + -moz-border-radius: 0 !important; + border-radius: 0 !important; overflow: hidden; } -.field-richeditor.stretch .redactor_box .redactor_toolbar { +.field-richeditor.stretch .redactor-box .redactor-toolbar { + -webkit-border-radius: 0 !important; + -moz-border-radius: 0 !important; + border-radius: 0 !important; display: block; border-bottom: none; position: absolute; top: 0; width: 100%; } -.field-richeditor.stretch .redactor_box .redactor_editor, -.field-richeditor.stretch .redactor_box textarea { - height: auto !important; - width: 100%!important; +.field-richeditor.stretch .redactor-box .redactor-editor, +.field-richeditor.stretch .redactor-box textarea { + width: 100% !important; left: 0; top: 0; bottom: 0; position: absolute; } -.field-richeditor.stretch .redactor_box textarea { +.field-richeditor.stretch .redactor-box .redactor-editor { + height: auto !important; +} +.field-richeditor.stretch .redactor-box textarea { padding: 10px; } -.field-richeditor.stretch .redactor_box iframe { - display: block; - position: absolute; - height: 100% !important; -} diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.cleanup.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.cleanup.js index 8f473bfac..dbd6525d9 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.cleanup.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.cleanup.js @@ -26,9 +26,11 @@ } - window.RedactorPlugins.cleanup = { - init: function () { - this.cleanup = new Cleanup(this) + window.RedactorPlugins.cleanup = function() { + return { + init: function () { + this.cleanup = new Cleanup(this) + } } } diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js index 41fc60864..20b70dce2 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.figure.js @@ -32,7 +32,7 @@ */ this.redactor.$editor.on('click', 'figcaption:empty, cite:empty', $.proxy(function (event) { $(event.target).prepend('
') - this.redactor.selectionEnd(event.target) + this.redactor.caret.setEnd(event.target) event.stopPropagation() }, this)) @@ -47,7 +47,7 @@ * Prevent user from removing captions or citations with delete/backspace keys */ this.redactor.$editor.on('keydown', $.proxy(function (event) { - var current = this.redactor.getCurrent(), + var current = this.redactor.selection.getCurrent(), isEmpty = !current.length, isCaptionNode = !!$(current).closest('figcaption, cite').length, isDeleteKey = $.inArray(event.keyCode, [this.redactor.keyCode.BACKSPACE, this.redactor.keyCode.DELETE]) >= 0 @@ -71,14 +71,14 @@ }).remove() if (this.redactor.opts.visual) { - this.redactor.sync() + this.redactor.code.sync() } }, showToolbar: function (event) { var $figure = $(event.currentTarget), type = $figure.data('type') || 'default', - $toolbar = this.getToolbar(type).data('figure', $figure).prependTo($figure) + $toolbar = this.getToolbar(type).data('figure', $figure).prependTo($figure).show() if (this.redactor[type] && this.redactor[type].onShow) { this.redactor[type].onShow($figure, $toolbar) @@ -86,7 +86,7 @@ }, hideToolbar: function (event) { - $(event.currentTarget).find('.oc-figure-controls').appendTo(this.redactor.$box) + $(event.currentTarget).find('.oc-figure-controls').appendTo(this.redactor.$box).hide() }, observeToolbars: function () { @@ -94,9 +94,9 @@ /* * Before clicking a command, make sure we save the current node within the editor */ - this.redactor.$editor.on('mousedown', '.oc-figure-controls', $.proxy(function () { + this.redactor.$editor.on('mousedown', '.oc-figure-controls', $.proxy(function (event) { event.preventDefault() - this.current = this.redactor.getCurrent() + this.current = this.redactor.selection.getCurrent() }, this)) this.redactor.$editor.on('click', '.oc-figure-controls span, .oc-figure-controls a', $.proxy(function (event) { @@ -116,7 +116,7 @@ /* * Mobile */ - if (this.redactor.isMobile()) { + if (this.redactor.utils.isMobile()) { /* * If $editor is focused, click doesn't seem to fire @@ -244,7 +244,7 @@ /* * Maintain undo history */ - this.redactor.bufferSet(this.redactor.$editor.html()) + this.redactor.buffer.set(this.redactor.$editor.html()) /* * Shared functions @@ -269,7 +269,7 @@ break } - this.redactor.sync() + this.redactor.code.sync() }, @@ -279,21 +279,28 @@ /* * Node at cursor */ - var currentNode = redactor.getBlock() + var currentNode = redactor.selection.getBlock() /* * Delete key */ - if (event.keyCode === 8 && !redactor.getCaretOffset(currentNode) && currentNode.previousSibling && currentNode.previousSibling.nodeName === 'FIGURE') { + if ( + event.keyCode === 8 + && !redactor.caret.getOffset(currentNode) + && currentNode.previousSibling + && currentNode.previousSibling.nodeName === 'FIGURE' + ) { event.preventDefault() } }) } } - window.RedactorPlugins.figure = { - init: function () { - this.figure = new Figure(this) + window.RedactorPlugins.figure = function() { + return { + init: function () { + this.figure = new Figure(this) + } } } diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.fullscreen.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.fullscreen.js index 7d6991620..8e0392850 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.fullscreen.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.fullscreen.js @@ -3,182 +3,127 @@ window.RedactorPlugins = window.RedactorPlugins || {}; - window.RedactorPlugins.fullscreen = { + window.RedactorPlugins.fullscreen = function() { + return { - init: function() { + init: function() { + this.fullscreen.isOpen = false - this.fullscreen = false + var button = this.button.add('fullscreen', 'FullScreen') + this.button.addCallback(button, $.proxy(this.fullscreen.toggle, this)) + button.addClass('redactor_btn_fullscreen').removeClass('redactor-btn-image') + button.parent().addClass('redactor-btn-right') - this.buttonAdd('fullscreen', 'Fullscreen', $.proxy(this.toggleFullscreen, this)) - this.buttonGet('fullscreen').addClass('redactor_btn_fullscreen').removeClass('redactor-btn-image') - this.buttonGet('fullscreen').parent().addClass('redactor_btn_right') + if (this.opts.fullscreen) + this.fullscreen.toggle() + }, - if (this.opts.fullscreen) - this.toggleFullscreen() + toggle: function() { + if (!this.fullscreen.isOpen) + this.fullscreen.enable() + else + this.fullscreen.disable() + }, - }, + enable: function() { + this.button.changeIcon('fullscreen', 'normalscreen') + this.button.setActive('fullscreen') + this.fullscreen.isOpen = true - toggleFullscreen: function() { - if (!this.fullscreen) - this.enableFullScreen() - else - this.disableFullScreen() - }, + if (this.opts.toolbarExternal) { + this.fullscreen.toolcss = {} + this.fullscreen.boxcss = {} + this.fullscreen.toolcss.width = this.$toolbar.css('width') + this.fullscreen.toolcss.top = this.$toolbar.css('top') + this.fullscreen.toolcss.position = this.$toolbar.css('position') + this.fullscreen.boxcss.top = this.$box.css('top') + } - enableFullScreen: function() { - var html + this.fullscreen.height = this.$editor.height() - this.buttonChangeIcon('fullscreen', 'normalscreen') - this.buttonActive('fullscreen') - this.fullscreen = true + if (this.opts.maxHeight) this.$editor.css('max-height', '') + if (this.opts.minHeight) this.$editor.css('min-height', '') - if (this.opts.toolbarExternal) { - this.toolcss = {} - this.boxcss = {} - this.toolcss.width = this.$toolbar.css('width') - this.toolcss.top = this.$toolbar.css('top') - this.toolcss.position = this.$toolbar.css('position') - this.boxcss.top = this.$box.css('top') + if (!this.$fullscreenPlaceholder) this.$fullscreenPlaceholder = $('
') + this.$fullscreenPlaceholder.insertAfter(this.$box) + + this.$box.appendTo(document.body) + + this.$box.addClass('redactor-box-fullscreen') + $('body, html').css('overflow', 'hidden') + + this.fullscreen.resize() + $(window).on('resize.redactor.fullscreen', $.proxy(this.fullscreen.resize, this)) + $(document).scrollTop(0, 0) + + this.$editor.focus() + this.observe.load() + }, + + disable: function() { + this.button.removeIcon('fullscreen', 'normalscreen') + this.button.setInactive('fullscreen') + this.fullscreen.isOpen = false + + $(window).off('resize.redactor.fullscreen') + $('body, html').css('overflow', '') + + this.$box.insertBefore(this.$fullscreenPlaceholder) + this.$fullscreenPlaceholder.remove() + + this.$box.removeClass('redactor-box-fullscreen').css({ width: 'auto', height: 'auto' }) + + this.code.sync() + + if (this.opts.toolbarExternal) { + this.$box.css('top', this.fullscreen.boxcss.top) + this.$toolbar.css({ + 'width': this.fullscreen.toolcss.width, + 'top': this.fullscreen.toolcss.top, + 'position': this.fullscreen.toolcss.position + }) + } + + if (this.opts.minHeight) this.$editor.css('minHeight', this.opts.minHeight) + if (this.opts.maxHeight) this.$editor.css('maxHeight', this.opts.maxHeight) + + this.$editor.css('height', 'auto') + this.$editor.focus() + this.observe.load() + }, + + resize: function() { + if (!this.fullscreen.isOpen) + return false + + var pad = this.$editor.css('padding-top').replace('px', '') + + var toolbarHeight = this.$toolbar.height(), + height = $(window).height() - toolbarHeight + + this.$box.width($(window).width() - 2).height(height + toolbarHeight) + + if (this.opts.toolbarExternal) { + this.$toolbar.css({ + top: '0px', + position: 'absolute', + width: '100%' + }) + + this.$box.css('top', toolbarHeight + 'px') + } + + // if (!this.opts.iframe) { + // this.$editor.height(height - (pad * 2)) + // } + // else { + // setTimeout($.proxy(function() { + // this.$frame.height(height) + // }, this), 1) + // } + + // this.$editor.height(height) } - - this.fsheight = this.$editor.height() - - if (this.opts.iframe) - this.fsheight = this.$frame.height() - - if (this.opts.maxHeight) - this.$editor.css('max-height', '') - - if (this.opts.iframe) - html = this.get() - - if (!this.$fullscreenPlaceholder) - this.$fullscreenPlaceholder = $('
') - - this.$fullscreenPlaceholder.insertAfter(this.$box) - - this.$box.appendTo(document.body) - - this.$box.addClass('redactor_box_fullscreen') - $('body, html').css('overflow', 'hidden') - - if (this.opts.iframe) - this.fullscreenIframe(html) - - this.fullScreenResize() - $(window).resize($.proxy(this.fullScreenResize, this)) - $(document).scrollTop(0, 0) - - this.focus() - this.observeStart() - }, - - disableFullScreen: function() { - var height - - this.buttonRemoveIcon('fullscreen', 'normalscreen') - this.buttonInactive('fullscreen') - this.fullscreen = false - - $(window).off('resize', $.proxy(this.fullScreenResize, this)) - $('body, html').css('overflow', '') - - this.$box.insertBefore(this.$fullscreenPlaceholder) - this.$fullscreenPlaceholder.remove() - - this.$box.removeClass('redactor_box_fullscreen').css({ width: 'auto', height: 'auto' }) - - if (this.opts.iframe) - html = this.$editor.html() - - if (this.opts.iframe) - this.fullscreenIframe(html) - else - this.sync() - - height = this.fsheight - if (this.opts.autoresize) - height = 'auto' - - if (this.opts.maxHeight) - this.$editor.css('max-height', this.opts.maxHeight) - - if (this.opts.toolbarExternal) { - this.$box.css('top', this.boxcss.top) - this.$toolbar.css({ - width: this.toolcss.width, - top: this.toolcss.top, - position: this.toolcss.position - }) - } - - if (!this.opts.iframe) - this.$editor.css('height', height) - else - this.$frame.css('height', height) - - this.$editor.css('height', height) - this.focus() - this.observeStart() - }, - - fullscreenIframe: function(html) { - this.$editor = this.$frame.contents().find('body') - this.$editor.attr({ - contenteditable: true, - dir: this.opts.direction - }); - - // Set document & window - if (this.$editor.get(0)) { - this.document = this.$editor.get(0).ownerDocument - this.window = this.document.defaultView || window - } - - // Iframe css - this.iframeAddCss() - - if (this.opts.fullpage) - this.setFullpageOnInit(html) - else - this.set(html) - - if (this.opts.wym) - this.$editor.addClass('redactor_editor_wym') - }, - - fullScreenResize: function() { - if (!this.fullscreen) - return false - - var pad = this.$editor.css('padding-top').replace('px', '') - - var toolbarHeight = this.$toolbar.height(), - height = $(window).height() - toolbarHeight - - this.$box.width($(window).width() - 2).height(height + toolbarHeight) - - if (this.opts.toolbarExternal) { - this.$toolbar.css({ - top: '0px', - position: 'absolute', - width: '100%' - }) - - this.$box.css('top', toolbarHeight + 'px') - } - - // if (!this.opts.iframe) { - // this.$editor.height(height - (pad * 2)) - // } - // else { - // setTimeout($.proxy(function() { - // this.$frame.height(height) - // }, this), 1) - // } - - // this.$editor.height(height) } - }; - + } }(jQuery)); \ No newline at end of file diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.image.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.image.js index 8667949fb..318f74a7f 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.image.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.image.js @@ -114,71 +114,73 @@ } } - window.RedactorPlugins.image = { - init: function () { - this.image = new Image(this) + window.RedactorPlugins.image = function() { + return { + init: function () { + this.image = new Image(this) - // This is a work in progress - this.buttonAddBefore('video', 'image', 'Image', $.proxy(function () { + // This is a work in progress + + var button = this.button.addBefore('video', 'image', 'Image') + this.button.addCallback(button, $.proxy(function () { + + /* + * Maintain undo history + */ + this.buffer.set() + + /* + * Remember the cursor pos + */ + var cursor = this.selection.getBlock() || this.selection.getCurrent() + + /* + * Display the image upload modal + */ + + /* + * Add button + */ + var url = 'http://placehold.it/100x100' + + var data = '
' + + this.selection.restore() + + if (cursor) { + $(cursor).after(data) + } + else { + this.insert.html(data) + } + + this.selection.restore() + this.code.sync() + + }, this)) /* - * Maintain undo history + * Detect resize command, update the image src */ - this.bufferSet() + this.$editor.on('imageCommand', 'figure', function (event, command) { + var size = null - /* - * Remember the cursor pos - */ - var cursor = this.getBlock() || this.getCurrent() + if (command == 'small') + size = 300 + else if (command == 'medium') + size = 600 + else if (command == 'large') + size = 900 + else + return - /* - * Display the image upload modal - */ + // @todo + var newUrl, $img = $(this).find('img') + $img.attr('src', newUrl) + }) - /* - * Add button - */ - var url = 'http://placehold.it/100x100' - - var data = '
' - - this.selectionRestore() - - if (cursor) { - $(cursor).after(data) - } - else { - this.insertHtmlAdvanced(data, false); - } - - this.selectionRestore() - this.sync() - - }, this)) - - /* - * Detect resize command, update the image src - */ - this.$editor.on('imageCommand', 'figure', function (event, command) { - var size = null - - if (command == 'small') - size = 300 - else if (command == 'medium') - size = 600 - else if (command == 'large') - size = 900 - else - return - - // @todo - var newUrl, $img = $(this).find('img') - $img.attr('src', newUrl) - }) - - this.buttonGet('image') - .addClass('redactor_btn_image') - .removeClass('redactor-btn-image') + button.addClass('redactor_btn_image').removeClass('redactor-btn-image') + } } } diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.quote.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.quote.js index 54196c48b..b27c10d60 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.quote.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.quote.js @@ -118,9 +118,9 @@ toggle: function () { - this.redactor.formatQuote() + this.redactor.block.format('blockquote') - var $target = $(this.redactor.getBlock() || this.redactor.getCurrent()) + var $target = $(this.redactor.selection.getBlock() || this.redactor.selection.getCurrent()) if ($target.is('blockquote')) { $target.append($('')) @@ -131,17 +131,20 @@ $target.closest('figure').before($target).remove() } - this.redactor.sync() + this.redactor.code.sync() } } - window.RedactorPlugins.quote = { - init: function () { - this.quote = new Quote(this) + window.RedactorPlugins.quote = function() { + return { + init: function () { + this.quote = new Quote(this) - this.buttonAddBefore('link', 'quote', 'Quote', $.proxy(this.quote.toggle, this.quote)) - this.buttonGet('quote').addClass('redactor_btn_quote').removeClass('redactor-btn-image') + var button = this.button.addBefore('link', 'quote', 'Quote') + this.button.addCallback(button, $.proxy(this.quote.toggle, this.quote)) + button.addClass('redactor_btn_quote').removeClass('redactor-btn-image') + } } } diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugin.table.js b/modules/backend/formwidgets/richeditor/assets/js/plugin.table.js index 93481a877..4108c15ae 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/plugin.table.js +++ b/modules/backend/formwidgets/richeditor/assets/js/plugin.table.js @@ -34,7 +34,7 @@ insertTable: function (rows, columns) { - this.redactor.bufferSet(false) + this.redactor.buffer.set(false) var $tableBox = $('
'), tableId = Math.floor(Math.random() * 99999), @@ -72,25 +72,25 @@ $('
').addClass('oc-table oc-table-bordered-rows').append($table).appendTo($tableBox) var html = $tableBox.html() - this.redactor.modalClose() - this.redactor.selectionRestore() + this.redactor.modal.close() + this.redactor.selection.restore() - var current = this.redactor.getBlock() || this.redactor.getCurrent() + var current = this.redactor.selection.getBlock() || this.redactor.selection.getCurrent() if (current) { $(current).after(html) } else { - this.redactor.insertHtmlAdvanced(html, false) + this.redactor.insert.html(html) } - this.redactor.selectionRestore() + this.redactor.selection.restore() var table = this.redactor.$editor.find('#table' + tableId) table.find('span#selection-marker-1').remove() table.removeAttr('id') - this.redactor.sync() + this.redactor.code.sync() }, @@ -183,52 +183,51 @@ } } - window.RedactorPlugins.table = { - init: function () { - this.table = new Table(this) - this.buttonAddBefore('link', 'table', 'Table', $.proxy(function () { + window.RedactorPlugins.table = function() { + return { + init: function () { + this.table = new Table(this) - /* - * Save cursor position - */ - this.selectionSave() + var button = this.button.addBefore('link', 'table', 'Table') + this.button.addCallback(button, $.proxy(function () { - var callback = $.proxy(function () { + /* + * Save cursor position + */ + this.selection.save() - $('#redactor_insert_table_btn').on('click', $.proxy(function () { + var callback = $.proxy(function () { + setTimeout(function () { + $('#redactor_table_rows').trigger('focus') + }, 200) + + }, this) + + var insert = $.proxy(function () { this.table.insertTable($('#redactor_table_rows').val(), $('#redactor_table_columns').val()) - this.buttonInactive('table') - }, this)) + this.button.setInactive('table') + }, this) - $('.redactor_btn_modal_close').on('click', $.proxy(function () { - this.buttonInactive('table') - }, this)) + var modal = String() + + '
' + + '' + + '' + + '' + + '' + + '
' - setTimeout(function () { - $('#redactor_table_rows').trigger('focus') - }, 200) + this.modal.addTemplate('insert-table', modal) + this.modal.addCallback('insert-table', callback) + this.modal.load('insert-table', 'Insert Table', 500) - }, this) + this.modal.createCancelButton() + this.modal.createActionButton(this.lang.get('insert')).on('click', insert) + this.modal.show() - var modal = String() + - '
' + - '' + - '' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '
' + }, this)) - this.modalInit('Insert Table', modal, 500, callback) - - }, this)) - - this.buttonGet('table') - .addClass('redactor_btn_table') - .removeClass('redactor-btn-image') + button.addClass('redactor_btn_table').removeClass('redactor-btn-image') + } } } diff --git a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js index ccc86fdaf..a3b8ef3be 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js +++ b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js @@ -54,7 +54,9 @@ * Initialize Redactor editor */ var redactorOptions = { - observeImages: false, + imageEditable: false, + imageResizable: false, + buttonSource: true, focusCallback: function() { self.$el.addClass('editor-focus') }, blurCallback: function() { self.$el.removeClass('editor-focus') }, initCallback: function() { self.build() }, @@ -72,8 +74,11 @@ redactorOptions.fullpage = true } - redactorOptions.plugins = ['cleanup', 'fullscreen', 'figure', 'image', 'quote', 'table'] - redactorOptions.buttons = ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'link', 'horizontalrule', 'html'], + // redactorOptions.plugins = ['cleanup', 'fullscreen', 'figure', 'image', 'quote', 'table'] + // redactorOptions.buttons = ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'link', 'horizontalrule', 'html'], + + redactorOptions.plugins = ['cleanup', 'fullscreen', 'figure', 'quote', 'table'] + redactorOptions.buttons = ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'image', 'link', 'horizontalrule', 'html'], this.$textarea.redactor(redactorOptions) } @@ -82,12 +87,13 @@ this.updateLayout() $(window).resize($.proxy(this.updateLayout, this)) + $(window).on('oc.updateUi', $.proxy(this.updateLayout, this)) } RichEditor.prototype.updateLayout = function() { - var $editor = $('.redactor_editor', this.$el), + var $editor = $('.redactor-editor', this.$el), $codeEditor = $('textarea', this.$el), - $toolbar = $('.redactor_toolbar', this.$el) + $toolbar = $('.redactor-toolbar', this.$el) if (!$editor.length) return diff --git a/modules/backend/formwidgets/richeditor/assets/less/_figures.less b/modules/backend/formwidgets/richeditor/assets/less/_figures.less index 3b6fa71bc..bcc347d36 100644 --- a/modules/backend/formwidgets/richeditor/assets/less/_figures.less +++ b/modules/backend/formwidgets/richeditor/assets/less/_figures.less @@ -2,7 +2,7 @@ // Figures // -.redactor_editor { +.redactor-editor { figure { position: relative; @@ -121,11 +121,7 @@ } -.redactor_box { - - figure:hover .oc-figure-controls { - display: block - } +.redactor-box { figcaption { &:empty:before { @@ -153,6 +149,10 @@ text-align: center; } + figure:hover .oc-figure-controls { + display: block; + } + .oc-figure-controls span { display: inline-block; border: none; diff --git a/modules/backend/formwidgets/richeditor/assets/less/_redactor.less b/modules/backend/formwidgets/richeditor/assets/less/_redactor.less index bb6dcd598..0ada7dfb4 100644 --- a/modules/backend/formwidgets/richeditor/assets/less/_redactor.less +++ b/modules/backend/formwidgets/richeditor/assets/less/_redactor.less @@ -1,322 +1,192 @@ -@import "../../../../assets/less/core/boot.less"; +.clearfix() { + &:after { + content: ""; + display: table; + clear: both; + } +} +.transition(@transition: all linear .2s) { + -moz-transition: @transition; + transition: @transition; +} -// -// Icon font -// +.opacity(@opacity: 100) { + filter: e(%("alpha(opacity=%d)", @opacity)); + -moz-opacity: @opacity / 100; + opacity: @opacity / 100; +} +.box-sizing(@box-model) { + -webkit-box-sizing: @box-model; + -moz-box-sizing: @box-model; + box-sizing: @box-model; +} +.striped(@color: rgba(255, 255, 255, .2); @angle: 45deg) { + background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); + background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); +} +.animation(@animation) { + -webkit-animation: @animation; + -o-animation: @animation; + animation: @animation; +} + +// VARIABLES +@redactorFontFamily: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; +@redactorCodeFontFamily: Menlo, Monaco, monospace, sans-serif !important; + +@redactorFontSize: 14px; +@redactorLineHeight: 1.6em; + +/* + Icon font +*/ @font-face { font-family: 'RedactorFont'; src: url('../vendor/redactor/redactor-font.eot'); } - @font-face { font-family: 'RedactorFont'; - src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggi/NUAAAC8AAAAYGNtYXAaVcx2AAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5Zm8dIFkAAAFwAAATSGhlYWQACVb9AAAUuAAAADZoaGVhA+ECBQAAFPAAAAAkaG10eEEBA94AABUUAAAAkGxvY2FVlFE8AAAVpAAAAEptYXhwAC8AkgAAFfAAAAAgbmFtZRHEcG0AABYQAAABZnBvc3QAAwAAAAAXeAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmHwHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIOYf//3//wAAAAAAIOYA//3//wAB/+Ma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ACAAAAAAAAIAAAADAAAAFAADAAEAAAAUAAQAOAAAAAoACAACAAIAAQAg5h///f//AAAAAAAg5gD//f//AAH/4xoEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAQAAhlBJsl8PPPUACwIAAAAAAM91iyUAAAAAz3WLJf///9sCAAHbAAAACAACAAAAAAAAAAEAAAHg/+AAAAIA//8AAAIAAAEAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAQAAAAIAAAACAAAAAgAAAAIAAG4CAAAAAgAAbQIAAAACAAAJAgAASQIA//8CAAAAAgAAAAIAAAACAACSAgAAAAIAAAACAAAlAgAAAAIAAG4CAAAlAgAAJQIAAEkCAAAAAgAAAAIAAJMCAAAlAgAAQgIAAAACAAAAAgAAAAIAAAACAAAAAABQAAAkAAAAAAAOAK4AAQAAAAAAAQAYAAAAAQAAAAAAAgAOAGoAAQAAAAAAAwAYAC4AAQAAAAAABAAYAHgAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgAoAJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgAoAJAAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff'); + src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggi/NUAAAC8AAAAYGNtYXAaVcx2AAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x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gAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgAoAJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgAoAJAAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('truetype'), + url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AABIoAAoAAAAAEeAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAADgEAAA4Bg0Rie09TLzIAAA74AAAAYAAAAGAIIvzVY21hcAAAD1gAAABMAAAATBpVzHZnYXNwAAAPpAAAAAgAAAAIAAAAEGhlYWQAAA+sAAAANgAAADYACVb9aGhlYQAAD+QAAAAkAAAAJAPhAgVobXR4AAAQCAAAAJAAAACQQQED3m1heHAAABCYAAAABgAAAAYAJFAAbmFtZQAAEKAAAAFmAAABZhHEcG1wb3N0AAASCAAAACAAAAAgAAMAAAEABAQAAQEBDVJlZGFjdG9yRm9udAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeKZviU+HQFHQAAAT8PHQAAAUQRHQAAAAkdAAAN+BIAJQEBDRkbHSAlKi80OT5DSE1SV1xhZmtwdXp/hImOk5idoqessba7wFJlZGFjdG9yRm9udFJlZGFjdG9yRm9udHUwdTF1MjB1RTYwMHVFNjAxdUU2MDJ1RTYwM3VFNjA0dUU2MDV1RTYwNnVFNjA3dUU2MDh1RTYwOX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wBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff'); font-weight: normal; font-style: normal; } -// =Selection -//----------------------------------------------------------------------------- -.redactor_box { - &::selection { - background: #ffff9e; - } - &::-moz-selection { - background: #ffff9e; - } - img::selection { - background: transparent; - } - img::-moz-selection { - background: transparent; - } -} - -// -// BOX -// - -.redactor_box { +/* + Box +*/ +.redactor-box { position: relative; overflow: visible; background: #fff; - iframe { + margin-bottom: 24px; + + & iframe, + & textarea { display: block; - margin: 0; - padding: 0; - border: none; // Oc - } - textarea { position: relative; - display: block; - overflow: auto; margin: 0; padding: 0; width: 100%; + } + & iframe { + border: 1px solid #eee; + } + & textarea { + overflow: auto; outline: none; border: none; - background-color: #222; + background-color: #111; box-shadow: none; color: #ccc; font-size: 13px; - font-family: Menlo, Monaco, monospace, sans-serif; + font-family: @redactorCodeFontFamily; resize: none; &:focus { outline: none; } } - &, textarea { - z-index: auto !important; +} + +/* + Z-index setup +*/ + +.redactor-editor, +.redactor-box, +.redactor-box textarea { + z-index: auto !important; +} +.redactor-box-fullscreen { + z-index: 99 !important; +} +.redactor-toolbar, +.redactor-dropdown { + z-index: 1050 !important; +} +#redactor-modal-overlay, +#redactor-modal-box, +#redactor-modal { + z-index: 1051 !important; +} + + +/* + Resize +*/ +.redactor-resize { + background: #f4f4f4; + padding: 4px 0 3px 0; + cursor: move; + border: 1px solid #e3e3e3; + border-top: none; + & div { + width: 30px; + margin: auto; + border-top: 1px solid #bbb; + border-bottom: 1px solid #fff; } - } -// -// zIndex -// - -.redactor_box_fullscreen { - z-index: @richeditor-zindex !important; - width: 100%!important; -} - -#redactor_modal_overlay, -#redactor_modal, -.redactor_dropdown { - z-index: @richeditor-zindex + 2 !important; -} - - -// -// AIR -// - -body .redactor_air { - position: absolute; - z-index: 502; -} - -// -// FULLSCREEN -// -body .redactor_box_fullscreen { +/* + Fullscreen +*/ +body .redactor-box-fullscreen { position: fixed; top: 0; left: 0; width: 100%; - - // October - background: @color-body-bg; - overflow-y: scroll !important; - .redactor_editor { - max-width: 960px; - margin: @richeditor-gutter auto !important; - padding: @richeditor-gutter; - } - } -// -// LINK TOOLTIP -// -.redactor-link-tooltip { - position: absolute; - z-index: 49999; - padding: 10px; - line-height: 1; - display: inline-block; - background-color: #000; - color: #555 !important; - &, a { - font-size: 12px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - } - a { - color: #ccc; - margin: 0 5px; - text-decoration: none; - &:hover { - color: #fff; - } - } -} -// -// IMAGE BOX -// -#redactor-image-box img { - width: 100%; -} -.redactor_editor { +/* + Editor +*/ +.redactor-editor { position: relative; overflow: auto; margin: 0 !important; - padding: 10px 20px; - padding-bottom: 5px; + padding: 20px; outline: none; - background: none; - background: #fff; - box-shadow: none !important; white-space: normal; - - border: none; // Oc - + border: 1px solid #eee; + font-family: @redactorFontFamily; + font-size: @redactorFontSize; + line-height: @redactorLineHeight; &:focus { outline: none; } +} - // div, p, ul, ol, table, dl, blockquote, pre, h1, h2, h3, h4, h5, h6 { - // font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - // } - // code, pre { - // font-family: Menlo, Monaco, monospace, sans-serif; - // } - // div, p, ul, ol, table, dl, blockquote, pre { - // font-size: 14px; - // line-height: 1.6em; - // } - - a { - color: #15c !important; - text-decoration: underline !important; - } - - .redactor_placeholder { +/* + Placeholder +*/ +.redactor-placeholder { + position: relative; + &:after { + position: absolute; + top: 20px; + left: 20px; + content: attr(placeholder); color: #999 !important; - display: block !important; + font-weight: normal !important; } } - -// -// TYPOGRAPHY -// - -.redactor_editor { - font-family: Helvetica, Arial, sans-serif; - line-height: 170%; - - object, embed, video, img { - max-width: 100%; - width: auto; - } - video, img { - height: auto; - } - div, p, ul, ol, dl, blockquote, pre { - margin: 0; - margin-bottom: 10px !important; - border: none; - background: none !important; - box-shadow: none !important; - } - iframe, object, hr { - margin-bottom: 15px !important; - } - blockquote { - margin-left: 1.5em !important; - padding-left: 0 !important; - color: #777; - font-style: italic !important; - } - ul, ol { - padding-left: 2em !important; - } - ul ul, ol ol, ul ol, ol ul { - margin: 2px !important; - padding: 0 !important; - padding-left: 2em !important; - border: none; - } - dl dt { - font-weight: bold; - } - dd { - margin-left: 1em; - } - // table { - // border-collapse: collapse; - // font-size: 1em !important; - // } - // table td { - // padding: 5px !important; - // border: 1px solid #ddd; - // vertical-align: top; - // } - // table thead td { - // border-bottom: 2px solid #000 !important; - // font-weight: bold !important; - // } - code { - background-color: #d8d7d7 !important; - } - pre { - overflow: auto; - padding: 1em !important; - border: 1px solid #ddd !important; - border-radius: 3px !important; - background: #f8f8f8 !important; - white-space: pre; - font-size: 90% !important; - } - hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid #ccc; - } -} -// -// HEADERS -// -.redactor_editor { - h1, h2, h3, h4, h5, h6 { - margin-top: 0 !important; - padding: 0 !important; - background: none; - color: #000; - font-weight: bold; - } - h1 { - font-size: 36px !important; - line-height: 1.111em !important; - margin-bottom: .15em !important; - } - h2 { - font-size: 30px !important; - line-height: 1.111em !important; - margin-bottom: .25em !important; - } - h3 { - font-size: 24px !important; - line-height: 1.333em !important; - margin-bottom: .2em !important; - } - h4 { - font-size: 18px !important; - line-height: 1.5em !important; - margin-bottom: .2em !important; - } - h5 { - font-size: 1em !important; - line-height: 1.6em !important; - margin-bottom: .25em !important; - } - h6 { - font-size: .8em !important; - line-height: 1.6em !important; - text-transform: uppercase; - margin-bottom: .3em !important; - } +/* Placeholder in linebreaks mode */ +.redactor-linebreaks.redactor-placeholder:after { + top: 10px; + left: 10px; } -// -// TOOLBAR -// -.redactor_toolbar { +/* + Toolbar +*/ +.redactor-toolbar { position: relative; top: 0; left: 0; @@ -324,19 +194,14 @@ body .redactor_box_fullscreen { padding: 0 !important; list-style: none !important; font-size: 14px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; line-height: 1 !important; + + background: #fff; border: none; + box-shadow: 0 1px 2px rgba(0, 0, 0, .2); - // October - background: @color-richeditor-toolbar; - z-index: @richeditor-zindex + 1; + .clearfix; - &:after { - content: ""; - display: table; - clear: both; - } &.redactor-toolbar-overflow { overflow-y: auto; height: 29px; @@ -345,111 +210,71 @@ body .redactor_box_fullscreen { &.redactor-toolbar-external { z-index: 999; box-shadow: none; - border: 1px solid rgba(0, 0, 0, 0.1); + border: 1px solid rgba(0, 0, 0, .1); } - - // October - li.redactor_btn_right { - float: right; - margin-right: 2px; - } - - li { + & li { vertical-align: top; display: inline-block; margin: 0 !important; padding: 0 !important; outline: none; list-style: none !important; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - a { - display: block; - - // October - color: @color-richeditor-toolbar-btn-color; - font-size: 14px; - width: 20px; - line-height: 20px; - - text-align: center; - padding: 9px 10px; - outline: none; - border: none; - text-decoration: none; - cursor: pointer; - zoom: 1; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - - &:hover { - outline: none; - - // October - background-color: @color-richeditor-toolbar-btn-bg-hover; - color: @color-richeditor-toolbar-btn-color-hover; - - i:before { - color: #fff; - } - } - - &:active, &.redactor_act { - outline: none; - - // October - background-color: @color-richeditor-toolbar-btn-bg-active; - color: @color-richeditor-toolbar-btn-color-hover; - } - - &.redactor-btn-image { - width: 14px; - height: 14px; - background-position: center center; - background-repeat: no-repeat; - } - &.fa-redactor-btn { - display: inline-block; - padding: 9px 10px 8px 10px; - line-height: 1; - } - } + .box-sizing(content-box); } - - &.redactor-toolbar-typewriter { - box-shadow: none; - background: rgba(240, 240, 240, 0.9); - li a:hover { + & li a { + display: block; + color: #333; + text-align: center; + padding: 9px 10px; + cursor: pointer; + outline: none; + border: none; + text-decoration: none; + cursor: pointer; + zoom: 1; + .box-sizing(content-box); + } + & li a { + &:hover { outline: none; - background-color: #1f78d8; + background-color: rgba(31,120,216,1); color: #fff; } - li a:active, - li a.redactor_act { + &:hover i:before { + color: #fff; + } + &:active, + &.redactor-act { outline: none; background-color: #ccc; color: #444; } } -} - -body .redactor_air .redactor_toolbar { - padding-right: 2px !important; -} - -.redactor_button_disabled { - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; - &:hover { - outline: none; - background-color: transparent !important; - cursor: default; + & li a.redactor-btn-image { + width: 14px; + height: 14px; + background-position: center center; + background-repeat: no-repeat; + } + & li a.fa-redactor-btn { + display: inline-block; + padding: 9px 10px 8px 10px; + line-height: 1; + } + & li a.redactor-button-disabled { + .opacity(30); + &:hover { + color: #333; + outline: none; + background-color: transparent !important; + cursor: default; + } } } +/* + Icons +*/ .re-icon { font-family: 'RedactorFont'; speak: none; @@ -466,452 +291,211 @@ body .redactor_air .redactor_toolbar { font-size: 14px; } -.re-video:before { content: "\e600"; } -.re-unorderedlist:before { content: "\e601"; } -.re-undo:before { content: "\e602"; } -.re-underline:before { content: "\e603"; } -.re-textdirection:before { content: "\e604"; } -.re-fontcolor:before { content: "\e605"; } -.re-table:before { content: "\e606"; } -.re-redo:before { content: "\e607"; } -.re-quote:before { content: "\e608"; } -.re-outdent:before { content: "\e609"; } -.re-orderedlist:before { content: "\e60a"; } -.re-link:before { content: "\e60b"; } -.re-horizontalrule:before { content: "\e60c"; } -.re-italic:before { content: "\e60d"; } -.re-indent:before { content: "\e60e"; } -.re-image:before { content: "\e60f"; } -.re-fullscreen:before { content: "\e610"; } -.re-normalscreen:before { content: "\e611"; } -.re-formatting:before { content: "\e612"; } -.re-fontsize:before { content: "\e613"; } -.re-fontfamily:before { content: "\e614"; } -.re-deleted:before { content: "\e615"; } -.re-html:before { content: "\e616"; } -.re-clips:before { content: "\e617"; } -.re-bold:before { content: "\e618"; } -.re-backcolor:before { content: "\e619"; } -.re-file:before { content: "\e61a"; } -.re-alignright:before { content: "\e61b"; } + +.re-video:before { + content: "\e600"; +} +.re-unorderedlist:before { + content: "\e601"; +} +.re-undo:before { + content: "\e602"; +} +.re-underline:before { + content: "\e603"; +} +.re-textdirection:before { + content: "\e604"; +} +.re-fontcolor:before { + content: "\e605"; +} +.re-table:before { + content: "\e606"; +} +.re-redo:before { + content: "\e607"; +} +.re-quote:before { + content: "\e608"; +} +.re-outdent:before { + content: "\e609"; +} +.re-orderedlist:before { + content: "\e60a"; +} +.re-link:before { + content: "\e60b"; +} +.re-horizontalrule:before { + content: "\e60c"; +} +.re-italic:before { + content: "\e60d"; +} +.re-indent:before { + content: "\e60e"; +} +.re-image:before { + content: "\e60f"; +} +.re-fullscreen:before { + content: "\e610"; +} +.re-normalscreen:before { + content: "\e611"; +} +.re-formatting:before { + content: "\e612"; +} +.re-fontsize:before { + content: "\e613"; +} +.re-fontfamily:before { + content: "\e614"; +} +.re-deleted:before { + content: "\e615"; +} +.re-html:before { + content: "\e616"; +} +.re-clips:before { + content: "\e617"; +} +.re-bold:before { + content: "\e618"; +} +.re-backcolor:before { + content: "\e619"; +} +.re-file:before { + content: "\e61a"; +} +.re-alignright:before { + content: "\e61b"; +} .re-alignment:before, -.re-alignleft:before { content: "\e61c"; } -.re-alignjustify:before { content: "\e61d"; } -.re-aligncenter:before { content: "\e61e"; } -.re-gallery:before { content: "\e61f"; } - -// -// Toolbar classes -// - -.redactor_format_blockquote { - padding-left: 10px; - color: #666 !important; - font-style: italic; +.re-alignleft:before { + content: "\e61c"; } -.redactor_format_pre { - font-family: monospace, sans-serif; +.re-alignjustify:before { + content: "\e61d"; } -.redactor_format_h1, -.redactor_format_h2, -.redactor_format_h3, -.redactor_format_h4, -.redactor_format_h5 { - font-weight: bold; +.re-aligncenter:before { + content: "\e61e"; } -.redactor_format_h1 { - font-size: 30px; - line-height: 36px; -} -.redactor_format_h2 { - font-size: 24px; - line-height: 36px; -} -.redactor_format_h3 { - font-size: 20px; - line-height: 30px; -} -.redactor_format_h4 { - font-size: 16px; - line-height: 26px; -} -.redactor_format_h5 { - font-size: 14px; - line-height: 23px; -} -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h1, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h3, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h4, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h5 { - font-size: 1em; - line-height: 1.6em; - text-transform: uppercase; -} -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2 { - font-size: .85em; +.re-gallery:before { + content: "\e61f"; } -// -// Typewriter -// -.redactor_editor.redactor-editor-typewriter { - background: #f5f5f5 !important; - padding: 25px 50px !important; -} -.redactor_editor.redactor-editor-typewriter div, -.redactor_editor.redactor-editor-typewriter p, -.redactor_editor.redactor-editor-typewriter ul, -.redactor_editor.redactor-editor-typewriter ol, -.redactor_editor.redactor-editor-typewriter table, -.redactor_editor.redactor-editor-typewriter dl, -.redactor_editor.redactor-editor-typewriter blockquote, -.redactor_editor.redactor-editor-typewriter pre, -.redactor_editor.redactor-editor-typewriter h1, -.redactor_editor.redactor-editor-typewriter h2, -.redactor_editor.redactor-editor-typewriter h3, -.redactor_editor.redactor-editor-typewriter h4, -.redactor_editor.redactor-editor-typewriter h5, -.redactor_editor.redactor-editor-typewriter h6 { - font-family: 'Courier New', 'Lucida Console', Consolas, Monaco, monospace, sans-serif; - font-size: 18px !important; - line-height: 1.5em !important; - margin-bottom: 1.5em !important; -} -.redactor_editor.redactor-editor-typewriter h2 { - font-size: 14px !important; -} -.redactor_editor.redactor-editor-typewriter h1, -.redactor_editor.redactor-editor-typewriter h2, -.redactor_editor.redactor-editor-typewriter h3, -.redactor_editor.redactor-editor-typewriter h4, -.redactor_editor.redactor-editor-typewriter h5, -.redactor_editor.redactor-editor-typewriter h6 { - text-transform: uppercase; -} -.redactor_editor.redactor-editor-typewriter a { - color: #000 !important; - text-decoration: underline !important; +/* + Toolbar tooltip +*/ +.redactor-toolbar-tooltip { + position: absolute; + z-index: 100; + text-align: center; + top: 0; + left: 0; + background: #000; + color: #fff; + padding: 5px 8px; + line-height: 1; + font-family: @redactorFontFamily; + font-size: 12px; + border-radius: 2px; } -// -// WYM -// -.redactor_editor.redactor_editor_wym { - padding: 10px 7px 0 7px !important; - background: #f6f6f6 !important; -} -.redactor_editor.redactor_editor_wym div, -.redactor_editor.redactor_editor_wym p, -.redactor_editor.redactor_editor_wym ul, -.redactor_editor.redactor_editor_wym ol, -.redactor_editor.redactor_editor_wym table, -.redactor_editor.redactor_editor_wym dl, -.redactor_editor.redactor_editor_wym pre, -.redactor_editor.redactor_editor_wym h1, -.redactor_editor.redactor_editor_wym h2, -.redactor_editor.redactor_editor_wym h3, -.redactor_editor.redactor_editor_wym h4, -.redactor_editor.redactor_editor_wym h5, -.redactor_editor.redactor_editor_wym h6, -.redactor_editor.redactor_editor_wym blockquote { - margin-top: 0; - margin-bottom: 5px !important; - padding: 10px !important; - border: 1px solid #e4e4e4 !important; - background-color: #fff !important; - z-index: 0; -} -.redactor_editor.redactor_editor_wym blockquote:before { content: ''; } -.redactor_editor.redactor_editor_wym img { - position: relative; - z-index: 1; -} -.redactor_editor.redactor_editor_wym div { - border: 1px dotted #aaa !important; -} -.redactor_editor.redactor_editor_wym pre { - border: 2px dashed #e4e4e4 !important; - background-color: #f8f8f8 !important; -} -.redactor_editor.redactor_editor_wym ul, -.redactor_editor.redactor_editor_wym ol { - padding-left: 2em !important; -} -.redactor_editor.redactor_editor_wym ul li ul, -.redactor_editor.redactor_editor_wym ol li ul, -.redactor_editor.redactor_editor_wym ul li ol, -.redactor_editor.redactor_editor_wym ol li ol { - border: none !important; -} - -// -// DROPDOWN -// - -.redactor_dropdown { +/* + Dropdown +*/ +.redactor-dropdown { position: absolute; top: 28px; left: 0; - padding: 10px; - width: 200px; - background-color: #fff; - box-shadow: 0 1px 5px #bbb; - font-size: 13px; - font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; - line-height: 21px; -} -.redactor-toolbar-typewriter .redactor_dropdown { - font-family: 'Courier New', 'Lucida Console', Consolas, Monaco, monospace, sans-serif; - background-color: #f5f5f5; -} -.redactor_separator_drop { - padding: 0 !important; - border-top: 1px solid #ddd; - font-size: 0; - line-height: 0; -} -.redactor_dropdown a { - display: block; - padding: 3px 5px; - color: #000; - text-decoration: none; -} -.redactor_dropdown a:hover { - background-color: #dde4ef; - color: #444 !important; - text-decoration: none; -} - -// -// MODAL -// - -#redactor_modal_overlay { - position: fixed; - top: 0; - left: 0; - margin: auto; - width: 100%; - height: 100%; - background-color: #000 !important; - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; -} -#redactor_modal { - position: fixed; - top: 50%; - left: 50%; padding: 0; - background: #fff; - color: #000; - font-size: 12px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); + min-width: 220px; + max-height: 254px; + overflow: auto; + background-color: #fff; + box-shadow: 0 1px 7px rgba(0, 0, 0, .25); + font-size: @redactorFontSize; + font-family: @redactorFontFamily; + line-height: @redactorLineHeight; + & a { + display: block; + padding: 10px 15px; + color: #000; + text-decoration: none; + border-bottom: 1px solid rgba(0, 0, 0, .07); + &:last-child { + border-bottom: none; + } + &:hover { + background-color: rgba(31, 120, 216, 1); + color: #fff !important; + text-decoration: none; + } + } } -#redactor_modal header { - padding: 20px 30px 5px 30px; - font-size: 16px; -} -#redactor_modal section { - padding: 20px 30px; -} -#redactor_modal label { - display: block !important; - float: none !important; - margin: 10px 0 3px 0 !important; - padding: 0 !important; - font-size: 12px !important; -} -#redactor_modal footer:after { - content: ""; - display: table; - clear: both; -} -#redactor_modal footer div { - float: left; -} -#redactor_modal input[type="radio"], -#redactor_modal input[type="checkbox"] { - position: relative; - top: -1px; -} -#redactor_modal input[type="text"], -#redactor_modal input[type="password"], -#redactor_modal input[type="email"], -#redactor_modal textarea { - position: relative; - z-index: 2; - margin: 0; - padding: 1px 2px; - height: 23px; - border: 1px solid #ccc; - border-radius: 1px; - background-color: white; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; - color: #333; - font-size: 13px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - line-height: 1; - -moz-transition: border 0.3s ease-in; - transition: border 0.3s ease-in; -} -#redactor_modal textarea { - display: block; - margin-top: 4px; - line-height: 1.4em; -} -#redactor_modal input:focus, -#redactor_modal textarea:focus { - outline: none; - border-color: #5ca9e4; - box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; -} -#redactor_modal_close { + + + +/* + LINK TOOLTIP +*/ +.redactor-link-tooltip { position: absolute; - top: 5px; - right: 3px; - width: 20px; - height: 20px; - color: #999; - font-size: 26px; - cursor: pointer; -} -#redactor_modal_close:hover { - color: #000; -} -.redactor_input { - width: 99%; - font-size: 14px; -} -.redactor_modal_box { - overflow: auto; - margin-bottom: 10px; - height: 350px; -} -#redactor_image_box { - overflow: auto; - margin-bottom: 10px; - height: 270px; -} -#redactor_image_box_select { - display: block; - margin-bottom: 15px !important; - width: 200px; -} -#redactor_image_box img { - margin-right: 10px; - margin-bottom: 10px; - max-width: 100px; - cursor: pointer; -} -#redactor_tabs { - margin-bottom: 18px; -} -#redactor_tabs a { + z-index: 49999; + padding: 10px; + line-height: 1; display: inline-block; - margin-right: 2px; - padding: 4px 14px; - border: 1px solid #d2d2d2; - border-radius: 3px; - background: #fff; - color: #000; - text-decoration: none; - line-height: 1; + background-color: #000; + color: #555 !important; } -#redactor_tabs a:hover, -#redactor_tabs a.redactor_tabs_act { - border-color: #eee; - color: #999 !important; - text-decoration: none !important; -} -.redactor_modal_btn_hidden { - display: none; -} -#redactor_modal footer button { - position: relative; - width: 100%; - padding: 10px 16px; - margin: 0; - outline: none; - border: none; - background-color: #ddd; - color: #000; - text-align: center; - text-decoration: none; - font-weight: normal; +.redactor-link-tooltip, +.redactor-link-tooltip a { font-size: 12px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - line-height: 1; - cursor: pointer; + font-family: @redactorFontFamily; } -#redactor_modal footer button:hover { - color: #777; - background: none; - background: #bbb; +.redactor-link-tooltip a { + color: #ccc; + margin: 0 5px; text-decoration: none; -} -#redactor_modal footer button.redactor_modal_delete_btn { - background: none; - color: #fff; - background-color: #b52525; -} -#redactor_modal footer button.redactor_modal_delete_btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #881b1b; -} -#redactor_modal footer button.redactor_modal_action_btn { - background: none; - color: #fff; - background-color: #2461b5; -} -#redactor_modal footer button.redactor_modal_action_btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #1a4580; -} -/* Drag and Drop Area */ -.redactor_droparea { - position: relative; - margin: auto; - margin-bottom: 5px; - width: 100%; -} -.redactor_droparea .redactor_dropareabox { - position: relative; - z-index: 1; - padding: 60px 0; - width: 99%; - border: 1px dashed #ddd; - background: #fff; - text-align: center; -} -.redactor_droparea .redactor_dropareabox, -.redactor_dropalternative { - color: #555; - font-size: 12px; -} -.redactor_dropalternative { - margin: 4px 0 2px 0; -} -.redactor_dropareabox.hover { - border-color: #aaa; - background: #efe3b8; -} -.redactor_dropareabox.error { - border-color: #dcc3c3; - background: #f7e5e5; -} -.redactor_dropareabox.drop { - border-color: #e0e5d6; - background: #f4f4ee; + &:hover { + color: #fff; + } } -// =ProgressBar -//----------------------------------------------------------------------------- +/* + DROPAREA +*/ +#redactor-droparea { + position: relative; + overflow: hidden; + padding: 140px 20px; + border: 3px dashed rgba(0, 0, 0, .1); + &.drag-hover { + background: rgba(200, 222, 250, 0.75); + } + &.drag-drop { + background: rgba(250, 248, 200, 0.5); + } +} +#redactor-droparea-placeholder { + text-align: center; + font-size: 12px; + color: rgba(0, 0, 0, .7); +} + +/* + PROGRESS +*/ #redactor-progress { position: fixed; top: 0; @@ -925,35 +509,439 @@ body .redactor_air .redactor_toolbar { width: 100%; height: 100%; background-color: #3d58a8; - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; + .striped(); + .animation(progress-bar-stripes 2s linear infinite); background-size: 40px 40px; } + @-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } + from { background-position: 40px 0; } + to { background-position: 0 0; } } @-o-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } + from { background-position: 40px 0; } + to { background-position: 0 0; } } @keyframes progress-bar-stripes { - from { - background-position: 40px 0; + from { background-position: 40px 0; } + to { background-position: 0 0; } +} + + +/* + MODAL +*/ +#redactor-modal-overlay { + position: fixed; + top: 0; + left: 0; + margin: auto; + overflow: auto; + width: 100%; + height: 100%; + background-color: #000 !important; + .opacity(30); +} +#redactor-modal-box { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + overflow-x: hidden; + overflow-y: auto; +} +#redactor-modal { + position: relative; + margin: auto; + margin-bottom: 20px; + padding: 0; + background: #fff; + color: #000; + font-size: 14px !important; + font-family: @redactorFontFamily; + box-shadow: 0 1px 70px rgba(0, 0, 0, .5); + + & header { + padding: 30px 40px 5px 40px; + font-size: 18px; + font-weight: bold; } - to { - background-position: 0 0; + & section { + padding: 30px 40px 50px 40px; + } + & label { + display: block; + float: none !important; + margin: 15px 0 3px 0 !important; + padding: 0; + } + & input[type="radio"], + & input[type="checkbox"] { + position: relative; + top: -1px; + } + & select { + width: 100%; + } + & input[type="text"], + & input[type="password"], + & input[type="email"], + & input[type="url"], + & textarea { + position: relative; + z-index: 2; + margin: 0; + padding: 5px 4px; + height: 28px; + border: 1px solid #ccc; + border-radius: 1px; + background-color: white; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; + color: #333; + width: 100%; + font-size: 14px; + font-family: @redactorFontFamily; + .transition(border 0.3s ease-in); + &:focus { + outline: none; + border-color: #5ca9e4; + box-shadow: 0 0 0 2px rgba(70, 161, 231, .3), 0 1px 2px rgba(0, 0, 0, .2) inset; + } + &.redactor-input-error { + border-color: #e82f2f; + box-shadow: 0 0 0 2px rgba(232, 47, 47, .3), 0 1px 2px rgba(0, 0, 0, .2) inset; + } + } + & textarea { + display: block; + margin-top: 4px; + line-height: 1.4em; + } + +} + +/* + Tabs in Modal +*/ +#redactor-modal-tabber { + margin-bottom: 15px; + font-size: 12px; + & a { + border: 1px solid #ddd; + line-height: 1; + padding: 8px 15px; + margin-right: -1px; + text-decoration: none; + color: #000; + &:hover { + background-color: rgba(31,120,216,1); + border-color: rgba(31,120,216,1); + color: #fff; + } + &.active { + cursor: default; + background-color: #ddd; + border-color: #ddd; + color: rgba(0, 0, 0, .6); + } } } + + +/* + List in Modal +*/ +#redactor-modal { + #redactor-modal-list { + margin-left: 0; + padding-left: 0; + list-style: none; + max-height: 250px; + overflow-x: scroll; + & li { + border-bottom: 1px solid #ddd; + &:last-child { + border-bottom: none; + } + } + + & a { + padding: 10px 5px; + color: #000; + text-decoration: none; + font-size: 13px; + display: block; + position: relative; + &:hover { + background-color: #eee; + } + } + } +} + +#redactor-modal-close { + position: absolute; + top: 10px; + right: 10px; + width: 30px; + height: 30px; + text-align: right; + color: #bbb; + font-size: 30px; + font-weight: 300; + cursor: pointer; + &:hover { + color: #000; + } + +} +#redactor-modal footer button { + position: relative; + width: 100%; + padding: 14px 16px; + margin: 0; + outline: none; + border: none; + background-color: #ddd; + color: #000; + text-align: center; + text-decoration: none; + font-weight: normal; + font-size: 12px; + font-family: @redactorFontFamily; + line-height: 1; + cursor: pointer; + + &:hover { + color: #777; + background: none; + background: #bbb; + text-decoration: none; + } + + &.redactor-modal-delete-btn { + background: none; + color: #fff; + background-color: #b52525; + &:hover { + color: rgba(255, 255, 255, .6); + background-color: #881b1b; + } + } + &.redactor-modal-action-btn { + background: none; + color: #fff; + background-color: #2461b5; + &:hover { + color: rgba(255, 255, 255, .6); + background-color: #1a4580; + } + } +} + + +/* + ############################################## + + DROPDOWN FORMATTING + + ############################################## +*/ +.redactor-dropdown { + & .redactor-formatting-blockquote { + color: rgba(0, 0, 0, .4); + font-style: italic; + } + & .redactor-formatting-pre { + font-family: monospace, sans-serif; + } + & .redactor-formatting-h1 { + font-size: 36px; + line-height: 36px; + font-weight: bold; + } + & .redactor-formatting-h2 { + font-size: 24px; + line-height: 36px; + font-weight: bold; + } + & .redactor-formatting-h3 { + font-size: 21px; + line-height: 30px; + font-weight: bold; + } + & .redactor-formatting-h4 { + font-size: 18px; + line-height: 26px; + font-weight: bold; + } + & .redactor-formatting-h5 { + font-size: 16px; + line-height: 23px; + font-weight: bold; + } +} + + +/* + ############################################## + + CONTENT STYLES + + ############################################## +*/ +.redactor-editor { + //code, + //pre { + // font-family: @redactorCodeFontFamily; + //} + //div, + //p, + //ul, + //ol, + //table, + //dl, + //blockquote, + //pre { + // font-size: @redactorFontSize; + // line-height: @redactorLineHeight; + //} + a { + color: #15c; + text-decoration: underline; + } + + object, + embed, + video, + img { + max-width: 100%; + width: auto; + } + video, + img { + height: auto; + } + div, + p, + ul, + ol, + table, + dl, + figure, + blockquote, + pre { + margin: 0; + margin-bottom: 15px; + border: none; + background: none; + box-shadow: none; + } + iframe, + object, + hr { + margin-bottom: 15px; + } + iframe { + width: auto; + } + blockquote { + margin-left: 1.6em !important; + padding-left: 0; + color: #777; + font-style: italic; + } + ul, + ol { + padding-left: 2em; + } + ul ul, + ol ol, + ul ol, + ol ul { + margin: 2px; + padding: 0; + padding-left: 2em; + border: none; + } + dl dt { + font-weight: bold; + } + dd { + margin-left: 1em; + } + // table { + // border-collapse: collapse; + // font-size: 1em; + // width: 100%; + // & td, + // & th { + // padding: 5px; + // border: 1px solid #ddd; + // vertical-align: top; + // } + // } + // table thead td, + // table th { + // font-weight: bold; + // border-bottom-color: #888; + // } + code { + background-color: #d8d7d7; + } + pre { + overflow: auto; + padding: 1em; + border: 1px solid #ddd; + border-radius: 3px; + background: #f8f8f8; + white-space: pre; + font-size: 90%; + } + hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + } + h1, + h2, + h3, + h4, + h5, + h6 { + font-weight: bold; + color: #0000; + padding: 0; + background: none; + text-rendering: optimizeLegibility; + margin: 0 0 .5em 0; + } + h1, + h2, + h3, + h4 { + line-height: 1.3; + } + h1 { + font-size: 36px; + } + h2 { + font-size: 24px; + margin-bottom: .7em; + } + h3 { + font-size: 21px; + } + h4 { + font-size: 18px; + } + h5 { + font-size: 16px; + } + h6 { + font-size: 12px; + text-transform: uppercase; + } +} \ No newline at end of file diff --git a/modules/backend/formwidgets/richeditor/assets/less/richeditor.less b/modules/backend/formwidgets/richeditor/assets/less/richeditor.less index 3741139ba..5386d532f 100644 --- a/modules/backend/formwidgets/richeditor/assets/less/richeditor.less +++ b/modules/backend/formwidgets/richeditor/assets/less/richeditor.less @@ -16,10 +16,10 @@ .field-richeditor { border: 1px solid @color-form-field-border; - &, .redactor_box { + &, .redactor-box { .border-radius(5px); } - .redactor_toolbar { + .redactor-toolbar { .border-top-radius(3px); } @@ -27,11 +27,80 @@ border-color: @color-form-field-border-focus; } - &.size-tiny .redactor_editor { height: (@size-tiny - @richeditor-toolbar-size) !important; } - &.size-small .redactor_editor { height: (@size-small - @richeditor-toolbar-size) !important; } - &.size-large .redactor_editor { height: (@size-large - @richeditor-toolbar-size) !important; } - &.size-huge .redactor_editor { height: (@size-huge - @richeditor-toolbar-size) !important; } - &.size-giant .redactor_editor { height: (@size-giant - @richeditor-toolbar-size) !important; } + &.size-tiny .redactor-editor { height: (@size-tiny - @richeditor-toolbar-size) !important; } + &.size-small .redactor-editor { height: (@size-small - @richeditor-toolbar-size) !important; } + &.size-large .redactor-editor { height: (@size-large - @richeditor-toolbar-size) !important; } + &.size-huge .redactor-editor { height: (@size-huge - @richeditor-toolbar-size) !important; } + &.size-giant .redactor-editor { height: (@size-giant - @richeditor-toolbar-size) !important; } +} + +// +// Override redactor defaults +// + +.redactor-box { + margin-bottom: 0; + + & iframe { + border: none; // Oc + } +} + +.redactor-box-fullscreen { + z-index: @richeditor-zindex + 99 !important; +} +.redactor-toolbar, +.redactor-dropdown { + z-index: @richeditor-zindex + 1050 !important; +} +#redactor-modal-overlay, +#redactor-modal-box, +#redactor-modal { + z-index: @richeditor-zindex + 1051 !important; +} + +.redactor-toolbar { + background: @color-richeditor-toolbar; + .box-shadow(none); + + & li.redactor-btn-right { + float: right; + margin-right: 2px; + } + + & li a { + color: @color-richeditor-toolbar-btn-color; + font-size: 14px; + width: 20px; + line-height: 20px; + + &:hover { + background-color: @color-richeditor-toolbar-btn-bg-hover; + color: @color-richeditor-toolbar-btn-color-hover; + } + + &:active, + &.redactor-act { + background-color: @color-richeditor-toolbar-btn-bg-active; + color: @color-richeditor-toolbar-btn-color-hover; + } + } +} + +.redactor-editor { + border: none; +} + +body .redactor-box-fullscreen { + background: @color-body-bg; + overflow-y: scroll !important; + width: 100%!important; + .redactor-editor { + background: #fff; + max-width: 960px; + margin: @richeditor-gutter auto !important; + padding: @richeditor-gutter; + } } // @@ -39,14 +108,17 @@ // .field-richeditor.stretch { - .redactor_box { + .redactor-box { display: block; position: relative; - height: 100%!important; - width: 100%!important; + height: 100% !important; + width: 100% !important; + .border-radius(0)!important; overflow: hidden; - .redactor_toolbar { + .redactor-toolbar { + .border-radius(0)!important; + display: block; border-bottom: none; position: absolute; @@ -54,23 +126,20 @@ width: 100%; } - .redactor_editor, textarea { - height: auto !important; - width: 100%!important; + .redactor-editor, textarea { + width: 100% !important; left: 0; top: 0; bottom: 0; position: absolute; } + .redactor-editor { + height: auto !important; + } + textarea { padding: 10px; - } - - iframe { - display: block; - position: absolute; - height: 100% !important; } } } diff --git a/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.css b/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.css index cf1288b54..cd8dfbf1a 100644 --- a/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.css +++ b/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.css @@ -11,307 +11,126 @@ font-weight: normal; font-style: normal; } -/* =Selection ------------------------------------------------------------------------------*/ -.redactor_box ::selection { - background: #ffff9e; -} -.redactor_box ::-moz-selection { - background: #ffff9e; -} -.redactor_box img::selection { - background: transparent; -} -.redactor_box img::-moz-selection { - background: transparent; -} /* - BOX + Box */ -.redactor_box { +.redactor-box { position: relative; overflow: visible; background: #fff; + margin-bottom: 24px; } -.redactor_box iframe { +.redactor-box iframe, +.redactor-box textarea { display: block; - margin: 0; - padding: 0; - border: 1px solid #eee; -} -.redactor_box textarea { position: relative; - display: block; - overflow: auto; margin: 0; padding: 0; width: 100%; +} +.redactor-box iframe { + border: 1px solid #eee; +} +.redactor-box textarea { + overflow: auto; outline: none; border: none; - background-color: #222; + background-color: #111; box-shadow: none; color: #ccc; font-size: 13px; font-family: Menlo, Monaco, monospace, sans-serif; resize: none; } -.redactor_box textarea:focus { +.redactor-box textarea:focus { outline: none; } -.redactor_box, -.redactor_box textarea { +/* + Z-index setup +*/ +.redactor-editor, +.redactor-box, +.redactor-box textarea { z-index: auto !important; } -.redactor_box_fullscreen { +.redactor-box-fullscreen { z-index: 99 !important; } -#redactor_modal_overlay, -#redactor_modal, -.redactor_dropdown { - z-index: 100 !important; +.redactor-toolbar, +.redactor-dropdown { + z-index: 1050 !important; +} +#redactor-modal-overlay, +#redactor-modal-box, +#redactor-modal { + z-index: 1051 !important; } /* - AIR - + Resize */ -body .redactor_air { - position: absolute; - z-index: 502; +.redactor-resize { + background: #f4f4f4; + padding: 4px 0 3px 0; + cursor: move; + border: 1px solid #e3e3e3; + border-top: none; +} +.redactor-resize div { + width: 30px; + margin: auto; + border-top: 1px solid #bbb; + border-bottom: 1px solid #fff; } /* - FULLSCREEN + Fullscreen */ -body .redactor_box_fullscreen { +body .redactor-box-fullscreen { position: fixed; top: 0; left: 0; width: 100%; } /* - LINK TOOLTIP + Editor */ -.redactor-link-tooltip { - position: absolute; - z-index: 49999; - padding: 10px; - line-height: 1; - display: inline-block; - background-color: #000; - color: #555 !important; -} -.redactor-link-tooltip, -.redactor-link-tooltip a { - font-size: 12px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; -} -.redactor-link-tooltip a { - color: #ccc; - margin: 0 5px; - text-decoration: none; -} -.redactor-link-tooltip a:hover { - color: #fff; -} -/* - IMAGE BOX -*/ -#redactor-image-box img { - width: 100%; -} -.redactor_editor { +.redactor-editor { position: relative; overflow: auto; margin: 0 !important; - padding: 10px 20px; - padding-bottom: 5px; + padding: 20px; outline: none; - background: none; - background: #fff; - box-shadow: none !important; white-space: normal; border: 1px solid #eee; -} -.redactor_editor:focus { - outline: none; -} -.redactor_editor div, -.redactor_editor p, -.redactor_editor ul, -.redactor_editor ol, -.redactor_editor table, -.redactor_editor dl, -.redactor_editor blockquote, -.redactor_editor pre, -.redactor_editor h1, -.redactor_editor h2, -.redactor_editor h3, -.redactor_editor h4, -.redactor_editor h5, -.redactor_editor h6 { font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; -} -.redactor_editor code, -.redactor_editor pre { - font-family: Menlo, Monaco, monospace, sans-serif; -} -.redactor_editor div, -.redactor_editor p, -.redactor_editor ul, -.redactor_editor ol, -.redactor_editor table, -.redactor_editor dl, -.redactor_editor blockquote, -.redactor_editor pre { font-size: 14px; line-height: 1.6em; } -.redactor_editor a { - color: #15c !important; - text-decoration: underline !important; +.redactor-editor:focus { + outline: none; } -.redactor_editor .redactor_placeholder { +/* + Placeholder +*/ +.redactor-placeholder { + position: relative; +} +.redactor-placeholder:after { + position: absolute; + top: 20px; + left: 20px; + content: attr(placeholder); color: #999 !important; - display: block !important; + font-weight: normal !important; +} +/* Placeholder in linebreaks mode */ +.redactor-linebreaks.redactor-placeholder:after { + top: 10px; + left: 10px; } /* - TYPOGRAPHY + Toolbar */ -.redactor_editor object, -.redactor_editor embed, -.redactor_editor video, -.redactor_editor img { - max-width: 100%; - width: auto; -} -.redactor_editor video, -.redactor_editor img { - height: auto; -} -.redactor_editor div, -.redactor_editor p, -.redactor_editor ul, -.redactor_editor ol, -.redactor_editor table, -.redactor_editor dl, -.redactor_editor blockquote, -.redactor_editor pre { - margin: 0; - margin-bottom: 10px !important; - border: none; - background: none !important; - box-shadow: none !important; -} -.redactor_editor iframe, -.redactor_editor object, -.redactor_editor hr { - margin-bottom: 15px !important; -} -.redactor_editor blockquote { - margin-left: 1.5em !important; - padding-left: 0 !important; - color: #777; - font-style: italic !important; -} -.redactor_editor ul, -.redactor_editor ol { - padding-left: 2em !important; -} -.redactor_editor ul ul, -.redactor_editor ol ol, -.redactor_editor ul ol, -.redactor_editor ol ul { - margin: 2px !important; - padding: 0 !important; - padding-left: 2em !important; - border: none; -} -.redactor_editor dl dt { - font-weight: bold; -} -.redactor_editor dd { - margin-left: 1em; -} -.redactor_editor table { - border-collapse: collapse; - font-size: 1em !important; -} -.redactor_editor table td { - padding: 5px !important; - border: 1px solid #ddd; - vertical-align: top; -} -.redactor_editor table thead td { - border-bottom: 2px solid #000 !important; - font-weight: bold !important; -} -.redactor_editor code { - background-color: #d8d7d7 !important; -} -.redactor_editor pre { - overflow: auto; - padding: 1em !important; - border: 1px solid #ddd !important; - border-radius: 3px !important; - background: #f8f8f8 !important; - white-space: pre; - font-size: 90% !important; -} -.redactor_editor hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid #ccc; -} -/* - HEADERS -*/ -.redactor_editor h1, -.redactor_editor h2, -.redactor_editor h3, -.redactor_editor h4, -.redactor_editor h5, -.redactor_editor h6 { - margin-top: 0 !important; - padding: 0 !important; - background: none; - color: #000; - font-weight: bold; -} -.redactor_editor h1 { - font-size: 36px !important; - line-height: 1.111em !important; - margin-bottom: .15em !important; -} -.redactor_editor h2 { - font-size: 30px !important; - line-height: 1.111em !important; - margin-bottom: .25em !important; -} -.redactor_editor h3 { - font-size: 24px !important; - line-height: 1.333em !important; - margin-bottom: .2em !important; -} -.redactor_editor h4 { - font-size: 18px !important; - line-height: 1.5em !important; - margin-bottom: .2em !important; -} -.redactor_editor h5 { - font-size: 1em !important; - line-height: 1.6em !important; - margin-bottom: .25em !important; -} -.redactor_editor h6 { - font-size: .8em !important; - line-height: 1.6em !important; - text-transform: uppercase; - margin-bottom: .3em !important; -} -/* - TOOLBAR -*/ -.redactor_toolbar { +.redactor-toolbar { position: relative; top: 0; left: 0; @@ -319,32 +138,27 @@ body .redactor_box_fullscreen { padding: 0 !important; list-style: none !important; font-size: 14px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; line-height: 1 !important; background: #fff; border: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); - z-index: 3; } -.redactor_toolbar:after { +.redactor-toolbar:after { content: ""; display: table; clear: both; } -.redactor_toolbar.redactor-toolbar-overflow { +.redactor-toolbar.redactor-toolbar-overflow { overflow-y: auto; height: 29px; white-space: nowrap; } -.redactor_toolbar.redactor-toolbar-external { +.redactor-toolbar.redactor-toolbar-external { z-index: 999; box-shadow: none; border: 1px solid rgba(0, 0, 0, 0.1); } -body .redactor_air .redactor_toolbar { - padding-right: 2px !important; -} -.redactor_toolbar li { +.redactor-toolbar li { vertical-align: top; display: inline-block; margin: 0 !important; @@ -355,7 +169,7 @@ body .redactor_air .redactor_toolbar { -moz-box-sizing: content-box; box-sizing: content-box; } -.redactor_toolbar li a { +.redactor-toolbar li a { display: block; color: #333; text-align: center; @@ -369,56 +183,45 @@ body .redactor_air .redactor_toolbar { -moz-box-sizing: content-box; box-sizing: content-box; } -.redactor_toolbar li a:hover { +.redactor-toolbar li a:hover { outline: none; background-color: #1f78d8; color: #fff; } -.redactor_toolbar li a:hover i:before { +.redactor-toolbar li a:hover i:before { color: #fff; } -.redactor_toolbar li a:active, -.redactor_toolbar li a.redactor_act { +.redactor-toolbar li a:active, +.redactor-toolbar li a.redactor-act { outline: none; background-color: #ccc; color: #444; } -.redactor_toolbar li a.redactor-btn-image { +.redactor-toolbar li a.redactor-btn-image { width: 14px; height: 14px; background-position: center center; background-repeat: no-repeat; } -.redactor_button_disabled { - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; -} -.redactor_button_disabled:hover { - outline: none; - background-color: transparent !important; - cursor: default; -} -.redactor_toolbar li a.fa-redactor-btn { +.redactor-toolbar li a.fa-redactor-btn { display: inline-block; padding: 9px 10px 8px 10px; line-height: 1; } -.redactor_toolbar.redactor-toolbar-typewriter { - box-shadow: none; - background: rgba(240, 240, 240, 0.9); +.redactor-toolbar li a.redactor-button-disabled { + filter: alpha(opacity=30); + -moz-opacity: 0.3; + opacity: 0.3; } -.redactor_toolbar.redactor-toolbar-typewriter li a:hover { +.redactor-toolbar li a.redactor-button-disabled:hover { + color: #333; outline: none; - background-color: #1f78d8; - color: #fff; -} -.redactor_toolbar.redactor-toolbar-typewriter li a:active, -.redactor_toolbar.redactor-toolbar-typewriter li a.redactor_act { - outline: none; - background-color: #ccc; - color: #444; + background-color: transparent !important; + cursor: default; } +/* + Icons +*/ .re-icon { font-family: 'RedactorFont'; speak: none; @@ -532,408 +335,102 @@ body .redactor_air .redactor_toolbar { content: "\e61f"; } /* - Toolbar classes + Toolbar tooltip */ -.redactor_format_blockquote { - padding-left: 10px; - color: #666 !important; - font-style: italic; -} -.redactor_format_pre { - font-family: monospace, sans-serif; -} -.redactor_format_h1, -.redactor_format_h2, -.redactor_format_h3, -.redactor_format_h4, -.redactor_format_h5 { - font-weight: bold; -} -.redactor_format_h1 { - font-size: 30px; - line-height: 36px; -} -.redactor_format_h2 { - font-size: 24px; - line-height: 36px; -} -.redactor_format_h3 { - font-size: 20px; - line-height: 30px; -} -.redactor_format_h4 { - font-size: 16px; - line-height: 26px; -} -.redactor_format_h5 { - font-size: 14px; - line-height: 23px; -} -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h1, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h3, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h4, -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h5 { - font-size: 1em; - line-height: 1.6em; - text-transform: uppercase; -} -.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2 { - font-size: .85em; +.redactor-toolbar-tooltip { + position: absolute; + z-index: 100; + text-align: center; + top: 0; + left: 0; + background: #000; + color: #fff; + padding: 5px 8px; + line-height: 1; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + font-size: 12px; + border-radius: 2px; } /* - Typewriter + Dropdown */ -.redactor_editor.redactor-editor-typewriter { - background: #f5f5f5 !important; - padding: 25px 50px !important; -} -.redactor_editor.redactor-editor-typewriter div, -.redactor_editor.redactor-editor-typewriter p, -.redactor_editor.redactor-editor-typewriter ul, -.redactor_editor.redactor-editor-typewriter ol, -.redactor_editor.redactor-editor-typewriter table, -.redactor_editor.redactor-editor-typewriter dl, -.redactor_editor.redactor-editor-typewriter blockquote, -.redactor_editor.redactor-editor-typewriter pre, -.redactor_editor.redactor-editor-typewriter h1, -.redactor_editor.redactor-editor-typewriter h2, -.redactor_editor.redactor-editor-typewriter h3, -.redactor_editor.redactor-editor-typewriter h4, -.redactor_editor.redactor-editor-typewriter h5, -.redactor_editor.redactor-editor-typewriter h6 { - font-family: 'Courier New', 'Lucida Console', Consolas, Monaco, monospace, sans-serif; - font-size: 18px !important; - line-height: 1.5em !important; - margin-bottom: 1.5em !important; -} -.redactor_editor.redactor-editor-typewriter h2 { - font-size: 14px !important; -} -.redactor_editor.redactor-editor-typewriter h1, -.redactor_editor.redactor-editor-typewriter h2, -.redactor_editor.redactor-editor-typewriter h3, -.redactor_editor.redactor-editor-typewriter h4, -.redactor_editor.redactor-editor-typewriter h5, -.redactor_editor.redactor-editor-typewriter h6 { - text-transform: uppercase; -} -.redactor_editor.redactor-editor-typewriter a { - color: #000 !important; - text-decoration: underline !important; -} -/* - WYM -*/ -.redactor_editor.redactor_editor_wym { - padding: 10px 7px 0 7px !important; - background: #f6f6f6 !important; -} -.redactor_editor.redactor_editor_wym div, -.redactor_editor.redactor_editor_wym p, -.redactor_editor.redactor_editor_wym ul, -.redactor_editor.redactor_editor_wym ol, -.redactor_editor.redactor_editor_wym table, -.redactor_editor.redactor_editor_wym dl, -.redactor_editor.redactor_editor_wym pre, -.redactor_editor.redactor_editor_wym h1, -.redactor_editor.redactor_editor_wym h2, -.redactor_editor.redactor_editor_wym h3, -.redactor_editor.redactor_editor_wym h4, -.redactor_editor.redactor_editor_wym h5, -.redactor_editor.redactor_editor_wym h6, -.redactor_editor.redactor_editor_wym blockquote { - margin-top: 0; - margin-bottom: 5px !important; - padding: 10px !important; - border: 1px solid #e4e4e4 !important; - background-color: #fff !important; - z-index: 0; -} -.redactor_editor.redactor_editor_wym blockquote:before { - content: ''; -} -.redactor_editor.redactor_editor_wym img { - position: relative; - z-index: 1; -} -.redactor_editor.redactor_editor_wym div { - border: 1px dotted #aaa !important; -} -.redactor_editor.redactor_editor_wym pre { - border: 2px dashed #e4e4e4 !important; - background-color: #f8f8f8 !important; -} -.redactor_editor.redactor_editor_wym ul, -.redactor_editor.redactor_editor_wym ol { - padding-left: 2em !important; -} -.redactor_editor.redactor_editor_wym ul li ul, -.redactor_editor.redactor_editor_wym ol li ul, -.redactor_editor.redactor_editor_wym ul li ol, -.redactor_editor.redactor_editor_wym ol li ol { - border: none !important; -} -/* - DROPDOWN -*/ -.redactor_dropdown { +.redactor-dropdown { position: absolute; top: 28px; left: 0; - padding: 10px; - width: 200px; + padding: 0; + min-width: 220px; + max-height: 254px; + overflow: auto; background-color: #fff; - box-shadow: 0 1px 5px #bbb; - font-size: 13px; - font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; - line-height: 21px; + box-shadow: 0 1px 7px rgba(0, 0, 0, 0.25); + font-size: 14px; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + line-height: 1.6em; } -.redactor-toolbar-typewriter .redactor_dropdown { - font-family: 'Courier New', 'Lucida Console', Consolas, Monaco, monospace, sans-serif; - background-color: #f5f5f5; -} -.redactor_separator_drop { - padding: 0 !important; - border-top: 1px solid #ddd; - font-size: 0; - line-height: 0; -} -.redactor_dropdown a { +.redactor-dropdown a { display: block; - padding: 3px 5px; + padding: 10px 15px; color: #000; text-decoration: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.07); } -.redactor_dropdown a:hover { - background-color: #dde4ef; - color: #444 !important; +.redactor-dropdown a:last-child { + border-bottom: none; +} +.redactor-dropdown a:hover { + background-color: #1f78d8; + color: #fff !important; text-decoration: none; } /* - MODAL + LINK TOOLTIP */ -#redactor_modal_overlay { - position: fixed; - top: 0; - left: 0; - margin: auto; - width: 100%; - height: 100%; - background-color: #000 !important; - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; -} -#redactor_modal { - position: fixed; - top: 50%; - left: 50%; - padding: 0; - background: #fff; - color: #000; - font-size: 12px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); -} -#redactor_modal header { - padding: 20px 30px 5px 30px; - font-size: 16px; -} -#redactor_modal section { - padding: 20px 30px; -} -#redactor_modal label { - display: block !important; - float: none !important; - margin: 10px 0 3px 0 !important; - padding: 0 !important; - font-size: 12px !important; -} -#redactor_modal footer:after { - content: ""; - display: table; - clear: both; -} -#redactor_modal footer div { - float: left; -} -#redactor_modal input[type="radio"], -#redactor_modal input[type="checkbox"] { - position: relative; - top: -1px; -} -#redactor_modal input[type="text"], -#redactor_modal input[type="password"], -#redactor_modal input[type="email"], -#redactor_modal textarea { - position: relative; - z-index: 2; - margin: 0; - padding: 1px 2px; - height: 23px; - border: 1px solid #ccc; - border-radius: 1px; - background-color: white; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; - color: #333; - font-size: 13px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - line-height: 1; - -moz-transition: border 0.3s ease-in; - transition: border 0.3s ease-in; -} -#redactor_modal textarea { - display: block; - margin-top: 4px; - line-height: 1.4em; -} -#redactor_modal input:focus, -#redactor_modal textarea:focus { - outline: none; - border-color: #5ca9e4; - box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; -} -#redactor_modal_close { +.redactor-link-tooltip { position: absolute; - top: 5px; - right: 3px; - width: 20px; - height: 20px; - color: #999; - font-size: 26px; - cursor: pointer; -} -#redactor_modal_close:hover { - color: #000; -} -.redactor_input { - width: 99%; - font-size: 14px; -} -.redactor_modal_box { - overflow: auto; - margin-bottom: 10px; - height: 350px; -} -#redactor_image_box { - overflow: auto; - margin-bottom: 10px; - height: 270px; -} -#redactor_image_box_select { - display: block; - margin-bottom: 15px !important; - width: 200px; -} -#redactor_image_box img { - margin-right: 10px; - margin-bottom: 10px; - max-width: 100px; - cursor: pointer; -} -#redactor_tabs { - margin-bottom: 18px; -} -#redactor_tabs a { - display: inline-block; - margin-right: 2px; - padding: 4px 14px; - border: 1px solid #d2d2d2; - border-radius: 3px; - background: #fff; - color: #000; - text-decoration: none; + z-index: 49999; + padding: 10px; line-height: 1; + display: inline-block; + background-color: #000; + color: #555 !important; } -#redactor_tabs a:hover, -#redactor_tabs a.redactor_tabs_act { - border-color: #eee; - color: #999 !important; - text-decoration: none !important; -} -.redactor_modal_btn_hidden { - display: none; -} -#redactor_modal footer button { - position: relative; - width: 100%; - padding: 10px 16px; - margin: 0; - outline: none; - border: none; - background-color: #ddd; - color: #000; - text-align: center; - text-decoration: none; - font-weight: normal; +.redactor-link-tooltip, +.redactor-link-tooltip a { font-size: 12px; font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; - line-height: 1; - cursor: pointer; } -#redactor_modal footer button:hover { - color: #777; - background: none; - background: #bbb; +.redactor-link-tooltip a { + color: #ccc; + margin: 0 5px; text-decoration: none; } -#redactor_modal footer button.redactor_modal_delete_btn { - background: none; +.redactor-link-tooltip a:hover { color: #fff; - background-color: #b52525; } -#redactor_modal footer button.redactor_modal_delete_btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #881b1b; -} -#redactor_modal footer button.redactor_modal_action_btn { - background: none; - color: #fff; - background-color: #2461b5; -} -#redactor_modal footer button.redactor_modal_action_btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #1a4580; -} -/* Drag and Drop Area */ -.redactor_droparea { +/* + DROPAREA +*/ +#redactor-droparea { position: relative; - margin: auto; - margin-bottom: 5px; - width: 100%; + overflow: hidden; + padding: 140px 20px; + border: 3px dashed rgba(0, 0, 0, 0.1); } -.redactor_droparea .redactor_dropareabox { - position: relative; - z-index: 1; - padding: 60px 0; - width: 99%; - border: 1px dashed #ddd; - background: #fff; +#redactor-droparea.drag-hover { + background: rgba(200, 222, 250, 0.75); +} +#redactor-droparea.drag-drop { + background: rgba(250, 248, 200, 0.5); +} +#redactor-droparea-placeholder { text-align: center; -} -.redactor_droparea .redactor_dropareabox, -.redactor_dropalternative { - color: #555; font-size: 12px; + color: rgba(0, 0, 0, 0.7); } -.redactor_dropalternative { - margin: 4px 0 2px 0; -} -.redactor_dropareabox.hover { - border-color: #aaa; - background: #efe3b8; -} -.redactor_dropareabox.error { - border-color: #dcc3c3; - background: #f7e5e5; -} -.redactor_dropareabox.drop { - border-color: #e0e5d6; - background: #f4f4ee; -} -/* =ProgressBar ------------------------------------------------------------------------------*/ +/* + PROGRESS +*/ #redactor-progress { position: fixed; top: 0; @@ -979,3 +476,410 @@ body .redactor_air .redactor_toolbar { background-position: 0 0; } } +/* + MODAL +*/ +#redactor-modal-overlay { + position: fixed; + top: 0; + left: 0; + margin: auto; + overflow: auto; + width: 100%; + height: 100%; + background-color: #000 !important; + filter: alpha(opacity=30); + -moz-opacity: 0.3; + opacity: 0.3; +} +#redactor-modal-box { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + overflow-x: hidden; + overflow-y: auto; +} +#redactor-modal { + position: relative; + margin: auto; + margin-bottom: 20px; + padding: 0; + background: #fff; + color: #000; + font-size: 14px !important; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + box-shadow: 0 1px 70px rgba(0, 0, 0, 0.5); +} +#redactor-modal header { + padding: 30px 40px 5px 40px; + font-size: 18px; + font-weight: bold; +} +#redactor-modal section { + padding: 30px 40px 50px 40px; +} +#redactor-modal label { + display: block; + float: none !important; + margin: 15px 0 3px 0 !important; + padding: 0; +} +#redactor-modal input[type="radio"], +#redactor-modal input[type="checkbox"] { + position: relative; + top: -1px; +} +#redactor-modal select { + width: 100%; +} +#redactor-modal input[type="text"], +#redactor-modal input[type="password"], +#redactor-modal input[type="email"], +#redactor-modal input[type="url"], +#redactor-modal textarea { + position: relative; + z-index: 2; + margin: 0; + padding: 5px 4px; + height: 28px; + border: 1px solid #ccc; + border-radius: 1px; + background-color: white; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; + color: #333; + width: 100%; + font-size: 14px; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + -moz-transition: border 0.3s ease-in; + transition: border 0.3s ease-in; +} +#redactor-modal input[type="text"]:focus, +#redactor-modal input[type="password"]:focus, +#redactor-modal input[type="email"]:focus, +#redactor-modal input[type="url"]:focus, +#redactor-modal textarea:focus { + outline: none; + border-color: #5ca9e4; + box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; +} +#redactor-modal input[type="text"].redactor-input-error, +#redactor-modal input[type="password"].redactor-input-error, +#redactor-modal input[type="email"].redactor-input-error, +#redactor-modal input[type="url"].redactor-input-error, +#redactor-modal textarea.redactor-input-error { + border-color: #e82f2f; + box-shadow: 0 0 0 2px rgba(232, 47, 47, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; +} +#redactor-modal textarea { + display: block; + margin-top: 4px; + line-height: 1.4em; +} +/* + Tabs in Modal +*/ +#redactor-modal-tabber { + margin-bottom: 15px; + font-size: 12px; +} +#redactor-modal-tabber a { + border: 1px solid #ddd; + line-height: 1; + padding: 8px 15px; + margin-right: -1px; + text-decoration: none; + color: #000; +} +#redactor-modal-tabber a:hover { + background-color: #1f78d8; + border-color: #1f78d8; + color: #fff; +} +#redactor-modal-tabber a.active { + cursor: default; + background-color: #ddd; + border-color: #ddd; + color: rgba(0, 0, 0, 0.6); +} +/* + List in Modal +*/ +#redactor-modal #redactor-modal-list { + margin-left: 0; + padding-left: 0; + list-style: none; + max-height: 250px; + overflow-x: scroll; +} +#redactor-modal #redactor-modal-list li { + border-bottom: 1px solid #ddd; +} +#redactor-modal #redactor-modal-list li:last-child { + border-bottom: none; +} +#redactor-modal #redactor-modal-list a { + padding: 10px 5px; + color: #000; + text-decoration: none; + font-size: 13px; + display: block; + position: relative; +} +#redactor-modal #redactor-modal-list a:hover { + background-color: #eee; +} +#redactor-modal-close { + position: absolute; + top: 10px; + right: 10px; + width: 30px; + height: 30px; + text-align: right; + color: #bbb; + font-size: 30px; + font-weight: 300; + cursor: pointer; +} +#redactor-modal-close:hover { + color: #000; +} +#redactor-modal footer button { + position: relative; + width: 100%; + padding: 14px 16px; + margin: 0; + outline: none; + border: none; + background-color: #ddd; + color: #000; + text-align: center; + text-decoration: none; + font-weight: normal; + font-size: 12px; + font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; + line-height: 1; + cursor: pointer; +} +#redactor-modal footer button:hover { + color: #777; + background: none; + background: #bbb; + text-decoration: none; +} +#redactor-modal footer button.redactor-modal-delete-btn { + background: none; + color: #fff; + background-color: #b52525; +} +#redactor-modal footer button.redactor-modal-delete-btn:hover { + color: rgba(255, 255, 255, 0.6); + background-color: #881b1b; +} +#redactor-modal footer button.redactor-modal-action-btn { + background: none; + color: #fff; + background-color: #2461b5; +} +#redactor-modal footer button.redactor-modal-action-btn:hover { + color: rgba(255, 255, 255, 0.6); + background-color: #1a4580; +} +/* + ############################################## + + DROPDOWN FORMATTING + + ############################################## +*/ +.redactor-dropdown .redactor-formatting-blockquote { + color: rgba(0, 0, 0, 0.4); + font-style: italic; +} +.redactor-dropdown .redactor-formatting-pre { + font-family: monospace, sans-serif; +} +.redactor-dropdown .redactor-formatting-h1 { + font-size: 36px; + line-height: 36px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h2 { + font-size: 24px; + line-height: 36px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h3 { + font-size: 21px; + line-height: 30px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h4 { + font-size: 18px; + line-height: 26px; + font-weight: bold; +} +.redactor-dropdown .redactor-formatting-h5 { + font-size: 16px; + line-height: 23px; + font-weight: bold; +} +/* + ############################################## + + CONTENT STYLES + + ############################################## +*/ +.redactor-editor code, +.redactor-editor pre { + font-family: Menlo, Monaco, monospace, sans-serif; +} +.redactor-editor div, +.redactor-editor p, +.redactor-editor ul, +.redactor-editor ol, +.redactor-editor table, +.redactor-editor dl, +.redactor-editor blockquote, +.redactor-editor pre { + font-size: 14px; + line-height: 1.6em; +} +.redactor-editor a { + color: #15c; + text-decoration: underline; +} +.redactor-editor object, +.redactor-editor embed, +.redactor-editor video, +.redactor-editor img { + max-width: 100%; + width: auto; +} +.redactor-editor video, +.redactor-editor img { + height: auto; +} +.redactor-editor div, +.redactor-editor p, +.redactor-editor ul, +.redactor-editor ol, +.redactor-editor table, +.redactor-editor dl, +.redactor-editor figure, +.redactor-editor blockquote, +.redactor-editor pre { + margin: 0; + margin-bottom: 15px; + border: none; + background: none; + box-shadow: none; +} +.redactor-editor iframe, +.redactor-editor object, +.redactor-editor hr { + margin-bottom: 15px; +} +.redactor-editor iframe { + width: auto; +} +.redactor-editor blockquote { + margin-left: 1.6em !important; + padding-left: 0; + color: #777; + font-style: italic; +} +.redactor-editor ul, +.redactor-editor ol { + padding-left: 2em; +} +.redactor-editor ul ul, +.redactor-editor ol ol, +.redactor-editor ul ol, +.redactor-editor ol ul { + margin: 2px; + padding: 0; + padding-left: 2em; + border: none; +} +.redactor-editor dl dt { + font-weight: bold; +} +.redactor-editor dd { + margin-left: 1em; +} +.redactor-editor table { + border-collapse: collapse; + font-size: 1em; + width: 100%; +} +.redactor-editor table td, +.redactor-editor table th { + padding: 5px; + border: 1px solid #ddd; + vertical-align: top; +} +.redactor-editor table thead td, +.redactor-editor table th { + font-weight: bold; + border-bottom-color: #888; +} +.redactor-editor code { + background-color: #d8d7d7; +} +.redactor-editor pre { + overflow: auto; + padding: 1em; + border: 1px solid #ddd; + border-radius: 3px; + background: #f8f8f8; + white-space: pre; + font-size: 90%; +} +.redactor-editor hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; +} +.redactor-editor h1, +.redactor-editor h2, +.redactor-editor h3, +.redactor-editor h4, +.redactor-editor h5, +.redactor-editor h6 { + font-weight: bold; + color: #0000; + padding: 0; + background: none; + text-rendering: optimizeLegibility; + margin: 0 0 .5em 0; +} +.redactor-editor h1, +.redactor-editor h2, +.redactor-editor h3, +.redactor-editor h4 { + line-height: 1.3; +} +.redactor-editor h1 { + font-size: 36px; +} +.redactor-editor h2 { + font-size: 24px; + margin-bottom: .7em; +} +.redactor-editor h3 { + font-size: 21px; +} +.redactor-editor h4 { + font-size: 18px; +} +.redactor-editor h5 { + font-size: 16px; +} +.redactor-editor h6 { + font-size: 12px; + text-transform: uppercase; +} diff --git a/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.js b/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.js index cb431e00d..869ee18d7 100644 --- a/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.js +++ b/modules/backend/formwidgets/richeditor/assets/vendor/redactor/redactor.js @@ -1,6 +1,6 @@ /* - Redactor v9.2.6 - Updated: Jul 19, 2014 + Redactor v10.0 + Updated: September 24, 2014 http://imperavi.com/redactor/ @@ -9,28 +9,26 @@ Usage: $('#content').redactor(); */ + (function($) { + 'use strict'; + + if (!Function.prototype.bind) + { + Function.prototype.bind = function(scope) + { + var fn = this; + return function() + { + return fn.apply(scope); + }; + }; + } + var uuid = 0; - "use strict"; - - var Range = function(range) - { - this[0] = range.startOffset; - this[1] = range.endOffset; - - this.range = range; - - return this; - }; - - Range.prototype.equals = function() - { - return this[0] === this[1]; - }; - - var reUrlYoutube = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig; + var reUrlYoutube = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig; var reUrlVimeo = /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/; // Plugin @@ -44,19 +42,41 @@ this.each(function() { var instance = $.data(this, 'redactor'); - if (typeof instance !== 'undefined' && $.isFunction(instance[options])) + var func; + + if (options.search(/\./) != '-1') { - var methodVal = instance[options].apply(instance, args); - if (methodVal !== undefined && methodVal !== instance) val.push(methodVal); + func = options.split('.'); + if (typeof instance[func[0]] != 'undefined') + { + func = instance[func[0]][func[1]]; + } + } + else + { + func = instance[options]; + } + + if (typeof instance !== 'undefined' && $.isFunction(func)) + { + var methodVal = func.apply(instance, args); + if (methodVal !== undefined && methodVal !== instance) + { + val.push(methodVal); + } + } + else + { + $.error('No such method "' + options + '" for Redactor'); } - else return $.error('No such method "' + options + '" for Redactor'); }); } else { this.each(function() { - if (!$.data(this, 'redactor')) $.data(this, 'redactor', Redactor(this, options)); + $.data(this, 'redactor', {}); + $.data(this, 'redactor', Redactor(this, options)); }); } @@ -72,236 +92,239 @@ return new Redactor.prototype.init(el, options); } + // Functionality $.Redactor = Redactor; - $.Redactor.VERSION = '9.2.6'; + $.Redactor.VERSION = '10.0'; + $.Redactor.modules = ['core', 'build', 'lang', 'toolbar', 'button', 'dropdown', 'code', + 'clean', 'tidy', 'paragraphize', 'tabifier', 'focus', 'placeholder', 'autosave', 'buffer', 'indent', 'alignment', 'paste', + 'keydown', 'keyup', 'shortcuts', 'line', 'list', 'block', 'inline', 'insert', 'caret', 'selection', 'observe', + 'link', 'image', 'file', 'modal', 'progress', 'upload', 'utils']; + $.Redactor.opts = { - // settings - rangy: false, + // settings + lang: 'en', + direction: 'ltr', // ltr or rtl - iframe: false, - fullpage: false, - css: false, // url + plugins: false, // array - lang: 'en', - direction: 'ltr', // ltr or rtl + focus: false, + focusEnd: false, - placeholder: false, + placeholder: false, - typewriter: false, - wym: false, - mobile: true, - cleanup: true, - tidyHtml: true, - pastePlainText: false, - removeEmptyTags: true, - cleanSpaces: true, - cleanFontTag: true, - templateVars: false, - xhtml: false, + visual: true, + tabindex: false, - visual: true, - focus: false, - tabindex: false, - autoresize: true, - minHeight: false, - maxHeight: false, - shortcuts: { - 'ctrl+m, meta+m': "this.execCommand('removeFormat', false)", - 'ctrl+b, meta+b': "this.execCommand('bold', false)", - 'ctrl+i, meta+i': "this.execCommand('italic', false)", - 'ctrl+h, meta+h': "this.execCommand('superscript', false)", - 'ctrl+l, meta+l': "this.execCommand('subscript', false)", - 'ctrl+k, meta+k': "this.linkShow()", - 'ctrl+shift+7': "this.execCommand('insertorderedlist', false)", - 'ctrl+shift+8': "this.execCommand('insertunorderedlist', false)" - }, - shortcutsAdd: false, + minHeight: false, + maxHeight: false, - autosave: false, // false or url - autosaveInterval: 60, // seconds + linebreaks: false, + replaceDivs: true, + paragraphize: true, + cleanStyleOnEnter: false, + enterKey: true, - plugins: false, // array + cleanOnPaste: true, + cleanSpaces: true, + pastePlainText: false, - //linkAnchor: true, - //linkEmail: true, - linkProtocol: 'http://', - linkNofollow: false, - linkSize: 50, - predefinedLinks: false, // json url (ex. /some-url.json ) or false + autosave: false, // false or url + autosaveName: false, + autosaveInterval: 60, // seconds + autosaveOnChange: false, - imageFloatMargin: '10px', - imageGetJson: false, // json url (ex. /some-images.json ) or false + linkTooltip: true, + linkProtocol: 'http', + linkNofollow: false, + linkSize: 50, - dragUpload: true, // false - imageTabLink: true, - imageUpload: false, // url - imageUploadParam: 'file', // input name - imageResizable: true, + imageEditable: true, + imageLink: true, + imagePosition: true, + imageFloatMargin: '10px', + imageResizable: true, - fileUpload: false, // url - fileUploadParam: 'file', // input name - clipboardUpload: true, // or false - clipboardUploadUrl: false, // url + imageUpload: false, + imageUploadParam: 'file', - dnbImageTypes: ['image/png', 'image/jpeg', 'image/gif'], // or false + uploadImageField: false, - s3: false, - uploadFields: false, + dragImageUpload: true, + clipboardImageUpload: false, - observeImages: true, - observeLinks: true, + fileUpload: false, + fileUploadParam: 'file', - modalOverlay: true, + dragFileUpload: true, - tabSpaces: false, // true or number of spaces - tabFocus: true, + s3: false, - air: false, - airButtons: ['formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent'], + convertLinks: true, + convertUrlLinks: true, + convertImageLinks: true, + convertVideoLinks: true, - toolbar: true, - toolbarFixed: false, - toolbarFixedTarget: document, - toolbarFixedTopOffset: 0, // pixels - toolbarFixedBox: false, - toolbarExternal: false, // ID selector - toolbarOverflow: false, - buttonSource: true, + preSpaces: 4, // or false + tabAsSpaces: false, // true or number of spaces + tabFocus: true, - buttons: ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', - 'outdent', 'indent', 'image', 'video', 'file', 'table', 'link', 'alignment', '|', - 'horizontalrule'], // 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify' - buttonsHideOnMobile: [], + scrollTarget: false, - activeButtons: ['deleted', 'italic', 'bold', 'underline', 'unorderedlist', 'orderedlist', - 'alignleft', 'aligncenter', 'alignright', 'justify', 'table'], - activeButtonsStates: { - b: 'bold', - strong: 'bold', - i: 'italic', - em: 'italic', - del: 'deleted', - strike: 'deleted', - ul: 'unorderedlist', - ol: 'orderedlist', - u: 'underline', - tr: 'table', - td: 'table', - table: 'table' - }, + toolbar: true, + toolbarFixed: true, + toolbarFixedTarget: document, + toolbarFixedTopOffset: 0, // pixels + toolbarExternal: false, // ID selector + toolbarOverflow: false, - formattingTags: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'], + buttonSource: false, + buttons: ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', + 'outdent', 'indent', 'image', 'file', 'link', 'alignment', 'horizontalrule'], // + 'underline' - linebreaks: false, - paragraphy: true, - convertDivs: true, - convertLinks: true, - convertImageLinks: false, - convertVideoLinks: false, - formattingPre: false, - phpTags: false, + buttonsHide: [], + buttonsHideOnMobile: [], - allowedTags: false, - deniedTags: ['html', 'head', 'link', 'body', 'meta', 'script', 'style', 'applet'], + formatting: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'], + formattingAdd: false, - boldTag: 'strong', - italicTag: 'em', + tabifier: true, - // private - indentValue: 20, - buffer: [], - rebuffer: [], - textareamode: false, - emptyHtml: '

', - invisibleSpace: '​', - rBlockTest: /^(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)$/i, - alignmentTags: ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'DD', 'DL', 'DT', 'DIV', 'TD', - 'BLOCKQUOTE', 'OUTPUT', 'FIGCAPTION', 'ADDRESS', 'SECTION', - 'HEADER', 'FOOTER', 'ASIDE', 'ARTICLE'], - ownLine: ['area', 'body', 'head', 'hr', 'i?frame', 'link', 'meta', 'noscript', 'style', 'script', 'table', 'tbody', 'thead', 'tfoot'], - contOwnLine: ['li', 'dt', 'dt', 'h[1-6]', 'option', 'script'], - newLevel: ['blockquote', 'div', 'dl', 'fieldset', 'form', 'frameset', 'map', 'ol', 'p', 'pre', 'select', 'td', 'th', 'tr', 'ul'], - blockLevelElements: ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'DD', 'DL', 'DT', 'DIV', 'LI', - 'BLOCKQUOTE', 'OUTPUT', 'FIGCAPTION', 'PRE', 'ADDRESS', 'SECTION', - 'HEADER', 'FOOTER', 'ASIDE', 'ARTICLE', 'TD'], + deniedTags: ['html', 'head', 'link', 'body', 'meta', 'script', 'style', 'applet'], + allowedTags: false, // or array + + removeComments: false, + replaceTags: [ + ['strike', 'del'] + ], + replaceStyles: [ + ['font-weight:\\s?bold', "strong"], + ['font-style:\\s?italic', "em"], + ['text-decoration:\\s?underline', "u"], + ['text-decoration:\\s?line-through', 'del'] + ], + removeDataAttr: false, + + removeAttr: false, // or multi array + allowedAttr: false, // or multi array + + removeWithoutAttr: ['span'], // or false + removeEmpty: ['p'], // or false; + + activeButtons: ['deleted', 'italic', 'bold', 'underline', 'unorderedlist', 'orderedlist', + 'alignleft', 'aligncenter', 'alignright', 'justify'], + activeButtonsStates: { + b: 'bold', + strong: 'bold', + i: 'italic', + em: 'italic', + del: 'deleted', + strike: 'deleted', + ul: 'unorderedlist', + ol: 'orderedlist', + u: 'underline' + }, + + shortcuts: { + 'ctrl+shift+m, meta+shift+m': { func: 'inline.removeFormat' }, + 'ctrl+b, meta+b': { func: 'inline.format', params: ['bold'] }, + 'ctrl+i, meta+i': { func: 'inline.format', params: ['italic'] }, + 'ctrl+h, meta+h': { func: 'inline.format', params: ['superscript'] }, + 'ctrl+l, meta+l': { func: 'inline.format', params: ['subscript'] }, + 'ctrl+k, meta+k': { func: 'link.show' }, + 'ctrl+shift+7': { func: 'list.toggle', params: ['orderedlist'] }, + 'ctrl+shift+8': { func: 'list.toggle', params: ['unorderedlist'] } + }, + shortcutsAdd: false, + + // private + buffer: [], + rebuffer: [], + emptyHtml: '

', + invisibleSpace: '​', + imageTypes: ['image/png', 'image/jpeg', 'image/gif'], + indentValue: 20, + verifiedTags: ['a', 'img', 'b', 'strong', 'sub', 'sup', 'i', 'em', 'u', 'small', 'strike', 'del', 'cite', 'ul', 'ol', 'li'], // and for span tag special rule + inlineTags: ['strong', 'b', 'u', 'em', 'i', 'code', 'del', 'ins', 'samp', 'kbd', 'sup', 'sub', 'mark', 'var', 'cite', 'small'], + alignmentTags: ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'DL', 'DT', 'DD', 'DIV', 'TD', 'BLOCKQUOTE', 'OUTPUT', 'FIGCAPTION', 'ADDRESS', 'SECTION', 'HEADER', 'FOOTER', 'ASIDE', 'ARTICLE'], + blockLevelElements: ['PRE', 'UL', 'OL', 'LI'], - // lang - langs: { - en: { - html: 'HTML', - video: 'Insert Video', - image: 'Insert Image', - table: 'Table', - link: 'Link', - link_insert: 'Insert link', - link_edit: 'Edit link', - unlink: 'Unlink', - formatting: 'Formatting', - paragraph: 'Normal text', - quote: 'Quote', - code: 'Code', - header1: 'Header 1', - header2: 'Header 2', - header3: 'Header 3', - header4: 'Header 4', - header5: 'Header 5', - bold: 'Bold', - italic: 'Italic', - fontcolor: 'Font Color', - backcolor: 'Back Color', - unorderedlist: 'Unordered List', - orderedlist: 'Ordered List', - outdent: 'Outdent', - indent: 'Indent', - cancel: 'Cancel', - insert: 'Insert', - save: 'Save', - _delete: 'Delete', - insert_table: 'Insert Table', - insert_row_above: 'Add Row Above', - insert_row_below: 'Add Row Below', - insert_column_left: 'Add Column Left', - insert_column_right: 'Add Column Right', - delete_column: 'Delete Column', - delete_row: 'Delete Row', - delete_table: 'Delete Table', - rows: 'Rows', - columns: 'Columns', - add_head: 'Add Head', - delete_head: 'Delete Head', - title: 'Title', - image_position: 'Position', - none: 'None', - left: 'Left', - right: 'Right', - center: 'Center', - image_web_link: 'Image Web Link', - text: 'Text', - mailto: 'Email', - web: 'URL', - video_html_code: 'Video Embed Code', - file: 'Insert File', - upload: 'Upload', - download: 'Download', - choose: 'Choose', - or_choose: 'Or choose', - drop_file_here: 'Drop file here', - align_left: 'Align text to the left', - align_center: 'Center text', - align_right: 'Align text to the right', - align_justify: 'Justify text', - horizontalrule: 'Insert Horizontal Rule', - deleted: 'Deleted', - anchor: 'Anchor', - link_new_tab: 'Open link in new tab', - underline: 'Underline', - alignment: 'Alignment', - filename: 'Name (optional)', - edit: 'Edit' - } + // lang + langs: { + en: { + html: 'HTML', + video: 'Insert Video', + image: 'Insert Image', + table: 'Table', + link: 'Link', + link_insert: 'Insert link', + link_edit: 'Edit link', + unlink: 'Unlink', + formatting: 'Formatting', + paragraph: 'Normal text', + quote: 'Quote', + code: 'Code', + header1: 'Header 1', + header2: 'Header 2', + header3: 'Header 3', + header4: 'Header 4', + header5: 'Header 5', + bold: 'Bold', + italic: 'Italic', + fontcolor: 'Font Color', + backcolor: 'Back Color', + unorderedlist: 'Unordered List', + orderedlist: 'Ordered List', + outdent: 'Outdent', + indent: 'Indent', + cancel: 'Cancel', + insert: 'Insert', + save: 'Save', + _delete: 'Delete', + insert_table: 'Insert Table', + insert_row_above: 'Add Row Above', + insert_row_below: 'Add Row Below', + insert_column_left: 'Add Column Left', + insert_column_right: 'Add Column Right', + delete_column: 'Delete Column', + delete_row: 'Delete Row', + delete_table: 'Delete Table', + rows: 'Rows', + columns: 'Columns', + add_head: 'Add Head', + delete_head: 'Delete Head', + title: 'Title', + image_position: 'Position', + none: 'None', + left: 'Left', + right: 'Right', + center: 'Center', + image_web_link: 'Image Web Link', + text: 'Text', + mailto: 'Email', + web: 'URL', + video_html_code: 'Video Embed Code or Youtube/Vimeo Link', + file: 'Insert File', + upload: 'Upload', + download: 'Download', + choose: 'Choose', + or_choose: 'Or choose', + drop_file_here: 'Drop file here', + align_left: 'Align text to the left', + align_center: 'Center text', + align_right: 'Align text to the right', + align_justify: 'Justify text', + horizontalrule: 'Insert Horizontal Rule', + deleted: 'Deleted', + anchor: 'Anchor', + link_new_tab: 'Open link in new tab', + underline: 'Underline', + alignment: 'Alignment', + filename: 'Name (optional)', + edit: 'Edit' } + } }; // Functionality @@ -312,10 +335,13 @@ DELETE: 46, DOWN: 40, ENTER: 13, + SPACE: 32, ESC: 27, TAB: 9, CTRL: 17, META: 91, + SHIFT: 16, + ALT: 18, LEFT: 37, LEFT_WIN: 91 }, @@ -323,3005 +349,2913 @@ // Initialization init: function(el, options) { - this.rtePaste = false; - this.$element = this.$source = $(el); + this.$element = $(el); this.uuid = uuid++; - // clonning options - var opts = $.extend(true, {}, $.Redactor.opts); + // if paste event detected = true + this.rtePaste = false; + this.$pasteBox = false; - // current settings - this.opts = $.extend( - {}, - opts, - this.$element.data(), - options - ); + this.loadOptions(options); + this.loadModules(); - this.start = true; - this.dropdowns = []; + // formatting storage + this.formatting = {}; - // get sizes - this.sourceHeight = this.$source.css('height'); - this.sourceWidth = this.$source.css('width'); + // block level tags + $.merge(this.opts.blockLevelElements, this.opts.alignmentTags); + this.reIsBlock = new RegExp('^(' + this.opts.blockLevelElements.join('|' ) + ')$', 'i'); - // dependency of the editor modes - if (this.opts.fullpage) this.opts.iframe = true; - if (this.opts.linebreaks) this.opts.paragraphy = false; - if (this.opts.paragraphy) this.opts.linebreaks = false; - if (this.opts.toolbarFixedBox) this.opts.toolbarFixed = true; - - // the alias for iframe mode - this.document = document; - this.window = window; - - // selection saved - this.savedSel = false; - - // clean setup - this.cleanlineBefore = new RegExp('^<(/?' + this.opts.ownLine.join('|/?' ) + '|' + this.opts.contOwnLine.join('|') + ')[ >]'); - this.cleanlineAfter = new RegExp('^<(br|/?' + this.opts.ownLine.join('|/?' ) + '|/' + this.opts.contOwnLine.join('|/') + ')[ >]'); - this.cleannewLevel = new RegExp('^]'); - - // block level - this.rTestBlock = new RegExp('^(' + this.opts.blockLevelElements.join('|' ) + ')$', 'i'); - - // setup formatting permissions - if (this.opts.linebreaks === false) - { - if (this.opts.allowedTags !== false) - { - var arrSearch = ['strong', 'em', 'del']; - var arrAdd = ['b', 'i', 'strike']; - - if ($.inArray('p', this.opts.allowedTags) === '-1') this.opts.allowedTags.push('p'); - - for (i in arrSearch) - { - if ($.inArray(arrSearch[i], this.opts.allowedTags) != '-1') this.opts.allowedTags.push(arrAdd[i]); - } - } - - if (this.opts.deniedTags !== false) - { - var pos = $.inArray('p', this.opts.deniedTags); - if (pos !== '-1') this.opts.deniedTags.splice(pos, pos); - } - } - - // ie & opera - if (this.browser('msie') || this.browser('opera')) - { - this.opts.buttons = this.removeFromArrayByValue(this.opts.buttons, 'horizontalrule'); - } + // setup allowed and denied tags + this.tidy.setupAllowed(); // load lang - this.opts.curLang = this.opts.langs[this.opts.lang]; + this.lang.load(); // extend shortcuts $.extend(this.opts.shortcuts, this.opts.shortcutsAdd); - // init placeholder - this.placeholderInit(); - - // Build - this.buildStart(); + // start callback + this.core.setCallback('start'); + // build + this.start = true; + this.build.run(); }, - toolbarInit: function(lang) + + loadOptions: function(options) + { + this.opts = $.extend( + {}, + $.extend(true, {}, $.Redactor.opts), + this.$element.data(), + options + ); + }, + getModuleMethods: function(object) + { + return Object.getOwnPropertyNames(object).filter(function(property) + { + return typeof object[property] == 'function'; + }); + }, + loadModules: function() + { + var len = $.Redactor.modules.length; + for (var i = 0; i < len; i++) + { + this.bindModuleMethods($.Redactor.modules[i]); + } + }, + bindModuleMethods: function(module) + { + if (typeof this[module] == 'undefined') return; + + // init module + this[module] = this[module](); + + var methods = this.getModuleMethods(this[module]); + var len = methods.length; + + // bind methods + for (var z = 0; z < len; z++) + { + this[module][methods[z]] = this[module][methods[z]].bind(this); + } + }, + + core: function() { return { - html: + getObject: function() { - title: lang.html, - func: 'toggle' + return $.extend({}, this); }, - formatting: + getEditor: function() { - title: lang.formatting, - func: 'show', - dropdown: + return this.$editor; + }, + getBox: function() + { + return this.$box; + }, + getElement: function() + { + return this.$element; + }, + getTextarea: function() + { + return this.$textarea; + }, + getToolbar: function() + { + return (this.$toolbar) ? this.$toolbar : false; + }, + addEvent: function(name) + { + this.core.event = name; + }, + getEvent: function() + { + return this.core.event; + }, + setCallback: function(type, e, data) + { + var callback = this.opts[type + 'Callback']; + if ($.isFunction(callback)) { - p: - { - title: lang.paragraph, - func: 'formatBlocks' - }, - blockquote: - { - title: lang.quote, - func: 'formatQuote', - className: 'redactor_format_blockquote' - }, - pre: - { - title: lang.code, - func: 'formatBlocks', - className: 'redactor_format_pre' - }, - h1: - { - title: lang.header1, - func: 'formatBlocks', - className: 'redactor_format_h1' - }, - h2: - { - title: lang.header2, - func: 'formatBlocks', - className: 'redactor_format_h2' - }, - h3: - { - title: lang.header3, - func: 'formatBlocks', - className: 'redactor_format_h3' - }, - h4: - { - title: lang.header4, - func: 'formatBlocks', - className: 'redactor_format_h4' - }, - h5: - { - title: lang.header5, - func: 'formatBlocks', - className: 'redactor_format_h5' - } - } - }, - bold: - { - title: lang.bold, - exec: 'bold' - }, - italic: - { - title: lang.italic, - exec: 'italic' - }, - deleted: - { - title: lang.deleted, - exec: 'strikethrough' - }, - underline: - { - title: lang.underline, - exec: 'underline' - }, - unorderedlist: - { - title: '• ' + lang.unorderedlist, - exec: 'insertunorderedlist' - }, - orderedlist: - { - title: '1. ' + lang.orderedlist, - exec: 'insertorderedlist' - }, - outdent: - { - title: '< ' + lang.outdent, - func: 'indentingOutdent' - }, - indent: - { - title: '> ' + lang.indent, - func: 'indentingIndent' - }, - image: - { - title: lang.image, - func: 'imageShow' - }, - video: - { - title: lang.video, - func: 'videoShow' - }, - file: - { - title: lang.file, - func: 'fileShow' - }, - table: - { - title: lang.table, - func: 'show', - dropdown: - { - insert_table: - { - title: lang.insert_table, - func: 'tableShow' - }, - separator_drop1: - { - name: 'separator' - }, - insert_row_above: - { - title: lang.insert_row_above, - func: 'tableAddRowAbove' - }, - insert_row_below: - { - title: lang.insert_row_below, - func: 'tableAddRowBelow' - }, - insert_column_left: - { - title: lang.insert_column_left, - func: 'tableAddColumnLeft' - }, - insert_column_right: - { - title: lang.insert_column_right, - func: 'tableAddColumnRight' - }, - separator_drop2: - { - name: 'separator' - }, - add_head: - { - title: lang.add_head, - func: 'tableAddHead' - }, - delete_head: - { - title: lang.delete_head, - func: 'tableDeleteHead' - }, - separator_drop3: - { - name: 'separator' - }, - delete_column: - { - title: lang.delete_column, - func: 'tableDeleteColumn' - }, - delete_row: - { - title: lang.delete_row, - func: 'tableDeleteRow' - }, - delete_table: - { - title: lang.delete_table, - func: 'tableDeleteTable' - } - } - }, - link: { - title: lang.link, - func: 'show', - dropdown: - { - link: - { - title: lang.link_insert, - func: 'linkShow' - }, - unlink: - { - title: lang.unlink, - exec: 'unlink' - } - } - }, - alignment: - { - title: lang.alignment, - func: 'show', - dropdown: - { - alignleft: - { - title: lang.align_left, - func: 'alignmentLeft' - }, - aligncenter: - { - title: lang.align_center, - func: 'alignmentCenter' - }, - alignright: - { - title: lang.align_right, - func: 'alignmentRight' - }, - justify: - { - title: lang.align_justify, - func: 'alignmentJustify' - } - } - }, - alignleft: - { - title: lang.align_left, - func: 'alignmentLeft' - }, - aligncenter: - { - title: lang.align_center, - func: 'alignmentCenter' - }, - alignright: - { - title: lang.align_right, - func: 'alignmentRight' - }, - alignjustify: - { - title: lang.align_justify, - func: 'alignmentJustify' - }, - horizontalrule: - { - exec: 'inserthorizontalrule', - title: lang.horizontalrule - } - - } - }, - - // CALLBACKS - callback: function(type, event, data) - { - var callback = this.opts[ type + 'Callback' ]; - if ($.isFunction(callback)) - { - if (event === false) return callback.call(this, data); - else return callback.call(this, event, data); - } - else return data; - }, - - - // DESTROY - destroy: function() - { - clearInterval(this.autosaveInterval); - - $(window).off('.redactor'); - this.$source.off('redactor-textarea'); - this.$element.off('.redactor').removeData('redactor'); - - var html = this.get(); - - if (this.opts.textareamode) - { - this.$box.after(this.$source); - this.$box.remove(); - this.$source.val(html).show(); - } - else - { - var $elem = this.$editor; - if (this.opts.iframe) $elem = this.$element; - - this.$box.after($elem); - this.$box.remove(); - - $elem.removeClass('redactor_editor').removeClass('redactor_editor_wym').removeAttr('contenteditable').html(html).show(); - } - - if (this.opts.toolbarExternal) - { - $(this.opts.toolbarExternal).html(''); - } - - if (this.opts.air) - { - $('#redactor_air_' + this.uuid).remove(); - } - }, - - // API GET - getObject: function() - { - return $.extend({}, this); - }, - getEditor: function() - { - return this.$editor; - }, - getBox: function() - { - return this.$box; - }, - getIframe: function() - { - return (this.opts.iframe) ? this.$frame : false; - }, - getToolbar: function() - { - return (this.$toolbar) ? this.$toolbar : false; - }, - - // CODE GET & SET - get: function() - { - return this.$source.val(); - }, - getCodeIframe: function() - { - this.$editor.removeAttr('contenteditable').removeAttr('dir'); - var html = this.outerHtml(this.$frame.contents().children()); - this.$editor.attr({ 'contenteditable': true, 'dir': this.opts.direction }); - - return html; - }, - set: function(html, strip, placeholderRemove) - { - html = html.toString(); - html = html.replace(/\$/g, '$'); - - if (this.opts.fullpage) this.setCodeIframe(html); - else this.setEditor(html, strip); - - if (html == '') placeholderRemove = false; - if (placeholderRemove !== false) this.placeholderRemoveFromEditor(); - }, - setEditor: function(html, strip) - { - - if (strip !== false) - { - html = this.cleanSavePreCode(html); - - html = this.cleanStripTags(html); - html = this.cleanConvertProtected(html); - html = this.cleanConvertInlineTags(html, true); - - if (this.opts.linebreaks === false) html = this.cleanConverters(html); - else html = html.replace(/([\w\W]*?)<\/p>/gi, '$2
'); - } - - // $ fix - html = html.replace(/&#36;/g, '$'); - - html = this.cleanEmpty(html); - - this.$editor.html(html); - - // set no editable - this.setNonEditable(); - this.setSpansVerified(); - - this.sync(); - }, - setCodeIframe: function(html) - { - var doc = this.iframePage(); - this.$frame[0].src = "about:blank"; - - html = this.cleanConvertProtected(html); - html = this.cleanConvertInlineTags(html); - html = this.cleanRemoveSpaces(html); - - doc.open(); - doc.write(html); - doc.close(); - - // redefine editor for fullpage mode - if (this.opts.fullpage) - { - this.$editor = this.$frame.contents().find('body').attr({ 'contenteditable': true, 'dir': this.opts.direction }); - } - - // set no editable - this.setNonEditable(); - this.setSpansVerified(); - this.sync(); - - }, - setFullpageOnInit: function(html) - { - this.fullpageDoctype = html.match(/^<\!doctype[^>]*>/i); - if (this.fullpageDoctype && this.fullpageDoctype.length == 1) - { - html = html.replace(/^<\!doctype[^>]*>/i, ''); - } - - html = this.cleanSavePreCode(html, true); - html = this.cleanConverters(html); - html = this.cleanEmpty(html); - - // set code - this.$editor.html(html); - - // set no editable - this.setNonEditable(); - this.setSpansVerified(); - this.sync(); - }, - setFullpageDoctype: function() - { - if (this.fullpageDoctype && this.fullpageDoctype.length == 1) - { - var source = this.fullpageDoctype[0] + '\n' + this.$source.val(); - this.$source.val(source); - } - }, - setSpansVerified: function() - { - var spans = this.$editor.find('span'); - var replacementTag = 'inline'; - - $.each(spans, function() { - var outer = this.outerHTML; - - // Replace opening tag - var regex = new RegExp('<' + this.tagName, 'gi'); - var newTag = outer.replace(regex, '<' + replacementTag); - - // Replace closing tag - regex = new RegExp('/, ''); - return html.replace(/<\/span>/, ''); - }, - setNonEditable: function() - { - this.$editor.find('.noneditable').attr('contenteditable', false); - }, - - // SYNC - sync: function(e) - { - var html = ''; - - this.cleanUnverified(); - - if (this.opts.fullpage) html = this.getCodeIframe(); - else html = this.$editor.html(); - - html = this.syncClean(html); - html = this.cleanRemoveEmptyTags(html); - - // is there a need to synchronize - var source = this.cleanRemoveSpaces(this.$source.val(), false); - var editor = this.cleanRemoveSpaces(html, false); - - if (source == editor) - { - // do not sync - return false; - } - // fix second level up ul, ol - html = html.replace(/<\/li><(ul|ol)>([\w\W]*?)<\/(ul|ol)>/gi, '<$1>$2'); - - if ($.trim(html) === '
') html = ''; - - // xhtml - if (this.opts.xhtml) - { - var xhtmlTags = ['br', 'hr', 'img', 'link', 'input', 'meta']; - $.each(xhtmlTags, function(i,s) - { - html = html.replace(new RegExp('<' + s + '(.*?[^\/$]?)>', 'gi'), '<' + s + '$1 />'); - }); - - } - - // before callback - html = this.callback('syncBefore', false, html); - - this.$source.val(html); - this.setFullpageDoctype(); - - // onchange & after callback - this.callback('syncAfter', false, html); - - if (this.start === false) - { - - if (typeof e != 'undefined') - { - switch(e.which) - { - case 37: // left - break; - case 38: // up - break; - case 39: // right - break; - case 40: // down - break; - - default: this.callback('change', false, html); - } - } - else - { - this.callback('change', false, html); - } - } - - }, - syncClean: function(html) - { - if (!this.opts.fullpage) html = this.cleanStripTags(html); - - // trim - html = $.trim(html); - - // removeplaceholder - html = this.placeholderRemoveFromCode(html); - - // remove space - html = html.replace(/​/gi, ''); - html = html.replace(/​/gi, ''); - html = html.replace(/<\/a> /gi, '<\/a> '); - html = html.replace(/\u200B/g, ''); - - if (html == '

' || html == '

' || html == '

 

') - { - html = ''; - } - - // link nofollow - if (this.opts.linkNofollow) - { - html = html.replace(//gi, ''); - html = html.replace(//gi, ''); - } - - // php code fix - html = html.replace('', '?>'); - - // revert no editable - html = html.replace(/<(.*?)class="noeditable"(.*?) contenteditable="false"(.*?)>/gi, '<$1class="noeditable"$2$3>'); - - html = html.replace(/ data-tagblock=""/gi, ''); - html = html.replace(/\n?<\/(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)>/gi, ''); - - // remove image resize - html = html.replace(/([\w\W]*?)<\/span>/gi, '$3'); - html = html.replace(/(.*?)<\/span>/gi, ''); - html = html.replace(/(.*?)<\/span>/gi, ''); - - // remove empty lists - html = html.replace(/<(ul|ol)>\s*\t*\n*<\/(ul|ol)>/gi, ''); - - // remove font - if (this.opts.cleanFontTag) - { - html = html.replace(/([\w\W]*?)<\/font>/gi, '$2'); - } - - // remove spans - html = html.replace(/([\w\W]*?)<\/span>/gi, '$2'); - html = html.replace(/([\w\W]*?)<\/inline>/gi, '$1'); - html = html.replace(//gi, ''); - html = html.replace(//gi, ''); - - if (this.opts.removeEmptyTags) - { - html = html.replace(/([\w\W]*?)<\/span>/gi, '$1'); - } - - html = html.replace(/([\w\W]*?)<\/span>/gi, ''); - html = html.replace(//gi, ''); - - // special characters - html = html.replace(/&/gi, '&'); - html = html.replace(/\u2122/gi, '™'); - html = html.replace(/\u00a9/gi, '©'); - html = html.replace(/\u2026/gi, '…'); - html = html.replace(/\u2014/gi, '—'); - html = html.replace(/\u2010/gi, '‐'); - - html = this.cleanReConvertProtected(html); - - return html; - }, - - - - // BUILD - buildStart: function() - { - // content - this.content = ''; - - // container - this.$box = $('
'); - - // textarea test - if (this.$source[0].tagName === 'TEXTAREA') this.opts.textareamode = true; - - // mobile - if (this.opts.mobile === false && this.isMobile()) - { - this.buildMobile(); - } - else - { - // get the content at the start - this.buildContent(); - - if (this.opts.iframe) - { - // build as iframe - this.opts.autoresize = false; - this.iframeStart(); - } - else if (this.opts.textareamode) this.buildFromTextarea(); - else this.buildFromElement(); - - // options and final setup - if (!this.opts.iframe) - { - this.buildOptions(); - this.buildAfter(); - } - } - }, - buildMobile: function() - { - if (!this.opts.textareamode) - { - this.$editor = this.$source; - this.$editor.hide(); - this.$source = this.buildCodearea(this.$editor); - this.$source.val(this.content); - } - - this.$box.insertAfter(this.$source).append(this.$source); - }, - buildContent: function() - { - if (this.opts.textareamode) this.content = $.trim(this.$source.val()); - else this.content = $.trim(this.$source.html()); - }, - buildFromTextarea: function() - { - this.$editor = $('
'); - this.$box.insertAfter(this.$source).append(this.$editor).append(this.$source); - - // enable - this.buildAddClasses(this.$editor); - this.buildEnable(); - }, - buildFromElement: function() - { - this.$editor = this.$source; - this.$source = this.buildCodearea(this.$editor); - this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$source); - - // enable - this.buildEnable(); - }, - buildCodearea: function($source) - { - return $('' - + '' - + '' - + '
' - + '' - + '' - + '
' - - }); - }, - modalInit: function(title, content, width, callback) - { - this.modalSetOverlay(); - - this.$redactorModalWidth = width; - this.$redactorModal = $('#redactor_modal'); - - if (!this.$redactorModal.length) - { - this.$redactorModal = $('