Fixed multiple rtl-related issues
authorMarcel Werk <burntime@woltlab.com>
Wed, 14 Sep 2016 09:53:38 +0000 (11:53 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 14 Sep 2016 09:53:48 +0000 (11:53 +0200)
com.woltlab.wcf/templates/wysiwyg.tpl
wcfsetup/install/files/acp/templates/wysiwyg.tpl
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php
wcfsetup/install/files/lib/util/StyleUtil.class.php

index 181f88eb9f002bdc732691066363ab120ec734df..162b73b792781c030fcfa7f27e7eea022efee4b1 100644 (file)
                        var config = {
                                buttons: buttons,
                                clipboardImageUpload: {if $__wcf->getBBCodeHandler()->isAvailableBBCode('img')}true{else}false{/if},
+                               direction: '{lang}wcf.global.pageDirection{/lang}',
                                formatting: ['p', 'h2', 'h3', 'h4'],
                                imageCaption: false,
                                imageUpload: {if $__wcf->getBBCodeHandler()->isAvailableBBCode('img')}true{else}false{/if},
index 3b1d51de449d31803409aa401e72350d86330bc1..02eab9aad3789a121865ac653ede06b680c16407 100644 (file)
                        var config = {
                                buttons: buttons,
                                clipboardImageUpload: false,
+                               direction: '{lang}wcf.global.pageDirection{/lang}',
                                formatting: ['p', 'h2', 'h3', 'h4'],
                                imageCaption: false,
                                lang: 'wsc', // fake language to offload phrases
index f251c1147261cbd07a3c64c9f90b3dff254abe25..1da640e7ba82a6bfcbd68a6c68e3b8bad55647ad 100644 (file)
@@ -339,7 +339,7 @@ class StyleCompiler extends SingletonFactory {
                FileUtil::makeWritable($filename.'.css');
                
                // convert stylesheet to RTL
-               //TODO: $content = StyleUtil::convertCSSToRTL($content);
+               $content = StyleUtil::convertCSSToRTL($content);
                
                // write stylesheet for RTL
                file_put_contents($filename.'-rtl.css', $content);
index 1b599ca78eaa93eccadb50d3a031b81b081df8b0..660f8d638803f60d91633900ba02974361d107f9 100644 (file)
@@ -53,8 +53,8 @@ final class StyleUtil {
                $contents = str_replace('wcf-border-left-style:', 'border-right-style:', $contents);
                
                // border-color
-               $contents = preg_replace('/border-color:\s*(rgba?\(.*?\))\s+(rgba?\(.*?\))\s+(rgba?\(.*?\))\s+(rgba?\(.*?\))/', 'border-color:\\1 \\4 \\3 \\2', $contents);
-               $contents = preg_replace('/border-color:\s*([^\s;\}]+)\s+([^\s;\}]+)\s+([^\s;\}]+)\s+([^\s;\}]+)/', 'border-color:\\1 \\4 \\3 \\2', $contents);
+               //$contents = preg_replace('/border-color:\s*(rgba?\(.*?\))\s+(rgba?\(.*?\))\s+(rgba?\(.*?\))\s+(rgba?\(.*?\))/', 'border-color:\\1 \\4 \\3 \\2', $contents);
+               //$contents = preg_replace('/border-color:\s*([^\s;\}]+)\s+([^\s;\}]+)\s+([^\s;\}]+)\s+([^\s;\}]+)/', 'border-color:\\1 \\4 \\3 \\2', $contents);
                
                // (border-left-color, border-right-color)
                $contents = str_replace('border-left-color:', 'wcf-border-left-color:', $contents);