diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js
index 1d2909dd..f1daf912 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js
@@ -25,6 +25,14 @@
$scope.editing.antecentesOcupacionaisAcidentesTrabalho = [];
$scope.editing.antecentesOcupacionaisDoencasProfissionais = [];
$scope.editing.antecentesOcupacionaisActividadesAnteriores = [];
+
+ globals.plugins.buildSideMenu({
+ onItemClick: function(e){
+
+ $('#modalDocumentosTrabalhador').modal('show');
+ }
+ });
+
};
$scope.edit = function(selected){
@@ -44,6 +52,14 @@
$scope.editing = angular.copy($scope.selected);
});
+ globals.plugins.buildSideMenu({
+ onItemClick: function(e){
+
+ $('#modalDocumentosTrabalhador').modal('show');
+ }
+ });
+
+
}, 0);
//test
@@ -67,30 +83,21 @@
//});
};
- $scope.save = function(){
-
- //globals.message.alert({
- // message: 'your message here',
- // callback: function(){
-
- // }
- //});
-
- //globals.message.confirm({
- // question: 'Tem a certeza que deseja continuar?',
- // answer: function(result){
-
- // if(result)
- // {
-
- // }
- // }
- //});
+ $scope.save = function(complete){
var isValid = $scope.editForm.$isValid();
if(isValid)
{
+ if(complete)
+ {
+ $scope.editing.ficha.data_conclusao = new Date();
+ }
+ else
+ {
+ $scope.editing.ficha.data_conclusao = null;
+ }
+
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
//TODO: check the need for other keys!!!
@@ -183,6 +190,8 @@
className: 'btn-danger',
callback: function() {
+ globals.plugins.hideSideMenu();
+
$scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
});
@@ -192,7 +201,7 @@
label: 'Gravar',
className: 'btn-success',
callback: function() {
- $scope.save();
+ $scope.save(false);
}
}
}
@@ -200,7 +209,6 @@
};
$scope.$on('afterrender', function(event, args){
-
-
+
});
});
\ No newline at end of file
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html
index 6390b7b9..4a75258f 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html
@@ -3698,9 +3698,9 @@
-
+
-
+
@@ -3710,6 +3710,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js
index 8814f004..cc2b2979 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2Controller.js
@@ -22,13 +22,22 @@
}, 0);
};
- $scope.save = function(){
+ $scope.save = function(complete){
var isValid = $scope.editForm.$isValid();
if(isValid)
{
-
+ if(complete)
+ {
+ $scope.editing.ficha.data_conclusao = new Date();
+ }
+ else
+ {
+ $scope.editing.ficha.data_conclusao = null;
+ }
+
+
}
};
@@ -59,7 +68,7 @@
label: 'Gravar',
className: 'btn-success',
callback: function() {
- $scope.save();
+ $scope.save(false);
}
}
}
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html
index 82b9c45d..cca96404 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form2/Form2View.html
@@ -30,31 +30,24 @@
-
-
@@ -63,7 +56,7 @@
@@ -71,7 +64,7 @@
@@ -88,11 +81,11 @@
@@ -104,7 +97,7 @@
@@ -113,9 +106,9 @@
-
+
-
+
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js
index b81ae988..1864923f 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3Controller.js
@@ -22,13 +22,22 @@
}, 0);
};
- $scope.save = function(){
+ $scope.save = function(complete){
var isValid = $scope.editForm.$isValid();
if(isValid)
{
-
+ if(complete)
+ {
+ $scope.editing.ficha.data_conclusao = new Date();
+ }
+ else
+ {
+ $scope.editing.ficha.data_conclusao = null;
+ }
+
+
}
};
@@ -59,7 +68,7 @@
label: 'Gravar',
className: 'btn-success',
callback: function() {
- $scope.save();
+ $scope.save(false);
}
}
}
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html
index 86e2ac6f..1e4cbfa8 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form3/Form3View.html
@@ -30,31 +30,24 @@
-
-
@@ -63,7 +56,7 @@
@@ -71,7 +64,7 @@
@@ -348,9 +341,9 @@
-
+
-
+
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js
index c3c87c82..40757fe3 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4Controller.js
@@ -22,13 +22,22 @@
}, 0);
};
- $scope.save = function(){
+ $scope.save = function(complete){
var isValid = $scope.editForm.$isValid();
if(isValid)
{
-
+ if(complete)
+ {
+ $scope.editing.ficha.data_conclusao = new Date();
+ }
+ else
+ {
+ $scope.editing.ficha.data_conclusao = null;
+ }
+
+
}
};
@@ -59,7 +68,7 @@
label: 'Gravar',
className: 'btn-success',
callback: function() {
- $scope.save();
+ $scope.save(false);
}
}
}
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html
index a08555c1..d0c0fc49 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form4/Form4View.html
@@ -30,31 +30,24 @@
-
-
@@ -63,7 +56,7 @@
@@ -71,7 +64,7 @@
@@ -82,33 +75,1189 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hábitos
+
+
+ Exame Objectivo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Classificação Individual de Saúde
+
+
+ Absentismo
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Esquema Vacinal
+
+
+ Resumo
+
+
+
+
+
Problemas
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Soluções
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Reavaliação
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Data do Exame
+
-
+
-
+
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js
index 62961c52..fc8c1a2b 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js
@@ -48,6 +48,9 @@
ficha: $scope.dadosTrabalhador
};
+ newRecord.ficha.tipo_ficha_id = selected.id;
+ newRecord.ficha.data_conclusao = null;
+
scope.add(newRecord);
});
};
@@ -111,18 +114,6 @@
$scope.$on('afterrender', function(event, args){
- //var testData = [
- // {
- // "id" : 206,
- // "designacao_social" : "LEYA GLOBAL, SA"
- // }, {
- // "id" : 112,
- // "designacao_social" : "LEYA, S.A."
- // }
- //];
-
- //$scope.comboEmpresas.store.loadData(testData);
-
$scope.comboEmpresas.loadStore(function(response, status, headers, config, items){
});
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Plugins.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Plugins.js
index 4c19cd4a..6b411443 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Plugins.js
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/Plugins.js
@@ -1,4 +1,4 @@
- evoapp.factory('plugins', function($rootScope) {
+ evoapp.factory('plugins', function($rootScope, utils) {
var me = this;
@@ -174,8 +174,45 @@
$.scrollToTop();
};
+ var buildSideMenu = function(options){
+
+ // Append Button
+ $("body").append($("")
+ .addClass("form-side-menu")
+ .attr({
+ "href": "#",
+ "id": "formSideMenu"
+ })
+ .append(
+ $("").addClass("glyphicon glyphicon-picture")
+ ));
+
+ $("#formSideMenu").click(function(e) {
+
+ e.preventDefault();
+
+ if(options.onItemClick)
+ {
+ options.onItemClick(e);
+ }
+
+ return false;
+ });
+
+ $("#formSideMenu").stop(true, true).addClass("visible");
+
+ return $("#formSideMenu");
+ };
+
+ var hideSideMenu = function(){
+
+ $('#formSideMenu').remove();
+ };
+
return {
setDefaults: setDefaults,
- setBootstrap: setBootstrap
+ setBootstrap: setBootstrap,
+ buildSideMenu: buildSideMenu,
+ hideSideMenu: hideSideMenu
};
});
\ No newline at end of file
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css b/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css
index d08f5d8e..2eb77c7e 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css
@@ -282,4 +282,108 @@ body.modal-open {
.navbar-brand
{
cursor:text;
+}
+
+
+/* form side menu */
+a.form-side-menu {
+ -moz-border-radius: 0px;
+ -moz-transition: all 0.3s;
+ -o-transition: all 0.3s;
+ -webkit-border-radius: 0px;
+ -webkit-transition: all 0.3s;
+ background: #f5f5f5;
+ border-radius: 0px;
+ top: 120px;
+ color: #d62c31;
+ display: block;
+ height: 20px;
+ opacity: 0;
+ padding: 13px 0 35px;
+ position: fixed;
+ left: 0px;
+ text-align: center;
+ text-decoration: none;
+ transition: all 0.3s;
+ width: 30px;
+ z-index: 1040;
+ border-top:1px solid #e7e7e7;
+ border-right:1px solid #e7e7e7;
+ border-bottom:1px solid #e7e7e7;
+}
+
+a.form-side-menu:hover {
+ filter: alpha(opacity=100);
+ opacity: 1;
+}
+
+a.form-side-menu.visible {
+ filter: alpha(opacity=75);
+ opacity: 0.75;
+}
+
+/* modal dialog */
+
+@media (min-width: 400px) {
+
+ .modal-large, .modal-medium, .modal-small
+ {
+ width:100%;
+ }
+
+ body
+ {
+ overflow:hidden;
+ }
+}
+
+@media (min-width: 1200px)
+{
+ .modal-large
+ {
+ width: 98%;
+ }
+
+ .modal-medium
+ {
+ width: 70%;
+ }
+
+ .modal-small
+ {
+ width: 40%;
+ }
+}
+
+/* modal dialog */
+
+@media (min-width: 400px) {
+
+ .modal-large, .modal-medium, .modal-small
+ {
+ width:100%;
+ }
+
+ body
+ {
+ overflow:hidden;
+ }
+}
+
+@media (min-width: 1200px)
+{
+ .modal-large
+ {
+ width: 98%;
+ }
+
+ .modal-medium
+ {
+ width: 70%;
+ }
+
+ .modal-small
+ {
+ width: 40%;
+ }
}
\ No newline at end of file
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/img/1200x480.gif b/trunk/SiprpWebFichasClinicas/WebContent/static/html/img/1200x480.gif
new file mode 100644
index 00000000..a02b2008
Binary files /dev/null and b/trunk/SiprpWebFichasClinicas/WebContent/static/html/img/1200x480.gif differ
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/views-all.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/views-all.html
index a646030c..736169d2 100644
--- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/views-all.html
+++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/views-all.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file