Commit 3ddc5cace97a5757b32e3aad940f0955fbec25ce
1 parent
6a56e716af
Exists in
master
Agregado foca modal forma pago.
Showing
3 changed files
with
14 additions
and
11 deletions
Show diff stats
index.html
| ... | ... | @@ -100,6 +100,7 @@ |
| 100 | 100 | <script src="./node_modules/foca-seguimiento/dist/foca-seguimiento.min.js"></script> |
| 101 | 101 | <script src="./node_modules/foca-teclado/dist/foca-teclado.min.js"></script> |
| 102 | 102 | <script src="./node_modules/foca-modal-descarga/dist/foca-modal-descarga.min.js"></script> |
| 103 | + <script src="./node_modules/foca-modal-forma-pago/dist/foca-modal-forma-pago.min.js"></script> | |
| 103 | 104 | <script src="./src/js/app.js"></script> |
| 104 | 105 | <script src="./src/js/controller.js"></script> |
| 105 | 106 | <script src="./src/etc/develop.js"></script> |
src/js/app.js
src/js/controller.js
| ... | ... | @@ -4,14 +4,15 @@ angular.module('appWrapperDemo') |
| 4 | 4 | '$rootScope', |
| 5 | 5 | '$timeout', |
| 6 | 6 | '$uibModalStack', |
| 7 | - function($scope, $rootScope, $timeout, $uibModalStack) { | |
| 7 | + '$uibModal', | |
| 8 | + function ($scope, $rootScope, $timeout, $uibModalStack, $uibModal) { | |
| 8 | 9 | $scope.usarTeclado = false; |
| 9 | 10 | $rootScope.$broadcast('usarTeclado', false); |
| 10 | 11 | $scope.mostrarTeclado = false; |
| 11 | 12 | //Envía broadcast para avisar que el teclado está en funcionamiento o no |
| 12 | 13 | //para su uso cambiar ng-click del boton por esta función |
| 13 | - $scope.cambioUsoTeclado = function() { | |
| 14 | - if($scope.usarTeclado) { | |
| 14 | + $scope.cambioUsoTeclado = function () { | |
| 15 | + if ($scope.usarTeclado) { | |
| 15 | 16 | $scope.usarTeclado = false; |
| 16 | 17 | $rootScope.$broadcast('usarTeclado', false); |
| 17 | 18 | return; |
| ... | ... | @@ -20,27 +21,27 @@ angular.module('appWrapperDemo') |
| 20 | 21 | $rootScope.$broadcast('usarTeclado', true); |
| 21 | 22 | }; |
| 22 | 23 | |
| 23 | - $rootScope.$on('focus', function() { | |
| 24 | - if(!$scope.usarTeclado) { | |
| 24 | + $rootScope.$on('focus', function () { | |
| 25 | + if (!$scope.usarTeclado) { | |
| 25 | 26 | return; |
| 26 | 27 | } |
| 27 | 28 | $scope.mostrarTeclado = true; |
| 28 | 29 | $timeout.cancel($scope.timeout); |
| 29 | - if(!$scope.$$phase) { | |
| 30 | + if (!$scope.$$phase) { | |
| 30 | 31 | $scope.$apply(); |
| 31 | 32 | } |
| 32 | 33 | }); |
| 33 | - $rootScope.$on('blur', function() { | |
| 34 | - $scope.timeout = $timeout(function() { | |
| 34 | + $rootScope.$on('blur', function () { | |
| 35 | + $scope.timeout = $timeout(function () { | |
| 35 | 36 | $scope.mostrarTeclado = false; |
| 36 | - if(!$scope.$$phase) { | |
| 37 | + if (!$scope.$$phase) { | |
| 37 | 38 | $scope.$apply(); |
| 38 | 39 | } |
| 39 | 40 | }, 150); |
| 40 | 41 | }); |
| 41 | 42 | |
| 42 | 43 | // Close all modals |
| 43 | - $rootScope.$on('$locationChangeSuccess', function() { | |
| 44 | + $rootScope.$on('$locationChangeSuccess', function () { | |
| 44 | 45 | $uibModalStack.dismissAll('close'); |
| 45 | 46 | }); |
| 46 | 47 | } |