From a68d638f6c390ad389df7cfdb4ce67bc4ea7d724 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 2 Oct 2014 15:48:10 -0500
Subject: [PATCH] i18n: rtl: Fixup redactor rtl blocks

---
 css/thread.css          |  2 +-
 js/redactor-fonts.js    | 23 +++++++----------------
 js/redactor-osticket.js |  2 +-
 scp/css/scp.css         |  3 +--
 4 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/css/thread.css b/css/thread.css
index 049165780..cdf25a720 100644
--- a/css/thread.css
+++ b/css/thread.css
@@ -394,7 +394,7 @@
 .thread-body blockquote,
 .thread-body pre {
 	font-size: 14px;
-	line-height: 1.25rem;
+	line-height: 1.4rem;
 }
 
 /* Adjust plain/text messages posted as <pre> in the thread body to show in
diff --git a/js/redactor-fonts.js b/js/redactor-fonts.js
index a052e57ec..bbf2e9936 100644
--- a/js/redactor-fonts.js
+++ b/js/redactor-fonts.js
@@ -145,28 +145,19 @@ RedactorPlugins.textdirection = {
 
         var button = this.buttonAdd('textdirection', __('Change Text Direction'),
             false, dropdown);
+
+        if (this.opts.direction)
+            this.setRtl();
     },
     setRtl: function()
     {
-        if (!this.opts.linebreaks) {
-            this.bufferSet();
-            this.blockSetAttr('dir', 'rtl');
-        }
-        else {
-            this.$editor.attr('dir', 'rtl');
-        }
-        this.$box.removeClass('ltr').addClass('rtl');
+        this.bufferSet();
+        this.blockSetAttr('dir', 'rtl');
 
     },
     setLtr: function()
     {
-        if (!this.opts.linebreaks) {
-            this.bufferSet();
-            this.blockSetAttr('dir', 'ltr');
-        }
-        else {
-            this.$editor.attr('dir', 'ltr');
-        }
-        this.$box.removeClass('rtl').addClass('ltr');
+        this.bufferSet();
+        this.blockSetAttr('dir', 'ltr');
     }
 };
diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js
index cded2e1f3..8c19159b3 100644
--- a/js/redactor-osticket.js
+++ b/js/redactor-osticket.js
@@ -233,7 +233,7 @@ $(function() {
                 'plugins': [],
                 'imageGetJson': 'ajax.php/draft/images/browse',
                 'syncBeforeCallback': captureImageSizes,
-                'linebreaks': true,
+                'linebreaks': !$('html').hasClass('rtl'),
                 'tabFocus': false,
                 'toolbarFixedBox': true,
                 'focusCallback': function() { this.$box.addClass('no-pjax'); },
diff --git a/scp/css/scp.css b/scp/css/scp.css
index a085fe39f..3fe5aae23 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -782,9 +782,8 @@ h2 .reload {
 }
 
 #threads li a {
-    display:block;
+    display:inline-block;
     width:auto;
-    float:left;
     height:30px;
     line-height:30px;
     border-top:1px solid #F4FAFF;
-- 
GitLab