Browse Source

Improved css for outlook 2013.

Martin Edenhofer 8 years ago
parent
commit
61a526e3bc
2 changed files with 7 additions and 3 deletions
  1. 5 1
      app/models/channel/email_build.rb
  2. 2 2
      db/seeds.rb

+ 5 - 1
app/models/channel/email_build.rb

@@ -199,6 +199,9 @@ Check if string is a complete html document. If not, add head and css styles.
       col {
         width: auto;
       }
+      p {
+        margin: 0;
+      }
       code {
         border: none;
         background: hsl(0,0%,97%);
@@ -238,7 +241,8 @@ Add/change markup to display html in any mail client nice.
   def self.html_mail_client_fixes(html)
 
     # https://github.com/martini/zammad/issues/165
-    html.gsub('<blockquote type="cite">', '<blockquote type="cite" style="border-left: 2px solid blue; margin: 0px; padding: 8px 12px 8px 12px;">')
+    html.gsub!('<blockquote type="cite">', '<blockquote type="cite" style="border-left: 2px solid blue; margin: 0px; padding: 8px 12px 8px 12px;">')
+    html.gsub('<p>', '<p style="margin: 0;">')
 
   end
 

+ 2 - 2
db/seeds.rb

@@ -4234,7 +4234,7 @@ Trigger.create_or_update(
   },
   perform: {
     'notification.email' => {
-      'body' => '<div>Your request (#{config.ticket_hook}#{ticket.number}) has been received and will be reviewed by our support staff.</div>
+      'body' => '<div>Your request <b>(#{config.ticket_hook}#{ticket.number})</b> has been received and will be reviewed by our support staff.</div>
 <br/>
 <div>To provide additional information, please reply to this email or click on the following link:
 <a href="#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}">#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}</a>
@@ -4273,7 +4273,7 @@ Trigger.create_or_update(
   },
   perform: {
     'notification.email' => {
-      'body' => '<div>Your follow up for (#{config.ticket_hook}#{ticket.number}) has been received and will be reviewed by our support staff.</div>
+      'body' => '<div>Your follow up for <b>(#{config.ticket_hook}#{ticket.number})</b> has been received and will be reviewed by our support staff.</div>
 <br/>
 <div>To provide additional information, please reply to this email or click on the following link:
 <a href="#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}">#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}</a>