From 8aa67ec4a380b37b61638fe16122de0bbb99ca19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Maur=C3=ADcio?= Date: Fri, 9 May 2014 11:54:59 +0000 Subject: [PATCH] git-svn-id: https://svn.coded.pt/svn/SIPRP@1913 bb69d46d-e84e-40c8-a05a-06db0d633741 --- .../static/html/app/Form5/Form5Controller.js | 11 +++++++++++ .../static/html/app/SearchForm/SearchView.html | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5Controller.js index 41a30bb0..c2de55a0 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5Controller.js @@ -147,6 +147,17 @@ }; $scope.$on('afterrender', function(event, args){ + + //listeners + $scope.$watch('editing.ficha.trabalhador_data_nascimento', function(newVal, oldVal){ + + if(newVal != null && newVal != oldVal) + { + var a = moment(new Date()); + var b = moment(newVal); + $scope.calculatedAge = a.diff(b, 'years'); + } + }); }); }); \ No newline at end of file diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html index f9800115..d1970f19 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html @@ -105,7 +105,7 @@ - {{item.concluido ? 'Concluido' : 'Em Aberto'}} + {{item.concluido ? 'ConcluĂ­do' : 'Em Aberto'}}