Commit 13e18eaf0989b5d89fd736f7a97dd9e6ae1aa902

Authored by Leandro Santos
1 parent 7a75197f

removing double call in proposal detail view

Showing 1 changed file with 5 additions and 8 deletions   Show diff stats
@@ -372,6 +372,7 @@ define(['handlebars','handlebars_helpers'], function(Handlebars){ @@ -372,6 +372,7 @@ define(['handlebars','handlebars_helpers'], function(Handlebars){
372 $('.results-container').hide(); 372 $('.results-container').hide();
373 $('.experience-proposal-container').hide(); 373 $('.experience-proposal-container').hide();
374 $('.talk-proposal-container').hide(); 374 $('.talk-proposal-container').hide();
  375 + $('#proposal-item-' + proposal_id + '.proposal-detail').show();
375 $('#proposal-item-' + proposal_id + ' .body').show(); 376 $('#proposal-item-' + proposal_id + ' .body').show();
376 377
377 var url = host + '/api/v1/articles/' + proposal_id + '?private_token=' + private_token + '&fields=id,body&content_type=ProposalsDiscussionPlugin::Topic'; 378 var url = host + '/api/v1/articles/' + proposal_id + '?private_token=' + private_token + '&fields=id,body&content_type=ProposalsDiscussionPlugin::Topic';
@@ -501,17 +502,13 @@ define(['handlebars','handlebars_helpers'], function(Handlebars){ @@ -501,17 +502,13 @@ define(['handlebars','handlebars_helpers'], function(Handlebars){
501 $('html, body').animate({ scrollTop: 0 }, 'fast'); 502 $('html, body').animate({ scrollTop: 0 }, 'fast');
502 }, 503 },
503 navigateToProposal: function(proposalId){ 504 navigateToProposal: function(proposalId){
  505 + var regexSubpages = /sobre-o-programa$/;
504 if(proposalId === undefined){ 506 if(proposalId === undefined){
505 this.display_proposals_tab(); 507 this.display_proposals_tab();
506 - }else{ 508 + }else if(regexSubpages.exec(window.location.hash) == null){
507 this.display_proposal('proposal-item-' + proposalId); 509 this.display_proposal('proposal-item-' + proposalId);
508 -  
509 - // show sub-page  
510 - var regexSubpages = /sobre-o-programa$/;  
511 - var m;  
512 - if((m = regexSubpages.exec(window.location.hash)) !== null ){  
513 - this.display_proposal_detail(proposalId);  
514 - } 510 + }else{
  511 + this.display_proposal_detail(proposalId);
515 } 512 }
516 }, 513 },
517 navigateToCategory: function(categoryId){ 514 navigateToCategory: function(categoryId){