Renamed style variables
authorMarcel Werk <burntime@woltlab.com>
Mon, 4 Apr 2016 14:41:14 +0000 (16:41 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 4 Apr 2016 14:41:14 +0000 (16:41 +0200)
individualLess -> individualScss
overrideLess -> overrideScss

wcfsetup/install/files/acp/templates/styleAdd.tpl
wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js
wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php
wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php
wcfsetup/install/files/lib/data/style/StyleAction.class.php
wcfsetup/install/files/lib/data/style/StyleEditor.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml
wcfsetup/setup/db/install.sql

index 6d767c8ebbce289da679122dc236a3607349850d..3482e8643582aaf3709916f38dae8e3ec73aa0f9 100644 (file)
                                {* custom declarations *}
                                <div id="advanced-custom" class="tabMenuContent">
                                        <section class="section">
-                                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualLess{/lang}</h2>
+                                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualScss{/lang}</h2>
                                                
                                                <dl class="wide">
                                                        <dt></dt>
                                                        <dd>
-                                                               <textarea id="individualLessCustom" rows="20" cols="40" name="individualLessCustom">{$variables[individualLessCustom]}</textarea>
-                                                               <small>{lang}wcf.acp.style.advanced.individualLess.description{/lang}</small>
+                                                               <textarea id="individualScssCustom" rows="20" cols="40" name="individualScssCustom">{$variables[individualScssCustom]}</textarea>
+                                                               <small>{lang}wcf.acp.style.advanced.individualScss.description{/lang}</small>
                                                        </dd>
                                                </dl>
                                        </section>
                                        
-                                       <section class="section{if $errorField == 'overrideLessCustom'} formError{/if}">
-                                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideLess{/lang}</h2>
+                                       <section class="section{if $errorField == 'overrideScssCustom'} formError{/if}">
+                                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideScss{/lang}</h2>
                                                
                                                <dl class="wide">
                                                        <dt></dt>
                                                        <dd>
-                                                               <textarea id="overrideLessCustom" rows="20" cols="40" name="overrideLessCustom">{$variables[overrideLessCustom]}</textarea>
-                                                               {if $errorField == 'overrideLessCustom'}
+                                                               <textarea id="overrideScssCustom" rows="20" cols="40" name="overrideScssCustom">{$variables[overrideScssCustom]}</textarea>
+                                                               {if $errorField == 'overrideScssCustom'}
                                                                        <small class="innerError">
-                                                                               {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}
                                                                        </small>
                                                                {/if}
-                                                               <small>{lang}wcf.acp.style.advanced.overrideLess.description{/lang}</small>
+                                                               <small>{lang}wcf.acp.style.advanced.overrideScss.description{/lang}</small>
                                                        </dd>
                                                </dl>
                                        </section>
-                                       {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualLessCustom, #overrideLessCustom'}
+                                       {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualScssCustom, #overrideScssCustom'}
                                        
                                        {event name='syntaxFieldsetsCustom'}
                                </div>
                        {/if}
                        
                        <section class="section">
-                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualLess{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
+                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualScss{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
                                
                                <dl class="wide">
                                        <dt></dt>
                                        <dd>
-                                               <textarea id="individualLess" rows="20" cols="40" name="individualLess">{$variables[individualLess]}</textarea>
-                                               <small>{lang}wcf.acp.style.advanced.individualLess.description{/lang}</small>
+                                               <textarea id="individualScss" rows="20" cols="40" name="individualScss">{$variables[individualScss]}</textarea>
+                                               <small>{lang}wcf.acp.style.advanced.individualScss.description{/lang}</small>
                                        </dd>
                                </dl>
                        </section>
                        
-                       <section class="section{if $errorField == 'overrideLess'} formError{/if}">
-                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideLess{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
+                       <section class="section{if $errorField == 'overrideScss'} formError{/if}">
+                               <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideScss{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
                                
                                <dl class="wide">
                                        <dt></dt>
                                        <dd>
-                                               <textarea id="overrideLess" rows="20" cols="40" name="overrideLess">{$variables[overrideLess]}</textarea>
-                                               {if $errorField == 'overrideLess'}
+                                               <textarea id="overrideScss" rows="20" cols="40" name="overrideScss">{$variables[overrideScss]}</textarea>
+                                               {if $errorField == 'overrideScss'}
                                                        <small class="innerError">
-                                                               {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}
                                                        </small>
                                                {/if}
-                                               <small>{lang}wcf.acp.style.advanced.overrideLess.description{/lang}</small>
+                                               <small>{lang}wcf.acp.style.advanced.overrideScss.description{/lang}</small>
                                        </dd>
                                </dl>
                        </section>
-                       {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'}
                        
index c8729168dbd045d9b2d374713a00b030c1c1d760..1422d2d6ea15bfb9cb3c896fc94ee2377c6aef72 100644 (file)
@@ -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();
                                        }
                                });
                        }
index d7c5e510616a87058189261a9ec2ee85efbfc7f5..26759a6457618d3029d67e922f6f8341db83785b 100644 (file)
@@ -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',
index 6a17e4594f2a4219d6b49fac8120dbe82d2825df..b73b34ef8bfe868827a257bc77f53183902140d9 100644 (file)
@@ -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(
index d0380c7b8f718be8bb433a6bff8b49f9af5de5b8..c462ddd68d0529405173baf1f5776135e04fea8d 100644 (file)
@@ -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([
index 04e9d20b4bb57d8c460b5148ed44967e36c991c4..b53a11bb90fc63842eb4358b3ed7f53d655c6030 100644 (file)
@@ -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;
                        
index e4801016b86ab856ee435a3ddd38f590ae95bda0..1159c31672731a6a256de88f8eb0936a8fb0ccc9 100644 (file)
@@ -1408,15 +1408,15 @@ GmbH=Gesellschaft mit beschränkter Haftung]]></item>
                <item name="wcf.acp.style.add"><![CDATA[Stil hinzufügen]]></item>
                <item name="wcf.acp.style.advanced"><![CDATA[Erweiterte Einstellungen]]></item>
                <item name="wcf.acp.style.advanced.custom"><![CDATA[Eigene Deklarationen]]></item>
-               <item name="wcf.acp.style.advanced.individualLess"><![CDATA[Individuelles CSS und LESS]]></item>
-               <item name="wcf.acp.style.advanced.individualLess.description"><![CDATA[Die Eingabe wird am Ende des Stils eingefügt und kann vollständig aus CSS bestehen. Sie haben zusätzlich den Zugriff auf LESS und alle von Community Framework zur Verfügung gestellten Mixins.]]></item>
+               <item name="wcf.acp.style.advanced.individualScss"><![CDATA[Individuelles CSS und SCSS]]></item>
+               <item name="wcf.acp.style.advanced.individualScss.description"><![CDATA[Die Eingabe wird am Ende des Stils eingefügt und kann vollständig aus CSS bestehen. Sie haben zusätzlich den Zugriff auf SCSS und alle von Community Framework zur Verfügung gestellten Mixins.]]></item>
                <item name="wcf.acp.style.advanced.original"><![CDATA[Vorgegebene Deklarationen]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess"><![CDATA[Überschreiben von LESS-Variablen]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.description"><![CDATA[Sie können innerhalb dieser Eingabe beliebige LESS-Variablen überschreiben, die nicht durch den Stil-Editor direkt bearbeitbar sind. Beim Bezug auf andere Variablen muss sichergestellt werden, dass diese in der Reihenfolge vorher definiert wurden. Die Syntax muss wie folgt lauten: „@variableName: variableValue;“]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error"><![CDATA[Ihre Eingabe war ungültig, bitte überprüfen Sie die folgenden Einträge:]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error.notValid"><![CDATA[Eingabe „{$error[text]}“ ungültig]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error.predefined"><![CDATA[Variable „{$error[text]}“ wird bereits durch den Stil-Editor gesetzt]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error.unknown"><![CDATA[Variable „{$error[text]}“ unbekannt]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss"><![CDATA[Überschreiben von SCSS-Variablen]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.description"><![CDATA[Sie können innerhalb dieser Eingabe beliebige SCSS-Variablen überschreiben, die nicht durch den Stil-Editor direkt bearbeitbar sind. Beim Bezug auf andere Variablen muss sichergestellt werden, dass diese in der Reihenfolge vorher definiert wurden. Die Syntax muss wie folgt lauten: „$variableName: variableValue;“]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error"><![CDATA[Ihre Eingabe war ungültig, bitte überprüfen Sie die folgenden Einträge:]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error.notValid"><![CDATA[Eingabe „{$error[text]}“ ungültig]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error.predefined"><![CDATA[Variable „{$error[text]}“ wird bereits durch den Stil-Editor gesetzt]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error.unknown"><![CDATA[Variable „{$error[text]}“ unbekannt]]></item>
                <item name="wcf.acp.style.authorName"><![CDATA[Autor]]></item>
                <item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
                <item name="wcf.acp.style.button.exportStyle"><![CDATA[Export starten]]></item>
index 2ee2c72b4d4808844de4a76c04ceadadf1142b66..d6cf970bf759682362e2b6fc1c707ba609b89e8f 100644 (file)
@@ -1406,15 +1406,15 @@ GmbH=Gesellschaft mit beschränkter Haftung]]></item>
                <item name="wcf.acp.style.add"><![CDATA[Add Style]]></item>
                <item name="wcf.acp.style.advanced"><![CDATA[Advanced Settings]]></item>
                <item name="wcf.acp.style.advanced.custom"><![CDATA[Own Declarations]]></item>
-               <item name="wcf.acp.style.advanced.individualLess"><![CDATA[Individual CSS and LESS]]></item>
-               <item name="wcf.acp.style.advanced.individualLess.description"><![CDATA[Content will be appended to the style sheet and may contain pure CSS. Furthermore you can use LESS including all Mixins provided by Community Framework.]]></item>
+               <item name="wcf.acp.style.advanced.individualScss"><![CDATA[Individual CSS and SCSS]]></item>
+               <item name="wcf.acp.style.advanced.individualScss.description"><![CDATA[Content will be appended to the style sheet and may contain pure CSS. Furthermore you can use SCSS including all Mixins provided by Community Framework.]]></item>
                <item name="wcf.acp.style.advanced.original"><![CDATA[Preset Declarations]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess"><![CDATA[LESS Variables Override]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.description"><![CDATA[Allows you to override LESS variables not available through the style editor itself. Syntax: “@variableName: variableValue;”, referred variables must be declared prior any attempt to read their value.]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error"><![CDATA[Provided value was invalid, please verify these items:]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error.notValid"><![CDATA[Input for “{$error[text]}” invalid]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error.predefined"><![CDATA[Variable “{$error[text]}” is already defined by the style editor]]></item>
-               <item name="wcf.acp.style.advanced.overrideLess.error.unknown"><![CDATA[Variable “{$error[text]}” is not recognized]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss"><![CDATA[SCSS Variables Override]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.description"><![CDATA[Allows you to override SCSS variables not available through the style editor itself. Syntax: “$variableName: variableValue;”, referred variables must be declared prior any attempt to read their value.]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error"><![CDATA[Provided value was invalid, please verify these items:]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error.notValid"><![CDATA[Input for “{$error[text]}” invalid]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error.predefined"><![CDATA[Variable “{$error[text]}” is already defined by the style editor]]></item>
+               <item name="wcf.acp.style.advanced.overrideScss.error.unknown"><![CDATA[Variable “{$error[text]}” is not recognized]]></item>
                <item name="wcf.acp.style.authorName"><![CDATA[Author]]></item>
                <item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
                <item name="wcf.acp.style.button.exportStyle"><![CDATA[Start Export]]></item>
index fd012e4fb6e3c12de57b938447b9092bce361612..866d2aa5363b9e8acfdcc6d6dd245e1691c22127 100644 (file)
@@ -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');