diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js index 9a325d12..fa1a8f9b 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js @@ -4,15 +4,13 @@ $scope.calculatedAge = 0; - $scope.storeDisciplines = new globals.dataService.store({ - model: 'Discipline', + $scope.storeFichasClinicas = new globals.dataService.store({ + model: null, actions: { - get: 'GetDisciplines', - upsert: 'UpsertDiscipline', - destroy: 'DeleteDiscipline' - }, - sort: 'Name', - limit: 8 + get: 'getFichaEAdmissaoInicial', + upsert: 'upsertFichaEAdmissaoInicial', + destroy: 'deleteFichaEAdmissaoInicial' + } }); $scope.add = function(){ @@ -27,6 +25,13 @@ $scope.edit = function(selected){ + $scope.storeFichasClinicas.get(function(response, status, headers, config, items){ + + $scope.selected = items; + + $scope.editing = angular.copy($scope.selected); + }); + //test var testModel = { @@ -637,24 +642,24 @@ }; //test - selected = testModel; + //selected = testModel; //$scope.editForm.$reset(); - $scope.selected = selected; + //$scope.selected = selected; - $scope.editing = angular.copy(selected); + //$scope.editing = angular.copy(selected); //listeners - $scope.$watch('editing.ficha.trabalhador_data_nascimento', function(newVal, oldVal){ + //$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'); - } - }); + // if(newVal != null && newVal != oldVal) + // { + // var a = moment(new Date()); + // var b = moment(newVal); + // $scope.calculatedAge = a.diff(b, 'years'); + // } + //}); }; $scope.save = function(){ diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html index a7272716..38d1e0c8 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html @@ -245,7 +245,7 @@
- +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/test.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/test.html new file mode 100644 index 00000000..3d13529d --- /dev/null +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/test.html @@ -0,0 +1,663 @@ +

4 - Antecedentes Pessoais

+
+
+ +
+
+ +
+ + +
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ + + +
+ +
+
+ +
+ + +
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/DataService.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/DataService.js index ce079272..7fddaebb 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/DataService.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/services/DataService.js @@ -1,6 +1,6 @@ evoapp.service('dataService', function ($rootScope, $http, $q, $timeout, modelService, $filter) { - var serviceBase = '/Home/'; + var serviceBase = 'http://java1.evo.pt:8080/siprp_fichasclinicas/rs/fichasclinicas/'; var record = function(model){ @@ -35,8 +35,6 @@ this.get = function(){ - //$rootScope.$emit('onBeforeGet', {store: me}); - var callbackFn = arguments[0]; params = {start: me.start, limit: me.limit, sort: me.sort, dir: me.dir}; @@ -72,24 +70,20 @@ //processServerDate(response); - //if(response.success) - //{ - // response.data = me.convertToModel ? modelService.collectionToModel(me.model, response.data, null) : response.data; + if(response.success) + { + //response.data = me.convertToModel ? modelService.collectionToModel(me.model, response.data, null) : response.data; + me.total = response.total; + me.items = response.data; + } - // me.total = response.total; - // me.items = response.data; - //} + callback(callbackFn, [response, status, headers, config, me.items]); - //callback(callbackFn, [response, status, headers, config, me.items]); - callback(callbackFn, [response, status, headers, config]); - - //$rootScope.$emit('onAfterGet', {store: me}); }). error(function(response, status, headers, config) { callback(callbackFn, [response, status, headers, config]); - //$rootScope.$emit('onAfterGet', {store: me}); }); }; @@ -122,8 +116,8 @@ $rootScope.$broadcast('response', {response: response}); - //if(response.success) - //{ + if(response.success) + { // var idPropertyValue = editing[modelInstance.idProperty], // isNewRecord = (idPropertyValue == 0 || idPropertyValue == null || idPropertyValue == undefined); @@ -141,7 +135,7 @@ // angular.copy(response.data, editing); // angular.copy(response.data, selected); // } - //} + } callback(callbackFn, [response, selected, editing, isNewRecord]); }). diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css b/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css index 44f660e7..73fb6a2b 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/css/theme.css @@ -1,4 +1,4 @@ -/* Sticky footer styles +/* Sticky footer styles -------------------------------------------------- */ html { position: relative;