From bad17f7cd57af986889b21affbff6bfafd335fe6 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 5 Nov 2015 15:06:37 +0100 Subject: [PATCH] undo overview name trim --- .../javascripts/app/controllers/ticket_overview.coffee | 7 ------- .../javascripts/app/views/agent_ticket_view/navbar.jst.eco | 2 +- .../app/views/agent_ticket_view/navbar_vertical.jst.eco | 6 +++--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 11d160659..457832ab6 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -124,16 +124,10 @@ class Navbar extends App.Controller if @bindId App.OverviewIndexCollection.unbind(@bindId) - trimName: (name) -> - start = if name.indexOf('All') > -1 then 4 else 0; - shortname = name.substr start, name.indexOf('Tickets') - 1 - start - return shortname.charAt(0).toUpperCase() + shortname.slice(1); - autoFoldTabs: => items = App.OverviewIndexCollection.get() @html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' }") items: items - trimName: @trimName while @clone.width() > @tabsHolder.width() @tabClone.not('.hide').last().addClass('hide') @@ -180,7 +174,6 @@ class Navbar extends App.Controller @html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' else '' }") items: data - trimName: @trimName if @vertical @autoFoldTabs() diff --git a/app/assets/javascripts/app/views/agent_ticket_view/navbar.jst.eco b/app/assets/javascripts/app/views/agent_ticket_view/navbar.jst.eco index 1f3ee8ab1..b49617456 100644 --- a/app/assets/javascripts/app/views/agent_ticket_view/navbar.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_view/navbar.jst.eco @@ -3,7 +3,7 @@ <% for item in @items: %>
  • class="active"<% end %>> - <%- @T(@trimName(item.name)) %> + <%- @T(item.name) %> <%= item.count %>
  • diff --git a/app/assets/javascripts/app/views/agent_ticket_view/navbar_vertical.jst.eco b/app/assets/javascripts/app/views/agent_ticket_view/navbar_vertical.jst.eco index 5719f12c9..e8bfa783c 100644 --- a/app/assets/javascripts/app/views/agent_ticket_view/navbar_vertical.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_view/navbar_vertical.jst.eco @@ -3,14 +3,14 @@ <% if @items: %> <% for item in @items: %> - <%- @T(@trimName(item.name)) %> + <%- @T(item.name) %> <%= item.count %> <% end %> @@ -28,7 +28,7 @@
    <% for item in @items: %> - <%- @T(@trimName(item.name)) %> + <%- @T(item.name) %> <%= item.count %> <% end %>