By default the issue list is sortered by created date: fix the ordering arrow

stable
David Barragán Merino 2014-08-17 16:04:25 +02:00
parent 25c3a56b56
commit d16e7c9da8
1 changed files with 5 additions and 4 deletions

View File

@ -372,10 +372,11 @@ IssuesDirective = ($log, $location) ->
linkOrdering = ($scope, $el, $attrs, $ctrl) -> linkOrdering = ($scope, $el, $attrs, $ctrl) ->
# Draw the arrow the first time # Draw the arrow the first time
currentOrder = $ctrl.getUrlFilter("orderBy") or "subject" currentOrder = $ctrl.getUrlFilter("orderBy")
icon = if startswith(currentOrder, "-") then "icon-caret-up" else "icon-caret-down" if currentOrder
colHeadElement = $el.find(".row.title > div[data-fieldname='#{trim(currentOrder, "-")}']") icon = if startswith(currentOrder, "-") then "icon-caret-up" else "icon-caret-down"
colHeadElement.html("#{colHeadElement.html()}<span class='icon #{icon}'></span>") colHeadElement = $el.find(".row.title > div[data-fieldname='#{trim(currentOrder, "-")}']")
colHeadElement.html("#{colHeadElement.html()}<span class='icon #{icon}'></span>")
$el.on "click", ".row.title > div", (event) -> $el.on "click", ".row.title > div", (event) ->
target = angular.element(event.currentTarget) target = angular.element(event.currentTarget)