From 0f96bb2b8225dfbb075509ddb52cd0205077ac5e Mon Sep 17 00:00:00 2001 From: Vasily Date: Tue, 5 Feb 2019 14:26:51 +0000 Subject: [PATCH] apply suggestions from code review Co-Authored-By: dkanada --- src/scripts/addpluginpage.js | 15 ++++++++++++--- src/scripts/librarymenu.js | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/scripts/addpluginpage.js b/src/scripts/addpluginpage.js index 9c111f1d84..6ad5b05d3f 100644 --- a/src/scripts/addpluginpage.js +++ b/src/scripts/addpluginpage.js @@ -44,10 +44,19 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e var msg = globalize.translate("MessageInstallPluginFromApp"); $("#nonServerMsg", page).html(msg).show(); } - pkg.shortDescription ? $("#tagline", page).show().html(pkg.shortDescription) : $("#tagline", page).hide(); + if (pkg.shortDescription) { + $("#tagline", page).show().html(pkg.shortDescription); + } else { + $("#tagline", page).hide(); + } $("#overview", page).html(pkg.overview || ""); $("#developer", page).html(pkg.owner); - pkg.richDescUrl ? ($("#pViewWebsite", page).show(), $("#pViewWebsite a", page).attr("href", pkg.richDescUrl)) : $("#pViewWebsite", page).hide(); + if (pkg.richDescUrl) { + $("#pViewWebsite", page).show(); + $("#pViewWebsite a", page).attr("href", pkg.richDescUrl); + } else { + $("#pViewWebsite", page).hide(); + } if (pkg.previewImage || pkg.thumbImage) { var img = pkg.previewImage ? pkg.previewImage : pkg.thumbImage; $("#pPreviewImage", page).show().html(""); @@ -128,4 +137,4 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e }) }) } -}); \ No newline at end of file +}); diff --git a/src/scripts/librarymenu.js b/src/scripts/librarymenu.js index f4d428bb2d..18fafa8bf6 100644 --- a/src/scripts/librarymenu.js +++ b/src/scripts/librarymenu.js @@ -199,7 +199,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", " if (user.localUser) { html += 'settings' + globalize.translate("ButtonSettings") + ""; html += 'wifi' + globalize.translate("ButtonSelectServer") + ""; - if (!localUser.EnableAutoLogin) { + if (!user.localUser.EnableAutoLogin) { html += 'exit_to_app' + globalize.translate("ButtonSignOut") + ""; } }