From 6f4bfc12e91053f655de71d193980eaf814c73d3 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 29 Sep 2015 23:18:50 +0200 Subject: [PATCH] Fixed shown icons in ticket list for merge. --- .../app/controllers/widget/ticket_list.coffee | 10 +++++----- app/assets/javascripts/app/models/ticket.coffee | 2 +- app/assets/javascripts/app/views/generic/table.jst.eco | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/app/controllers/widget/ticket_list.coffee b/app/assets/javascripts/app/controllers/widget/ticket_list.coffee index fd524888b..1e8dd5e2f 100644 --- a/app/assets/javascripts/app/controllers/widget/ticket_list.coffee +++ b/app/assets/javascripts/app/controllers/widget/ticket_list.coffee @@ -20,18 +20,18 @@ class App.TicketList extends App.Controller id: refObject.id value - callbackIconHeader = (header) -> + callbackIconHeader = (headers) -> attribute = name: 'icon' display: '' translation: false style: 'width: 28px' - header.unshift(0) - header[0] = attribute - header + headers.unshift(0) + headers[0] = attribute + headers callbackIcon = (value, object, attribute, header, refObject) -> value = ' ' - attribute.class = object.icon() + attribute.class = object.iconClass() attribute.link = '' attribute.title = App.i18n.translateInline( object.iconTitle() ) value diff --git a/app/assets/javascripts/app/models/ticket.coffee b/app/assets/javascripts/app/models/ticket.coffee index 6255534f3..03dbfc6b5 100644 --- a/app/assets/javascripts/app/models/ticket.coffee +++ b/app/assets/javascripts/app/models/ticket.coffee @@ -43,7 +43,7 @@ class App.Ticket extends App.Model state icon: -> - "task-state" + 'task-state' iconClass: -> @getState() diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index a269eff20..18c2f6ed4 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -16,7 +16,7 @@ <% for item in @header: %> class="<%= item.className %>"<% end %><% if item.style: %> style="<%= item.style %>"<% end %>> <%- @T( item.display ) %> - <%- @Icon('arrow-down', 'table-sort-arrow') %> + <% if item.sortOrderIcon: %><%- @Icon(item.sortOrderIcon[0], item.sortOrderIcon[1]) %><% end %> <% end %> <% if @destroy: %>