From 6ee8429a9e32a37d96b5f676b7b221ae2d2a13d0 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 29 Nov 2012 21:05:45 +0100 Subject: [PATCH] Replaced native trim() with query.trim() because IE8 is not supporting it. --- .../javascripts/app/controllers/agent_ticket_zoom.js.coffee | 3 ++- app/assets/javascripts/app/lib/app_post/clipboard.js.coffee | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 be012847a..5266c5473 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee @@ -439,7 +439,8 @@ class Article extends App.Controller # build html body # cleanup body - @article['html'] = @article.body.trim() +# @article['html'] = @article.body.trim() + @article['html'] = $.trim( @article.body.trim() ) @article['html'].replace( /\n\r/g, "\n" ) @article['html'].replace( /\n\n\n/g, "\n\n" ) diff --git a/app/assets/javascripts/app/lib/app_post/clipboard.js.coffee b/app/assets/javascripts/app/lib/app_post/clipboard.js.coffee index 36801a7af..df246a2f6 100644 --- a/app/assets/javascripts/app/lib/app_post/clipboard.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/clipboard.js.coffee @@ -70,7 +70,8 @@ class _Singleton else if document.selection text = document.selection.createRange().text if text - text = text.toString().trim() +# text = text.toString().trim() + text = $.trim( text.toString() ) text # get current selection