From df1fd1f64638c52977a1891e2ad142c48649ad38 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 15 Jan 2015 01:13:08 +0100 Subject: [PATCH] add article Read More prototype --- .../app/controllers/layout_ref.js.coffee | 20 ++++++- .../layout_ref/communication_overview.jst.eco | 20 ++++++- app/assets/stylesheets/zammad.css.scss | 57 +++++++++++++++---- 3 files changed, 84 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index 61aadbc29..ef40756a4 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -104,6 +104,8 @@ App.Config.set( 'layout_ref/content', Content, 'Routes' ) class CommunicationOverview extends App.ControllerContent + events: + 'click .js-unfold': 'unfold' constructor: -> super @@ -116,6 +118,22 @@ class CommunicationOverview extends App.ControllerContent scrollHolder = pageHeader.scrollParent() scrollBody = scrollHolder.get(0).scrollHeight - scrollHolder.height() + unfold: (e) -> + container = $(e.currentTarget).parents('.textBubble-content') + + container.find('.textBubble-overflowContainer').velocity + properties: + opacity: 0 + options: + duration: 300 + + container.velocity + properties: + height: container.attr('data-height') + options: + duration: 300 + complete: -> container.parents('.textBubble').removeClass('is-overflowing') + render: -> @html App.view('layout_ref/communication_overview')() @@ -133,7 +151,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent '.attachmentUpload': 'attachmentUpload' '.attachmentUpload-progressBar':'progressBar' '.js-percentage': 'progressText' - '.text-bubble': 'textBubble' + '.textBubble': 'textBubble' events: 'focus .js-textarea': 'open_textarea' diff --git a/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco b/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco index b9a593f07..63d52cbe5 100644 --- a/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco @@ -196,12 +196,30 @@ Grüße, Peter
-
Lieber HP,
+
+
Lieber HP,
anbei findest du die Midi Noten für Maria Maria "I Like it Loud".
Wünsche dir einen guten Auftritt in Hamburg.

+Deine Frau bekommt ein Kind haben wir gehört.
+Gratulation dazu! Wir schicken dir was liebes.
+
+Und wenn du noch mal Probleme mit der Stimme hast sag bescheid – ich kenn da ein Wundermittel.
+
+Das ist eine Pille von einem Druiden aus dem Bayerischen Wald. Die ölt einem so richtig die Stimmbänder.
+
+Verwende ich immer wenn ich meine Frau anschreien will. Die macht meinen Tenor richtig zum Löwen.
+
+Ach ja und dein Freund Tim. Richt dem mal aus dass er das doch bitte sein lassen soll mit den Anrufen.
+
Ich weiß schon dass ich ein hübscher bin. Aber ich hab ihm schon tausend mal gesagt, dass ich seine Gefühle leider nicht erwiedern kann.
+
+Bin verheiratet, hab Kind. Is doch offensichtlich, Junge!
Alles gute,
Oliver
+
+
See More
+
+

2 <%- @T('Attached Files') %>

diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 3d842fae7..2b17be820 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -3121,7 +3121,7 @@ footer { display: none; } - .text-bubble { + .textBubble { padding: 10px 20px; background: white; border-radius: 2px; @@ -3130,32 +3130,67 @@ footer { position: relative; overflow-wrap: break-word; word-wrap: break-word; - } - + /* email css reset */ - .text-bubble p { + p { margin: 0; } - .text-bubble blockquote, - .text-bubble pre - { + blockquote, + pre { margin: 0px; padding: 8px 12px 8px 12px; } + } + .ticket-article-item.state--folde-out .textBubble { + border-color: hsl(0,0%,90%); + } - .ticket-article-item.state--folde-out .text-bubble { - border-color: hsl(0,0%,90%); + .textBubble-content { + overflow: hidden; + position: relative; + } + + .is-overflowing .textBubble-overflowContainer { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: white; + + .btn { + padding: 7px 0; } - .customer.ticket-article-item .text-bubble { + &:before { + content: ""; + position: absolute; + left: 0; + right: 0; + top: -30px; + height: 30px; + background: linear-gradient(transparent, white); + } + } + + .customer .is-overflowing .textBubble-overflowContainer { + background: #e5f0f5; + &:before { + background: linear-gradient(transparent, #e5f0f5); + } + } + + .customer.ticket-article-item .textBubble { background: #e5f0f5; border-color: hsl(199,38%,92%); box-shadow: none; + &.is-overflowing:after { + background: linear-gradient(transparent, #e5f0f5 60px); + } } - .customer.ticket-article-item.state--folde-out .text-bubble { + .customer.ticket-article-item.state--folde-out .textBubble { border-color: hsl(199,44%,85%); }