Bug 989890 - Port the help button to in-content prefs. r=jaws

This commit is contained in:
Richard Marti 2014-05-05 22:54:57 +02:00
parent 87dbabdc89
commit 016cf16d28
10 changed files with 116 additions and 23 deletions

View File

@ -138,13 +138,13 @@
onselect="gAdvancedPane.tabSelectionChanged();">
<tabs id="tabsElement">
<tab id="generalTab" label="&generalTab.label;" helpTopic="prefs-advanced-general"/>
<tab id="generalTab" label="&generalTab.label;"/>
#ifdef MOZ_DATA_REPORTING
<tab id="dataChoicesTab" label="&dataChoicesTab.label;" helpTopic="prefs-advanced-data-choices"/>
<tab id="dataChoicesTab" label="&dataChoicesTab.label;"/>
#endif
<tab id="networkTab" label="&networkTab.label;" helpTopic="prefs-advanced-network"/>
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
<tab id="encryptionTab" label="&certificateTab.label;" helpTopic="prefs-advanced-encryption"/>
<tab id="networkTab" label="&networkTab.label;"/>
<tab id="updateTab" label="&updateTab.label;"/>
<tab id="encryptionTab" label="&certificateTab.label;"/>
</tabs>
<tabpanels flex="1">

View File

@ -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);
}

View File

@ -78,53 +78,81 @@
<!-- category list -->
<richlistbox id="categories">
<richlistitem id="category-general" class="category" align="center"
value="paneGeneral" tooltiptext="&paneGeneral.title;">
<richlistitem id="category-general"
class="category"
value="paneGeneral"
helpTopic="prefs-main"
tooltiptext="&paneGeneral.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&paneGeneral.title;"/>
</richlistitem>
<richlistitem id="category-content" class="category" align="center"
value="paneContent" tooltiptext="&paneContent.title;">
<richlistitem id="category-content"
class="category"
value="paneContent"
helpTopic="prefs-content"
tooltiptext="&paneContent.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&paneContent.title;"/>
</richlistitem>
<richlistitem id="category-application" class="category" align="center"
value="paneApplications" tooltiptext="&paneApplications.title;">
<richlistitem id="category-application"
class="category"
value="paneApplications"
helpTopic="prefs-applications"
tooltiptext="&paneApplications.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&paneApplications.title;"/>
</richlistitem>
<richlistitem id="category-privacy" class="category" align="center"
value="panePrivacy" tooltiptext="&panePrivacy.title;">
<richlistitem id="category-privacy"
class="category"
value="panePrivacy"
helpTopic="prefs-privacy"
tooltiptext="&panePrivacy.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&panePrivacy.title;"/>
</richlistitem>
<richlistitem id="category-security" class="category" align="center"
value="paneSecurity" tooltiptext="&paneSecurity.title;">
<richlistitem id="category-security"
class="category"
value="paneSecurity"
helpTopic="prefs-security"
tooltiptext="&paneSecurity.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&paneSecurity.title;"/>
</richlistitem>
#ifdef MOZ_SERVICES_SYNC
<richlistitem id="category-sync" class="category" align="center"
value="paneSync" tooltiptext="&paneSync.title;">
<richlistitem id="category-sync"
class="category"
value="paneSync"
helpTopic="prefs-weave"
tooltiptext="&paneSync.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&paneSync.title;"/>
</richlistitem>
#endif
<richlistitem id="category-advanced" class="category" align="center"
value="paneAdvanced" tooltiptext="&paneAdvanced.title;">
<richlistitem id="category-advanced"
class="category"
value="paneAdvanced"
helpTopic="prefs-advanced-general"
tooltiptext="&paneAdvanced.title;"
align="center">
<image class="category-icon"/>
<label class="category-name" flex="1" value="&paneAdvanced.title;"/>
</richlistitem>
</richlistbox>
<box class="main-content" flex="1">
<prefpane flex="1" id="mainPrefPane">
<vbox class="main-content" flex="1">
<prefpane id="mainPrefPane">
#include main.xul
#include privacy.xul
#include advanced.xul
@ -135,7 +163,12 @@
#include sync.xul
#endif
</prefpane>
</box>
<hbox pack="end">
<button class="help-button"
aria-label="&helpButton.label;"
oncommand="helpButtonCommand();"/>
</hbox>
</vbox>
</hbox>
</page>

View File

@ -22,4 +22,6 @@
<!-- LOCALIZATION NOTE (paneSync.title): This should match syncBrand.shortName.label in ../syncBrand.dtd -->
<!ENTITY paneSync.title "Sync">
<!ENTITY buttonForward.tooltip "Go forward one page">
<!ENTITY buttonBack.tooltip "Go back one page">
<!ENTITY buttonBack.tooltip "Go back one page">
<!ENTITY helpButton.label "Help">

View File

@ -140,6 +140,8 @@ browser.jar:
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)
skin/classic/browser/preferences/in-content/dropdown@2x.png (../shared/incontentprefs/dropdown@2x.png)
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)

View File

@ -230,6 +230,8 @@ browser.jar:
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
skin/classic/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

View File

@ -53,7 +53,9 @@ groupbox {
margin-top: 15px;
margin-bottom: 15px;
-moz-margin-start: 60px;
-moz-margin-end: 0;
-moz-padding-start: 0;
-moz-padding-end: 0;
font-size: 1.25rem;
}
@ -182,6 +184,46 @@ button[type="menu"] > .button-box > .button-menu-dropmarker {
list-style-image: url("chrome://browser/skin/preferences/in-content/dropdown.png");
}
.help-button {
min-width: 30px;
border-radius: 2px;
border: 1px solid #C1C1C1;
background-color: #FFCB00;
background-image: none;
box-shadow: none;
}
.help-button:not([disabled="true"]):hover {
background-color: #F4C200;
background-image: none;
}
.help-button:not([disabled="true"]):hover:active {
background-color: #EABA00;
background-image: none;
}
.help-button > .button-box {
padding-top: 0;
padding-bottom: 0;
padding-right: 0 !important;
padding-left: 0 !important;
}
.help-button > .button-box > .button-icon {
width: 26px;
height: 26px;
background-image: url("chrome://browser/skin/preferences/in-content/help-glyph.png");
background-position: center;
}
@media (min-resolution: 2dppx) {
.help-button > .button-box > .button-icon {
background-size: 26px 26px;
background-image: url("chrome://browser/skin/preferences/in-content/help-glyph@2x.png");
}
}
.spinbuttons-button {
-moz-margin-start: 10px !important;
-moz-margin-end: 2px !important;

View File

@ -165,6 +165,8 @@ browser.jar:
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
skin/classic/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)
@ -530,6 +532,8 @@ browser.jar:
skin/classic/aero/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/aero/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/aero/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/aero/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/aero/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/aero/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
skin/classic/aero/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
skin/classic/aero/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)