Commit 92daa9a4ae85ed586a578e4057c2ac548a3785f5
1 parent
dbcca6be
Exists in
master
Corrigindo ordem de carregamento das funcoes.
Showing
1 changed file
with
13 additions
and
13 deletions
Show diff stats
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/TarjaAssinaturaController.js
... | ... | @@ -27,7 +27,7 @@ citApp.controller('TarjaAssinaturaController', |
27 | 27 | $scope.uploaderLogo.clearQueue(); |
28 | 28 | } |
29 | 29 | |
30 | - $scope.edit = true; | |
30 | + $scope.edit = false; | |
31 | 31 | $timeout(function(){ |
32 | 32 | if($scope.tarjaAssinaturaForm){ |
33 | 33 | $scope.tarjaAssinaturaForm.$submitted = false; |
... | ... | @@ -43,16 +43,6 @@ citApp.controller('TarjaAssinaturaController', |
43 | 43 | $scope.tipoAssinaturaCertificado = result.originalElement; |
44 | 44 | }); |
45 | 45 | |
46 | - $scope.getTarjaAssinatura = function(id, edit) { | |
47 | - $scope.resetForm(); | |
48 | - $scope.setLoadingGet(true); | |
49 | - TarjaAssinaturaRepository.get(id).then(function(result) { | |
50 | - $scope.tarjaAssinatura = result.originalElement; | |
51 | - $scope.edit = edit; | |
52 | - $scope.setLoading(false); | |
53 | - }); | |
54 | - }; | |
55 | - | |
56 | 46 | $scope.saveOrUpdate = function(form){ |
57 | 47 | |
58 | 48 | form.$submitted = true; |
... | ... | @@ -140,10 +130,20 @@ citApp.controller('TarjaAssinaturaController', |
140 | 130 | console.info('onCompleteAll'); |
141 | 131 | }; |
142 | 132 | |
133 | + $scope.getTarjaAssinatura = function(id, edit) { | |
134 | + $scope.resetForm(); | |
135 | + $scope.setLoadingGet(true); | |
136 | + TarjaAssinaturaRepository.get(id).then(function(result) { | |
137 | + $scope.tarjaAssinatura = result.originalElement; | |
138 | + vincularIdTarjaUploader(); | |
139 | + $scope.edit = edit; | |
140 | + $scope.setLoading(false); | |
141 | + }); | |
142 | + }; | |
143 | + | |
143 | 144 | var vincularIdTarjaUploader = function () { |
144 | 145 | if($scope.tarjaAssinatura.id){ |
145 | - $scope.uploaderLogoTarjaAssinatura.url += $scope.tarjaAssinatura.id; | |
146 | + $scope.uploaderLogo.url += $scope.tarjaAssinatura.id; | |
146 | 147 | } |
147 | 148 | }; |
148 | - vincularIdTarjaUploader(); | |
149 | 149 | }]); | ... | ... |