[backport] Fixing reordering issue when filters enabled, error message was shown but order was updated anyway

stable
Alejandro Alonso 2015-05-05 07:34:46 +02:00 committed by Juanfran
parent 475c7e27e9
commit 5aa07429f2
1 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,8 @@ BacklogSortableDirective = ($repo, $rs, $rootscope, $tgConfirm) ->
return return
filterError = -> filterError = ->
$tgConfirm.notify("error", "You can't drop on backlog when filters are open") #TODO: i18n text = $translate.instant("BACKLOG.SORTABLE_FILTER_ERROR")
$tgConfirm.notify("error", text)
$el.sortable({ $el.sortable({
items: ".us-item-row", items: ".us-item-row",
@ -99,6 +100,9 @@ BacklogSortableDirective = ($repo, $rs, $rootscope, $tgConfirm) ->
if $(ui.items[0]).parent().length == 0 if $(ui.items[0]).parent().length == 0
return return
if $el.hasClass("active-filters")
return
items = _.sortBy ui.items, (item) -> items = _.sortBy ui.items, (item) ->
return $(item).index() return $(item).index()