diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js index 3a7fbd81..8641cec7 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js @@ -231,48 +231,55 @@ }; $scope.cancel = function(){ + + var buttons = { + cancelar: { + label: 'Cancelar', + className: 'btn-default', + callback: function() { + //cancelar diálogo + } + }, + anular: { + label: 'Anular', + className: 'btn-danger', + callback: function() { + + globals.plugins.hideFloatingSideMenu(); + $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ + + angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); + }); + } + } + }; + + if(!$scope.editing.ficha.data_conclusao) + { + angular.extend(buttons, { + gravar: { + label: 'Gravar', + className: 'btn-success', + callback: function() { + + $scope.save(false); + + globals.plugins.hideFloatingSideMenu(); + + $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ + + angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); + }); + } + } + }); + }; + 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() { - - globals.plugins.hideFloatingSideMenu(); - - $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ - - angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); - }); - } - }, - gravar: { - label: 'Gravar', - className: 'btn-success', - callback: function() { - - $scope.save(false); - - globals.plugins.hideFloatingSideMenu(); - - $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ - - angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); - }); - - } - } - } + buttons: buttons }); }; diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html index 18af2d7c..51bf6799 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html @@ -119,8 +119,8 @@
- - + +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js index bfeca140..a6bac6ab 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js @@ -105,32 +105,34 @@ }; $scope.cancel = function(){ - - 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() { - - globals.plugins.hideFloatingSideMenu(); + + var buttons = { + cancelar: { + label: 'Cancelar', + className: 'btn-default', + callback: function() { + //cancelar diálogo + } + }, + anular: { + label: 'Anular', + className: 'btn-danger', + callback: function() { + + globals.plugins.hideFloatingSideMenu(); - $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ - - angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); - }); - } - }, - gravar: { + $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ + + angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); + }); + } + } + }; + + if(!$scope.editing.ficha.data_conclusao) + { + angular.extend(buttons, { + gravar: { label: 'Gravar', className: 'btn-success', callback: function() { @@ -143,8 +145,14 @@ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); }); } - } - } + } + }); + }; + + globals.message.custom({ + title: null, + message: 'Pretende anular as alterações à ficha ou gravar para edição posterior?', + buttons: buttons }); }; diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html index 6111e087..9cfbaffc 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html @@ -74,9 +74,8 @@
- - - + +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js index d46f9143..aac07893 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js @@ -101,32 +101,34 @@ }; $scope.cancel = function(){ - - 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() { - - globals.plugins.hideFloatingSideMenu(); + + var buttons = { + cancelar: { + label: 'Cancelar', + className: 'btn-default', + callback: function() { + //cancelar diálogo + } + }, + anular: { + label: 'Anular', + className: 'btn-danger', + callback: function() { + + globals.plugins.hideFloatingSideMenu(); - $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ - - angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); - }); - } - }, - gravar: { + $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ + + angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); + }); + } + } + }; + + if(!$scope.editing.ficha.data_conclusao) + { + angular.extend(buttons, { + gravar: { label: 'Gravar', className: 'btn-success', callback: function() { @@ -139,8 +141,14 @@ angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); }); } - } - } + } + }); + }; + + globals.message.custom({ + title: null, + message: 'Pretende anular as alterações à ficha ou gravar para edição posterior?', + buttons: buttons }); }; diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html index 2deac12e..a699bfdb 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html @@ -124,9 +124,8 @@
- - - + +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js index 6b47da4f..cc78a9f6 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js @@ -232,47 +232,54 @@ $scope.cancel = function(){ - 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() { - - globals.plugins.hideFloatingSideMenu(); - - $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ - - angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); - }); - } - }, - gravar: { - label: 'Gravar', - className: 'btn-success', - callback: function() { - - $scope.save(false); - - globals.plugins.hideFloatingSideMenu(); - - $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ - - angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); - }); + var buttons = { + cancelar: { + label: 'Cancelar', + className: 'btn-default', + callback: function() { + //cancelar diálogo + } + }, + anular: { + label: 'Anular', + className: 'btn-danger', + callback: function() { + + globals.plugins.hideFloatingSideMenu(); - } + $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ + + angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); + }); } } + }; + + if(!$scope.editing.ficha.data_conclusao) + { + angular.extend(buttons, { + gravar: { + label: 'Gravar', + className: 'btn-success', + callback: function() { + + $scope.save(false); + + globals.plugins.hideFloatingSideMenu(); + + $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){ + + angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change'); + }); + } + } + }); + }; + + globals.message.custom({ + title: null, + message: 'Pretende anular as alterações à ficha ou gravar para edição posterior?', + buttons: buttons }); }; diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html index dd0dbd2b..b5eb4e4d 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html @@ -140,8 +140,8 @@
- - + +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html index 13f7d3e4..13b3e09d 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html @@ -95,15 +95,15 @@ Data Tipo - Autor + Autor Estado   - Ficha A. + F. Aptidão - + {{item.concluido ? 'Concluído' : 'Em Aberto'}} @@ -118,7 +118,10 @@ Emitir - Emitida + + Emitida + diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/directives/datatable.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/directives/datatable.js index 1a1235b0..11420411 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/directives/datatable.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/directives/datatable.js @@ -82,9 +82,10 @@ }); //Activate tooltips - $(row).find("[data-toggle='tooltip']").tooltip(); - - + $timeout(function() { + + $(row).find("[data-toggle='tooltip']").tooltip(); + }); }); } }; diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Message.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Message.js index 716f1f85..9989a3d7 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Message.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Message.js @@ -70,6 +70,25 @@ evoapp.factory('message', function($rootScope) { buttons: buttons }); }; + +// var custom2 = function(){ +// +// var me = this; +// +// var message = arguments[0].message, +// title = arguments[0].title, +// buttons = arguments[0].buttons; +// +// me.show = function(){ +// +// bootbox.dialog({ +// message: message, +// buttons: buttons +// }); +// }; +// +// return me; +// }; return { confirm: confirm,