From 924a11e7712664ab0d62cc0c561f13495d1334e2 Mon Sep 17 00:00:00 2001 From: Shahar Porat Date: Fri, 12 Jun 2015 00:45:49 +0300 Subject: [PATCH 1/3] RTL Support first submit - WIP This is a work in progress of Rocket.Chat RTL Support. The work is not finished. I didn't know where to put the .rtl class in the html file, so I use the addClass method in layout.coffee. Please write down suggestion and don't accept this pull request yet, until final version. --- client/stylesheets/rtl.less | 90 ++++++++++++++++++++++ client/views/app/chatMessageDashboard.html | 2 +- client/views/app/chatWindowDashboard.html | 4 +- client/views/app/layout.coffee | 2 +- 4 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 client/stylesheets/rtl.less diff --git a/client/stylesheets/rtl.less b/client/stylesheets/rtl.less new file mode 100644 index 0000000000000..a569cbd3149bb --- /dev/null +++ b/client/stylesheets/rtl.less @@ -0,0 +1,90 @@ +// Mix-ins +.right(@right) { + right: @right; + left: auto; +} + +.left (@left) { + left: @left; + right: auto; +} + +.margin-right(@margin-right) { + margin-right: @margin-right; + margin-left: auto; +} + +.margin-left(@margin-left) { + margin-left: @margin-left; + margin-right: auto; +} + +.padding-right(@padding-right) { + padding-right: @padding-right; + padding-left: 0px; +} + +.padding-left(@padding-left) { + padding-left: @padding-left; + padding-right: 0px; +} + + +.rtl +{ + + direction: rtl; + + .side-nav { + .right(0px); + } + + .main-content { + .margin-right(260px); + } + + .account-box .options span.soon { + .left(-30px); + } + + .messages-box { + .message { + .padding-right(50px); + } + + .thumb { + .right(0px); + } + + .message.with-thumb .time { + .right(4px); + } + + .time-single { + .right(-15px); + } + } + + .messages-container { + .message-form { + textarea { + padding-left: 38px; + padding-right: 8px; + } + + .icon-paper-plane { + .left(10px); + transform: rotateY(180deg); + } + } + } + + q { + padding-right: 10px; + padding-left: 0px; + } + q:before { + right: 50px; + left: auto; + } +} diff --git a/client/views/app/chatMessageDashboard.html b/client/views/app/chatMessageDashboard.html index 58262053cf329..b785ac9752139 100644 --- a/client/views/app/chatMessageDashboard.html +++ b/client/views/app/chatMessageDashboard.html @@ -41,7 +41,7 @@ {{/if}} {{/if}} -
+
{{{renderMessage}}}
{{/if}} diff --git a/client/views/app/chatWindowDashboard.html b/client/views/app/chatWindowDashboard.html index 2f6ab4d98002f..fe642dd3b903d 100644 --- a/client/views/app/chatWindowDashboard.html +++ b/client/views/app/chatWindowDashboard.html @@ -58,7 +58,7 @@

{{> messagePopupConfig getPupupConfig}} - +
@@ -79,7 +79,7 @@

{{/if}} {{/with}}

-