Commit 6185c0f541005875c329a648bca1980c2f572304
Committed by
Caroline Salib
1 parent
5cb69fa4
Exists in
master
and in
1 other branch
Corrigido bug ao selecionar pessoa cadastrada pela modal;
portabilis/ieducar#155
Showing
1 changed file
with
3 additions
and
7 deletions
Show diff stats
ieducar/modules/Cadastro/Assets/Javascripts/Aluno.js
| @@ -615,10 +615,6 @@ function afterChangePessoa(targetWindow, parentType, parentId, parentName) { | @@ -615,10 +615,6 @@ function afterChangePessoa(targetWindow, parentType, parentId, parentName) { | ||
| 615 | var $tempIdField; | 615 | var $tempIdField; |
| 616 | var $tempNomeField; | 616 | var $tempNomeField; |
| 617 | 617 | ||
| 618 | - console.log(parentType); | ||
| 619 | - console.log(parentId); | ||
| 620 | - console.log(parentName); | ||
| 621 | - | ||
| 622 | if(parentType){ | 618 | if(parentType){ |
| 623 | $tempIdField = $j(buildId(parentType + '_id')); | 619 | $tempIdField = $j(buildId(parentType + '_id')); |
| 624 | $tempNomeField = $j(buildId(parentType + '_nome')); | 620 | $tempNomeField = $j(buildId(parentType + '_nome')); |
| @@ -634,7 +630,7 @@ function afterChangePessoa(targetWindow, parentType, parentId, parentName) { | @@ -634,7 +630,7 @@ function afterChangePessoa(targetWindow, parentType, parentId, parentName) { | ||
| 634 | 630 | ||
| 635 | $tempIdField.val(parentId); | 631 | $tempIdField.val(parentId); |
| 636 | if(!parentType){ | 632 | if(!parentType){ |
| 637 | - getPersonDetails(pessoaId); | 633 | + getPersonDetails(parentId); |
| 638 | }else{ | 634 | }else{ |
| 639 | $tempNomeField.val(parentId + ' - ' +parentName); | 635 | $tempNomeField.val(parentId + ' - ' +parentName); |
| 640 | } | 636 | } |
| @@ -1294,14 +1290,14 @@ function canShowParentsFields(){ | @@ -1294,14 +1290,14 @@ function canShowParentsFields(){ | ||
| 1294 | dataType : 'json', | 1290 | dataType : 'json', |
| 1295 | data : data, | 1291 | data : data, |
| 1296 | success : function(dataResponse) { | 1292 | success : function(dataResponse) { |
| 1297 | - afterChangePessoa(null,pessoa_id); | 1293 | + afterChangePessoa(null,null,pessoa_id); |
| 1298 | } | 1294 | } |
| 1299 | }; | 1295 | }; |
| 1300 | 1296 | ||
| 1301 | postResource(options); | 1297 | postResource(options); |
| 1302 | 1298 | ||
| 1303 | }else{ | 1299 | }else{ |
| 1304 | - afterChangePessoa(null,pessoa_id); | 1300 | + afterChangePessoa(null,null,pessoa_id); |
| 1305 | } | 1301 | } |
| 1306 | 1302 | ||
| 1307 | } | 1303 | } |