Commit 255d797e8d8efd9fa8fd6d54f5d7aafcf02ffcb7
1 parent
f0bb186662
Exists in
master
and in
1 other branch
reemplazo alert por modal
Showing
3 changed files
with
10 additions
and
7 deletions
Show diff stats
gulpfile.js
... | ... | @@ -45,7 +45,7 @@ gulp.task('uglify', ['templates'], function() { |
45 | 45 | ]), |
46 | 46 | concat('foca-modal-cobranza.js'), |
47 | 47 | replace('src/views/', ''), |
48 | - replace("['ui.bootstrap', 'focaDirectivas', 'angular-ladda']", '[]'), | |
48 | + replace("['ui.bootstrap', 'focaDirectivas', 'focaFiltros, 'angular-ladda', 'focaModal']", '[]'), | |
49 | 49 | gulp.dest(paths.tmp), |
50 | 50 | rename('foca-modal-cobranza.min.js'), |
51 | 51 | uglify(), |
src/js/app.js
src/js/controller.js
... | ... | @@ -6,7 +6,9 @@ angular.module('focaModalCobranza') |
6 | 6 | '$scope', |
7 | 7 | '$uibModalInstance', |
8 | 8 | 'focaModalCobranzaService', |
9 | - function($timeout, $filter, $scope, $uibModalInstance, focaModalCobranzaService) { | |
9 | + 'focaModalService', | |
10 | + function($timeout, $filter, $scope, $uibModalInstance, | |
11 | + focaModalCobranzaService, focaModalService) { | |
10 | 12 | var fecha = new Date(); |
11 | 13 | $scope.fechaHasta = new Date(); |
12 | 14 | $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1)); |
... | ... | @@ -24,17 +26,17 @@ angular.module('focaModalCobranza') |
24 | 26 | //METODOS |
25 | 27 | $scope.busquedaPress = function(key) { |
26 | 28 | if (key === 13) { |
27 | - //TODO Validaciones con alertas de foca | |
28 | 29 | if(!$scope.fechaDesde) { |
29 | - alert('INGRESE FECHA DESDE'); | |
30 | + focaModalService.alert('INGRESE FECHA DESDE'); | |
30 | 31 | return; |
31 | 32 | } |
32 | 33 | if(!$scope.fechaHasta) { |
33 | - alert('INGRESE FECHA HASTA'); | |
34 | + focaModalService.alert('INGRESE FECHA HASTA'); | |
34 | 35 | return; |
35 | 36 | } |
36 | 37 | if($scope.fechaDesde > $scope.fechaHasta) { |
37 | - alert('La fecha desde no puede ser mayor a la fecha hasta'); | |
38 | + focaModalService | |
39 | + .alert('La fecha desde no puede ser mayor a la fecha hasta'); | |
38 | 40 | return; |
39 | 41 | } |
40 | 42 | $scope.searchLoading = true; |