Commit 38a34a953d88dd5dd0a06b08b72b67ce35ce4e92
1 parent
5a7851ca0d
Exists in
master
and in
1 other branch
correciones en identacion
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/js/controller.js
1 | angular.module('focaBotoneraPrincipal') | 1 | angular.module('focaBotoneraPrincipal') |
2 | .controller('focaBotoneraPrincipalController', [ | 2 | .controller('focaBotoneraPrincipalController', [ |
3 | '$scope', '$rootScope', '$timeout', '$location', '$localStorage', | 3 | '$scope', '$rootScope', '$timeout', '$location', '$localStorage', |
4 | 'botones', 'focaModalService', 'APP', 'focaBotoneraLateralService', | 4 | 'botones', 'focaModalService', 'APP', 'focaBotoneraLateralService', |
5 | function ($scope, $rootScope, $timeout, $location, $localStorage, | 5 | function ($scope, $rootScope, $timeout, $location, $localStorage, |
6 | botones, focaModalService, APP, focaBotoneraLateralService) { | 6 | botones, focaModalService, APP, focaBotoneraLateralService) { |
7 | $scope.paginas = []; | 7 | $scope.paginas = []; |
8 | var botonesPorPagina = 10; | 8 | var botonesPorPagina = 10; |
9 | if (APP === 'distribuidor' || APP === 'transportista') { | 9 | if (APP === 'distribuidor' || APP === 'transportista') { |
10 | botonesPorPagina = 3; | 10 | botonesPorPagina = 3; |
11 | } | 11 | } |
12 | for (var i = 0; i < botones.data.length; i += botonesPorPagina) { | 12 | for (var i = 0; i < botones.data.length; i += botonesPorPagina) { |
13 | $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); | 13 | $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); |
14 | } | 14 | } |
15 | 15 | ||
16 | focaBotoneraLateralService.showGuardar(false); | 16 | focaBotoneraLateralService.showGuardar(false); |
17 | focaBotoneraLateralService.showPausar(false); | 17 | focaBotoneraLateralService.showPausar(false); |
18 | focaBotoneraLateralService.showSalir(false); | 18 | focaBotoneraLateralService.showSalir(false); |
19 | focaBotoneraLateralService.showCancelar(false); | 19 | focaBotoneraLateralService.showCancelar(false); |
20 | 20 | ||
21 | $scope.rutas = $localStorage.rutas? JSON.parse($localStorage.rutas) : []; | 21 | $scope.rutas = $localStorage.rutas ? JSON.parse($localStorage.rutas) : []; |
22 | 22 | ||
23 | $scope.irA = function (accion) { | 23 | $scope.irA = function (accion) { |
24 | $location.path(accion); | 24 | $location.path(accion); |
25 | }; | 25 | }; |
26 | 26 | ||
27 | $scope.logout = function () { | 27 | $scope.logout = function () { |
28 | $location.path('/logout'); | 28 | $location.path('/logout'); |
29 | }; | 29 | }; |
30 | 30 | ||
31 | $scope.showTerminal = function () { | 31 | $scope.showTerminal = function () { |
32 | var key = $localStorage.terminalKey; | 32 | var key = $localStorage.terminalKey; |
33 | focaModalService.info('Su terminal es: ' + key); | 33 | focaModalService.info('Su terminal es: ' + key); |
34 | }; | 34 | }; |
35 | 35 | ||
36 | } | 36 | } |
37 | ]); | 37 | ]); |
38 | 38 |