Bug 1372645 Highlight the legacy pane when showing details for a legacy addon r=rhelmer
authorAndrew Swan <aswan@mozilla.com>
Wed, 26 Jul 2017 19:58:36 -0700
changeset 420175 a689645ca0f71cee221db9ec82282fdbad316ea3
parent 420174 274db82383c0b75fd8f4d83c01e3f9dfc237b7dd
child 420176 85b4584e1a838c8f44e6d342d2562e72c42c191f
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs1372645
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1372645 Highlight the legacy pane when showing details for a legacy addon r=rhelmer MozReview-Commit-ID: D6jSI8dGMIh
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -3148,18 +3148,21 @@ var gDetailView = {
         legacy = false;
       }
     }
     this.node.setAttribute("legacy", legacy);
     document.getElementById("detail-legacy-warning").href = SUPPORT_URL + "webextensions";
 
     // If the search category isn't selected then make sure to select the
     // correct category
-    if (gCategories.selected != "addons://search/")
-      gCategories.select("addons://list/" + aAddon.type);
+    if (gCategories.selected != "addons://search/") {
+      let category = (isDisabledLegacy(aAddon) || isDisabledUnsigned(aAddon)) ?
+                     "addons://legacy" : `addons://list/${aAddon.type}`;
+      gCategories.select(category);
+    }
 
     document.getElementById("detail-name").textContent = aAddon.name;
     var icon = AddonManager.getPreferredIconURL(aAddon, 64, window);
     document.getElementById("detail-icon").src = icon ? icon : "";
     document.getElementById("detail-creator").setCreator(aAddon.creator, aAddon.homepageURL);
 
     var version = document.getElementById("detail-version");
     if (shouldShowVersionNumber(aAddon)) {