From 8bd3af788fa815fb59949270eb7f39785ed5db9a Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 12 May 2016 11:32:51 +0200 Subject: [PATCH 1/4] richtext-content: fix spacing of nested p, table and pre --- app/assets/stylesheets/zammad.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 5d04127cb..5f05fd5bf 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -8127,8 +8127,9 @@ output { .richtext-content { p, table, pre { margin-bottom: 16px; - + } + & > p, & > table, & > pre { &:first-child { margin-top: 6px; } From b82e08bfae16eb69171cbfc7b0157910d634adda Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 12 May 2016 11:50:10 +0200 Subject: [PATCH 2/4] fix widths of boxes in the new chat-ticket --- app/assets/stylesheets/zammad.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 5f05fd5bf..eb6fcc02a 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -5278,7 +5278,7 @@ footer { } & > .box { - flex: 1; + width: calc(50% - 47px); margin: 34px; } @@ -5288,6 +5288,7 @@ footer { } .boxFade { + width: 94px; top: 34px; height: 100%; position: absolute; From 561d8163ef9dcced4752d7712866727799e27ee4 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 12 May 2016 15:20:48 +0200 Subject: [PATCH 3/4] richtext-content: add style for blockquote --- app/assets/stylesheets/zammad.scss | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index eb6fcc02a..04fdb7636 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -4430,12 +4430,6 @@ footer { p { margin: 0; } - - blockquote, - pre { - margin: 0px; - padding: 8px 12px 8px 12px; - } } .ticket-article-item.state--folde-out .textBubble { @@ -8126,11 +8120,17 @@ output { } .richtext-content { - p, table, pre { + p, + table, + pre, + blockquote { margin-bottom: 16px; } - & > p, & > table, & > pre { + & > p, + & > table, + & > pre, + & > blockquote { &:first-child { margin-top: 6px; } @@ -8167,6 +8167,11 @@ output { } } + blockquote { + padding: 8px 12px; + border-left: 5px solid #eee; + } + code { border: none; background: hsl(0,0%,97%); @@ -8174,7 +8179,7 @@ output { } pre { - padding: 15px; + padding: 12px 15px; font-size: 13px; line-height: 1.45; background: hsl(0,0%,97%); From db8b944e685f541d12ef9092450fd2ce16f183d7 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 12 May 2016 15:25:47 +0200 Subject: [PATCH 4/4] add richtext-content style to emails --- app/models/channel/email_build.rb | 105 ++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 34 deletions(-) diff --git a/app/models/channel/email_build.rb b/app/models/channel/email_build.rb index e578bdf84..a7a0fb42b 100644 --- a/app/models/channel/email_build.rb +++ b/app/models/channel/email_build.rb @@ -115,7 +115,7 @@ module Channel::EmailBuild content_disposition: attachment.preferences['Content-Disposition'] || 'attachment', content_type: attachment.preferences['Content-Type'], mime_type: attachment.preferences['Mime-Type'], - content: attachment.content, + content: attachment.content } end end @@ -146,39 +146,76 @@ Check if string is a complete html document. If not, add head and css styles. #{html}