From ddd20ae1553f53018cd69ec185ffce6a07ada8e1 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 18 Sep 2013 22:47:34 +0200 Subject: [PATCH] Fixed see more link. --- .../javascripts/app/controllers/ticket_zoom.js.coffee | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 98af16b75..59656f6cb 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -608,9 +608,9 @@ class ArticleView extends App.Controller e.preventDefault() $(e.target).hide() if $(e.target).next('div')[0] - $(e.target).next('div').show() + $(e.target).next('div').removeClass('hide') else - $(e.target).parent().next('div').show() + $(e.target).parent().next('div').removeClass('hide') checkIfSignatureIsNeeded: (article_type) => @@ -705,9 +705,9 @@ class Article extends App.Controller if article_lines.length > preview preview_mode = true if article_lines[preview] is '' - article_lines.splice( preview, 0, '----SEEMORE----' ) + article_lines.splice( preview, 0, '-----SEEMORE-----' ) else - article_lines.splice( preview + 1, 0, '----SEEMORE----' ) + article_lines.splice( preview - 1, 0, '-----SEEMORE-----' ) @article['html'] = article_lines.join("\n") @article['html'] = window.linkify( @article['html'] ) notify = '' + App.i18n.translateContent('See more') + '' @@ -715,7 +715,7 @@ class Article extends App.Controller # preview mode if preview_mode @article_changed = false - @article['html'] = @article['html'].replace /^\n{0,10}----SEEMORE----\n/m, (match) => + @article['html'] = @article['html'].replace /^-----SEEMORE-----\n/m, (match) => @article_changed = true notify + '
' if @article_changed @@ -730,7 +730,6 @@ class Article extends App.Controller if @article_changed @article['html'] = @article['html'] + '
' - actionRow: -> if @isRole('Customer') @article.actions = []