From 8ee2a500bcf6efea90dcd421e6734258a67c9b5e Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 18 Apr 2017 15:18:03 -0400 Subject: [PATCH] FEATURE: add hamburger extensibility --- .../javascripts/discourse/widgets/hamburger-menu.js.es6 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 b/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 index 3e9979cad1..890a7a7b4a 100644 --- a/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 +++ b/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 @@ -163,22 +163,22 @@ export default createWidget('hamburger-menu', { const prioritizeFaq = this.currentUser && !this.currentUser.read_faq; if (prioritizeFaq) { - results.push(this.attach('menu-links', { heading: true, contents: () => { + results.push(this.attach('menu-links', { name: 'faq-link', heading: true, contents: () => { return this.attach('priority-faq-link', { href: faqUrl }); }})); } if (currentUser && currentUser.staff) { - results.push(this.attach('menu-links', { contents: () => { + results.push(this.attach('menu-links', { name: 'admin-links', contents: () => { const extraLinks = flatten(applyDecorators(this, 'admin-links', this.attrs, this.state)); return this.adminLinks().concat(extraLinks); }})); } - results.push(this.attach('menu-links', { contents: () => this.generalLinks() })); + results.push(this.attach('menu-links', {name: 'general-links', contents: () => this.generalLinks() })); results.push(this.listCategories()); results.push(h('hr')); - results.push(this.attach('menu-links', { omitRule: true, contents: () => this.footerLinks(prioritizeFaq, faqUrl) })); + results.push(this.attach('menu-links', {name: 'footer-links', omitRule: true, contents: () => this.footerLinks(prioritizeFaq, faqUrl) })); return results; },