#11668 Fix black theme

This commit is contained in:
miguel angel rasteu 2023-08-03 12:22:20 +02:00
parent 2ced051f56
commit 1dc24cdfb4
3 changed files with 26 additions and 4 deletions

View File

@ -419,6 +419,9 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript
// Include tiny for wysiwyg editor. // Include tiny for wysiwyg editor.
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/'); ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
ui_require_javascript_file('pandora'); ui_require_javascript_file('pandora');
if ($config['style'] === 'pandora_black') {
html_print_input_hidden('selected_style_theme', 'pandora_black');
}
?> ?>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
@ -443,8 +446,12 @@ ui_require_javascript_file('pandora');
changeYear: true, changeYear: true,
showAnim: "slideDown"} showAnim: "slideDown"}
); );
var consoleStyle = $("#hidden-selected_style_theme").val();
if (consoleStyle == "pandora_black") {
defineTinyMCEDark('#textarea_text');
} else {
defineTinyMCE('#textarea_text'); defineTinyMCE('#textarea_text');
}
$("#checkbox-expire").click(function() { $("#checkbox-expire").click(function() {
check_expire(); check_expire();
@ -462,5 +469,4 @@ ui_require_javascript_file('pandora');
$('#news-0-4').css('visibility', 'hidden'); $('#news-0-4').css('visibility', 'hidden');
} }
} }
</script> </script>

View File

@ -1448,6 +1448,17 @@ function defineTinyMCE(selector) {
}); });
} }
function defineTinyMCEDark(selector) {
tinymce.init({
selector: selector,
plugins: "preview, searchreplace, table, nonbreaking, link, image",
promotion: false,
branding: false,
skin: "oxide-dark",
content_css: "dark"
});
}
function UndefineTinyMCE(textarea_id) { function UndefineTinyMCE(textarea_id) {
tinyMCE.remove(textarea_id); tinyMCE.remove(textarea_id);
$(textarea_id).show(""); $(textarea_id).show("");

View File

@ -1810,7 +1810,7 @@ a.pandora_pagination,
} }
.tox .tox-statusbar__resize-handle > svg { .tox .tox-statusbar__resize-handle > svg {
filter: invert(100%); filter: invert(100%) !important;
} }
.tox-dialog, .tox-dialog,
@ -1839,3 +1839,8 @@ a.pandora_pagination,
background-color: #111 !important; background-color: #111 !important;
color: #fff !important; color: #fff !important;
} }
.mce-content-body {
color: #fff !important;
background-color: #333 !important;
}