Commit 0470d753b690bafe03523408b9edff28a91125fa
1 parent
2711adb43a
Exists in
master
and in
1 other branch
Cambio en el boton " Salir "
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
src/js/controllerCisterna.js
... | ... | @@ -26,7 +26,7 @@ angular.module('focaAbmVehiculo') |
26 | 26 | focaBotoneraLateralService.showPausar(true); |
27 | 27 | focaBotoneraLateralService.showCancelar(false); |
28 | 28 | focaBotoneraLateralService.showGuardar(true, $scope.guardar); |
29 | - focaBotoneraLateralService.addCustomButton('Cancelar', $scope.cancelar); | |
29 | + focaBotoneraLateralService.addCustomButton('Salir', $scope.salir); | |
30 | 30 | }); |
31 | 31 | |
32 | 32 | if ($routeParams.idx !== -1) { |
... | ... | @@ -56,16 +56,18 @@ angular.module('focaAbmVehiculo') |
56 | 56 | }); |
57 | 57 | }); |
58 | 58 | |
59 | - $scope.cancelar = function() { | |
59 | + $scope.salir = function() { | |
60 | 60 | |
61 | 61 | if (!$scope.formCisterna.$pristine) { |
62 | 62 | focaModalService.confirm( |
63 | 63 | '¿Está seguro de que desea salir? Se perderán todos los datos cargados.' |
64 | 64 | ).then(function(data) { |
65 | 65 | if (data) { |
66 | - $location.path('/vehiculo'); | |
66 | + $location.path('/vehiculo/'); | |
67 | 67 | } |
68 | 68 | }); |
69 | + } else { | |
70 | + $location.path('/vehiculo/'); | |
69 | 71 | } |
70 | 72 | }; |
71 | 73 |