Commit f2814ef6621960016670360a1badeda63df7c923

Authored by Eric Fernandez
1 parent 488b2c556d
Exists in master and in 1 other branch develop

code review

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/js/focaTipo-directive.js
1 angular.module('focaDirectivas') 1 angular.module('focaDirectivas')
2 .directive('focaTipoInput',['$rootScope', function($rootScope) { 2 .directive('focaTipoInput',['$rootScope', function($rootScope) {
3 var mostrarTeclado; 3 var mostrarTeclado;
4 return { 4 return {
5 link: function(scope, element, attr, ctrls) { 5 link: function(scope, element, attr, ctrls) {
6 if(mostrarTeclado) { 6 if(mostrarTeclado) {
7 element[0].type = 'text'; 7 element[0].type = 'text';
8 return; 8 return;
9 } 9 }
10 element[0].type = 'number'; 10 element[0].type = 'number';
11 $rootScope.$on('usarTeclado', function(event, data) { 11 $rootScope.$on('usarTeclado', function(event, data) {
12 if(data){ 12 if(data) {
13 mostrarTeclado = true; 13 mostrarTeclado = true;
14 element[0].type = 'text'; 14 element[0].type = 'text';
15 return; 15 return;
16 } 16 }
17 mostrarTeclado = false; 17 mostrarTeclado = false;
18 element[0].type = 'number'; 18 element[0].type = 'number';
19 }); 19 });
20 } 20 }
21 } 21 }
22 }]); 22 }]);
23 23