diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index 9b919efe3..2175801d2 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -159,7 +159,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent '.attachmentPlaceholder': 'attachmentPlaceholder' '.attachmentPlaceholder-inputHolder': 'attachmentInputHolder' '.attachmentPlaceholder-hint': 'attachmentHint' - '.ticket-edit': 'ticketEdit' + '.article-new': 'articleNewEdit' '.attachments': 'attachmentsHolder' '.attachmentUpload': 'attachmentUpload' '.attachmentUpload-progressBar':'progressBar' @@ -215,13 +215,13 @@ class LayoutRefCommunicationReply extends App.ControllerContent @remove_textarea_catcher() open_textarea: (event, withoutAnimation) => - if !@ticketEdit.hasClass('is-open') + if !@articleNewEdit.hasClass('is-open') duration = 300 if withoutAnimation duration = 0 - @ticketEdit.addClass('is-open') + @articleNewEdit.addClass('is-open') @textarea.velocity properties: @@ -268,7 +268,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent add_textarea_catcher: -> @textareaCatcher = new App.clickCatcher - holder: @ticketEdit.offsetParent() + holder: @articleNewEdit.offsetParent() callback: @close_textarea zIndexScale: 4 @@ -287,7 +287,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent options: duration: 300 easing: 'easeOutQuad' - complete: => @ticketEdit.removeClass('is-open') + complete: => @articleNewEdit.removeClass('is-open') @textBubble.velocity properties: @@ -317,18 +317,18 @@ class LayoutRefCommunicationReply extends App.ControllerContent @open_textarea() if @dragEventCounter is 0 @dragEventCounter++ - @ticketEdit.addClass('is-dropTarget') + @articleNewEdit.addClass('is-dropTarget') onDragleave: (event) => @dragEventCounter-- - @ticketEdit.removeClass('is-dropTarget') if @dragEventCounter is 0 + @articleNewEdit.removeClass('is-dropTarget') if @dragEventCounter is 0 onFileDrop: (event) => event.preventDefault() event.stopPropagation() files = event.originalEvent.dataTransfer.files - @ticketEdit.removeClass('is-dropTarget') + @articleNewEdit.removeClass('is-dropTarget') @queueUpload(files) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 2c402b476..ad3335e3d 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -278,10 +278,9 @@ class App.TicketZoom extends App.Controller @form_id = App.ControllerForm.formId() - new Edit( + new ArticleNew( ticket: @ticket - el: @el.find('.ticket-edit') - #el: @el.find('.edit') + el: @el.find('.article-new') form_meta: @form_meta form_id: @form_id defaults: @taskGet('article') @@ -943,13 +942,13 @@ class TicketMeta extends App.Controller release: => App.Ticket.unsubscribe( @subscribeId ) -class Edit extends App.Controller +class ArticleNew extends App.Controller elements: '.js-textarea': 'textarea' '.attachmentPlaceholder': 'attachmentPlaceholder' '.attachmentPlaceholder-inputHolder': 'attachmentInputHolder' '.attachmentPlaceholder-hint': 'attachmentHint' - '.article-add': 'ticketEdit' + '.article-add': 'articleNewEdit' '.attachments': 'attachmentsHolder' '.attachmentUpload': 'attachmentUpload' '.attachmentUpload-progressBar': 'progressBar' @@ -1069,7 +1068,7 @@ class Edit extends App.Controller ticket = App.Ticket.fullLocal( @ticket.id ) - @html App.view('ticket_zoom/edit')( + @html App.view('ticket_zoom/article_new')( ticket: ticket articleTypes: @articleTypes article: @defaults @@ -1298,14 +1297,14 @@ class Edit extends App.Controller @remove_textarea_catcher() open_textarea: (event, withoutAnimation) => - console.log('ticketEdit', @ticketEdit.hasClass('is-open')) - if !@ticketEdit.hasClass('is-open') + console.log('articleNewEdit', @articleNewEdit.hasClass('is-open')) + if !@articleNewEdit.hasClass('is-open') duration = 300 if withoutAnimation duration = 0 - @ticketEdit.addClass('is-open') + @articleNewEdit.addClass('is-open') @textarea.velocity properties: @@ -1350,9 +1349,9 @@ class Edit extends App.Controller duration: duration add_textarea_catcher: => - if @ticketEdit.is(':visible') + if @articleNewEdit.is(':visible') @textareaCatcher = new App.clickCatcher - holder: @ticketEdit.offsetParent() + holder: @articleNewEdit.offsetParent() callback: @close_textarea zIndexScale: 4 @@ -1371,7 +1370,7 @@ class Edit extends App.Controller options: duration: 300 easing: 'easeOutQuad' - complete: => @ticketEdit.removeClass('is-open') + complete: => @articleNewEdit.removeClass('is-open') @textBubble.velocity properties: @@ -1401,12 +1400,12 @@ class Edit extends App.Controller @open_textarea() if @dragEventCounter is 0 @dragEventCounter++ - @ticketEdit.parent().addClass('is-dropTarget') + @articleNewEdit.parent().addClass('is-dropTarget') onDragleave: (event) => @dragEventCounter-- - @ticketEdit.parent().removeClass('is-dropTarget') if @dragEventCounter is 0 + @articleNewEdit.parent().removeClass('is-dropTarget') if @dragEventCounter is 0 renderAttachment: (file) => @attachmentsHolder.append App.view('generic/attachment_item') diff --git a/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco b/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco index 96cce4e7a..1ee64bb05 100644 --- a/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco @@ -6,12 +6,12 @@

Article Reply

-
+
-
<%- @content %>
+
<%- @content %>
diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 4a157d35d..e5b4d6e58 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -3305,7 +3305,7 @@ footer { } .ticket-article, -.ticket-edit { +.article-new { max-width: 800px; margin: 0 auto; padding: 0 21px; @@ -3580,7 +3580,7 @@ footer { position: relative; } -.ticket-edit { +.article-new { margin-top: auto; margin-bottom: 36px; } @@ -3664,13 +3664,13 @@ footer { visibility: hidden; } - .ticket-edit .recipient-picker { + .article-new .recipient-picker { height: 36px; position: relative; transition: 300ms; } - .ticket-edit .recipient-picker.is-open { + .article-new .recipient-picker.is-open { opacity: 1; } @@ -3778,16 +3778,16 @@ footer { .recipient-list input::-moz-placeholder { opacity: 1; color: #666; } .recipient-list input:-ms-input-placeholder { color: #666; } - .ticket-edit .textBubble { + .article-new .textBubble { border-color: #b3b3b3; border-radius: 5px; padding-left: 12px; padding-right: 12px; } - .ticket-edit .textBubble [contenteditable], - .ticket-edit textarea, - .ticketEdit-body { + .article-new .textBubble [contenteditable], + .article-new textarea, + .articleNewEdit-body { width: 100%; position: relative; min-height: 20px; @@ -3798,7 +3798,7 @@ footer { resize: none; } - .ticketEdit-body { + .articleNewEdit-body { height: auto; min-height: 38px; }