Commit 733cd7b6cc03416335f13686e456f407b2c2c545
1 parent
e51520bb
Exists in
master
Redmine #4783 Terminando reestruturação básica das wizards de entrada de materiais.
Showing
3 changed files
with
8 additions
and
14 deletions
Show diff stats
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js
... | ... | @@ -856,13 +856,11 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp |
856 | 856 | |
857 | 857 | //Funcao especifica que retorna se o formulario de documentos esta valido |
858 | 858 | function validStepDocumentos() { |
859 | - $scope.stepValid = true; | |
860 | - | |
861 | - if ($scope.entradaAlmoxarifadoForm.documentosForm.$invalid) { | |
862 | - $scope.stepValid = false; | |
863 | - } | |
864 | - | |
865 | - return $scope.stepValid; | |
859 | + $scope.stepValid = true; | |
860 | + if ($scope.entradaAlmoxarifadoForm.documentosForm.$invalid || !$scope.entradaAlmoxarifado.documentos.length > 0) { | |
861 | + $scope.stepValid = false; | |
862 | + } | |
863 | + return $scope.stepValid; | |
866 | 864 | }; |
867 | 865 | |
868 | 866 | }]); | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoEdit.html
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | <a href="#void" class="title" style="text-decoration: none;"><translate>LABEL.MATERIAIS</translate></a> |
65 | 65 | </li> |
66 | 66 | |
67 | - <li ng-class="{'active': isCurrentStep(2), 'complete' : ((isCurrentStep(2) || isCurrentStep(3)) && !entradaAlmoxarifadoForm.documentosForm.$invalid), 'invalid' : ((entradaAlmoxarifadoForm.documentosForm.$submitted || step > 1) && entradaAlmoxarifadoForm.documentosForm.$invalid) && (isCurrentStep(2) || isCurrentStep(3))}" | |
67 | + <li ng-class="{'active': isCurrentStep(2), 'complete' : ((isCurrentStep(2) || isCurrentStep(3)) && !entradaAlmoxarifadoForm.documentosForm.$invalid), 'invalid' : ((entradaAlmoxarifadoForm.documentosForm.$submitted || step > 1) && entradaAlmoxarifadoForm.documentosForm.$invalid) && (isCurrentStep(2) || isCurrentStep(3)) && entradaAlmoxarifado.documentos.length < 1}" | |
68 | 68 | ng-click="setCurrentStep(2)" title="{{$translate.instant('ALMOXARIFADO.LABEL.DOCUMENTOS')}}" alt="{{$translate.instant('ALMOXARIFADO.LABEL.DOCUMENTOS')}}"> |
69 | 69 | <span class="step">3</span> |
70 | 70 | <a href="#void" class="title" style="text-decoration: none;"><translate>ALMOXARIFADO.LABEL.DOCUMENTOS</translate></a> | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoPg3.html
1 | 1 | <ng-form name="documentosForm" novalidate autocomplete="off"> |
2 | 2 | <div class="page-content"> |
3 | 3 | <fieldset> |
4 | - <legend> | |
5 | - <translate>ALMOXARIFADO.LABEL.DOCUMENTOS</translate> | |
6 | - </legend> | |
7 | - | |
8 | - | |
9 | - | |
4 | + <componente-associar-documentos ng-documentos="entradaAlmoxarifado.documentos" ng-edit="edit" ng-uploader="uploader" ng-workspace="$parent.workspace" form="documentosForm" | |
5 | + ng-obrigatorio="true"></componente-associar-documentos> | |
10 | 6 | </fieldset> |
11 | 7 | </div> <!-- /.page-content --> |
12 | 8 | </ng-form> |
13 | 9 | \ No newline at end of file | ... | ... |