Commit 1e30d1ff6a68c1f9ad94940f9ee3f39b5ace4026
Exists in
master
and in
10 other branches
Merge branch 'master' of gitlab.com:participa/proposal-app
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
js/main.js
@@ -88,15 +88,18 @@ $.getJSON(noosferoAPI) | @@ -88,15 +88,18 @@ $.getJSON(noosferoAPI) | ||
88 | 88 | ||
89 | $( '.send-button a' ).click(function(event){ | 89 | $( '.send-button a' ).click(function(event){ |
90 | //display form to send proposal (or login form for non-logged users) | 90 | //display form to send proposal (or login form for non-logged users) |
91 | - loginButton = $(this).parents('.send-button'); | 91 | + var $this = $(this); |
92 | + loginButton = $this.parents('.send-button'); | ||
92 | loginButton.hide(); | 93 | loginButton.hide(); |
93 | - $('.success-proposal-sent').hide(); | 94 | + $this.parents('.success-proposal-sent').hide(); |
94 | loginCallback(logged_in); | 95 | loginCallback(logged_in); |
95 | event.preventDefault(); | 96 | event.preventDefault(); |
96 | }); | 97 | }); |
98 | + | ||
97 | $( '#display-contrast' ).click(function(event){ | 99 | $( '#display-contrast' ).click(function(event){ |
98 | $('#proposal-result').toggleClass('contrast'); | 100 | $('#proposal-result').toggleClass('contrast'); |
99 | }); | 101 | }); |
102 | + | ||
100 | $( '.show_body a' ).click(function(event){ | 103 | $( '.show_body a' ).click(function(event){ |
101 | event.preventDefault(); | 104 | event.preventDefault(); |
102 | 105 | ||
@@ -349,6 +352,8 @@ function display_proposal_by_category(item){ | @@ -349,6 +352,8 @@ function display_proposal_by_category(item){ | ||
349 | $('nav').show(); | 352 | $('nav').show(); |
350 | $('#content').show(); | 353 | $('#content').show(); |
351 | $('#proposal-categories').show(); | 354 | $('#proposal-categories').show(); |
355 | + $('#nav-proposal-categories a').addClass('active'); | ||
356 | + $('#nav-proposal-group a').removeClass('active'); | ||
352 | $('.proposal-category-items').hide(); | 357 | $('.proposal-category-items').hide(); |
353 | $('.proposal-detail').hide(); | 358 | $('.proposal-detail').hide(); |
354 | $item.show(); | 359 | $item.show(); |