From de2a852c64beddf04791fcab5de0a75d444b1b73 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Sun, 7 May 2017 15:18:09 +0200 Subject: [PATCH] fixes #184: close button of quick ticket --- angular_app/js/controllers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/angular_app/js/controllers.js b/angular_app/js/controllers.js index a58e65f..e26018c 100644 --- a/angular_app/js/controllers.js +++ b/angular_app/js/controllers.js @@ -595,9 +595,9 @@ eventManControllers.controller('EventTicketsCtrl', ['$scope', '$state', 'Event', $state.go('event.ticket.edit', {id: $scope.event._id, ticket_id: ret_ticket._id}); } else { $scope.query = ''; - if ($scope.$close) { + if ($scope.modalInstance) { // Close the Quick ticket modal. - $scope.$close(); + $scope.modalInstance.dismiss('no reason'); } var msg = $scope.buildTicketLabel(ret_ticket); msg += ' successfully added to event ' + $scope.event.title; @@ -651,8 +651,8 @@ eventManControllers.controller('EventTicketsCtrl', ['$scope', '$state', 'Event', $scope.cancelForm = function() { if (!$state.is('event.tickets')) { $state.go('events'); - } else if ($scope.$close) { - $scope.$close(); + } else if ($scope.modalInstance) { + $scope.modalInstance.dismiss('no reason'); } };