diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index d63ebd71a..43db17b0f 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -582,6 +582,8 @@ class ArticleView extends App.Controller 'click [data-type=internal]': 'public_internal' 'click .show_toogle': 'show_toogle' 'click [data-type=reply]': 'reply' + 'click .more': 'more_toogle' + 'click .close-details': 'more_toogle' # 'click [data-type=reply-all]': 'replyall' constructor: -> @@ -643,6 +645,19 @@ class ArticleView extends App.Controller $(e.target).text( App.i18n.translateContent('See more') ) $(e.target).next('div').addClass('hide') + more_toogle: (e) -> + e.preventDefault() + if !$(e.target).parent().find('.article-meta.top').hasClass('hide') + $(e.target).parent().find('.more').removeClass('hide') + $(e.target).parent().find('.close-details').addClass('hide') + $(e.target).parent().find('.article-meta.top').addClass('hide') + $(e.target).parent().find('.article-meta.bottom').addClass('hide') + else + $(e.target).parent().find('.more').addClass('hide') + $(e.target).parent().find('.close-details').removeClass('hide') + $(e.target).parent().find('.article-meta.top').removeClass('hide') + $(e.target).parent().find('.article-meta.bottom').removeClass('hide') + checkIfSignatureIsNeeded: (type) => # add signature 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 e53dd4f38..fea49a315 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 @@ -1,9 +1,11 @@ <% for article in @articles: %> -
+
-