From eb89f530c8338bbb71a6b39ebdeb5c5a00663b0b Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 8 Aug 2013 13:02:24 +0000 Subject: [PATCH] main menu: set extras according to pandora.site.menuExtras --- static/js/mainMenu.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index ad87d2142..c05d203c0 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -9,9 +9,15 @@ pandora.ui.mainMenu = function() { fromMenu = false, fullscreenState = Ox.Fullscreen.getState(), that = Ox.MainMenu({ - extras: [ - pandora.$ui.loadingIcon = pandora.ui.loadingIcon() - ], + extras: pandora.site.menuExtras.map(function(menuExtra) { + if (menuExtra == 'user') { + return pandora.$ui.userButton = pandora.ui.userButton(); + } else if (menuExtra == 'locale') { + return pandora.$ui.localeButton = pandora.ui.localeButton(); + } else if (menuExtra == 'reload') { + return pandora.$ui.loadingIcon = pandora.ui.loadingIcon(); + } + }), id: 'mainMenu', menus: [].concat( [