Commit f0d1f7fe0bbdb4a6dcfe9c22005a7a94425bed17
Exists in
master
and in
2 other branches
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-botonera-principal!1
Showing
3 changed files
Show diff stats
gulpfile.js
... | ... | @@ -17,7 +17,7 @@ var paths = { |
17 | 17 | dist: 'dist/' |
18 | 18 | }; |
19 | 19 | |
20 | -gulp.task('clean', function(){ | |
20 | +gulp.task('clean', function() { | |
21 | 21 | return gulp.src(['tmp', 'dist'], {read: false}) |
22 | 22 | .pipe(clean()); |
23 | 23 | }); |
... | ... | @@ -79,3 +79,7 @@ gulp.task('clean-post-install', function(){ |
79 | 79 | }); |
80 | 80 | |
81 | 81 | gulp.task('default', ['webserver']); |
82 | + | |
83 | +gulp.task('watch', function() { | |
84 | + gulp.watch([paths.srcJS, paths.srcViews], ['uglify']) | |
85 | +}); |
src/js/controller.js
... | ... | @@ -2,6 +2,7 @@ angular.module('focaBotoneraPrincipal') |
2 | 2 | .controller('focaBotoneraPrincipalController', [ |
3 | 3 | '$scope', '$location', |
4 | 4 | function($scope, $location) { |
5 | + // TODO: Tomar estos datos desde el servicio | |
5 | 6 | $scope.botones = [ |
6 | 7 | { |
7 | 8 | texto: 'Abrir Turno', |
... | ... | @@ -17,11 +18,104 @@ angular.module('focaBotoneraPrincipal') |
17 | 18 | texto: 'Nota Pedido', |
18 | 19 | clase: 'botonera-principal-nota-pedido', |
19 | 20 | accion: '/venta-nota-pedido/crear' |
21 | + }, | |
22 | + { | |
23 | + texto: '', | |
24 | + clase: 'botonera-principal-vacio', | |
25 | + accion: '/' | |
26 | + }, | |
27 | + { | |
28 | + texto: '', | |
29 | + clase: 'botonera-principal-vacio', | |
30 | + accion: '/' | |
31 | + }, | |
32 | + { | |
33 | + texto: '', | |
34 | + clase: 'botonera-principal-vacio', | |
35 | + accion: '/' | |
36 | + }, | |
37 | + { | |
38 | + texto: '', | |
39 | + clase: 'botonera-principal-vacio', | |
40 | + accion: '/' | |
41 | + }, | |
42 | + { | |
43 | + texto: '', | |
44 | + clase: 'botonera-principal-vacio', | |
45 | + accion: '/' | |
46 | + }, | |
47 | + { | |
48 | + texto: '', | |
49 | + clase: 'botonera-principal-vacio', | |
50 | + accion: '/' | |
51 | + }, | |
52 | + { | |
53 | + texto: '', | |
54 | + clase: 'botonera-principal-vacio', | |
55 | + accion: '/' | |
56 | + }, | |
57 | + { | |
58 | + texto: '', | |
59 | + clase: 'botonera-principal-vacio', | |
60 | + accion: '/' | |
61 | + }, | |
62 | + { | |
63 | + texto: '', | |
64 | + clase: 'botonera-principal-vacio', | |
65 | + accion: '/' | |
66 | + }, | |
67 | + { | |
68 | + texto: '', | |
69 | + clase: 'botonera-principal-vacio', | |
70 | + accion: '/' | |
71 | + }, | |
72 | + { | |
73 | + texto: '', | |
74 | + clase: 'botonera-principal-vacio', | |
75 | + accion: '/' | |
76 | + }, | |
77 | + { | |
78 | + texto: '', | |
79 | + clase: 'botonera-principal-vacio', | |
80 | + accion: '/' | |
81 | + }, | |
82 | + { | |
83 | + texto: '', | |
84 | + clase: 'botonera-principal-vacio', | |
85 | + accion: '/' | |
86 | + }, | |
87 | + { | |
88 | + texto: '', | |
89 | + clase: 'botonera-principal-vacio', | |
90 | + accion: '/' | |
91 | + }, | |
92 | + { | |
93 | + texto: '', | |
94 | + clase: 'botonera-principal-vacio', | |
95 | + accion: '/' | |
96 | + }, | |
97 | + { | |
98 | + texto: '', | |
99 | + clase: 'botonera-principal-vacio', | |
100 | + accion: '/' | |
101 | + }, | |
102 | + { | |
103 | + texto: '', | |
104 | + clase: 'botonera-principal-vacio', | |
105 | + accion: '/' | |
106 | + }, | |
107 | + { | |
108 | + texto: '', | |
109 | + clase: 'botonera-principal-vacio', | |
110 | + accion: '/' | |
20 | 111 | } |
21 | 112 | ]; |
22 | 113 | |
114 | + $scope.paginas = []; | |
115 | + $scope.paginas.push($scope.botones.slice(0, 15)); | |
116 | + $scope.paginas.push($scope.botones.slice(15, 30)); | |
117 | + | |
23 | 118 | $scope.irA = function(accion) { |
24 | - console.log(accion); | |
25 | 119 | $location.path(accion); |
26 | 120 | }; |
27 | 121 |
src/views/foca-botonera-principal.html
1 | -<menu class="botonera-principal"> | |
2 | - <menuitem ng-class="boton.clase" ng-repeat="boton in botones"> | |
3 | - <button ng-click="irA(boton.accion)"> | |
4 | - <span ng-bind="boton.texto"></span> | |
5 | - </button> | |
6 | - </menuitem> | |
7 | -</menu> | |
1 | +<div class="botonera-principal"> | |
2 | + <div class="row"> | |
3 | + <div class="offset-4 col-4 py-2"> | |
4 | + <img class="botonera-principal-logo" src="./img/logo.png"/> | |
5 | + </div> | |
6 | + </div> | |
7 | + <div class="row"> | |
8 | + <div class="col-12"> | |
9 | + <swiper on-init="inicioSwiper"> | |
10 | + <slides> | |
11 | + <slide ng-repeat="pagina in paginas"> | |
12 | + <menu class="botonera-principal-menu"> | |
13 | + <menuitem ng-class="boton.clase" ng-repeat="boton in pagina"> | |
14 | + <button ng-click="irA(boton.accion)"> | |
15 | + <span ng-bind="boton.texto"></span> | |
16 | + </button> | |
17 | + </menuitem> | |
18 | + </menu> | |
19 | + </slide> | |
20 | + </slides> | |
21 | + <prev></prev> | |
22 | + <next></next> | |
23 | + <pagination></pagination> | |
24 | + </swiper> | |
25 | + </div> | |
26 | + </div> | |
27 | +</div> |