Commit e7ed83b0940a71aa04306e17e80e39e0605877f2

Authored by Jose Pinto
1 parent 014f467867
Exists in master

fuera espacio en blanco

Showing 1 changed file with 0 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
8 $scope.paginas = []; 7 $scope.paginas = [];
9 var botonesPorPagina = 10; 8 var botonesPorPagina = 10;
10 if(APP === 'distribuidor' || APP === 'transportista') { 9 if(APP === 'distribuidor' || APP === 'transportista') {
11 botonesPorPagina = 3; 10 botonesPorPagina = 3;
12 } 11 }
13 for(var i = 0; i < botones.data.length; i += botonesPorPagina){ 12 for(var i = 0; i < botones.data.length; i += botonesPorPagina){
14 $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); 13 $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina));
15 } 14 }
16 15
17 focaBotoneraLateralService.showGuardar(false); 16 focaBotoneraLateralService.showGuardar(false);
18 focaBotoneraLateralService.showPausar(false); 17 focaBotoneraLateralService.showPausar(false);
19 focaBotoneraLateralService.showSalir(false); 18 focaBotoneraLateralService.showSalir(false);
20 19
21 $scope.irA = function(accion) { 20 $scope.irA = function(accion) {
22 $location.path(accion); 21 $location.path(accion);
23 }; 22 };
24 23
25 $scope.logout = function() { 24 $scope.logout = function() {
26 $location.path('/logout'); 25 $location.path('/logout');
27 }; 26 };
28 27
29 $scope.showTerminal = function() { 28 $scope.showTerminal = function() {
30 var key = $localStorage.terminalKey; 29 var key = $localStorage.terminalKey;
31 focaModalService.alert('SU TERMINAL ES: ' + key); 30 focaModalService.alert('SU TERMINAL ES: ' + key);
32 }; 31 };
33 } 32 }
34 ]); 33 ]);
35 34