Bug 969045 - Add feedback item in Settings charm. r=mbrubeck
authorSam Foster <sfoster@mozilla.com>
Fri, 07 Feb 2014 09:35:03 -0800
changeset 184785 010e1b10e1fe899fa20b2146213bf370731b239a
parent 184784 6a48babd4b2077da65417138187ccfc610462f93
child 184786 84cc01e1c62182ddcd4bec92e1745d1827ede4ae
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs969045
milestone30.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 969045 - Add feedback item in Settings charm. r=mbrubeck
browser/metro/base/content/browser-ui.js
browser/metro/base/content/browser.xul
browser/metro/base/content/flyoutpanels/SettingsCharm.js
browser/metro/locales/jar.mn
--- a/browser/metro/base/content/browser-ui.js
+++ b/browser/metro/base/content/browser-ui.js
@@ -43,16 +43,17 @@ let Elements = {};
   ["browsers",           "browsers"],
   ["navbar",             "navbar"],
   ["autocomplete",       "urlbar-autocomplete"],
   ["contextappbar",      "contextappbar"],
   ["findbar",            "findbar"],
   ["contentViewport",    "content-viewport"],
   ["progress",           "progress-control"],
   ["progressContainer",  "progress-container"],
+  ["feedbackLabel",  "feedback-label"],
 ].forEach(function (aElementGlobal) {
   let [name, id] = aElementGlobal;
   XPCOMUtils.defineLazyGetter(Elements, name, function() {
     return document.getElementById(id);
   });
 });
 
 /**
--- a/browser/metro/base/content/browser.xul
+++ b/browser/metro/base/content/browser.xul
@@ -25,16 +25,18 @@
 <!ENTITY % searchPanelDTD SYSTEM "chrome://browser/locale/searchPanel.dtd">
 %searchPanelDTD;
 #ifdef MOZ_SERVICES_SYNC
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 %syncBrandDTD;
 <!ENTITY % syncDTD SYSTEM "chrome://browser/locale/sync.dtd">
 %syncDTD;
 #endif
+<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
+%baseMenuOverlayDTD;
 ]>
 
 <window id="main-window"
         onload="Browser.startup();"
         onunload="Browser.shutdown();"
         windowtype="navigator:browser"
         chromedir="&locale.dir;"
         title="&brandShortName;"
@@ -847,10 +849,11 @@ Desktop browser's sync prefs.
     </box>
 
     <box id="autofill-container" class="menu-container" hidden="true">
       <vbox id="autofill-popup" class="menu-popup">
         <richlistbox id="menupopup-commands" onclick="if (event.target != this) AutofillMenuUI.selectByIndex(this.selectedIndex);" flex="1"/>
       </vbox>
     </box>
   </stack>
-
+  <!-- XXX: Expose feedback string to SettingsCharm.js -->
+  <label value="&helpFeedbackPage.label;" id="feedback-label" href="https://input.mozilla.org/feedback/metrofirefox" hidden="true"/>
 </window>
--- a/browser/metro/base/content/flyoutpanels/SettingsCharm.js
+++ b/browser/metro/base/content/flyoutpanels/SettingsCharm.js
@@ -47,16 +47,27 @@ var SettingsCharm = {
 */
 
     // About
     this.addEntry({
         label: Strings.browser.GetStringFromName("aboutCharm1"),
         onselected: function() FlyoutPanelsUI.show('AboutFlyoutPanel')
     });
 
+    // Feedback
+    this.addEntry({
+        // feedbackLabel is a temporary measure to expose this string
+        // from the baseMenuOverlay.dtd
+        label: Elements.feedbackLabel.value,
+        onselected: function() {
+          let url = Elements.feedbackLabel.getAttribute("href");
+          BrowserUI.addAndShowTab(url, Browser.selectedTab);
+        }
+    });
+
     // Help
     this.addEntry({
         label: Strings.browser.GetStringFromName("helpOnlineCharm"),
         onselected: function() {
           let url = Services.urlFormatter.formatURLPref("app.support.baseURL") +
             "firefox-help";
           BrowserUI.addAndShowTab(url, Browser.selectedTab);
         }
--- a/browser/metro/locales/jar.mn
+++ b/browser/metro/locales/jar.mn
@@ -34,12 +34,14 @@
 
 #
 # Browser jar resources
 #
 
 @AB_CD@.jar:
 relativesrcdir browser/locales:
   locale/browser/syncBrand.dtd            (%chrome/browser/syncBrand.dtd)
+# Temporary hack to provide a 'feedback' string
+  locale/browser/baseMenuOverlay.dtd      (%chrome/browser/baseMenuOverlay.dtd)
   locale/browser/netError.dtd             (%chrome/overrides/netError.dtd)
 % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
   locale/browser/appstrings.properties    (%chrome/overrides/appstrings.properties)
 % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties