From 48f2f886ae8c3d90c5080d8216e0d17cd2ea4f1f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 17 Aug 2016 14:43:18 +0200 Subject: [PATCH] Added conversations to mobile menu --- files/js/WCF.Conversation.js | 8 ++++++++ templateListener.xml | 7 +++++++ templates/__mobileMenuConversation.tpl | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 templates/__mobileMenuConversation.tpl diff --git a/files/js/WCF.Conversation.js b/files/js/WCF.Conversation.js index 856f6d8..73cdf2c 100644 --- a/files/js/WCF.Conversation.js +++ b/files/js/WCF.Conversation.js @@ -1225,6 +1225,14 @@ WCF.User.Panel.Conversation = WCF.User.Panel.Abstract.extend({ this.updateBadge(0); this._loadData = true; }).bind(this)); + + require(['EventHandler'], (function(EventHandler) { + EventHandler.add('com.woltlab.wcf.UserMenuMobile', 'more', (function(data) { + if (data.identifier === 'com.woltlab.wcf.conversation') { + this.toggle(); + } + }).bind(this)); + }).bind(this)); }, /** diff --git a/templateListener.xml b/templateListener.xml index 65be1a7..48e7413 100644 --- a/templateListener.xml +++ b/templateListener.xml @@ -35,6 +35,13 @@ menuInteraction + + + user + pageMenuMobile + userMenuItems + + diff --git a/templates/__mobileMenuConversation.tpl b/templates/__mobileMenuConversation.tpl new file mode 100644 index 0000000..0e61665 --- /dev/null +++ b/templates/__mobileMenuConversation.tpl @@ -0,0 +1,6 @@ + -- 2.20.1