Commit 5046fde412e583f7c4658e045a0b4ecf7a487f17
1 parent
2f621a2c3d
Exists in
master
and in
1 other branch
texto boton salir
Showing
1 changed file
with
4 additions
and
4 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,14 +56,14 @@ 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 | + $window.history.back(); | |
67 | 67 | } |
68 | 68 | }); |
69 | 69 | } else { |
... | ... | @@ -74,7 +74,7 @@ angular.module('focaAbmVehiculo') |
74 | 74 | $scope.guardar = function() { |
75 | 75 | |
76 | 76 | if ($scope.formCisterna.$pristine) { |
77 | - $scope.cancelar(); | |
77 | + $scope.salir(); | |
78 | 78 | return; |
79 | 79 | } else if (!$scope.cisterna.codigo) { |
80 | 80 | focaModalService.alert('Ingrese codigo de cisterna'); |