From 8826b8c371ba4529f5d684962518d8748efd14a1 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 14 Dec 2015 16:25:06 +0100 Subject: [PATCH] ticket zoom: full click area for textarea --- .../app/controllers/ticket_zoom/article_new.coffee | 12 ++++++++---- app/assets/stylesheets/zammad.scss | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee index 9ccba0fd3..07c646118 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee @@ -18,8 +18,8 @@ class App.TicketZoomArticleNew extends App.Controller 'click .js-articleTypeItem': 'selectArticleType' 'click .js-selectedArticleType': 'showSelectableArticleType' 'click .js-mail-inputs': 'stopPropagation' - 'click .js-writeArea': 'stopPropagation' - 'click .list-entry-type div': 'change_type' + 'click .js-writeArea': 'propagateOpenTextarea' + 'click .list-entry-type div': 'changeType' 'focus .js-textarea': 'openTextarea' constructor: -> @@ -217,9 +217,8 @@ class App.TicketZoomArticleNew extends App.Controller ) @subscribeIdTextModule = ticket.subscribe( callback ) - change_type: (e) -> + changeType: (e) -> $(e.target).addClass('active').siblings('.active').removeClass('active') - # store $(this).data('value') toggleVisibility: (event) -> event.stopPropagation() @@ -309,7 +308,12 @@ class App.TicketZoomArticleNew extends App.Controller scrollToBottom: -> @el.scrollParent().scrollTop @el.scrollParent().prop('scrollHeight') + propagateOpenTextarea: (event) -> + event.stopPropagation() + @textarea.focus() + openTextarea: (event, withoutAnimation) => + event.stopPropagation() if @articleNewEdit.hasClass('is-open') return diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index ec4c480e5..eb8ff996c 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -4588,6 +4588,7 @@ footer { border-radius: 5px; padding-left: 12px; padding-right: 12px; + cursor: text; } .article-new .textBubble [contenteditable],