Commit 1d5d0d3e3f0bb933a797ab7e4351b9a72293f700

Authored by Ronan Tavares Camargo
1 parent 415e2fb9
Exists in master

Redmine #4587

cit-tabelas-corp-web/src/main/webapp/assets/js/angular/custom/directive/AssociarDocumentoDirective.js
@@ -82,6 +82,7 @@ citApp.directive("componenteAssociarDocumentos", ["$translate", @@ -82,6 +82,7 @@ citApp.directive("componenteAssociarDocumentos", ["$translate",
82 82
83 $scope.inicializarModalDocumentos = function(){ 83 $scope.inicializarModalDocumentos = function(){
84 $scope.editDocumento = true; 84 $scope.editDocumento = true;
  85 + $scope.showButtonSalvarDoc = false;
85 86
86 resetModalDocumentos(); 87 resetModalDocumentos();
87 88
@@ -163,6 +164,7 @@ citApp.directive("componenteAssociarDocumentos", ["$translate", @@ -163,6 +164,7 @@ citApp.directive("componenteAssociarDocumentos", ["$translate",
163 if(documento !== undefined){ 164 if(documento !== undefined){
164 165
165 $scope.editDocumento = edit; 166 $scope.editDocumento = edit;
  167 + $scope.showButtonSalvarDoc = edit;
166 $scope.documento = documento; 168 $scope.documento = documento;
167 $scope.documento.dataEmissao = $filter('date')(documento.dataEmissao, "dd/MM/yyyy"); 169 $scope.documento.dataEmissao = $filter('date')(documento.dataEmissao, "dd/MM/yyyy");
168 if($scope.documento.id && $scope.documento.emitente){ 170 if($scope.documento.id && $scope.documento.emitente){
cit-tabelas-corp-web/src/main/webapp/assets/js/angular/custom/directive/html/dialog_associar_documetos.html
1 <form name="formDialogDocumentos" novalidade> 1 <form name="formDialogDocumentos" novalidade>
2 <div class="modal-header"> 2 <div class="modal-header">
3 - <button class="btn btn-clear" type="button" ng-show="editDocumento" ng-click="salvarAdicionarDocumento(formDialogDocumentos, false)"> 3 + <button class="btn btn-clear" type="button" ng-show="editDocumento && !showButtonSalvarDoc" ng-click="salvarAdicionarDocumento(formDialogDocumentos, false)">
  4 + <i class="fa fa-save green"></i>
  5 + <translate>LABEL.ADICIONAR</translate>
  6 + </button>
  7 +
  8 + <button class="btn btn-clear" type="button" ng-show="editDocumento && showButtonSalvarDoc" ng-click="salvarAdicionarDocumento(formDialogDocumentos, false)">
4 <i class="fa fa-save green"></i> 9 <i class="fa fa-save green"></i>
5 <translate>LABEL.SALVAR</translate> 10 <translate>LABEL.SALVAR</translate>
6 </button> 11 </button>
7 12
8 - <button class="btn btn-clear" type="button" ng-show="editDocumento" ng-click="salvarAdicionarDocumento(formDialogDocumentos, true)"> 13 + <button class="btn btn-clear" type="button" ng-show="editDocumento && !showButtonSalvarDoc" ng-click="salvarAdicionarDocumento(formDialogDocumentos, true)">
9 <i class="fa fa-save green"></i> 14 <i class="fa fa-save green"></i>
10 <translate>LABEL.ADICIONAR_CONTINUAR</translate> 15 <translate>LABEL.ADICIONAR_CONTINUAR</translate>
11 </button> 16 </button>