Commit b9bc7db9ae6073a522e2373190e2cd88bae8b95d
1 parent
ef5c44df
Exists in
master
and in
8 other branches
Fix: display wrong proposal details
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
js/main.js
... | ... | @@ -135,7 +135,8 @@ define(['handlebars','handlebars_helpers'], function(Handlebars){ |
135 | 135 | $( '.proposal-selection' ).change(function(e){ |
136 | 136 | e.preventDefault(); |
137 | 137 | |
138 | - Main.display_proposal('proposal-item-' + this.value); | |
138 | + // Update URL and Navigate | |
139 | + Main.updateHash('#/programas/' + this.value); | |
139 | 140 | }); |
140 | 141 | |
141 | 142 | var availableTags = [ ]; |
... | ... | @@ -369,11 +370,11 @@ define(['handlebars','handlebars_helpers'], function(Handlebars){ |
369 | 370 | $('.results-container').hide(); |
370 | 371 | $('.experience-proposal-container').hide(); |
371 | 372 | $('.talk-proposal-container').hide(); |
372 | - $('.body').show(); | |
373 | + $('#proposal-item-' + proposal_id + ' .body').show(); | |
373 | 374 | |
374 | 375 | var url = host + '/api/v1/articles/' + proposal_id + '?private_token=' + private_token + '&fields=id,body&content_type=ProposalsDiscussionPlugin::Topic'; |
375 | 376 | $.getJSON(url).done(function( data ) { |
376 | - $('.body-content').replaceWith(data.article.body); | |
377 | + $('#proposal-item-' + proposal_id + ' .body-content').replaceWith(data.article.body); | |
377 | 378 | }) |
378 | 379 | .fail(function( jqxhr, textStatus, error ) { |
379 | 380 | var err = textStatus + ', ' + error; | ... | ... |