From aea2d1c42ad784626cdc2068a89ce35b928afc65 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 13 May 2013 11:55:59 -0400 Subject: [PATCH] updated nuget --- dashboard-ui/scripts/addpluginpage.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/dashboard-ui/scripts/addpluginpage.js b/dashboard-ui/scripts/addpluginpage.js index 0ea92da16..55e9375f9 100644 --- a/dashboard-ui/scripts/addpluginpage.js +++ b/dashboard-ui/scripts/addpluginpage.js @@ -31,23 +31,14 @@ var packageVersion; - if (installedPlugin) { + if (!installedPlugin) { - // Select the first available package with the same update class as the installed version - packageVersion = packageInfo.versions.filter(function (current) { - - return current.classification == installedPlugin.UpdateClass; - })[0]; - - - } else { $('#pCurrentVersion', page).hide().html(""); } // If we don't have a package version to select, pick the first release build if (!packageVersion) { - // Select the first available package with the same update class as the installed version packageVersion = packageInfo.versions.filter(function (current) { return current.classification == "Release"; @@ -57,20 +48,19 @@ // If we still don't have a package version to select, pick the first Beta build if (!packageVersion) { - // Select the first available package with the same update class as the installed version packageVersion = packageInfo.versions.filter(function (current) { return current.classification == "Beta"; })[0]; } + selectmenu.selectmenu('refresh'); + if (packageVersion) { var val = packageVersion.versionStr + '|' + packageVersion.classification; - $('#selectVersion', page).val(val); + selectmenu.val(val).selectmenu('refresh'); } - - selectmenu.selectmenu('refresh'); } function renderPackage(pkg, installedPlugins, pluginSecurityInfo, page) {