From b599f8c57ad74c4b273879c27fc9006dbce61537 Mon Sep 17 00:00:00 2001 From: Richard Marti Date: Mon, 5 May 2014 22:54:57 +0200 Subject: [PATCH] Bug 989890 - Port the help button to in-content prefs. r=jaws --- .../preferences/in-content/advanced.xul | 10 +-- .../preferences/in-content/preferences.js | 8 +++ .../preferences/in-content/preferences.xul | 67 +++++++++++++----- .../browser/preferences/preferences.dtd | 4 +- browser/themes/linux/jar.mn | 2 + browser/themes/osx/jar.mn | 2 + .../shared/incontentprefs/help-glyph.png | Bin 0 -> 280 bytes .../shared/incontentprefs/help-glyph@2x.png | Bin 0 -> 500 bytes .../shared/incontentprefs/preferences.css | 42 +++++++++++ browser/themes/windows/jar.mn | 4 ++ 10 files changed, 116 insertions(+), 23 deletions(-) create mode 100644 browser/themes/shared/incontentprefs/help-glyph.png create mode 100644 browser/themes/shared/incontentprefs/help-glyph@2x.png diff --git a/browser/components/preferences/in-content/advanced.xul b/browser/components/preferences/in-content/advanced.xul index 2f4d0c369ca4..b242c9369182 100644 --- a/browser/components/preferences/in-content/advanced.xul +++ b/browser/components/preferences/in-content/advanced.xul @@ -138,13 +138,13 @@ onselect="gAdvancedPane.tabSelectionChanged();"> - + #ifdef MOZ_DATA_REPORTING - + #endif - - - + + + diff --git a/browser/components/preferences/in-content/preferences.js b/browser/components/preferences/in-content/preferences.js index 7630cca7a1d1..80a6058e40af 100644 --- a/browser/components/preferences/in-content/preferences.js +++ b/browser/components/preferences/in-content/preferences.js @@ -58,3 +58,11 @@ function search(aQuery, aAttribute) { element.hidden = (attributeValue != aQuery); } } + +function helpButtonCommand() { + let pane = history.state; + let categories = document.getElementById("categories"); + let helpTopic = categories.querySelector(".category[value=" + pane + "]") + .getAttribute("helpTopic"); + openHelpLink(helpTopic); +} diff --git a/browser/components/preferences/in-content/preferences.xul b/browser/components/preferences/in-content/preferences.xul index 1321a41e58cc..399a24159f50 100644 --- a/browser/components/preferences/in-content/preferences.xul +++ b/browser/components/preferences/in-content/preferences.xul @@ -78,53 +78,81 @@ - + - + - + - + - + #ifdef MOZ_SERVICES_SYNC - + #endif - + - - + + #include main.xul #include privacy.xul #include advanced.xul @@ -135,7 +163,12 @@ #include sync.xul #endif - + +