Bug 1331318 - Add learn more link in the Site Data section draft
authorFischer.json <fischer.json@gmail.com>
Mon, 16 Jan 2017 14:59:38 +0800
changeset 461225 806466d93a3e222bc92aa5ec5ec498655874aac4
parent 461121 8eaf154b385bbe0ff06155294ccf7962aa2d3324
child 542250 b8a16ce47a0d9bda45abaf0024bb8b98a56fe0be
push id41601
push userbmo:fliu@mozilla.com
push dateMon, 16 Jan 2017 07:09:37 +0000
bugs1331318
milestone53.0a1
Bug 1331318 - Add learn more link in the Site Data section MozReview-Commit-ID: 1PdUr7q1sYk
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/advanced.xul
browser/locales/en-US/chrome/browser/preferences/advanced.dtd
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -60,16 +60,19 @@ var gAdvancedPane = {
         Services.obs.removeObserver(this, "sitedatamanager:sites-updated");
       };
       window.addEventListener("unload", unload);
       SiteDataManager.updateSites();
       setEventListener("clearSiteDataButton", "command",
                        gAdvancedPane.clearSiteData);
       setEventListener("siteDataSettings", "command",
                        gAdvancedPane.showSiteDataSettings);
+
+      let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "storage-permissions";
+      document.getElementById("siteDataLearnMoreLink").setAttribute("href", url);
     }
 
     setEventListener("layers.acceleration.disabled", "change",
                      gAdvancedPane.updateHardwareAcceleration);
     setEventListener("advancedPrefs", "select",
                      gAdvancedPane.tabSelectionChanged);
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       setEventListener("submitHealthReportBox", "command",
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -326,17 +326,19 @@
         </hbox>
       </groupbox>
 
       <!-- Site Data -->
       <groupbox id="siteDataGroup" hidden="true">
         <caption><label>&siteData.label;</label></caption>
 
         <hbox align="center">
-          <label id="totalSiteDataSize" flex="1"></label>
+          <label id="totalSiteDataSize"></label>
+          <label id="siteDataLearnMoreLink" class="learnMore text-link" value="&siteDataLearnMoreLink.label;"></label>
+          <spacer flex="1" />
           <button id="clearSiteDataButton" icon="clear"
                   label="&clearSiteData.label;" accesskey="&clearSiteData.accesskey;"/>
         </hbox>
         <vbox align="end">
           <button id="siteDataSettings"
                   label="&siteDataSettings.label;"
                   accesskey="&siteDataSettings.accesskey;"/>
         </vbox>
--- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
@@ -58,16 +58,17 @@
 <!ENTITY offlineStorage2.label           "Offline Web Content and User Data">
 
 <!--  Site Data section manages sites using Storage API and is under Network -->
 <!ENTITY siteData.label                  "Site Data">
 <!ENTITY clearSiteData.label             "Clear All Data">
 <!ENTITY clearSiteData.accesskey         "l">
 <!ENTITY siteDataSettings.label          "Settingsā€¦">
 <!ENTITY siteDataSettings.accesskey      "i">
+<!ENTITY siteDataLearnMoreLink.label     "Learn more">
 
 <!-- LOCALIZATION NOTE:
   The entities limitCacheSizeBefore.label and limitCacheSizeAfter.label appear on a single
   line in preferences as follows:
 
   &limitCacheSizeBefore.label [textbox for cache size in MB] &limitCacheSizeAfter.label;
 -->
 <!ENTITY limitCacheSizeBefore.label      "Limit cache to">