diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html
index 96459765..bb8b38cc 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Documents/DocumentsView.html
@@ -17,9 +17,6 @@
| {{item.nome}} |
-
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js
index 041d3e5a..ebeabb90 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js
@@ -3,6 +3,17 @@
$scope.globals = globals;
$scope.descricao = null;
+
+ $scope.calculatedAge = 0;
+
+ $scope.storeFichasClinicas = new globals.dataService.store({
+ model: null,
+ actions: {
+ get: 'getFicha',
+ upsert: 'sendFicha',
+ destroy: 'sendFicha'
+ }
+ });
$scope.add = function(selected){
@@ -33,7 +44,16 @@
$scope.editForm.$reset();
+ $scope.storeFichasClinicas.extraParams = {
+ fichaID: selected.id
+ };
+ $scope.storeFichasClinicas.get(function(response, status, headers, config, items){
+
+ $scope.selected = items;
+
+ $scope.editing = angular.copy($scope.selected);
+ });
}, 0);
};
@@ -52,6 +72,19 @@
{
$scope.editing.ficha.data_conclusao = null;
}
+
+ $scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
+
+ if(response.success && complete)
+ {
+ globals.plugins.hideSideMenu();
+
+ $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+
+ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
+ });
+ }
+ });
}
};
@@ -77,6 +110,7 @@
$scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
});
}
},
@@ -84,9 +118,14 @@
label: 'Gravar',
className: 'btn-success',
callback: function() {
- $scope.save(false);
+ $scope.save(false);
globals.plugins.hideFloatingSideMenu();
+
+ $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+
+ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
+ });
}
}
}
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js
index a4634dc0..5a0580ca 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js
@@ -1,13 +1,47 @@
evoapp.controller('Form4Controller', function($rootScope, $scope, $timeout, $compile, $injector, $filter, globals)
{
$scope.globals = globals;
+
+ var scrollspyItems = $(
+ ''
+ );
$scope.descricao = null;
+
+ $scope.calculatedAge = 0;
+
+ $scope.storeFichasClinicas = new globals.dataService.store({
+ model: null,
+ actions: {
+ get: 'getFicha',
+ upsert: 'sendFicha',
+ destroy: 'sendFicha'
+ }
+ });
$scope.add = function(selected){
globals.plugins.buildFloatingSideMenu({
title: 'Ficha Clinica',
+ scrollspyItems: scrollspyItems,
+ afterrender: function(){
+
+ $('body').scrollspy({
+ target: '#scrollspyItems'
+ });
+ },
documentclick: function(){
$scope.openModalDocumentos();
@@ -23,6 +57,13 @@
globals.plugins.buildFloatingSideMenu({
title: 'Ficha Clinica',
+ scrollspyItems: scrollspyItems,
+ afterrender: function(){
+
+ $('body').scrollspy({
+ target: '#scrollspyItems'
+ });
+ },
documentclick: function(){
$scope.openModalDocumentos();
@@ -33,7 +74,16 @@
$scope.editForm.$reset();
+ $scope.storeFichasClinicas.extraParams = {
+ fichaID: selected.id
+ };
+
+ $scope.storeFichasClinicas.get(function(response, status, headers, config, items){
+
+ $scope.selected = items;
+ $scope.editing = angular.copy($scope.selected);
+ });
}, 0);
};
@@ -53,7 +103,18 @@
$scope.editing.ficha.data_conclusao = null;
}
+ $scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
+ if(response.success && complete)
+ {
+ globals.plugins.hideSideMenu();
+
+ $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+
+ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
+ });
+ }
+ });
}
};
@@ -79,6 +140,7 @@
$scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
});
}
},
@@ -86,9 +148,14 @@
label: 'Gravar',
className: 'btn-success',
callback: function() {
- $scope.save(false);
+ $scope.save(false);
globals.plugins.hideFloatingSideMenu();
+
+ $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+
+ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
+ });
}
}
}
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html
index a694540a..0dc297f5 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html
@@ -20,7 +20,7 @@
|