Commit b851f6cdcb4231f454ed1331c5c571ce833efdc8
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !3
Showing
3 changed files
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "wrapper-demo", | 2 | "name": "wrapper-demo", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "", | 4 | "description": "", |
5 | "main": "main.js", | 5 | "main": "main.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "initdev": "npm install gulp --global && npm install && npm install -g jshint", | 7 | "initdev": "npm install gulp --global && npm install && npm install -g jshint", |
8 | "gulp-pre-commit": "gulp pre-commit", | 8 | "gulp-pre-commit": "gulp pre-commit", |
9 | "compile": "gulp uglify && gulp sass", | 9 | "compile": "gulp uglify && gulp sass", |
10 | "actualizar": "git pull origin master", | 10 | "actualizar": "git pull origin master", |
11 | "install-dev": "gulp pre-install && npm install && gulp post-install" | 11 | "install-dev": "gulp pre-install && npm install && gulp post-install" |
12 | }, | 12 | }, |
13 | "pre-commit": [ | 13 | "pre-commit": [ |
14 | "gulp-pre-commit" | 14 | "gulp-pre-commit" |
15 | ], | 15 | ], |
16 | "repository": { | 16 | "repository": { |
17 | "type": "git", | 17 | "type": "git", |
18 | "url": "git@debonline.dyndns.org:npm/wrapper-demo.git" | 18 | "url": "git@debonline.dyndns.org:npm/wrapper-demo.git" |
19 | }, | 19 | }, |
20 | "author": "Foca Software", | 20 | "author": "Foca Software", |
21 | "license": "ISC", | 21 | "license": "ISC", |
22 | "dependencies": { | 22 | "dependencies": { |
23 | "angular": "^1.7.5", | 23 | "angular": "^1.7.5", |
24 | "angular-chart.js": "1.1.1", | 24 | "angular-chart.js": "1.1.1", |
25 | "angular-cookies": "^1.7.5", | 25 | "angular-cookies": "^1.7.5", |
26 | "angular-i18n": "^1.7.5", | 26 | "angular-i18n": "^1.7.5", |
27 | "angular-ladda": "^0.4.3", | 27 | "angular-ladda": "^0.4.3", |
28 | "angular-route": "^1.7.5", | 28 | "angular-route": "^1.7.5", |
29 | "angular-sanitize": "^1.7.5", | 29 | "angular-sanitize": "^1.7.5", |
30 | "angular-ui-swiper": "^2.3.8", | 30 | "angular-ui-swiper": "^2.3.8", |
31 | "bootstrap": "^4.1.3", | 31 | "bootstrap": "^4.1.3", |
32 | "chart.js": "2.7.3", | 32 | "chart.js": "2.7.3", |
33 | "foca-abm-chofer": "git+http://git.focasoftware.com/npm/foca-abm-chofer.git", | 33 | "foca-abm-chofer": "git+http://git.focasoftware.com/npm/foca-abm-chofer.git", |
34 | "foca-abm-plazo-pago": "git+http://git.focasoftware.com/npm/foca-abm-plazo-pago.git", | 34 | "foca-abm-plazo-pago": "git+http://git.focasoftware.com/npm/foca-abm-plazo-pago.git", |
35 | "foca-abm-precios-condiciones": "git+http://git.focasoftware.com/npm/foca-abm-precios-condiciones.git", | 35 | "foca-abm-precios-condiciones": "git+http://git.focasoftware.com/npm/foca-abm-precios-condiciones.git", |
36 | "foca-abm-sectores": "git+http://git.focasoftware.com/npm/foca-abm-sectores.git", | 36 | "foca-abm-sectores": "git+http://git.focasoftware.com/npm/foca-abm-sectores.git", |
37 | "foca-abm-vehiculo": "git+http://git.focasoftware.com/npm/foca-abm-vehiculo.git", | 37 | "foca-abm-vehiculo": "git+http://git.focasoftware.com/npm/foca-abm-vehiculo.git", |
38 | "foca-abm-vendedor-cobrador": "git+http://git.focasoftware.com/npm/foca-abm-vendedor-cobrador.git", | 38 | "foca-abm-vendedor-cobrador": "git+http://git.focasoftware.com/npm/foca-abm-vendedor-cobrador.git", |
39 | "foca-activar-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-activar-hoja-ruta.git", | 39 | "foca-activar-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-activar-hoja-ruta.git", |
40 | "foca-admin-seguimiento": "git+http://git.focasoftware.com/npm/foca-admin-seguimiento.git", | 40 | "foca-admin-seguimiento": "git+http://git.focasoftware.com/npm/foca-admin-seguimiento.git", |
41 | "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git", | 41 | "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git", |
42 | "foca-botonera-lateral": "git+http://git.focasoftware.com/npm/foca-botonera-lateral.git", | 42 | "foca-botonera-lateral": "git+http://git.focasoftware.com/npm/foca-botonera-lateral.git", |
43 | "foca-botonera-principal": "git+http://git.focasoftware.com/npm/foca-botonera-principal.git", | 43 | "foca-botonera-principal": "git+http://git.focasoftware.com/npm/foca-botonera-principal.git", |
44 | "foca-busqueda-cliente": "git+http://git.focasoftware.com/npm/foca-busqueda-cliente.git", | 44 | "foca-busqueda-cliente": "git+http://git.focasoftware.com/npm/foca-busqueda-cliente.git", |
45 | "foca-cabecera-facturador": "git+http://git.focasoftware.com/npm/foca-cabecera-facturador.git", | 45 | "foca-cabecera-facturador": "git+http://git.focasoftware.com/npm/foca-cabecera-facturador.git", |
46 | "foca-configuracion": "git+http://git.focasoftware.com/npm/foca-configuracion.git", | 46 | "foca-configuracion": "git+http://git.focasoftware.com/npm/foca-configuracion.git", |
47 | "foca-crear-cobranza": "git+http://git.focasoftware.com/npm/foca-crear-cobranza.git", | 47 | "foca-crear-cobranza": "git+http://git.focasoftware.com/npm/foca-crear-cobranza.git", |
48 | "foca-crear-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-crear-hoja-ruta.git", | 48 | "foca-crear-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-crear-hoja-ruta.git", |
49 | "foca-crear-login": "git+http://git.focasoftware.com/npm/foca-crear-login.git", | 49 | "foca-crear-login": "git+http://git.focasoftware.com/npm/foca-crear-login.git", |
50 | "foca-crear-nota-pedido": "git+http://git.focasoftware.com/npm/foca-crear-nota-pedido.git", | 50 | "foca-crear-nota-pedido": "git+http://git.focasoftware.com/npm/foca-crear-nota-pedido.git", |
51 | "foca-crear-remito": "git+http://git.focasoftware.com/npm/foca-crear-remito.git", | 51 | "foca-crear-remito": "git+http://git.focasoftware.com/npm/foca-crear-remito.git", |
52 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", | 52 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", |
53 | "foca-estado-cisternas": "git+http://git.focasoftware.com/npm/foca-estado-cisternas.git", | 53 | "foca-estado-cisternas": "git+http://git.focasoftware.com/npm/foca-estado-cisternas.git", |
54 | "foca-filtros": "git+http://git.focasoftware.com/npm/foca-filtros.git", | 54 | "foca-filtros": "git+http://git.focasoftware.com/npm/foca-filtros.git", |
55 | "foca-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-hoja-ruta.git", | 55 | "foca-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-hoja-ruta.git", |
56 | "foca-login": "git+http://git.focasoftware.com/npm/foca-login.git", | 56 | "foca-login": "git+http://git.focasoftware.com/npm/foca-login.git", |
57 | "foca-logistica-pedido-ruta": "git+http://git.focasoftware.com/npm/foca-logistica-pedido-ruta.git", | 57 | "foca-logistica-pedido-ruta": "git+http://git.focasoftware.com/npm/foca-logistica-pedido-ruta.git", |
58 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git", | 58 | "foca-modal": "git+http://git.focasoftware.com/npm/foca-modal.git", |
59 | "foca-modal-banco": "git+http://git.focasoftware.com/npm/foca-modal-banco.git", | 59 | "foca-modal-banco": "git+http://git.focasoftware.com/npm/foca-modal-banco.git", |
60 | "foca-modal-busqueda-productos": "git+http://git.focasoftware.com/npm/foca-modal-busqueda-productos.git", | 60 | "foca-modal-busqueda-productos": "git+http://git.focasoftware.com/npm/foca-modal-busqueda-productos.git", |
61 | "foca-modal-cheque": "git+http://git.focasoftware.com/npm/foca-modal-cheque.git", | 61 | "foca-modal-cheque": "git+http://git.focasoftware.com/npm/foca-modal-cheque.git", |
62 | "foca-modal-chofer": "git+http://git.focasoftware.com/npm/foca-modal-chofer.git", | 62 | "foca-modal-chofer": "git+http://git.focasoftware.com/npm/foca-modal-chofer.git", |
63 | "foca-modal-cobrador": "git+http://git.focasoftware.com/npm/foca-modal-cobrador.git", | 63 | "foca-modal-cobrador": "git+http://git.focasoftware.com/npm/foca-modal-cobrador.git", |
64 | "foca-modal-cobranza": "git+http://git.focasoftware.com/npm/foca-modal-cobranza.git", | 64 | "foca-modal-cobranza": "git+http://git.focasoftware.com/npm/foca-modal-cobranza.git", |
65 | "foca-modal-cotizacion": "git+http://git.focasoftware.com/npm/foca-modal-cotizacion.git", | 65 | "foca-modal-cotizacion": "git+http://git.focasoftware.com/npm/foca-modal-cotizacion.git", |
66 | "foca-modal-detalle-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-modal-detalle-hoja-ruta.git", | 66 | "foca-modal-detalle-hoja-ruta": "git+http://git.focasoftware.com/npm/foca-modal-detalle-hoja-ruta.git", |
67 | "foca-modal-domicilio": "git+http://git.focasoftware.com/npm/foca-modal-domicilio.git", | 67 | "foca-modal-domicilio": "git+http://git.focasoftware.com/npm/foca-modal-domicilio.git", |
68 | "foca-modal-efectivo": "git+http://git.focasoftware.com/npm/foca-modal-efectivo.git", | 68 | "foca-modal-efectivo": "git+http://git.focasoftware.com/npm/foca-modal-efectivo.git", |
69 | "foca-modal-factura": "git+http://git.focasoftware.com/npm/foca-modal-factura.git", | 69 | "foca-modal-factura": "git+http://git.focasoftware.com/npm/foca-modal-factura.git", |
70 | "foca-modal-factura-detalle": "git+http://git.focasoftware.com/npm/foca-modal-factura-detalle.git", | 70 | "foca-modal-factura-detalle": "git+http://git.focasoftware.com/npm/foca-modal-factura-detalle.git", |
71 | "foca-modal-flete": "git+http://git.focasoftware.com/npm/foca-modal-flete.git", | 71 | "foca-modal-flete": "git+http://git.focasoftware.com/npm/foca-modal-flete.git", |
72 | "foca-modal-lista-precio": "git+http://git.focasoftware.com/npm/foca-modal-lista-precio.git", | 72 | "foca-modal-lista-precio": "git+http://git.focasoftware.com/npm/foca-modal-lista-precio.git", |
73 | "foca-modal-localidad": "git+http://git.focasoftware.com/npm/foca-modal-localidad.git", | 73 | "foca-modal-localidad": "git+http://git.focasoftware.com/npm/foca-modal-localidad.git", |
74 | "foca-modal-login": "git+http://git.focasoftware.com/npm/foca-modal-login.git", | 74 | "foca-modal-login": "git+http://git.focasoftware.com/npm/foca-modal-login.git", |
75 | "foca-modal-moneda": "git+http://git.focasoftware.com/npm/foca-modal-moneda.git", | 75 | "foca-modal-moneda": "git+http://git.focasoftware.com/npm/foca-modal-moneda.git", |
76 | "foca-modal-nota-pedido": "git+http://git.focasoftware.com/npm/foca-modal-nota-pedido.git", | 76 | "foca-modal-nota-pedido": "git+http://git.focasoftware.com/npm/foca-modal-nota-pedido.git", |
77 | "foca-modal-precio-condiciones": "git+http://git.focasoftware.com/npm/foca-modal-precio-condiciones.git", | 77 | "foca-modal-precio-condiciones": "git+http://git.focasoftware.com/npm/foca-modal-precio-condiciones.git", |
78 | "foca-modal-proveedor": "git+http://git.focasoftware.com/npm/foca-modal-proveedor.git", | 78 | "foca-modal-proveedor": "git+http://git.focasoftware.com/npm/foca-modal-proveedor.git", |
79 | "foca-modal-provincia": "git+http://git.focasoftware.com/npm/foca-modal-provincia.git", | 79 | "foca-modal-provincia": "git+http://git.focasoftware.com/npm/foca-modal-provincia.git", |
80 | "foca-modal-punto-descarga": "git+http://git.focasoftware.com/npm/foca-modal-punto-descarga.git", | 80 | "foca-modal-punto-descarga": "git+http://git.focasoftware.com/npm/foca-modal-punto-descarga.git", |
81 | "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", | 81 | "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", |
82 | "foca-modal-tarifa-flete": "git+http://git.focasoftware.com/npm/foca-modal-tarifa-flete.git", | 82 | "foca-modal-tarifa-flete": "git+http://git.focasoftware.com/npm/foca-modal-tarifa-flete.git", |
83 | "foca-modal-transportista": "git+http://git.focasoftware.com/npm/foca-modal-transportista.git", | 83 | "foca-modal-transportista": "git+http://git.focasoftware.com/npm/foca-modal-transportista.git", |
84 | "foca-modal-unidad-medida": "git+http://git.focasoftware.com/npm/foca-modal-unidad-medida.git", | 84 | "foca-modal-unidad-medida": "git+http://git.focasoftware.com/npm/foca-modal-unidad-medida.git", |
85 | "foca-modal-vehiculo": "git+http://git.focasoftware.com/npm/foca-modal-vehiculo.git", | 85 | "foca-modal-vehiculo": "git+http://git.focasoftware.com/npm/foca-modal-vehiculo.git", |
86 | "foca-modal-vendedores": "git+http://git.focasoftware.com/npm/foca-modal-vendedores.git", | 86 | "foca-modal-vendedores": "git+http://git.focasoftware.com/npm/foca-modal-vendedores.git", |
87 | "foca-nombre-empresa": "git+http://git.focasoftware.com/npm/foca-nombre-empresa.git", | 87 | "foca-nombre-empresa": "git+http://git.focasoftware.com/npm/foca-nombre-empresa.git", |
88 | "foca-seguimiento": "git+http://git.focasoftware.com/npm/foca-seguimiento.git", | 88 | "foca-seguimiento": "git+http://git.focasoftware.com/npm/foca-seguimiento.git", |
89 | "foca-sqlite": "git+http://git.focasoftware.com/npm/foca-sqlite.git", | ||
89 | "foca-teclado": "git+http://git.focasoftware.com/npm/foca-teclado.git", | 90 | "foca-teclado": "git+http://git.focasoftware.com/npm/foca-teclado.git", |
90 | "font-awesome": "^4.7.0", | 91 | "font-awesome": "^4.7.0", |
91 | "gulp-angular-templatecache": "^2.2.1", | 92 | "gulp-angular-templatecache": "^2.2.1", |
92 | "gulp-htmlmin": "^5.0.1", | 93 | "gulp-htmlmin": "^5.0.1", |
93 | "gulp-uglify": "^3.0.1", | 94 | "gulp-uglify": "^3.0.1", |
94 | "gulp-uglify-es": "^1.0.4", | 95 | "gulp-uglify-es": "^1.0.4", |
95 | "jquery": "^3.3.1", | 96 | "jquery": "^3.3.1", |
96 | "ladda": "1.0.6", | 97 | "ladda": "1.0.6", |
97 | "leaflet": "1.3.4", | 98 | "leaflet": "1.3.4", |
98 | "moment": "2.23.0", | 99 | "moment": "2.23.0", |
99 | "ngstorage": "^0.3.11", | 100 | "ngstorage": "^0.3.11", |
100 | "node-sass": "^4.10.0", | 101 | "node-sass": "^4.10.0", |
101 | "uglify": "^0.1.5", | 102 | "uglify": "^0.1.5", |
102 | "ui-bootstrap4": "^3.0.5" | 103 | "ui-bootstrap4": "^3.0.5" |
103 | }, | 104 | }, |
104 | "devDependencies": { | 105 | "devDependencies": { |
105 | "gulp": "3.9.1", | 106 | "gulp": "3.9.1", |
106 | "gulp-clean": "^0.4.0", | 107 | "gulp-clean": "^0.4.0", |
107 | "gulp-concat": "^2.6.1", | 108 | "gulp-concat": "^2.6.1", |
108 | "gulp-connect": "^5.6.1", | 109 | "gulp-connect": "^5.6.1", |
109 | "gulp-jshint": "^2.1.0", | 110 | "gulp-jshint": "^2.1.0", |
110 | "gulp-rename": "^1.4.0", | 111 | "gulp-rename": "^1.4.0", |
111 | "gulp-replace": "^1.0.0", | 112 | "gulp-replace": "^1.0.0", |
112 | "gulp-sass": "^4.0.1", | 113 | "gulp-sass": "^4.0.1", |
113 | "gulp-uglify": "^1.0.4", | 114 | "gulp-uglify": "^1.0.4", |
114 | "gulp-watch": "^5.0.1", | 115 | "gulp-watch": "^5.0.1", |
115 | "jasmine-core": "^3.2.1", | 116 | "jasmine-core": "^3.2.1", |
116 | "jshint": "^2.9.6", | 117 | "jshint": "^2.9.6", |
117 | "pre-commit": "^1.2.2", | 118 | "pre-commit": "^1.2.2", |
118 | "pump": "^3.0.0" | 119 | "pump": "^3.0.0" |
119 | } | 120 | } |
120 | } | 121 | } |
121 | 122 |
src/js/app.js
1 | angular.module('appWrapperDemo', [ | 1 | angular.module('appWrapperDemo', [ |
2 | //EXTERNOS | 2 | //EXTERNOS |
3 | 'angular-ladda', | 3 | 'angular-ladda', |
4 | 'cordovaGeolocationModule', | 4 | 'cordovaGeolocationModule', |
5 | 'ngCookies', | 5 | 'ngCookies', |
6 | 'ngRoute', | 6 | 'ngRoute', |
7 | 'ngStorage', | 7 | 'ngStorage', |
8 | 'ui.bootstrap', | 8 | 'ui.bootstrap', |
9 | 'ui.swiper', | 9 | 'ui.swiper', |
10 | 10 | ||
11 | // MODULOS FOCA | 11 | // MODULOS FOCA |
12 | 'focaBotoneraFacturador', | 12 | 'focaBotoneraFacturador', |
13 | 'focaBotoneraLateral', | 13 | 'focaBotoneraLateral', |
14 | 'focaBotoneraPrincipal', | 14 | 'focaBotoneraPrincipal', |
15 | 'focaBusquedaCliente', | 15 | 'focaBusquedaCliente', |
16 | 'focaBusquedaProductos', | 16 | 'focaBusquedaProductos', |
17 | 'focaCabeceraFacturador', | 17 | 'focaCabeceraFacturador', |
18 | 'focaConfiguracion', | 18 | 'focaConfiguracion', |
19 | 'focaCrearCobranza', | 19 | 'focaCrearCobranza', |
20 | 'focaCrearNotaPedido', | 20 | 'focaCrearNotaPedido', |
21 | 'focaDirectivas', | 21 | 'focaDirectivas', |
22 | 'focaFiltros', | 22 | 'focaFiltros', |
23 | 'focaHojaRuta', | 23 | 'focaHojaRuta', |
24 | 'focaLogin', | 24 | 'focaLogin', |
25 | 'focaModal', | 25 | 'focaModal', |
26 | 'focaModalBanco', | 26 | 'focaModalBanco', |
27 | 'focaModalCheque', | 27 | 'focaModalCheque', |
28 | 'focaModalChofer', | 28 | 'focaModalChofer', |
29 | 'focaModalCobradores', | 29 | 'focaModalCobradores', |
30 | 'focaModalCobranza', | 30 | 'focaModalCobranza', |
31 | 'focaModalCotizacion', | 31 | 'focaModalCotizacion', |
32 | 'focaModalDetalleHojaRuta', | 32 | 'focaModalDetalleHojaRuta', |
33 | 'focaModalDomicilio', | 33 | 'focaModalDomicilio', |
34 | 'focaModalEfectivo', | 34 | 'focaModalEfectivo', |
35 | 'focaModalFactura', | 35 | 'focaModalFactura', |
36 | 'focaModalFacturaDetalle', | 36 | 'focaModalFacturaDetalle', |
37 | 'focaModalFlete', | 37 | 'focaModalFlete', |
38 | 'focaModalListaPrecio', | 38 | 'focaModalListaPrecio', |
39 | 'focaModalLocalidad', | 39 | 'focaModalLocalidad', |
40 | 'focaModalLogin', | 40 | 'focaModalLogin', |
41 | 'focaModalMoneda', | 41 | 'focaModalMoneda', |
42 | 'focaModalNotaPedido', | 42 | 'focaModalNotaPedido', |
43 | 'focaModalPrecioCondicion', | 43 | 'focaModalPrecioCondicion', |
44 | 'focaModalProveedor', | 44 | 'focaModalProveedor', |
45 | 'focaModalProvincia', | 45 | 'focaModalProvincia', |
46 | 'focaModalPuntoDescarga', | 46 | 'focaModalPuntoDescarga', |
47 | 'focaModalTarifaFlete', | 47 | 'focaModalTarifaFlete', |
48 | 'focaModalTransportista', | 48 | 'focaModalTransportista', |
49 | 'focaModalUnidadMedida', | 49 | 'focaModalUnidadMedida', |
50 | 'focaModalVendedores', | 50 | 'focaModalVendedores', |
51 | 'focaNombreEmpresa', | 51 | 'focaNombreEmpresa', |
52 | 'focaSeguimiento', | 52 | 'focaSeguimiento', |
53 | 'focaSqlite' | ||
53 | ]); | 54 | ]); |
54 | 55 |
src/js/controller.js
1 | angular.module('appWrapperDemo') | 1 | angular.module('appWrapperDemo') |
2 | .controller('appWrapperDemoController', [ | 2 | .controller('appWrapperDemoController', [ |
3 | '$scope', | 3 | '$scope', |
4 | '$rootScope', | 4 | '$rootScope', |
5 | '$timeout', | 5 | '$timeout', |
6 | function($scope, $rootScope, $timeout) { | 6 | 'focaSqliteService', |
7 | function($scope, $rootScope, $timeout, focaSqliteService) { | ||
8 | document.addEventListener('deviceready', function() { | ||
9 | focaSqliteService.openDataBase(); | ||
10 | }); | ||
7 | $scope.usarTeclado = false; | 11 | $scope.usarTeclado = false; |
8 | $rootScope.$broadcast('usarTeclado', false); | 12 | $rootScope.$broadcast('usarTeclado', false); |
9 | $scope.mostrarTeclado = false; | 13 | $scope.mostrarTeclado = false; |
10 | //Envía broadcast para avisar que el teclado está en funcionamiento o no | 14 | //Envía broadcast para avisar que el teclado está en funcionamiento o no |
11 | //para su uso cambiar ng-click del boton por esta función | 15 | //para su uso cambiar ng-click del boton por esta función |
12 | $scope.cambioUsoTeclado = function() { | 16 | $scope.cambioUsoTeclado = function() { |
13 | if($scope.usarTeclado) { | 17 | if($scope.usarTeclado) { |
14 | $scope.usarTeclado = false; | 18 | $scope.usarTeclado = false; |
15 | $rootScope.$broadcast('usarTeclado', false); | 19 | $rootScope.$broadcast('usarTeclado', false); |
16 | return; | 20 | return; |
17 | } | 21 | } |
18 | $scope.usarTeclado = true; | 22 | $scope.usarTeclado = true; |
19 | $rootScope.$broadcast('usarTeclado', true); | 23 | $rootScope.$broadcast('usarTeclado', true); |
20 | }; | 24 | }; |
21 | 25 | ||
22 | $rootScope.$on('focus', function(event) { | 26 | $rootScope.$on('focus', function(event) { |
23 | if(!$scope.usarTeclado) { | 27 | if(!$scope.usarTeclado) { |
24 | return; | 28 | return; |
25 | } | 29 | } |
26 | $scope.mostrarTeclado = true; | 30 | $scope.mostrarTeclado = true; |
27 | $timeout.cancel($scope.timeout); | 31 | $timeout.cancel($scope.timeout); |
28 | if(!$scope.$$phase) { | 32 | if(!$scope.$$phase) { |
29 | $scope.$apply(); | 33 | $scope.$apply(); |
30 | } | 34 | } |
31 | }); | 35 | }); |
32 | $rootScope.$on('blur', function(event) { | 36 | $rootScope.$on('blur', function(event) { |
33 | $scope.timeout = $timeout(function() { | 37 | $scope.timeout = $timeout(function() { |
34 | $scope.mostrarTeclado = false; | 38 | $scope.mostrarTeclado = false; |
35 | if(!$scope.$$phase) { | 39 | if(!$scope.$$phase) { |
36 | $scope.$apply(); | 40 | $scope.$apply(); |
37 | } | 41 | } |
38 | }, 150); | 42 | }, 150); |
39 | }); | 43 | }); |
40 | } | 44 | } |
41 | ]); | 45 | ]); |
42 | 46 |