From 20236091de3a655baadde228ad624a82e42fe8bb Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Tue, 21 Feb 2017 09:58:55 +0100 Subject: [PATCH] Batch Overlay - center cancel area in empty space --- .../app/controllers/ticket_overview.coffee | 15 ++++++++------- app/assets/stylesheets/zammad.scss | 7 +++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index f230ebc09..4df9b2a7f 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -350,6 +350,10 @@ class App.TicketOverview extends App.Controller return if !@batchOverlayShown # user might have dropped the item already @batchAssignShown = true + @batchCancel.css + top: 0 + bottom: @batchAssign.height() + @batchAssign.velocity properties: translateY: [0, '100%'] @@ -360,10 +364,6 @@ class App.TicketOverview extends App.Controller visibility: 'visible' complete: @highlightBatchEntryAtMousePosition - @batchCancel.css - top: 0 - bottom: 'auto' - @batchCancel.velocity properties: translateY: [0, '100%'] @@ -452,6 +452,10 @@ class App.TicketOverview extends App.Controller return if !@batchOverlayShown # user might have dropped the item already @batchMacroShown = true + @batchCancel.css + bottom: 0 + top: @batchMacro.height() + @batchMacro.velocity properties: translateY: [0, '-100%'] @@ -462,9 +466,6 @@ class App.TicketOverview extends App.Controller visibility: 'visible' complete: @highlightBatchEntryAtMousePosition - @batchCancel.css - top: 'auto' - bottom: 0 @batchCancel.velocity properties: translateY: [0, '-100%'] diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 339996582..353cee5e3 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -8511,13 +8511,16 @@ output { border: 2px dashed hsla(0,0%,100%,.3); border-radius: 8px; padding: 28px; - margin: 50px 200px; + margin: auto 200px; position: absolute; - top: 0; left: 0; right: 0; + max-height: 100px; visibility: hidden; will-change: opacity; + display: flex; + justify-content: center; + align-items: center; } &-box {