Improved show/hide behaviour.

This commit is contained in:
Martin Edenhofer 2014-11-10 13:52:21 +01:00
parent 88ef274c63
commit 3a4d4f9375
2 changed files with 2 additions and 6 deletions

View file

@ -59,9 +59,6 @@ class App.TicketStats extends App.Controller
org_total: data.org_tickets_open_ids.length + data.org_tickets_closed_ids.length
)
if @organization
@showOrgTab()
limit = 5
new TicketStatsList(
el: @$('.js-user-open-tickets')
@ -158,6 +155,5 @@ class TicketStatsFrequency extends App.Controller
item.closed_in_percent = 100 / max * item.closed
@html App.view('widget/ticket_stats_frequency')(
user: @user
ticket_volume_by_year: @ticket_volume_by_year.reverse()
)

View file

@ -5,7 +5,7 @@
</div>
<% end %>
<div class="js-user">
<div class="js-user <% if !@user && @organization: %>hide<% end %>">
<div class="userZoom-ticketLists horizontal">
<div class="userZoom-ticketList js-user-open-tickets"></div>
<div class="userZoom-ticketList js-user-closed-tickets"></div>
@ -14,7 +14,7 @@
<div class="frequency stat-widget vertical js-user-frequency"></div>
</div>
<div class="js-org hide">
<div class="js-org <% if @user: %>hide<% end %>">
<div class="userZoom-ticketLists horizontal">
<div class="userZoom-ticketList js-org-open-tickets"></div>
<div class="userZoom-ticketList js-org-closed-tickets"></div>