From d4b20749d6c36379048f1d276a4db7d64ab8e497 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 23 Oct 2018 13:34:03 -0400 Subject: [PATCH] move slideout and chat menus to partials --- lib/persona.js | 4 +++ templates/header.tpl | 44 ++-------------------------- templates/partials/chats-menu.tpl | 11 +++++++ templates/partials/slideout-menu.tpl | 31 ++++++++++++++++++++ 4 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 templates/partials/chats-menu.tpl create mode 100644 templates/partials/slideout-menu.tpl diff --git a/lib/persona.js b/lib/persona.js index 7a6aabf..69f1662 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -14,6 +14,10 @@ $(document).ready(function() { $(window).on('resize', utils.debounce(configureNavbarHiding, 200)); $(window).on('resize', fixHeaderPadding); + $(window).on('action:app.loggedIn', function () { + setupMobileMenu(); + }); + function fixHeaderPadding() { var env = utils.findBootstrapEnvironment(); if (env === 'sm' || env === 'xs' || env === 'md') { diff --git a/templates/header.tpl b/templates/header.tpl index 7fee372..90cd878 100644 --- a/templates/header.tpl +++ b/templates/header.tpl @@ -26,50 +26,10 @@
diff --git a/templates/partials/chats-menu.tpl b/templates/partials/chats-menu.tpl new file mode 100644 index 0000000..498066b --- /dev/null +++ b/templates/partials/chats-menu.tpl @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/templates/partials/slideout-menu.tpl b/templates/partials/slideout-menu.tpl new file mode 100644 index 0000000..0daa6aa --- /dev/null +++ b/templates/partials/slideout-menu.tpl @@ -0,0 +1,31 @@ + + + + + + + + + \ No newline at end of file