From 202e30097f174ced449541e1a6cf4ecf52a6cfe1 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 8 Sep 2015 18:01:48 +1000 Subject: [PATCH] FIX: clicking on number should open user drawer --- app/assets/javascripts/discourse/controllers/header.js.es6 | 7 +++++++ app/assets/javascripts/discourse/templates/header.hbs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/header.js.es6 b/app/assets/javascripts/discourse/controllers/header.js.es6 index 4d40efbbea0..0460830bced 100644 --- a/app/assets/javascripts/discourse/controllers/header.js.es6 +++ b/app/assets/javascripts/discourse/controllers/header.js.es6 @@ -20,6 +20,13 @@ const HeaderController = Ember.Controller.extend({ actions: { + showUserMenu() { + if (!this.get('userMenuVisible')) { + this.appEvents.trigger('dropdowns:closeAll'); + this.set('userMenuVisible', true); + } + }, + fullPageSearch() { const searchService = this.container.lookup('search-service:main'); const context = searchService.get('searchContext'); diff --git a/app/assets/javascripts/discourse/templates/header.hbs b/app/assets/javascripts/discourse/templates/header.hbs index 04c87250f98..faf1cf61c00 100644 --- a/app/assets/javascripts/discourse/templates/header.hbs +++ b/app/assets/javascripts/discourse/templates/header.hbs @@ -46,10 +46,10 @@ loginAction="showLogin" title="user.avatar.header_title"}} {{#if currentUser.unread_notifications}} - {{currentUser.unread_notifications}} + {{currentUser.unread_notifications}} {{/if}} {{#if currentUser.unread_private_messages}} - {{currentUser.unread_private_messages}} + {{currentUser.unread_private_messages}} {{/if}} {{/header-dropdown}} {{/if}}