From d6ebe079e6b03730098597b4cffde8f7ec3194da Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 17 Dec 2014 23:02:09 +0100 Subject: [PATCH] Improved ticket title behaviour. --- .../app/lib/base/jquery.contenteditable.js | 14 +------------- app/assets/stylesheets/zammad.css.scss | 4 ++++ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/app/lib/base/jquery.contenteditable.js b/app/assets/javascripts/app/lib/base/jquery.contenteditable.js index 96d8440ea..4f2953ffa 100644 --- a/app/assets/javascripts/app/lib/base/jquery.contenteditable.js +++ b/app/assets/javascripts/app/lib/base/jquery.contenteditable.js @@ -88,19 +88,7 @@ // strip html signes if multi line exists if ( this.options.multiline ) { - var text = this.$element.html() - //console.log('h2a 1', text) - text = text.replace(/


<\/p>/g, "\n") // new line as /p - text = text.replace(/

<\/p>/g, "\n") // new line as /p - text = text.replace(/<\/p>/g, "\n") // new line as /p - text = text.replace(/
/g, "\n") // new line as br - text = text.replace(/<\/div>/g, "\n") // in some caes, new line als div - text = text.replace(/<.+?>/g, "") // new line as /p - text = $("

" + text + "
").text() - text = text.replace(/ /g, " ") - text = text.replace(/\s+$/g, ''); - //console.log('h2a 2', text) - return text + return this.$element.html() } return this.$element.text().trim() } diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 21f71f970..e49d555f8 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -2908,6 +2908,10 @@ footer { text-align: center; } + .ticket-title-update { + white-space: normal; + } + .task-subline { text-align: center; display: block;