Commit 337364a2c3973421988758b5d3469aeabccb9471

Authored by Leonardo Merlin
1 parent aab3f021

Fix: click on 'Participar' button was toggling loginPanel

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
js/main.js
... ... @@ -701,7 +701,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun
701 701 e.preventDefault();
702 702 var $bt = $(this);
703 703 if(!logged_in) {
704   - $('#login-button').click();
  704 + $('#login-panel').show();
705 705 $('html, body').animate({scrollTop: 0}, 'fast');
706 706 } else {
707 707 $.ajax({
... ... @@ -837,7 +837,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun
837 837 $(document).click(function(e){
838 838 var $target = $(e.target);
839 839  
840   - var isLoginButton = ($target.attr('id') === 'login-button');
  840 + var isLoginButton = ($target.closest('#login-button').length !== 0);
841 841 var requireLogin = $target.hasClass('require-main-login');
842 842 var isChildOfPanel = ($target.closest(loginPanelId).length !== 0);
843 843  
... ...