Blur the resend button after response

This commit is contained in:
Shane Kilkelly 2016-08-12 11:25:03 +01:00
parent a7bc8bffe0
commit d547bff4e5
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,7 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
.col-xs-8 {{ invite.email }} 
div.small
| #{translate("invite_not_accepted")}. 
a(href="#", ng-click="resendInvite(invite)") #{translate("resend")}
a(href="#", ng-click="resendInvite(invite, $event)") #{translate("resend")}
.col-xs-3.text-left
// todo: get invite privileges
span(ng-show="invite.privileges == 'readAndWrite'") #{translate("can_edit")}

View file

@ -143,16 +143,18 @@ define [
$scope.state.inflight = false
$scope.state.error = "Sorry, something went wrong :("
$scope.resendInvite = (invite) ->
$scope.resendInvite = (invite, event) ->
$scope.state.error = null
$scope.state.inflight = true
projectInvites
.resendInvite(invite._id)
.success () ->
$scope.state.inflight = false
event.target.blur()
.error () ->
$scope.state.inflight = false
$scope.state.error = "Sorry, something went wrong resending the invite :("
event.target.blur()
$scope.openMakePublicModal = () ->
$modal.open {