Fix js for handling click of header buttons. They were adding /# to the url, which broke routing.

This commit is contained in:
Neil Lalonde
2013-11-22 11:50:57 -05:00
parent 35bb4fc17f
commit 4e45c5ff3d
2 changed files with 44 additions and 42 deletions

View File

@@ -103,7 +103,8 @@
<ul class="location-links">
{{#if currentUser.staff}}
<li><a href="/admin" class="admin-link"><i class='icon icon-wrench'></i>{{i18n admin_title}}</a></li>
<li><a href="/admin/flags/active" class="flagged-posts-link"><i class='icon icon-flag'></i>{{i18n flags_title}}</a>
<li>
<a href="/admin/flags/active" class="flagged-posts-link"><i class='icon icon-flag'></i>{{i18n flags_title}}</a>
{{#if currentUser.site_flagged_posts_count}}
<a href='/admin/flags/active' title='{{i18n notifications.total_flagged}}' class='badge-notification flagged-posts'>{{currentUser.site_flagged_posts_count}}</a>
{{/if}}

View File

@@ -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);