diff --git a/MediaBrowser.WebDashboard/Html/scripts/site.js b/MediaBrowser.WebDashboard/Html/scripts/site.js index c8ff13e18e..1f3c301af9 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/site.js +++ b/MediaBrowser.WebDashboard/Html/scripts/site.js @@ -648,12 +648,6 @@ var Dashboard = { }).done(function (result) { deferred.resolveWith(null, [[result]]); - }).fail(function () { - - console.log('Error getting plugin security info'); - - deferred.resolveWith(null, [[{ IsMBSupporter: false }]]); - }); Dashboard.getPluginSecurityInfoPromise = deferred; @@ -674,12 +668,8 @@ var Dashboard = { if (isLoggedIn) { - var promise1 = Dashboard.getCurrentUser(); - var promise2 = Dashboard.getPluginSecurityInfo(); - - $.when(promise1, promise2).done(function (response1, response2) { - - Dashboard.renderHeader(page, response1[0], response2[0]); + Dashboard.getCurrentUser().done(function (user) { + Dashboard.renderHeader(page, user); }); } else { @@ -689,7 +679,7 @@ var Dashboard = { } }, - renderHeader: function (page, user, pluginSecurityInfo) { + renderHeader: function (page, user) { var headerHtml = ''; headerHtml += '
'; @@ -728,11 +718,8 @@ var Dashboard = { } headerHtml += ''; - if (pluginSecurityInfo.IsMBSupporter) { - headerHtml += ''; - } if (user.Configuration.IsAdministrator) { - headerHtml += ''; + headerHtml += ''; } headerHtml += '
'; @@ -740,6 +727,12 @@ var Dashboard = { headerHtml += ''; page.prepend(headerHtml); + + Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) { + if (pluginSecurityInfo.IsMBSupporter) { + $('').insertBefore('.btnTools', page); + } + }); }, ensureToolsMenu: function (page) { diff --git a/MediaBrowser.sln b/MediaBrowser.sln index b473b20625..0fe54d0059 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -253,4 +253,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection EndGlobal