diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js
index e0ff83b2..d2cee1ae 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js
@@ -4,7 +4,6 @@
$scope.calculatedAge = 0;
- //TODO: review store name!!!
$scope.storeFichasClinicas = new globals.dataService.store({
model: null,
actions: {
@@ -14,14 +13,8 @@
}
});
- //$scope.$watch('editing.antecentesOcupacionaisActividadesAnteriores', function(newVal, oldVal){
-
- //});
-
$scope.add = function(selected){
- //$("body, html").animate({scrollTop : 0}, 500);
-
$scope.editForm.$reset();
$scope.editing = angular.copy(selected);
@@ -30,7 +23,6 @@
$scope.editing.antecentesOcupacionaisAcidentesTrabalho = [];
$scope.editing.antecentesOcupacionaisDoencasProfissionais = [];
$scope.editing.antecentesOcupacionaisActividadesAnteriores = [];
-
};
$scope.edit = function(selected){
@@ -99,10 +91,13 @@
{
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
- if(isNewRecord)
- {
- //$scope.isNewRecord = isNewRecord;
- }
+ //TODO: id's de cada ficha - injectar no modelo em edição
+
+
+ //if(isNewRecord)
+ //{
+ // //$scope.isNewRecord = isNewRecord;
+ //}
//$scope.editing.ficha.id = editing.ficha.id;
@@ -129,8 +124,35 @@
$scope.cancel = function(){
- $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+ globals.message.custom({
+ title: null,
+ message: 'Pretende anular as alterações à ficha ou gravar para edição posterior?',
+ buttons: {
+ cancelar: {
+ label: 'Cancelar',
+ className: 'btn-default',
+ callback: function() {
+ //cancelar diálogo
+ }
+ },
+ anular: {
+ label: 'Anular',
+ className: 'btn-danger',
+ callback: function() {
+
+ $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
+ });
+ }
+ },
+ gravar: {
+ label: 'Gravar',
+ className: 'btn-success',
+ callback: function() {
+ $scope.save();
+ }
+ }
+ }
});
};
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html
index 9fe2f2ca..15d486aa 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html
@@ -30,14 +30,14 @@
@@ -46,7 +46,7 @@
@@ -54,7 +54,7 @@
@@ -74,7 +74,7 @@
@@ -84,11 +84,11 @@
@@ -101,7 +101,7 @@
@@ -236,7 +236,6 @@
2 - Actividade
-
1.2 - Utente
@@ -265,7 +264,7 @@
@@ -771,7 +770,7 @@
-
+
|
@@ -829,13 +828,13 @@
|
-
+
|
|
-
+
|
|