Commit 0ac6ce80054b234dd81b134971388df20c433b0a
1 parent
fde0c77d37
Exists in
master
Modificación teclado
Showing
4 changed files
with
39 additions
and
10 deletions
Show diff stats
index.html
1 | <html ng-app="appWrapperDemo"> | 1 | <html ng-app="appWrapperDemo"> |
2 | <head> | 2 | <head> |
3 | <meta charset="UTF-8"/> | 3 | <meta charset="UTF-8"/> |
4 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | 4 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
5 | <base href="./"> | 5 | <base href="./"> |
6 | 6 | ||
7 | <!--CSS--> | 7 | <!--CSS--> |
8 | <link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> | 8 | <link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> |
9 | <link href="./node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet"/> | 9 | <link href="./node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet"/> |
10 | <link href="css/general.css" rel="stylesheet"/> | 10 | <link href="css/general.css" rel="stylesheet"/> |
11 | 11 | ||
12 | <!--VENDOR JS--> | 12 | <!--VENDOR JS--> |
13 | <script src="./node_modules/jquery/dist/jquery.min.js"></script> | 13 | <script src="./node_modules/jquery/dist/jquery.min.js"></script> |
14 | <script src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script> | 14 | <script src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script> |
15 | <script src="./node_modules/angular/angular.min.js"></script> | 15 | <script src="./node_modules/angular/angular.min.js"></script> |
16 | <script src="./node_modules/angular-route/angular-route.min.js"></script> | 16 | <script src="./node_modules/angular-route/angular-route.min.js"></script> |
17 | <script src="./node_modules/angular-cookies/angular-cookies.min.js"></script> | 17 | <script src="./node_modules/angular-cookies/angular-cookies.min.js"></script> |
18 | <script src="./node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> | 18 | <script src="./node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> |
19 | <script src="./node_modules/angular-on-screen-keyboard/dist/angular-on-screen-keyboard.min.js"></script> | 19 | <script src="./node_modules/angular-on-screen-keyboard/dist/angular-on-screen-keyboard.min.js"></script> |
20 | <script src="./node_modules/angular-sanitize/angular-sanitize.min.js"></script> | 20 | <script src="./node_modules/angular-sanitize/angular-sanitize.min.js"></script> |
21 | 21 | ||
22 | <script src="./node_modules/foca-directivas/dist/foca-directivas.min.js"></script> | 22 | <script src="../foca-directivas/tmp/foca-directivas.js"></script> |
23 | <script src="./node_modules/foca-botonera-principal/dist/foca-botonera-principal.min.js"></script> | 23 | <script src="./node_modules/foca-botonera-principal/dist/foca-botonera-principal.min.js"></script> |
24 | <script src="./node_modules/foca-turno-apertura/dist/foca-turno-apertura.min.js"></script> | 24 | <script src="./node_modules/foca-turno-apertura/dist/foca-turno-apertura.min.js"></script> |
25 | <script src="./node_modules/foca-abm-plazo-pago/dist/foca-abm-plazo-pago.min.js"></script> | 25 | <script src="./node_modules/foca-abm-plazo-pago/dist/foca-abm-plazo-pago.min.js"></script> |
26 | <script src="./node_modules/foca-abm-precios-condiciones/dist/foca-abm-precios-condiciones.min.js"></script> | 26 | <script src="./node_modules/foca-abm-precios-condiciones/dist/foca-abm-precios-condiciones.min.js"></script> |
27 | <script src="./node_modules/foca-abm-sectores/dist/foca-abm-sectores.min.js"></script> | 27 | <script src="./node_modules/foca-abm-sectores/dist/foca-abm-sectores.min.js"></script> |
28 | <script src="./node_modules/foca-crear-nota-pedido/dist/foca-crear-nota-pedido.min.js"></script> | 28 | <script src="./node_modules/foca-crear-nota-pedido/dist/foca-crear-nota-pedido.min.js"></script> |
29 | <script src="./node_modules/foca-login/dist/foca-login.min.js"></script> | 29 | <script src="./node_modules/foca-login/dist/foca-login.min.js"></script> |
30 | <script src="./node_modules/foca-modal/dist/foca-modal.min.js"></script> | 30 | <script src="./node_modules/foca-modal/dist/foca-modal.min.js"></script> |
31 | <script src="./node_modules/foca-modal-busqueda-productos/dist/foca-busqueda-productos.min.js"></script> | 31 | <script src="./node_modules/foca-modal-busqueda-productos/dist/foca-busqueda-productos.min.js"></script> |
32 | <script src="./node_modules/foca-modal-flete/dist/foca-modal-flete.min.js"></script> | 32 | <script src="./node_modules/foca-modal-flete/dist/foca-modal-flete.min.js"></script> |
33 | <script src="./node_modules/foca-modal-moneda/dist/foca-modal-moneda.min.js"></script> | 33 | <script src="./node_modules/foca-modal-moneda/dist/foca-modal-moneda.min.js"></script> |
34 | <script src="./node_modules/foca-modal-petroleras/dist/foca-modal-petroleras.min.js"></script> | 34 | <script src="./node_modules/foca-modal-petroleras/dist/foca-modal-petroleras.min.js"></script> |
35 | <script src="./node_modules/foca-modal-precio-condiciones/dist/foca-modal-precio-condiciones.min.js"></script> | 35 | <script src="../foca-modal-precio-condiciones/dist/foca-modal-precio-condiciones.min.js"></script> |
36 | <script src="./node_modules/foca-modal-vendedores/dist/foca-modal-vendedores.min.js"></script> | 36 | <script src="./node_modules/foca-modal-vendedores/dist/foca-modal-vendedores.min.js"></script> |
37 | <script src="./node_modules/foca-busqueda-cliente/dist/foca-busqueda-cliente.min.js"></script> | 37 | <script src="./node_modules/foca-busqueda-cliente/dist/foca-busqueda-cliente.min.js"></script> |
38 | <script src="./node_modules/foca-teclado/dist/foca-teclado.min.js"></script> | 38 | <script src="./node_modules/foca-teclado/dist/foca-teclado.min.js"></script> |
39 | <script src="./node_modules/foca-modal-domicilio/dist/foca-modal-domicilios.min.js"></script> | 39 | <script src="./node_modules/foca-modal-domicilio/dist/foca-modal-domicilios.min.js"></script> |
40 | 40 | ||
41 | <!-- BUILD --> | 41 | <!-- BUILD --> |
42 | <script src="./src/js/app.js"></script> | 42 | <script src="./src/js/app.js"></script> |
43 | <script src="./src/js/controller.js"></script> | ||
43 | <script src="./src/etc/develop.js"></script> | 44 | <script src="./src/etc/develop.js"></script> |
44 | <!-- /BUILD --> | 45 | <!-- /BUILD --> |
45 | 46 | ||
46 | </head> | 47 | </head> |
47 | <body> | 48 | <body> |
48 | <style> | 49 | <style> |
49 | </style> | 50 | </style> |
50 | <botonera-horizontal></botonera-horizontal> | 51 | <botonera-horizontal></botonera-horizontal> |
51 | <div ng-view class="container contenedor"></div> | 52 | <div ng-view class="container contenedor"></div> |
52 | <div class="container contenedor-teclado"> | 53 | <div ng-controller="appWrapperDemoController" class="container contenedor-teclado"> |
53 | <div class="btn-group-toggle" data-toggle="buttons" ng-click="mostrarTeclado = !mostrarTeclado"> | 54 | <div class="btn-group-toggle" data-toggle="buttons" ng-click="mostrarTeclado = !mostrarTeclado"> |
54 | <label class="btn btn-secondary active" ng-class="{'teclado-activar': mostrarTeclado}"> | 55 | <label class="btn btn-secondary active boton-activar-teclado" ng-class="{'teclado-activar': mostrarTeclado}"> |
55 | <input type="checkbox" autocomplete="off"><i class="fa fa-keyboard-o fa-3x" aria-hidden="true"></i> | 56 | <input type="checkbox" autocomplete="off"><i class="fa fa-keyboard-o fa-3x" aria-hidden="true"></i> |
56 | </label> | 57 | </label> |
57 | </div> | 58 | </div> |
58 | <foca-teclado ng-show="mostrarTeclado" alfanumeric="true" numeric="true"></foca-teclado> | 59 | <foca-teclado ng-show="mostrarTeclado && hasFocus" alfanumeric="true" numeric="true"></foca-teclado> |
59 | </div> | 60 | </div> |
60 | </body> | 61 | </body> |
61 | </html> | 62 | </html> |
62 | 63 |
src/js/controller.js
File was created | 1 | angular.module('appWrapperDemo') | |
2 | .controller('appWrapperDemoController', [ | ||
3 | '$scope', | ||
4 | '$rootScope', | ||
5 | '$timeout', | ||
6 | function($scope, $rootScope, $timeout) { | ||
7 | $scope.hasFocus = false; | ||
8 | var estado; | ||
9 | $rootScope.$on('focus', function(event, data) { | ||
10 | estado = data; | ||
11 | if(!data) { | ||
12 | $timeout(function() { | ||
13 | if(!estado) { | ||
14 | $scope.hasFocus = data; | ||
15 | } | ||
16 | },200) | ||
17 | } else { | ||
18 | $scope.hasFocus = data; | ||
19 | } | ||
20 | }); | ||
21 | } | ||
22 | ]); |
src/sass/_contenedor.scss
1 | body { | 1 | body { |
2 | background-color: #cccccc; | 2 | background-color: #cccccc; |
3 | } | 3 | } |
4 | 4 | ||
5 | .contenedor { | 5 | .contenedor { |
6 | background-image: radial-gradient(circle at 50% 50%, #ebecf1, #abaec3); | 6 | background-image: radial-gradient(circle at 50% 50%, #ebecf1, #abaec3); |
7 | min-height: 600px; | 7 | min-height: 600px; |
8 | min-width: 800px; | 8 | min-width: 800px; |
9 | } | 9 | } |
10 | 10 | ||
11 | .contenedor-teclado { | 11 | .contenedor-teclado { |
12 | background-image: radial-gradient(circle at 50% 50%, #ebecf1, #abaec3); | 12 | /* background-image: radial-gradient(circle at 50% 50%, #ebecf1, #abaec3); */ |
13 | height: 300px; | 13 | /* height: 300px; */ |
14 | } | 14 | } |
15 | 15 | ||
16 | .grilla-articulos { | 16 | .grilla-articulos { |
17 | background-color: rgba(0, 0, 0, 0.8); | 17 | background-color: rgba(0, 0, 0, 0.8); |
18 | height: 430px; | 18 | height: 430px; |
19 | } | 19 | } |
20 | 20 | ||
21 | .crear-nota-pedido { | 21 | .crear-nota-pedido { |
22 | form { | 22 | form { |
23 | margin-bottom: 0; | 23 | margin-bottom: 0; |
24 | } | 24 | } |
25 | table { | 25 | table { |
26 | margin-bottom: 0; | 26 | margin-bottom: 0; |
27 | } | 27 | } |
28 | } | 28 | } |
29 | 29 |
src/sass/_teclado.scss
1 | 1 | ||
2 | .keyboard { | 2 | .keyboard { |
3 | -webkit-touch-callout: none; | 3 | -webkit-touch-callout: none; |
4 | -webkit-user-select: none; | 4 | -webkit-user-select: none; |
5 | -khtml-user-select: none; | 5 | -khtml-user-select: none; |
6 | -moz-user-select: none; | 6 | -moz-user-select: none; |
7 | -ms-user-select: none; | 7 | -ms-user-select: none; |
8 | user-select: none; | 8 | user-select: none; |
9 | width: 70%; | 9 | width: 62%; |
10 | height: 60%; | 10 | height: 60%; |
11 | margin: auto; | 11 | margin-left: 13%; |
12 | margin-top: -6%; | 12 | margin-top: -19%; |
13 | position: absolute; | ||
13 | table { | 14 | table { |
14 | border-spacing: 10px; | 15 | border-spacing: 10px; |
15 | border-collapse: separate; | 16 | border-collapse: separate; |
16 | z-index: 100000; | 17 | z-index: 100000; |
17 | td { | 18 | td { |
18 | touch-action: none; | 19 | touch-action: none; |
19 | } | 20 | } |
20 | } | 21 | } |
21 | 22 | ||
22 | .letter { | 23 | .letter { |
23 | background-color: #bdbdbd; | 24 | background-color: #bdbdbd; |
24 | box-shadow: 2px 2px 3px #555555; | 25 | box-shadow: 2px 2px 3px #555555; |
25 | width: 47px; | 26 | width: 47px; |
26 | height: 50px; | 27 | height: 50px; |
27 | text-align: center; | 28 | text-align: center; |
28 | font-family: "arial"; | 29 | font-family: "arial"; |
29 | cursor: pointer; | 30 | cursor: pointer; |
30 | color: #000; | 31 | color: #000; |
31 | font-size: 22px; | 32 | font-size: 22px; |
32 | 33 | ||
33 | &:hover { | 34 | &:hover { |
34 | background-color: #fafafa; | 35 | background-color: #fafafa; |
35 | } | 36 | } |
36 | &:active { | 37 | &:active { |
37 | background-color: #999; | 38 | background-color: #999; |
38 | color: #fff; | 39 | color: #fff; |
39 | } | 40 | } |
40 | } | 41 | } |
41 | .number { | 42 | .number { |
42 | background-color: #bdbdbd; | 43 | background-color: #bdbdbd; |
43 | box-shadow: 2px 2px 3px #555555; | 44 | box-shadow: 2px 2px 3px #555555; |
44 | width: 47px; | 45 | width: 47px; |
45 | height: 35px; | 46 | height: 35px; |
46 | text-align: center; | 47 | text-align: center; |
47 | font-family: "arial"; | 48 | font-family: "arial"; |
48 | cursor: pointer; | 49 | cursor: pointer; |
49 | color: #000; | 50 | color: #000; |
50 | font-size: 22px; | 51 | font-size: 22px; |
51 | 52 | ||
52 | &:hover { | 53 | &:hover { |
53 | background-color: #fafafa; | 54 | background-color: #fafafa; |
54 | } | 55 | } |
55 | &:active { | 56 | &:active { |
56 | background-color: #999; | 57 | background-color: #999; |
57 | color: #fff; | 58 | color: #fff; |
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 | ||
61 | .margin { | 62 | .margin { |
62 | width: 40px; | 63 | width: 40px; |
63 | height: 50px; | 64 | height: 50px; |
64 | } | 65 | } |
65 | } | 66 | } |
66 | .teclado-activar { | 67 | .teclado-activar { |
67 | background-color: #17d236; | 68 | background-color: #17d236; |
68 | } | 69 | } |
70 | .boton-activar-teclado { | ||
71 | margin-top: -10%; | ||
72 | position: absolute; | ||
73 | z-index: 100000; | ||
74 | } | ||
69 | 75 |