From fbbffbbb7bf6441aa757f5ceab86a88f847eee82 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 10 Nov 2014 13:53:01 +0100 Subject: [PATCH] Improved show/hide behaviour. --- .../app/controllers/widget/ticket_stats.js.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee b/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee index aece7cfe3..967164a57 100644 --- a/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee @@ -9,7 +9,7 @@ class App.TicketStats extends App.Controller # subscribe and reload data / fetch new data if triggered if @user @subscribeId = App.User.full( @user.id, @load, false, true ) - if @organization + else if @organization @subscribeId = App.Organization.full( @organization.id, @load, false, true ) release: => @@ -32,9 +32,7 @@ class App.TicketStats extends App.Controller data: data processData: true success: (data) => - # load assets App.Collection.loadAssets( data.assets ) - @render(data) ) @@ -152,7 +150,7 @@ class TicketStatsFrequency extends App.Controller for item in @ticket_volume_by_year item.created_in_percent = 100 / max * item.created - item.closed_in_percent = 100 / max * item.closed + item.closed_in_percent = 100 / max * item.closed @html App.view('widget/ticket_stats_frequency')( ticket_volume_by_year: @ticket_volume_by_year.reverse()