Commit 159c1afae72ae182a905ac78d6f6801414a0f5e4
Exists in
master
and in
10 other branches
Merge branch 'fix-65' into 'master'
Fix 65 See merge request !15
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
js/main.js
@@ -89,8 +89,17 @@ $.getJSON(noosferoAPI) | @@ -89,8 +89,17 @@ $.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 regexSubpages = /sobre-o-programa$/; | ||
93 | + var isSubpage = regexSubpages.exec(hash) !== null; | ||
94 | + var newHash = '#/temas'; // default page | ||
95 | + | ||
96 | + if(isSubpage){ | ||
97 | + // return to proposal page | ||
98 | + newHash = window.location.hash.split('/sobre-o-programa')[0]; | ||
99 | + } | ||
100 | + | ||
92 | // Update URL and Navigate | 101 | // Update URL and Navigate |
93 | - updateHash('#/temas'); | 102 | + updateHash(newHash); |
94 | }); | 103 | }); |
95 | 104 | ||
96 | $( '.send-button a' ).click(function(event){ | 105 | $( '.send-button a' ).click(function(event){ |