Commit 7bde5c6050939f3226336990908ac0f987f0c251

Authored by Leonardo Merlin
1 parent 8be3af3e

Fix #65 - Voltar a tela do programa, quando estiver em 'sobre-o-programa' (2)

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
@@ -89,13 +89,14 @@ $.getJSON(noosferoAPI) @@ -89,13 +89,14 @@ $.getJSON(noosferoAPI)
89 $( '.proposal-category .go-back' ).click(function(event){ 89 $( '.proposal-category .go-back' ).click(function(event){
90 event.preventDefault(); 90 event.preventDefault();
91 91
  92 + var oldHash = window.location.hash;
92 var regexSubpages = /sobre-o-programa$/; 93 var regexSubpages = /sobre-o-programa$/;
93 - var isSubpage = regexSubpages.exec(hash) !== null; 94 + var isSubpage = regexSubpages.exec(oldHash) !== null;
94 var newHash = '#/temas'; // default page 95 var newHash = '#/temas'; // default page
95 96
96 if(isSubpage){ 97 if(isSubpage){
97 // return to proposal page 98 // return to proposal page
98 - newHash = window.location.hash.split('/sobre-o-programa')[0]; 99 + newHash = oldHash.split('/sobre-o-programa')[0];
99 } 100 }
100 101
101 // Update URL and Navigate 102 // Update URL and Navigate