fix #1745 prevent firefox click after drag

stable
Juanfran 2014-12-11 08:33:56 +01:00
parent 19a6043350
commit e1d2388baa
1 changed files with 16 additions and 3 deletions

View File

@ -104,7 +104,11 @@ BacklogSortableDirective = ($repo, $rs, $rootscope, $tgConfirm) ->
item = $(item)
itemUs = item.scope().us
# HACK: setTimeout prevents that firefox click
# event fires just after drag ends
setTimeout ( =>
item.find('a').removeClass('noclick')
), 300
return itemUs
@ -137,6 +141,7 @@ BacklogEmptySortableDirective = ($repo, $rs, $rootscope) ->
deleteElement(ui.item)
$scope.$emit("sprint:us:move", [itemUs], itemIndex, null)
ui.item.find('a').removeClass('noclick')
$scope.$on "$destroy", ->
@ -168,7 +173,6 @@ SprintSortableDirective = ($repo, $rs, $rootscope) ->
itemUs = item.scope().us
deleteElement(item)
item.find('a').removeClass('noclick')
return itemUs
@ -181,9 +185,18 @@ SprintSortableDirective = ($repo, $rs, $rootscope) ->
itemUs = ui.item.scope().us
itemIndex = ui.item.index()
# HACK: setTimeout prevents that firefox click
# event fires just after drag ends
setTimeout ( =>
ui.item.find('a').removeClass('noclick')
), 300
$scope.$emit("sprint:us:move", [itemUs], itemIndex, $scope.sprint.id)
$el.on "sortstart", (event, ui) ->
ui.item.find('a').addClass('noclick')
return {link:link}