diff --git a/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee index c9675168b..9e1270333 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee @@ -9,6 +9,7 @@ class Index extends App.Controller 'click [data-type=internal]': 'public_internal', 'click [data-type=history]': 'history_view', 'change [name="ticket_article_type_id"]': 'form_update', + 'click .show_toogle': 'show_toogle', constructor: (params) -> super @@ -66,7 +67,16 @@ class Index extends App.Controller if !@articles @articles = [] for article_id in @ticket.article_ids - @articles.push App.TicketArticle.find(article_id) + article = App.TicketArticle.find(article_id) + + # build html body + article['html'] = window.linkify( article.body.trim() ) + notify = "" + T('See more') + "" + article['html'] = article['html'].replace /--/m, (match) -> + notify + '
' + match + article['html'] = article['html'] + '
' + + @articles.push article # check attachments for article in @articles @@ -157,6 +167,11 @@ class Index extends App.Controller debug: false ) + show_toogle: (e) -> + e.preventDefault() + $(e.target).hide() + $(e.target).next('div').show() + history_view: (e) -> e.preventDefault() new History( ticket_id: @ticket_id ) diff --git a/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco b/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco index a9075e3f1..2910dcd77 100644 --- a/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco @@ -53,7 +53,7 @@ <% end %>
-
<%- window.linkify( article.body.trim() ) %>
+
<%- article.html %>
<% end %> diff --git a/app/assets/stylesheets/zzz.css b/app/assets/stylesheets/zzz.css index 23496ed5a..fa2ec1ce9 100644 --- a/app/assets/stylesheets/zzz.css +++ b/app/assets/stylesheets/zzz.css @@ -108,7 +108,7 @@ footer { } .ticket-answer .avatar { - margin-left: 10px; + margin-left: 10px; } .ticket-answer .span8 { width: 558px; @@ -158,6 +158,12 @@ footer { width: 602px; } +.show_toogle { + font-size: 10px; + line-height: 12px; + color: #999999; +} + .well-muted { background-color: whiteSmoke; border: 1px solid #eee;