From: Marcel Werk Date: Mon, 4 Apr 2016 14:41:14 +0000 (+0200) Subject: Renamed style variables X-Git-Tag: 3.0.0_Beta_1~1983 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97ec036791837c5c3732f4d48ee65f86958e846a;p=GitHub%2FWoltLab%2FWCF.git Renamed style variables individualLess -> individualScss overrideLess -> overrideScss --- diff --git a/wcfsetup/install/files/acp/templates/styleAdd.tpl b/wcfsetup/install/files/acp/templates/styleAdd.tpl index 6d767c8ebb..3482e86435 100644 --- a/wcfsetup/install/files/acp/templates/styleAdd.tpl +++ b/wcfsetup/install/files/acp/templates/styleAdd.tpl @@ -840,35 +840,35 @@ {* custom declarations *}
-

{lang}wcf.acp.style.advanced.individualLess{/lang}

+

{lang}wcf.acp.style.advanced.individualScss{/lang}

- - {lang}wcf.acp.style.advanced.individualLess.description{/lang} + + {lang}wcf.acp.style.advanced.individualScss.description{/lang}
-
-

{lang}wcf.acp.style.advanced.overrideLess{/lang}

+
+

{lang}wcf.acp.style.advanced.overrideScss{/lang}

- - {if $errorField == 'overrideLessCustom'} + + {if $errorField == 'overrideScssCustom'} - {lang}wcf.acp.style.advanced.overrideLess.error{/lang} - {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideLess.error.{$error.error}{/lang}{/implode} + {lang}wcf.acp.style.advanced.overrideScss.error{/lang} + {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideScss.error.{$error.error}{/lang}{/implode} {/if} - {lang}wcf.acp.style.advanced.overrideLess.description{/lang} + {lang}wcf.acp.style.advanced.overrideScss.description{/lang}
- {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualLessCustom, #overrideLessCustom'} + {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualScssCustom, #overrideScssCustom'} {event name='syntaxFieldsetsCustom'}
@@ -878,35 +878,35 @@ {/if}
-

{lang}wcf.acp.style.advanced.individualLess{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}

+

{lang}wcf.acp.style.advanced.individualScss{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}

- - {lang}wcf.acp.style.advanced.individualLess.description{/lang} + + {lang}wcf.acp.style.advanced.individualScss.description{/lang}
-
-

{lang}wcf.acp.style.advanced.overrideLess{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}

+
+

{lang}wcf.acp.style.advanced.overrideScss{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}

- - {if $errorField == 'overrideLess'} + + {if $errorField == 'overrideScss'} - {lang}wcf.acp.style.advanced.overrideLess.error{/lang} - {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideLess.error.{$error.error}{/lang}{/implode} + {lang}wcf.acp.style.advanced.overrideScss.error{/lang} + {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideScss.error.{$error.error}{/lang}{/implode} {/if} - {lang}wcf.acp.style.advanced.overrideLess.description{/lang} + {lang}wcf.acp.style.advanced.overrideScss.description{/lang}
- {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualLess, #overrideLess' editable=$isTainted} + {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualScss, #overrideScss' editable=$isTainted} {event name='syntaxFieldsetsOriginal'} diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js index c8729168db..1422d2d6ea 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js @@ -58,24 +58,24 @@ define(['Ajax', 'Dictionary', 'Dom/Util', 'EventHandler'], function(Ajax, Dictio * @param {boolean} isTainted false if style is in protected mode */ _handleLess: function(isTainted) { - var individualLess = elById('individualLess'); - var overrideLess = elById('overrideLess'); + var individualScss = elById('individualScss'); + var overrideScss = elById('overrideScss'); if (isTainted) { EventHandler.add('com.woltlab.wcf.simpleTabMenu_styleTabMenuContainer', 'select', function(data) { - individualLess.codemirror.refresh(); - overrideLess.codemirror.refresh(); + individualScss.codemirror.refresh(); + overrideScss.codemirror.refresh(); }); } else { EventHandler.add('com.woltlab.wcf.simpleTabMenu_advanced', 'select', function(data) { if (data.activeName === 'advanced-custom') { - elById('individualLessCustom').codemirror.refresh(); - elById('overrideLessCustom').codemirror.refresh(); + elById('individualScssCustom').codemirror.refresh(); + elById('overrideScssCustom').codemirror.refresh(); } else if (data.activeName === 'advanced-original') { - individualLess.codemirror.refresh(); - overrideLess.codemirror.refresh(); + individualScss.codemirror.refresh(); + overrideScss.codemirror.refresh(); } }); } diff --git a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php index d7c5e51061..26759a6457 100644 --- a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php @@ -318,7 +318,7 @@ class StyleAddForm extends AbstractForm { } } - if (!empty($this->variables['overrideLess'])) { + if (!empty($this->variables['overrideScss'])) { $this->parseOverrides(); } } @@ -340,7 +340,7 @@ class StyleAddForm extends AbstractForm { $variables[] = $row['variableName']; } - $lines = explode("\n", StringUtil::unifyNewlines($this->variables['overrideLess'])); + $lines = explode("\n", StringUtil::unifyNewlines($this->variables['overrideScss'])); $regEx = new Regex('^@([a-zA-Z]+): ?([@a-zA-Z0-9 ,\.\(\)\%\#-]+);$'); $errors = []; foreach ($lines as $index => &$line) { @@ -382,10 +382,10 @@ class StyleAddForm extends AbstractForm { } } - $this->variables['overrideLess'] = implode("\n", $lines); + $this->variables['overrideScss'] = implode("\n", $lines); if (!empty($errors)) { - throw new UserInputException('overrideLess', $errors); + throw new UserInputException('overrideScss', $errors); } } @@ -480,8 +480,8 @@ class StyleAddForm extends AbstractForm { // set specialized variables $this->specialVariables = [ - 'individualLess', - 'overrideLess', + 'individualScss', + 'overrideScss', 'pageLogo', 'useFluidLayout', 'useGoogleFont', diff --git a/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php b/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php index 6a17e4594f..b73b34ef8b 100644 --- a/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php @@ -63,13 +63,13 @@ class StyleEditForm extends StyleAddForm { unset($variableValue); if (!$this->style->isTainted) { - $tmp = Style::splitLessVariables($this->variables['individualLess']); - $this->variables['individualLess'] = $tmp['preset']; - $this->variables['individualLessCustom'] = $tmp['custom']; + $tmp = Style::splitLessVariables($this->variables['individualScss']); + $this->variables['individualScss'] = $tmp['preset']; + $this->variables['individualScssCustom'] = $tmp['custom']; - $tmp = Style::splitLessVariables($this->variables['overrideLess']); - $this->variables['overrideLess'] = $tmp['preset']; - $this->variables['overrideLessCustom'] = $tmp['custom']; + $tmp = Style::splitLessVariables($this->variables['overrideScss']); + $this->variables['overrideScss'] = $tmp['preset']; + $this->variables['overrideScssCustom'] = $tmp['custom']; } } @@ -80,8 +80,8 @@ class StyleEditForm extends StyleAddForm { parent::setVariables(); if (!$this->style->isTainted) { - $this->specialVariables[] = 'individualLessCustom'; - $this->specialVariables[] = 'overrideLessCustom'; + $this->specialVariables[] = 'individualScssCustom'; + $this->specialVariables[] = 'overrideScssCustom'; } } @@ -117,11 +117,11 @@ class StyleEditForm extends StyleAddForm { // TODO: how should this actually work? /*if (!$this->style->isTainted) { - $this->variables['individualLess'] = Style::joinLessVariables($this->variables['individualLess'], $this->variables['individualLessCustom']); - $this->variables['overrideLess'] = Style::joinLessVariables($this->variables['overrideLess'], $this->variables['overrideLessCustom']); + $this->variables['individualScss'] = Style::joinLessVariables($this->variables['individualScss'], $this->variables['individualScssCustom']); + $this->variables['overrideScss'] = Style::joinLessVariables($this->variables['overrideScss'], $this->variables['overrideScssCustom']); - unset($this->variables['individualLessCustom']); - unset($this->variables['overrideLessCustom']); + unset($this->variables['individualScssCustom']); + unset($this->variables['overrideScssCustom']); }*/ $this->objectAction = new StyleAction(array($this->style), 'update', array( diff --git a/wcfsetup/install/files/lib/data/style/StyleAction.class.php b/wcfsetup/install/files/lib/data/style/StyleAction.class.php index d0380c7b8f..c462ddd68d 100644 --- a/wcfsetup/install/files/lib/data/style/StyleAction.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleAction.class.php @@ -652,8 +652,8 @@ class StyleAction extends AbstractDatabaseObjectAction implements IToggleAction, public function markAsTainted() { // merge definitions $variables = $this->styleEditor->getVariables(); - $variables['individualLess'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['individualLess']); - $variables['overrideLess'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['overrideLess']); + $variables['individualScss'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['individualScss']); + $variables['overrideScss'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['overrideScss']); $this->styleEditor->setVariables($variables); $this->styleEditor->update([ diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index 04e9d20b4b..b53a11bb90 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -504,11 +504,11 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $variables = $style->getVariables(); - $individualLess = Style::splitLessVariables($variables['individualLess']); - $variables['individualLess'] = Style::joinLessVariables($styleData['variables']['individualLess'], $individualLess['custom']); + $individualScss = Style::splitLessVariables($variables['individualScss']); + $variables['individualScss'] = Style::joinLessVariables($styleData['variables']['individualScss'], $individualScss['custom']); - $overrideLess = Style::splitLessVariables($variables['overrideLess']); - $variables['overrideLess'] = Style::joinLessVariables($styleData['variables']['overrideLess'], $overrideLess['custom']); + $overrideScss = Style::splitLessVariables($variables['overrideScss']); + $variables['overrideScss'] = Style::joinLessVariables($styleData['variables']['overrideScss'], $overrideScss['custom']); $styleData['variables'] = $variables; diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index e4801016b8..1159c31672 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1408,15 +1408,15 @@ GmbH=Gesellschaft mit beschränkter Haftung]]> - - + + - - - - - - + + + + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 2ee2c72b4d..d6cf970bf7 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1406,15 +1406,15 @@ GmbH=Gesellschaft mit beschränkter Haftung]]> - - + + - - - - - - + + + + + + diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index fd012e4fb6..866d2aa536 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -1944,9 +1944,9 @@ INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMess -- style default values -INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('individualLess', ''); +INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('individualScss', ''); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('messageSidebarOrientation', 'left'); -INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('overrideLess', ''); +INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('overrideScss', ''); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogo', ''); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useFluidLayout', '1'); INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useGoogleFont', '1');