From a0960f44f322171363cb45f57dd0b39b3b409c4a Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 18 Jun 2015 10:44:55 -0300 Subject: [PATCH] Fix requirement of login with participate button --- index.html | 2 +- js/main.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 4dde2dc..b72a11a 100644 --- a/index.html +++ b/index.html @@ -510,7 +510,7 @@
- +
diff --git a/js/main.js b/js/main.js index 8e34aba..16486fe 100644 --- a/js/main.js +++ b/js/main.js @@ -807,15 +807,12 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun // handle click on elsewhere (out of loginPanel) $(document).click(function(e){ var $target = $(e.target); - // console.log('e.target', e.target); var isLoginButton = ($target.attr('id') === 'login-button'); - // console.log('isLoginButton', isLoginButton); - + var requireLogin = $target.hasClass('require-main-login'); var isChildOfPanel = ($target.closest(loginPanelId).length !== 0); - // console.log('isChildOfPanel', isChildOfPanel); - if( !isLoginButton && !isChildOfPanel ){ + if( !isLoginButton && !isChildOfPanel && !requireLogin ){ $loginPanel.hide(); } }); -- libgit2 0.21.2