From 9f97c3af34381b52e21497d167e790c89d65847c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 28 Dec 2014 16:28:52 +0100 Subject: [PATCH] Moved to new attachment view. --- .../app/controllers/ticket_zoom.js.coffee | 6 +++-- .../layout_ref/communication_overview.jst.eco | 12 +++++----- .../views/ticket_zoom/article_view.jst.eco | 24 ++++++++++++------- app/assets/stylesheets/zammad.css.scss | 6 ++--- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 12ccc8a63..485f34f20 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -176,7 +176,7 @@ class App.TicketZoom extends App.Controller # if page header is not possible to use - mainScrollHeigth to low - hide page header else top = -headerHeight - + @scrollPageHeader.css('transform', "translateY(#{top}px)") render: (force) => @@ -700,7 +700,7 @@ class TicketTitle extends App.Controller @lastTitle = ticket.title @html App.view('ticket_zoom/title')( - ticket: ticket + ticket: ticket ) @$('.ticket-title-update').ce({ @@ -1552,6 +1552,8 @@ class Article extends App.Controller if @article_changed @article['html'] = @article['html'] + '' + @article['html'] = @article['html'].replace( /\n/g, '
' ) + actionRow: -> if @isRole('Customer') @article.actions = [] diff --git a/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco b/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco index 7fb82e5ab..3016ce3c7 100644 --- a/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco @@ -196,12 +196,12 @@ Grüße, Peter
-
Lieber HP, -anbei findest du die Midi Noten für Maria Maria "I Like it Loud". -Wünsche dir einen guten Auftritt in Hamburg. - -Alles gute, -Oliver +
Lieber HP,
+anbei findest du die Midi Noten für Maria Maria "I Like it Loud".
+Wünsche dir einen guten Auftritt in Hamburg.
+
+Alles gute,
+Oliver

2 <%- @T('Attached Files') %>

diff --git a/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco index db367cf14..7a72e71cd 100644 --- a/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco @@ -41,7 +41,22 @@ <% end %> <%- article.created_by.avatar("40", position) %>
-
<%- article.html %>
+
+
+ <%- article.html %> + <% if !_.isEmpty( article.attachments ): %> +
+
+

<%- article.attachments.length %> <%- @T('Attached Files') %>

+ <% for attachment in article.attachments: %> +
+ <%= attachment.filename %> +
<%= attachment.size %>
+
+ <% end %> +
+ <% end %> +
@@ -59,13 +74,6 @@
- <% if article.attachments: %> -
- <% for attachment in article.attachments: %> - <%= attachment.filename %> - <% end %> -
- <% end %> <% if article.actions: %>
diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 353c162fa..d7109040c 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -2978,8 +2978,8 @@ footer { position: relative; } - /* - clip the article-meta to not stand out on the other side + /* + clip the article-meta to not stand out on the other side of the text-bubble if the text bubble is small */ @@ -3056,7 +3056,6 @@ footer { .text-bubble { padding: 10px 20px; - white-space: pre-wrap; background: white; border-radius: 2px; border: 1px solid hsl(240,4%,95%); @@ -3364,7 +3363,6 @@ footer { .ticket-edit .text-bubble { border-color: #b3b3b3; - white-space: normal; border-radius: 5px; padding-left: 12px; padding-right: 12px;