Merge branch 'develop' of github.com:martini/zammad into develop

This commit is contained in:
Martin Edenhofer 2015-10-19 11:16:10 +02:00
commit 1d39bb0ea3
6 changed files with 29 additions and 29 deletions

View file

@ -619,7 +619,7 @@ class App.Sidebar extends App.Controller
render: => render: =>
@html App.view('generic/sidebar_tabs') @html App.view('generic/sidebar_tabs')
items: @items items: @items
scrollbarWidth: @getScrollBarWidth() scrollbarWidth: App.Utils.getScrollBarWidth()
# init content callback # init content callback
for item in @items for item in @items
@ -635,21 +635,6 @@ class App.Sidebar extends App.Controller
type: 'small' type: 'small'
) )
getScrollBarWidth: ->
$outer = $('<div>').css(
visibility: 'hidden'
width: 100
overflow: 'scroll'
).appendTo('body')
widthWithScroll = $('<div>').css(
width: '100%'
).appendTo($outer).outerWidth()
$outer.remove()
return 100 - widthWithScroll
toggleDropdown: (e) -> toggleDropdown: (e) ->
e.stopPropagation() e.stopPropagation()
$(e.currentTarget).next('.js-actions').find('.dropdown-toggle').dropdown('toggle') $(e.currentTarget).next('.js-actions').find('.dropdown-toggle').dropdown('toggle')

View file

@ -271,17 +271,12 @@ class App.TicketZoom extends App.Controller
if not mainScrollHeigth > mainHeigth + headerHeight if not mainScrollHeigth > mainHeigth + headerHeight
@scrollPageHeader.css('transform', "translateY(#{-headerHeight}px)") @scrollPageHeader.css('transform', "translateY(#{-headerHeight}px)")
if scroll > headerHeight if scroll > headerHeight
scroll = headerHeight scroll = headerHeight
if scroll is @scrollHeaderPos if scroll is @scrollHeaderPos
return return
#marginTop: 0 .. headerHeight
@main.css('margin-top', scroll)
# translateY: 0 .. -headerHeight
@ticketZoom.css('transform', "translateY(-#{scroll}px)")
# translateY: headerHeight .. 0 # translateY: headerHeight .. 0
@scrollPageHeader.css('transform', "translateY(#{scroll - headerHeight}px)") @scrollPageHeader.css('transform', "translateY(#{scroll - headerHeight}px)")
@ -295,11 +290,11 @@ class App.TicketZoom extends App.Controller
if !@renderDone if !@renderDone
@renderDone = true @renderDone = true
@html App.view('ticket_zoom')( @html App.view('ticket_zoom')
ticket: @ticket ticket: @ticket
nav: @nav nav: @nav
isCustomer: @isRole('Customer') isCustomer: @isRole('Customer')
) scrollbarWidth: App.Utils.getScrollBarWidth()
new App.TicketZoomOverviewNavigator( new App.TicketZoomOverviewNavigator(
el: @$('.overview-navigator') el: @$('.overview-navigator')

View file

@ -595,3 +595,18 @@ class App.Utils
@icon: (name, className = '') -> @icon: (name, className = '') ->
"<svg class=\"icon icon-#{name} #{className}\"><use xlink:href=\"#icon-#{name}\" /></svg>" "<svg class=\"icon icon-#{name} #{className}\"><use xlink:href=\"#icon-#{name}\" /></svg>"
@getScrollBarWidth: ->
$outer = $('<div>').css(
visibility: 'hidden'
width: 100
overflow: 'scroll'
).appendTo('body')
widthWithScroll = $('<div>').css(
width: '100%'
).appendTo($outer).outerWidth()
$outer.remove()
return 100 - widthWithScroll

View file

@ -1,5 +1,5 @@
<div class="tabsSidebar-holder"> <div class="tabsSidebar-holder">
<div class="scrollPageHeader tabsSidebar-sidebarSpacer"> <div class="scrollPageHeader tabsSidebar-sidebarSpacer" style="right: <%- @scrollbarWidth %>px">
<small><%- @C('ticket_hook') %> <span class="ticket-number"><%- @ticket.number %></span></small> <small><%- @C('ticket_hook') %> <span class="ticket-number"><%- @ticket.number %></span></small>
<div class="ticket-title"></div> <div class="ticket-title"></div>
<div class="highlighter"></div> <div class="highlighter"></div>

View file

@ -20,7 +20,7 @@
</div> </div>
<% end %> <% end %>
<% else: %> <% else: %>
<div class="u-textTruncate"> <div class="activity-placeholder">
<%- @T("No unread Notifications for you. :) ") %> <%- @T("No unread Notifications for you. :) ") %>
</div> </div>
<% end %> <% end %>

View file

@ -2880,7 +2880,7 @@ footer {
} }
} }
.icon { .icon-logo {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
@ -3384,6 +3384,11 @@ footer {
margin: 0 -17px; margin: 0 -17px;
} }
.activity-placeholder {
@extend .u-textTruncate;
padding: 0 17px;
}
.activity-entry { .activity-entry {
display: flex; display: flex;
padding: 0 17px; padding: 0 17px;