undo overview name trim
This commit is contained in:
parent
60c675262d
commit
bad17f7cd5
3 changed files with 4 additions and 11 deletions
|
@ -124,16 +124,10 @@ class Navbar extends App.Controller
|
||||||
if @bindId
|
if @bindId
|
||||||
App.OverviewIndexCollection.unbind(@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: =>
|
autoFoldTabs: =>
|
||||||
items = App.OverviewIndexCollection.get()
|
items = App.OverviewIndexCollection.get()
|
||||||
@html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' }")
|
@html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' }")
|
||||||
items: items
|
items: items
|
||||||
trimName: @trimName
|
|
||||||
|
|
||||||
while @clone.width() > @tabsHolder.width()
|
while @clone.width() > @tabsHolder.width()
|
||||||
@tabClone.not('.hide').last().addClass('hide')
|
@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 '' }")
|
@html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' else '' }")
|
||||||
items: data
|
items: data
|
||||||
trimName: @trimName
|
|
||||||
|
|
||||||
if @vertical
|
if @vertical
|
||||||
@autoFoldTabs()
|
@autoFoldTabs()
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% for item in @items: %>
|
<% for item in @items: %>
|
||||||
<li <% if item.active: %>class="active"<% end %>>
|
<li <% if item.active: %>class="active"<% end %>>
|
||||||
<a class="horizontal center" href="<%= item.target %>">
|
<a class="horizontal center" href="<%= item.target %>">
|
||||||
<span class="local u-textTruncate"><%- @T(@trimName(item.name)) %></span>
|
<span class="local u-textTruncate"><%- @T(item.name) %></span>
|
||||||
<span class="badge badge--text"><%= item.count %></span>
|
<span class="badge badge--text"><%= item.count %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
<% if @items: %>
|
<% if @items: %>
|
||||||
<% for item in @items: %>
|
<% for item in @items: %>
|
||||||
<a class="tab js-tab<%= ' active' if item.active %>" href="<%= item.target %>">
|
<a class="tab js-tab<%= ' active' if item.active %>" href="<%= item.target %>">
|
||||||
<span class="tab-name"><%- @T(@trimName(item.name)) %></span>
|
<span class="tab-name"><%- @T(item.name) %></span>
|
||||||
<span class="tab-badge"><%= item.count %></span>
|
<span class="tab-badge"><%= item.count %></span>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<ul class="dropdown dropdown--actions dropdown--wide dropdown-menu dropdown-menu-right js-dropdown" role="menu" aria-labelledby="userAction">
|
<ul class="dropdown dropdown--actions dropdown--wide dropdown-menu dropdown-menu-right js-dropdown" role="menu" aria-labelledby="userAction">
|
||||||
<% for item in @items: %>
|
<% for item in @items: %>
|
||||||
<li class="js-dropdownItem hide<%= ' active' if item.active %>" role="presentation" data-target="<%= item.target %>" role="menuitem" tabindex="-1">
|
<li class="js-dropdownItem hide<%= ' active' if item.active %>" role="presentation" data-target="<%= item.target %>" role="menuitem" tabindex="-1">
|
||||||
<span class="flex u-textTruncate"><%- @T(@trimName(item.name)) %></span>
|
<span class="flex u-textTruncate"><%- @T(item.name) %></span>
|
||||||
<span class="badge badge--text"><%= item.count %></span>
|
<span class="badge badge--text"><%= item.count %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<div class="tabs tabs--inline tabs--big u-invisible js-tabsClone">
|
<div class="tabs tabs--inline tabs--big u-invisible js-tabsClone">
|
||||||
<% for item in @items: %>
|
<% for item in @items: %>
|
||||||
<a class="tab js-tabClone<%= ' active' if item.active %>" href="<%= item.target %>">
|
<a class="tab js-tabClone<%= ' active' if item.active %>" href="<%= item.target %>">
|
||||||
<span class="tab-name"><%- @T(@trimName(item.name)) %></span>
|
<span class="tab-name"><%- @T(item.name) %></span>
|
||||||
<span class="tab-badge"><%= item.count %></span>
|
<span class="tab-badge"><%= item.count %></span>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue