Commit 6fda5af79c5ee9b61fa1f4801f44c053f49b5e7b
1 parent
faaeecf95f
Exists in
master
and in
2 other branches
arreglos de espacios
Showing
2 changed files
with
27 additions
and
29 deletions
Show diff stats
src/js/controller.js
1 | 1 | angular.module('focaModalRemito') |
2 | - .controller('focaModalRemitoController', | |
2 | + .controller('focaModalRemitoController', | |
3 | 3 | [ |
4 | 4 | '$timeout', |
5 | 5 | '$filter', |
... | ... | @@ -8,7 +8,7 @@ angular.module('focaModalRemito') |
8 | 8 | 'focaModalRemitoService', |
9 | 9 | 'usadoPor', |
10 | 10 | 'focaModalService', |
11 | - function($timeout, $filter, $scope, $uibModalInstance, | |
11 | + function ($timeout, $filter, $scope, $uibModalInstance, | |
12 | 12 | focaModalRemitoService, usadoPor, focaModalService |
13 | 13 | ) { |
14 | 14 | var fecha = new Date(); |
... | ... | @@ -27,21 +27,21 @@ angular.module('focaModalRemito') |
27 | 27 | $scope.filteredRemitos = []; |
28 | 28 | $scope.currentPageRemitos = []; |
29 | 29 | $scope.selectedRemito = -1; |
30 | - | |
30 | + | |
31 | 31 | //METODOS |
32 | - $scope.busquedaPress = function(key) { | |
32 | + $scope.busquedaPress = function (key) { | |
33 | 33 | if (key === 13) { |
34 | - if(!$scope.fechaDesde) { | |
34 | + if (!$scope.fechaDesde) { | |
35 | 35 | focaModalService |
36 | 36 | .alert('INGRESE FECHA DESDE'); |
37 | 37 | return; |
38 | 38 | } |
39 | - if(!$scope.fechaHasta) { | |
39 | + if (!$scope.fechaHasta) { | |
40 | 40 | focaModalService |
41 | 41 | .alert('INGRESE FECHA HASTA'); |
42 | 42 | return; |
43 | 43 | } |
44 | - if($scope.fechaDesde > $scope.fechaHasta) { | |
44 | + if ($scope.fechaDesde > $scope.fechaHasta) { | |
45 | 45 | focaModalService |
46 | 46 | .alert('La fecha desde no puede ser mayor a la fecha hasta'); |
47 | 47 | return; |
... | ... | @@ -54,7 +54,7 @@ angular.module('focaModalRemito') |
54 | 54 | .then(llenarDatos); |
55 | 55 | } |
56 | 56 | }; |
57 | - | |
57 | + | |
58 | 58 | function llenarDatos(res) { |
59 | 59 | $scope.remitos = []; |
60 | 60 | $scope.filteredRemitos = []; |
... | ... | @@ -67,15 +67,15 @@ angular.module('focaModalRemito') |
67 | 67 | primera(); |
68 | 68 | } |
69 | 69 | |
70 | - $scope.searchRemito = function(pressed) { | |
71 | - if($scope.remitos.length > 0) { | |
70 | + $scope.searchRemito = function (pressed) { | |
71 | + if ($scope.remitos.length > 0) { | |
72 | 72 | $scope.filteredRemitos = $filter('filter')( |
73 | 73 | $scope.remitos, |
74 | - {numeroRemito: $scope.filtersRemito} | |
74 | + { numeroRemito: $scope.filtersRemito } | |
75 | 75 | ); |
76 | 76 | |
77 | - if(pressed && $scope.filteredRemitos.length === 0){ | |
78 | - $timeout(function() { | |
77 | + if (pressed && $scope.filteredRemitos.length === 0) { | |
78 | + $timeout(function () { | |
79 | 79 | angular.element('#search')[0].focus(); |
80 | 80 | $scope.filtersRemito = ''; |
81 | 81 | }); |
... | ... | @@ -89,15 +89,15 @@ angular.module('focaModalRemito') |
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | - $scope.searchCliente = function(pressed) { | |
93 | - if($scope.remitos.length > 0) { | |
92 | + $scope.searchCliente = function (pressed) { | |
93 | + if ($scope.remitos.length > 0) { | |
94 | 94 | $scope.filteredRemitos = $filter('filter')( |
95 | 95 | $scope.remitos, |
96 | - {nombreCliente: $scope.filtersCliente} | |
96 | + { nombreCliente: $scope.filtersCliente } | |
97 | 97 | ); |
98 | 98 | |
99 | - if(pressed && $scope.filteredRemitos.length === 0){ | |
100 | - $timeout(function() { | |
99 | + if (pressed && $scope.filteredRemitos.length === 0) { | |
100 | + $timeout(function () { | |
101 | 101 | angular.element('#search')[0].focus(); |
102 | 102 | $scope.filtersCliente = ''; |
103 | 103 | }); |
... | ... | @@ -111,12 +111,12 @@ angular.module('focaModalRemito') |
111 | 111 | } |
112 | 112 | }; |
113 | 113 | |
114 | - $scope.resetPage = function() { | |
114 | + $scope.resetPage = function () { | |
115 | 115 | $scope.currentPage = 1; |
116 | 116 | $scope.selectPage(1); |
117 | 117 | }; |
118 | 118 | |
119 | - $scope.selectPage = function(page) { | |
119 | + $scope.selectPage = function (page) { | |
120 | 120 | var start = (page - 1) * $scope.numPerPage; |
121 | 121 | var end = start + $scope.numPerPage; |
122 | 122 | $scope.paginas = []; |
... | ... | @@ -125,21 +125,21 @@ angular.module('focaModalRemito') |
125 | 125 | $scope.currentPage = page; |
126 | 126 | }; |
127 | 127 | |
128 | - $scope.select = function(remito) { | |
128 | + $scope.select = function (remito) { | |
129 | 129 | $uibModalInstance.close(remito); |
130 | 130 | }; |
131 | 131 | |
132 | - $scope.cancel = function() { | |
132 | + $scope.cancel = function () { | |
133 | 133 | $uibModalInstance.dismiss('cancel'); |
134 | 134 | }; |
135 | 135 | |
136 | - $scope.busquedaDown = function(key) { | |
136 | + $scope.busquedaDown = function (key) { | |
137 | 137 | if (key === 40) { |
138 | 138 | primera(key); |
139 | 139 | } |
140 | 140 | }; |
141 | 141 | |
142 | - $scope.itemRemito = function(key) { | |
142 | + $scope.itemRemito = function (key) { | |
143 | 143 | if (key === 38) { |
144 | 144 | anterior(key); |
145 | 145 | } |
... | ... | @@ -162,7 +162,7 @@ angular.module('focaModalRemito') |
162 | 162 | paginas.push(paginaActual); |
163 | 163 | |
164 | 164 | if (paginaActual - 1 > 1) { |
165 | - | |
165 | + | |
166 | 166 | paginas.unshift(paginaActual - 1); |
167 | 167 | if (paginaActual - 2 > 1) { |
168 | 168 | paginas.unshift(paginaActual - 2); |
... | ... | @@ -200,10 +200,10 @@ angular.module('focaModalRemito') |
200 | 200 | } |
201 | 201 | |
202 | 202 | function siguiente() { |
203 | - if ($scope.selectedRemito < $scope.currentPageRemitos.length - 1 ) { | |
203 | + if ($scope.selectedRemito < $scope.currentPageRemitos.length - 1) { | |
204 | 204 | $scope.selectedRemito++; |
205 | 205 | } else { |
206 | - avanzarPagina(); | |
206 | + avanzarPagina(); | |
207 | 207 | } |
208 | 208 | } |
209 | 209 |
src/views/foca-modal-remito.html
... | ... | @@ -42,7 +42,6 @@ |
42 | 42 | id="search" |
43 | 43 | teclado-virtual |
44 | 44 | > |
45 | - | |
46 | 45 | <button |
47 | 46 | ng-show="filtersRemito.length >= 1" |
48 | 47 | type="button" |
... | ... | @@ -62,7 +61,6 @@ |
62 | 61 | <i class="fa fa-search" aria-hidden="true"></i> |
63 | 62 | </button> |
64 | 63 | </div> |
65 | - | |
66 | 64 | </div> |
67 | 65 | </div> |
68 | 66 | </div> |