').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 @@