From 332f3fb6a2f25bc5d7c042d67e76b2c2b7ca6f0e Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 19 Oct 2015 11:09:52 +0200 Subject: [PATCH 1/3] fix scrollbar in ticketZoom: add gap for scrollbar --- .../_application_controller_generic.coffee | 17 +---------------- .../app/controllers/ticket_zoom.coffee | 15 +++++---------- .../javascripts/app/lib/app_post/utils.coffee | 15 +++++++++++++++ .../javascripts/app/views/ticket_zoom.jst.eco | 2 +- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee index 5aa752432..cabe3ceb8 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee @@ -619,7 +619,7 @@ class App.Sidebar extends App.Controller render: => @html App.view('generic/sidebar_tabs') items: @items - scrollbarWidth: @getScrollBarWidth() + scrollbarWidth: App.Utils.getScrollBarWidth() # init content callback for item in @items @@ -635,21 +635,6 @@ class App.Sidebar extends App.Controller type: 'small' ) - getScrollBarWidth: -> - $outer = $('
').css( - visibility: 'hidden' - width: 100 - overflow: 'scroll' - ).appendTo('body') - - widthWithScroll = $('
').css( - width: '100%' - ).appendTo($outer).outerWidth() - - $outer.remove() - - return 100 - widthWithScroll - toggleDropdown: (e) -> e.stopPropagation() $(e.currentTarget).next('.js-actions').find('.dropdown-toggle').dropdown('toggle') diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index 213a9d724..20b7d9ce3 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -271,17 +271,12 @@ class App.TicketZoom extends App.Controller if not mainScrollHeigth > mainHeigth + headerHeight @scrollPageHeader.css('transform', "translateY(#{-headerHeight}px)") - if scroll > headerHeight scroll = headerHeight if scroll is @scrollHeaderPos return - #marginTop: 0 .. headerHeight - @main.css('margin-top', scroll) - # translateY: 0 .. -headerHeight - @ticketZoom.css('transform', "translateY(-#{scroll}px)") # translateY: headerHeight .. 0 @scrollPageHeader.css('transform', "translateY(#{scroll - headerHeight}px)") @@ -295,11 +290,11 @@ class App.TicketZoom extends App.Controller if !@renderDone @renderDone = true - @html App.view('ticket_zoom')( - ticket: @ticket - nav: @nav - isCustomer: @isRole('Customer') - ) + @html App.view('ticket_zoom') + ticket: @ticket + nav: @nav + isCustomer: @isRole('Customer') + scrollbarWidth: App.Utils.getScrollBarWidth() new App.TicketZoomOverviewNavigator( el: @$('.overview-navigator') diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index f2925bf6e..882a8a988 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -595,3 +595,18 @@ class App.Utils @icon: (name, className = '') -> "" + + @getScrollBarWidth: -> + $outer = $('
').css( + visibility: 'hidden' + width: 100 + overflow: 'scroll' + ).appendTo('body') + + widthWithScroll = $('
').css( + width: '100%' + ).appendTo($outer).outerWidth() + + $outer.remove() + + return 100 - widthWithScroll diff --git a/app/assets/javascripts/app/views/ticket_zoom.jst.eco b/app/assets/javascripts/app/views/ticket_zoom.jst.eco index 7fde02bb7..36ef86765 100644 --- a/app/assets/javascripts/app/views/ticket_zoom.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom.jst.eco @@ -1,5 +1,5 @@
-
+
<%- @C('ticket_hook') %> <%- @ticket.number %>
From c1fc41635db8e70b28b3b86f6619c6d547768413 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 19 Oct 2015 11:12:31 +0200 Subject: [PATCH 2/3] fix activity placeholder position --- .../app/views/widget/online_notification_content.jst.eco | 2 +- app/assets/stylesheets/zammad.scss | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/views/widget/online_notification_content.jst.eco b/app/assets/javascripts/app/views/widget/online_notification_content.jst.eco index be97dc26a..e342be1f8 100644 --- a/app/assets/javascripts/app/views/widget/online_notification_content.jst.eco +++ b/app/assets/javascripts/app/views/widget/online_notification_content.jst.eco @@ -20,7 +20,7 @@
<% end %> <% else: %> -
+
<%- @T("No unread Notifications for you. :) ") %>
<% end %> \ No newline at end of file diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index c7844c42e..66f407dbf 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -3384,6 +3384,11 @@ footer { margin: 0 -17px; } + .activity-placeholder { + @extend .u-textTruncate; + padding: 0 17px; + } + .activity-entry { display: flex; padding: 0 17px; From 35cdb8a358afa5bcb376130e53f98979310e05b9 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 19 Oct 2015 11:15:43 +0200 Subject: [PATCH 3/3] fix avatar crown icons --- app/assets/stylesheets/zammad.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 66f407dbf..74603a465 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -2880,7 +2880,7 @@ footer { } } - .icon { + .icon-logo { width: 100%; height: 100%; }