From 4e45c5ff3d4b1cc074950710996d31a10c45b46f Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 22 Nov 2013 11:50:57 -0500 Subject: [PATCH] Fix js for handling click of header buttons. They were adding /# to the url, which broke routing. --- .../discourse/templates/header.js.handlebars | 83 ++++++++++--------- .../discourse/views/header_view.js | 3 +- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/header.js.handlebars b/app/assets/javascripts/discourse/templates/header.js.handlebars index ed85a469cd0..a41630353a6 100644 --- a/app/assets/javascripts/discourse/templates/header.js.handlebars +++ b/app/assets/javascripts/discourse/templates/header.js.handlebars @@ -99,49 +99,50 @@ {{render notifications notifications}} {{#if view.renderSiteMap}} -
- - - {{#if categories}} - -
- {{/if}} + {{#if categories}} + + {{/if}} + + + {{/if}} diff --git a/app/assets/javascripts/discourse/views/header_view.js b/app/assets/javascripts/discourse/views/header_view.js index 7212809d5e8..e6d5be2c286 100644 --- a/app/assets/javascripts/discourse/views/header_view.js +++ b/app/assets/javascripts/discourse/views/header_view.js @@ -109,7 +109,8 @@ Discourse.HeaderView = Discourse.View.extend({ var headerView = this; this.$('a[data-dropdown]').on('click.dropdown', function(e) { - return headerView.showDropdown($(e.currentTarget)); + headerView.showDropdown($(e.currentTarget)); + return false; }); this.$('a.unread-private-messages, a.unread-notifications, a[data-notifications]').on('click.notifications', function(e) { headerView.showNotifications(e);