diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html index 19d389ce..643b76fe 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html @@ -17,7 +17,7 @@ {{item.nome}} - @@ -32,7 +32,7 @@
- diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js index 57a3570e..87ff0657 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js @@ -100,16 +100,6 @@ }, 0); - //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'); - // } - //}); }; $scope.save = function(complete){ @@ -272,7 +262,18 @@ }); }; - $scope.$on('afterrender', function(event, args){ + $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/Form2/Form2Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js index 4813dfec..2f3ce68b 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.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/Form3/Form3Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js index ebeabb90..3c134d58 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js @@ -147,6 +147,18 @@ }; $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/Form3/Form3View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html index 6e45115c..b271161d 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html @@ -30,7 +30,7 @@
- +
@@ -38,7 +38,7 @@
- +
@@ -47,7 +47,7 @@
- +
@@ -64,7 +64,7 @@
- +
@@ -126,7 +126,7 @@
@@ -159,13 +159,14 @@ -
+ +
Resumo
@@ -209,7 +210,7 @@
- +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js index 263ace54..d7c40280 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js @@ -184,6 +184,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/Form4/Form4View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html index 62b1dcdb..ac083d92 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html @@ -30,7 +30,7 @@
- +
@@ -38,7 +38,7 @@
- +
@@ -47,7 +47,7 @@
- +
@@ -64,7 +64,7 @@
- +