From e8defa3037865db369cbedd14df57dfadc516b95 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 30 Jan 2019 18:25:05 +0100 Subject: [PATCH] Replaced fixed color values with variables / Style API version 5.2 --- com.woltlab.wcf/defaultStyle.tar | Bin 10752 -> 10752 bytes .../files/acp/style/acpStyleEditor.css | 4 +++- .../install/files/acp/templates/styleAdd.tpl | 17 +++++++++++++++- .../files/lib/acp/form/StyleAddForm.class.php | 8 ++++++-- .../files/lib/data/style/Style.class.php | 4 ++-- wcfsetup/install/files/style/ui/wsc52.scss | 19 ++++++++++++++++++ wcfsetup/setup/db/install.sql | 1 + 7 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 wcfsetup/install/files/style/ui/wsc52.scss diff --git a/com.woltlab.wcf/defaultStyle.tar b/com.woltlab.wcf/defaultStyle.tar index a401dd01b6a8e82f2acf7a7a21cf5a461d5cdbb9..88d9bd8dab56d4a62e8708790c2f33be3a5ad982 100644 GIT binary patch delta 74 zcmZn&X$YCnC2V43Vr*(=W@y4-U|?WoY-YeWiunA5EHYhp3!76=0J8!T?0d1 bV}r?g%-yU&F+GFH|Cl8~vYVw?o~Z%=kE0Q# delta 74 zcmZn&X$YCnC2VMJYHVt3WMIZ%U|?WoY--A2FjWiunA5EHYpp5bIM=0J9HT|)z1 ZBg@Ho%-yU&F`(!_W=W9jW+|3ussN9a5u^YB diff --git a/wcfsetup/install/files/acp/style/acpStyleEditor.css b/wcfsetup/install/files/acp/style/acpStyleEditor.css index 85ed53265b..8169392425 100644 --- a/wcfsetup/install/files/acp/style/acpStyleEditor.css +++ b/wcfsetup/install/files/acp/style/acpStyleEditor.css @@ -59,7 +59,9 @@ html[dir="rtl"] #spTable th { text-align: right; } #spButtonPrimary { margin-top: 10px; } /* ### editor ### */ -#spEditorContent { border: 1px solid rgb(224, 224, 224); border-top-width: 0; height: 100px; } +#spEditorContent { border: 1px solid rgb(224, 224, 224); border-top-width: 0; min-height: 100px; padding: 10px; } +#spEditorTable { border-collapse: collapse; border-spacing: 0; margin: 10px 0; min-width: 60%; } +#spEditorTable td { border: 1px solid rgb(221, 221, 221); padding: 10px; } /* ### dropdown ### */ #spDropdown { display: inline-block; float: none; position: relative; visibility: visible; z-index: 10; } diff --git a/wcfsetup/install/files/acp/templates/styleAdd.tpl b/wcfsetup/install/files/acp/templates/styleAdd.tpl index 2a5a01d6e6..580d45c2d9 100644 --- a/wcfsetup/install/files/acp/templates/styleAdd.tpl +++ b/wcfsetup/install/files/acp/templates/styleAdd.tpl @@ -705,7 +705,20 @@
  • -
    +
    + + + + + + + + + + + +
    Lorem  
    Ipsum  
    +
    Dropdown
    @@ -829,6 +842,7 @@

    {lang}wcf.acp.style.colors.description{/lang}


    3.1 {lang version='3.1'}wcf.acp.style.colors.description.apiVersion{/lang}

    +

    5.2 {lang version='5.2'}wcf.acp.style.colors.description.apiVersion{/lang}

    {foreach from=$colors key=spCategory item=spColors} @@ -927,6 +941,7 @@ 'wcfEditorButtonText': '#spEditor .redactor-toolbar a { color: VALUE; }', 'wcfEditorButtonTextActive': '#spEditor .redactor-toolbar a:hover, #spEditor .redactor-toolbar a.dropact { color: VALUE; }', 'wcfEditorButtonTextDisabled': '#spEditor .redactor-toolbar a.redactor-button-disabled { color: VALUE; }', + 'wcfEditorTableBorder': '#spEditorTable td { border-color: VALUE; }', 'wcfDropdownBackground': '#spDropdown { background-color: VALUE; } __COMBO_RULE__ #spDropdown::before { border-bottom-color: VALUE; }', 'wcfDropdownBorderInner': '#spDropdown .dropdownDivider { border-color: VALUE; }', 'wcfDropdownText': '#spDropdown li { color: VALUE; }', diff --git a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php index 9a48d55317..8a52412fa3 100644 --- a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php @@ -140,7 +140,10 @@ class StyleAddForm extends AbstractForm { 'wcfEditorButtonBackgroundActive' => '3.1', 'wcfEditorButtonText' => '3.1', 'wcfEditorButtonTextActive' => '3.1', - 'wcfEditorButtonTextDisabled' => '3.1' + 'wcfEditorButtonTextDisabled' => '3.1', + + // 5.2 + 'wcfEditorTableBorder' => '5.2', ]; /** @@ -482,7 +485,7 @@ class StyleAddForm extends AbstractForm { 'wcfTabularBox' => 'wcfTabularBox', 'wcfInput' => ['wcfInput', 'wcfInputDisabled'], 'wcfButton' => ['wcfButton', 'wcfButtonPrimary', 'wcfButtonDisabled'], - 'wcfEditor' =>'wcfEditorButton', + 'wcfEditor' => ['wcfEditorButton', 'wcfEditorTable'], 'wcfDropdown' => 'wcfDropdown', 'wcfStatus' => ['wcfStatusInfo', 'wcfStatusSuccess', 'wcfStatusWarning', 'wcfStatusError'], 'wcfFooterBox' => ['wcfFooterBox', 'wcfFooterBoxHeadline'], @@ -509,6 +512,7 @@ class StyleAddForm extends AbstractForm { 'wcfButtonPrimary' => ['background', 'text', 'backgroundActive', 'textActive'], 'wcfButtonDisabled' => ['background', 'text'], 'wcfEditorButton' => ['background', 'backgroundActive', 'text', 'textActive', 'textDisabled'], + 'wcfEditorTable' => ['border'], 'wcfDropdown' => ['background', 'borderInner', 'text', 'link', 'backgroundActive', 'linkActive'], 'wcfStatusInfo' => ['background', 'border', 'text', 'link', 'linkActive'], 'wcfStatusSuccess' => ['background', 'border', 'text', 'link', 'linkActive'], diff --git a/wcfsetup/install/files/lib/data/style/Style.class.php b/wcfsetup/install/files/lib/data/style/Style.class.php index 620cb9c24a..5647916d9e 100644 --- a/wcfsetup/install/files/lib/data/style/Style.class.php +++ b/wcfsetup/install/files/lib/data/style/Style.class.php @@ -45,9 +45,9 @@ class Style extends DatabaseObject { * list of supported API versions * @var string[] */ - public static $supportedApiVersions = ['3.0', '3.1']; + public static $supportedApiVersions = ['3.0', '3.1', '5.2']; - const API_VERSION = '3.1'; + const API_VERSION = '5.2'; const PREVIEW_IMAGE_MAX_HEIGHT = 64; const PREVIEW_IMAGE_MAX_WIDTH = 102; diff --git a/wcfsetup/install/files/style/ui/wsc52.scss b/wcfsetup/install/files/style/ui/wsc52.scss new file mode 100644 index 0000000000..67b3113475 --- /dev/null +++ b/wcfsetup/install/files/style/ui/wsc52.scss @@ -0,0 +1,19 @@ +/* + * Special styles for changes introduced in WoltLab Suite 5.2 that + * are not compatible with styles created for earlier versions. + */ +@include requireApiVersion(52) { + .htmlContent table, + .table { + tr:hover > td { + background-color: $wcfTabularBoxBackgroundActive; + } + } + + .redactor-layer table { + th, + td { + border-color: $wcfEditorTableBorder; + } + } +} diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index 7c8909e89d..919bb38685 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -2269,6 +2269,7 @@ INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorB INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonText', 'rgba(255, 255, 255, 1)'); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonTextActive', 'rgba(255, 255, 255, 1)'); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonTextDisabled', 'rgba(165, 165, 165, 1)'); +INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorTableBorder', 'rgba(221, 221, 221, 1)'); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontFamilyFallback', '"Segoe UI", "DejaVu Sans", "Lucida Grande", "Helvetica", sans-serif'); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontFamilyGoogle', 'Open Sans'); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontLineHeight', '1.48'); -- 2.20.1