diff --git a/toolkit/components/help/content/help.js b/toolkit/components/help/content/help.js
index 884498a7590..59c3fc31409 100644
--- a/toolkit/components/help/content/help.js
+++ b/toolkit/components/help/content/help.js
@@ -105,6 +105,10 @@ var helpBaseURI;
var searchDatasources = "rdf:null";
var searchDS = null;
+var gIgnoreFocus = false;
+var gClickSelectsAll;
+var gIgnoreClick = false;
+
/* defaultTopic is either set
1. in the openHelp() call, passed as an argument to the Help window and
evaluated in init(), or
@@ -135,158 +139,171 @@ function displayTopic(topic) {
# Initialize the Help window
function init() {
- // Cache panel references.
- helpSearchPanel = document.getElementById("help-search-panel");
- helpTocPanel = document.getElementById("help-toc-panel");
- helpIndexPanel = document.getElementById("help-index-panel");
- helpGlossaryPanel = document.getElementById("help-glossary-panel");
- helpBrowser = document.getElementById("help-content");
-
- strBundle = document.getElementById("bundle_help");
- emptySearchText = strBundle.getString("emptySearchText");
+ // Cache panel references.
+ helpSearchPanel = document.getElementById("help-search-panel");
+ helpTocPanel = document.getElementById("help-toc-panel");
+ helpIndexPanel = document.getElementById("help-index-panel");
+ helpGlossaryPanel = document.getElementById("help-glossary-panel");
+ helpBrowser = document.getElementById("help-content");
- initFindBar();
+ strBundle = document.getElementById("bundle_help");
+ emptySearchText = strBundle.getString("emptySearchText");
- // Get the content pack, base URL, and help topic
- var helpTopic = defaultTopic;
- if ("arguments" in window
- && window.arguments[0]
- instanceof Components.interfaces.nsIDialogParamBlock) {
- helpFileURI = window.arguments[0].GetString(0);
- // trailing "/" included.
- helpBaseURI = helpFileURI.substring(0, helpFileURI.lastIndexOf("/")+1);
- helpTopic = window.arguments[0].GetString(1);
- }
+ initFindBar();
- loadHelpRDF();
- displayTopic(helpTopic);
+ // Get the content pack, base URL, and help topic
+ var helpTopic = defaultTopic;
+ if ("arguments" in window &&
+ window.arguments[0] instanceof Components.interfaces.nsIDialogParamBlock) {
+ helpFileURI = window.arguments[0].GetString(0);
+ // trailing "/" included.
+ helpBaseURI = helpFileURI.substring(0, helpFileURI.lastIndexOf("/")+1);
+ helpTopic = window.arguments[0].GetString(1);
+ }
- // Move to Center of Screen
- const width = document.documentElement.getAttribute("width");
- const height = document.documentElement.getAttribute("height");
- window.moveTo((screen.availWidth - width) / 2, (screen.availHeight - height) / 2);
+ loadHelpRDF();
+ displayTopic(helpTopic);
- // Initialize history.
- getWebNavigation().sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"]
- .createInstance(Components.interfaces.nsISHistory);
- window.XULBrowserWindow = new nsHelpStatusHandler();
+ // Move to Center of Screen
+ const width = document.documentElement.getAttribute("width");
+ const height = document.documentElement.getAttribute("height");
+ window.moveTo((screen.availWidth - width) / 2, (screen.availHeight - height) / 2);
- //Start the status handler.
- window.XULBrowserWindow.init();
+ // Initialize history.
+ getWebNavigation().sessionHistory =
+ Components.classes["@mozilla.org/browser/shistory;1"]
+ .createInstance(Components.interfaces.nsISHistory);
+ window.XULBrowserWindow = new nsHelpStatusHandler();
- // Hook up UI through Progress Listener
- const interfaceRequestor = helpBrowser.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
- const webProgress = interfaceRequestor.getInterface(Components.interfaces.nsIWebProgress);
+ //Start the status handler.
+ window.XULBrowserWindow.init();
- webProgress.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
+ // Hook up UI through Progress Listener
+ const interfaceRequestor = helpBrowser.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
+ const webProgress = interfaceRequestor.getInterface(Components.interfaces.nsIWebProgress);
- //Display the Table of Contents
- showPanel("help-toc");
+ webProgress.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
- // initialize the customizeDone method on the customizeable toolbar
- var toolbox = document.getElementById("help-toolbox");
- toolbox.customizeDone = ToolboxCustomizeDone;
+ gClickSelectsAll = getBoolPref("browser.urlbar.clickSelectsAll", true);
+}
- var toolbarset = document.getElementById("customToolbars");
- toolbox.toolbarset = toolbarset;
+function showSearchSidebar() {
+ // if you tab too quickly, you end up with stuck focus, revert focus to the searchbar
+ var searchTree = document.getElementById("help-toc-panel");
+ if (searchTree.treeBoxObject.focused) {
+ focusSearch();
+ }
- // Set the text of the sidebar toolbar button to "Hide Sidebar" taken the properties file.
- // This is needed so that it says "Toggle Sidebar" in toolbar customization, but outside
- // of it, it says either "Show Sidebar" or "Hide Sidebar".
- document.getElementById("help-sidebar-button").label = strBundle.getString("hideSidebarLabel");
+ var tableOfContents = document.getElementById("help-toc-sidebar");
+ tableOfContents.setAttribute("hidden", "true");
+
+ var sidebar = document.getElementById("help-search-sidebar");
+ sidebar.removeAttribute("hidden");
+}
+
+function hideSearchSidebar(aEvent) {
+ // if we're focused in the search results, focus content
+ var searchTree = document.getElementById("help-search-tree");
+ if (searchTree.treeBoxObject.focused) {
+ content.focus();
+ }
+
+ var sidebar = document.getElementById("help-search-sidebar");
+ sidebar.setAttribute("hidden", "true");
+
+ var tableOfContents = document.getElementById("help-toc-sidebar");
+ tableOfContents.removeAttribute("hidden");
}
function loadHelpRDF() {
- if (!helpFileDS) {
- try {
- helpFileDS = RDF.GetDataSourceBlocking(helpFileURI);
- } catch (e if (e.result == NSRESULT_RDF_SYNTAX_ERROR)) {
- log("Help file: " + helpFileURI + " contains a syntax error.");
- } catch (e) {
- log("Help file: " + helpFileURI + " was not found.");
- }
- try {
- document.title = getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, "");
- helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI);
- // if there's no nc:defaulttopic in the content pack, set "welcome"
- // as the default topic
- defaultTopic = getAttribute(helpFileDS,
- RDF_ROOT, NC_DEFAULTTOPIC, "welcome");
-
- var panelDefs = helpFileDS.GetTarget(RDF_ROOT, NC_PANELLIST, true);
- RDFContainer.Init(helpFileDS, panelDefs);
- var iterator = RDFContainer.GetElements();
- while (iterator.hasMoreElements()) {
- var panelDef = iterator.getNext();
- var panelID = getAttribute(helpFileDS, panelDef, NC_PANELID,
- null);
-
- var datasources = getAttribute(helpFileDS, panelDef,
- NC_DATASOURCES, "rdf:none");
- datasources = normalizeLinks(helpBaseURI, datasources);
-
- var panelPlatforms = getAttribute(helpFileDS, panelDef, NC_PLATFORM, platform);
- panelPlatforms = panelPlatforms.split(/\s+/);
-
- if (panelPlatforms.indexOf(platform) == -1)
- continue; // ignore datasources for other platforms
-
- // Cache Additional Datasources to Augment Search Datasources.
- if (panelID == "search") {
- emptySearchText = getAttribute(helpFileDS, panelDef,
- NC_EMPTY_SEARCH_TEXT, emptySearchText);
- emptySearchLink = getAttribute(helpFileDS, panelDef,
- NC_EMPTY_SEARCH_LINK, emptySearchLink);
- searchDatasources += " " + datasources;
- continue; // Don't try to display them yet!
- }
-
- // Cache TOC Datasources for Use by ID Lookup.
- var tree = document.getElementById("help-" + panelID + "-panel");
- loadDatabasesBlocking(datasources);
- tree.setAttribute("datasources",
- tree.getAttribute("datasources") + " " + datasources);
- }
- } catch (e) {
- log(e + "");
- }
+ if (!helpFileDS) {
+ try {
+ helpFileDS = RDF.GetDataSourceBlocking(helpFileURI);
+ } catch (e if (e.result == NSRESULT_RDF_SYNTAX_ERROR)) {
+ log("Help file: " + helpFileURI + " contains a syntax error.");
+ } catch (e) {
+ log("Help file: " + helpFileURI + " was not found.");
}
+
+ try {
+ document.title = getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, "");
+ helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI);
+ // if there's no nc:defaulttopic in the content pack, set "welcome"
+ // as the default topic
+ defaultTopic = getAttribute(helpFileDS,
+ RDF_ROOT, NC_DEFAULTTOPIC, "welcome");
+
+ var panelDefs = helpFileDS.GetTarget(RDF_ROOT, NC_PANELLIST, true);
+ RDFContainer.Init(helpFileDS, panelDefs);
+ var iterator = RDFContainer.GetElements();
+ while (iterator.hasMoreElements()) {
+ var panelDef = iterator.getNext();
+ var panelID = getAttribute(helpFileDS, panelDef, NC_PANELID, null);
+
+ var datasources = getAttribute(helpFileDS, panelDef, NC_DATASOURCES, "rdf:none");
+ datasources = normalizeLinks(helpBaseURI, datasources);
+
+ var panelPlatforms = getAttribute(helpFileDS, panelDef, NC_PLATFORM, platform);
+ panelPlatforms = panelPlatforms.split(/\s+/);
+
+ if (panelPlatforms.indexOf(platform) == -1)
+ continue; // ignore datasources for other platforms
+
+ // Cache Additional Datasources to Augment Search Datasources.
+ if (panelID == "search") {
+ emptySearchText = getAttribute(helpFileDS, panelDef,
+ NC_EMPTY_SEARCH_TEXT, emptySearchText);
+ emptySearchLink = getAttribute(helpFileDS, panelDef,
+ NC_EMPTY_SEARCH_LINK, emptySearchLink);
+ searchDatasources += " " + datasources;
+ continue; // Don't try to display them yet!
+ }
+
+ // Cache TOC Datasources for Use by ID Lookup.
+ var tree = document.getElementById("help-" + panelID + "-panel");
+ loadDatabasesBlocking(datasources);
+ tree.setAttribute("datasources",
+ tree.getAttribute("datasources") + " " + datasources);
+ }
+ } catch (e) {
+ log(e + "");
+ }
+ }
}
function loadDatabasesBlocking(datasources) {
- var ds = datasources.split(/\s+/);
- for (var i=0; i < ds.length; ++i) {
- if (ds[i] == "rdf:null" || ds[i] == "")
- continue;
- try {
- // We need blocking here to ensure the database is loaded so
- // getLink(topic) works.
- var datasource = RDF.GetDataSourceBlocking(ds[i]);
- } catch (e) {
- log("Datasource: " + ds[i] + " was not found.");
- }
+ var ds = datasources.split(/\s+/);
+ for (var i=0; i < ds.length; ++i) {
+ if (ds[i] == "rdf:null" || ds[i] == "")
+ continue;
+ try {
+ // We need blocking here to ensure the database is loaded so
+ // getLink(topic) works.
+ var datasource = RDF.GetDataSourceBlocking(ds[i]);
+ } catch (e) {
+ log("Datasource: " + ds[i] + " was not found.");
}
+ }
}
# Prepend helpBaseURI to list of space separated links if the don't start with
# "chrome:"
function normalizeLinks(helpBaseURI, links) {
- if (!helpBaseURI) {
- return links;
- }
- var ls = links.split(/\s+/);
- if (ls.length == 0) {
- return links;
- }
- for (var i=0; i < ls.length; ++i) {
- if (ls[i] == "") {
- continue;
- }
- if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:") {
- ls[i] = helpBaseURI + ls[i];
- }
- }
- return ls.join(" ");
+ if (!helpBaseURI) {
+ return links;
+ }
+ var ls = links.split(/\s+/);
+ if (ls.length == 0) {
+ return links;
+ }
+ for (var i=0; i < ls.length; ++i) {
+ if (ls[i] == "")
+ continue;
+
+ if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:")
+ ls[i] = helpBaseURI + ls[i];
+ }
+ return ls.join(" ");
}
function getLink(ID) {
@@ -579,30 +596,6 @@ function getMarkupDocumentViewer() {
return helpBrowser.markupDocumentViewer;
}
-# Show the selected sidebar panel
-function showPanel(panelId) {
- //hide other sidebar panels and show the panel name taken in.
- helpSearchPanel.setAttribute("hidden", "true");
- helpTocPanel.setAttribute("hidden", "true");
- helpIndexPanel.setAttribute("hidden", "true");
- helpGlossaryPanel.setAttribute("hidden", "true");
- var thePanel = document.getElementById(panelId + "-panel");
- thePanel.setAttribute("hidden","false");
-
- //remove the selected style from the previous panel selected.
- var theButton = document.getElementById(panelId + "-btn");
- document.getElementById("help-glossary-btn").removeAttribute("selected");
- document.getElementById("help-index-btn").removeAttribute("selected");
- document.getElementById("help-search-btn").removeAttribute("selected");
- document.getElementById("help-toc-btn").removeAttribute("selected");
- //add the selected style to the correct panel.
- theButton.setAttribute("selected", "true");
-
- //focus the searchbox if the search sidebar panel is shown.
- if (panelId == "help-search")
- document.getElementById("findText").focus();
-}
-
function findParentNode(node, parentNode)
{
if (node && node.nodeType == Node.TEXT_NODE) {
@@ -629,8 +622,8 @@ function findParentNode(node, parentNode)
function onselect_loadURI(tree) {
try {
var resource = tree.view.getResourceAtIndex(tree.currentIndex);
- var link = tree.database.GetTarget(resource, NC_LINK, true);
- if (link) {
+ var link = tree.database.GetTarget(resource, NC_LINK, true);
+ if (link) {
link = link.QueryInterface(Components.interfaces.nsIRDFLiteral);
loadURI(link.Value);
}
@@ -638,9 +631,44 @@ function onselect_loadURI(tree) {
}// when switching between tabs a spurious row number is returned.
}
+// copied from browser.js to handle the searchbar
+function SearchbarFocusHandler(aEvent, aElt)
+{
+ if (gIgnoreFocus)
+ gIgnoreFocus = false;
+ else if (gClickSelectsAll)
+ aElt.select();
+}
+
+function SearchbarMouseDownHandler(aEvent, aElt)
+{
+ if (aElt.hasAttribute("focused")) {
+ gIgnoreClick = true;
+ } else {
+ gIgnoreFocus = true;
+ gIgnoreClick = false;
+ aElt.setSelectionRange(0, 0);
+ }
+}
+
+function SearchbarClickHandler(aEvent, aElt)
+{
+ if (!gIgnoreClick && gClickSelectsAll && aElt.selectionStart == aElt.selectionEnd)
+ aElt.select();
+}
+
+
+function focusSearch() {
+ var searchBox = document.getElementById("findText");
+ searchBox.focus();
+}
+
# doFind - Searches the help files for what is located in findText and outputs into
-# the find search tree.
+# the find search tree.
function doFind() {
+ if (document.getElementById("help-search-sidebar").hidden)
+ showSearchSidebar();
+
var searchTree = document.getElementById("help-search-tree");
var findText = document.getElementById("findText");
@@ -651,6 +679,7 @@ function doFind() {
RE = findText.value.match(/\S+/g);
if (!RE) {
searchTree.builder.rebuild();
+ hideSearchSidebar();
return;
}
@@ -672,7 +701,7 @@ function doFind() {
sourceDS = tree.database;
// If the glossary has never been displayed this will be null (sigh!).
if (!sourceDS)
- sourceDS = loadCompositeDS(tree.datasources);
+ sourceDS = loadCompositeDS(tree.datasources);
doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);
@@ -753,18 +782,18 @@ function doFindOnSeq(resultsDS, sourceDS, resource, level) {
function assertSearchEmpty(resultsDS) {
var resSearchEmpty = RDF.GetResource("urn:emptySearch");
- resultsDS.Assert(RDF_ROOT,
- NC_CHILD,
- resSearchEmpty,
- true);
- resultsDS.Assert(resSearchEmpty,
- NC_NAME,
- RDF.GetLiteral(emptySearchText),
- true);
- resultsDS.Assert(resSearchEmpty,
- NC_LINK,
- RDF.GetLiteral(emptySearchLink),
- true);
+ resultsDS.Assert(RDF_ROOT,
+ NC_CHILD,
+ resSearchEmpty,
+ true);
+ resultsDS.Assert(resSearchEmpty,
+ NC_NAME,
+ RDF.GetLiteral(emptySearchText),
+ true);
+ resultsDS.Assert(resSearchEmpty,
+ NC_LINK,
+ RDF.GetLiteral(emptySearchLink),
+ true);
}
function isMatch(text) {
@@ -839,51 +868,16 @@ function expandAllIndexEntries() {
}
}
-# toggleSidebarStatus - Toggles the visibility of the sidebar.
-function toggleSidebar()
+function getBoolPref (aPrefname, aDefault)
{
- var sidebar = document.getElementById("helpsidebar-box");
- var separator = document.getElementById("helpsidebar-splitter");
- var sidebarButton = document.getElementById("help-sidebar-button");
-
- //Use the string bundle to retrieve the text "Hide Sidebar"
- //and "Show Sidebar" from the locale directory.
- if (sidebar.hidden) {
- sidebar.removeAttribute("hidden");
- sidebarButton.label = strBundle.getString("hideSidebarLabel");
-
- separator.removeAttribute("hidden");
- } else {
- sidebar.setAttribute("hidden","true");
- sidebarButton.label = strBundle.getString("showSidebarLabel");
-
- separator.setAttribute("hidden","true");
- }
-}
-
-// Shows the panel relative to the currently selected panel.
-// Takes a boolean parameter - if true it will show the next panel,
-// otherwise it will show the previous panel.
-function showRelativePanel(goForward) {
- var selectedIndex = -1;
- var sidebarBox = document.getElementById("helpsidebar-box");
- var sidebarButtons = new Array();
- for (var i = 0; i < sidebarBox.childNodes.length; i++) {
- var btn = sidebarBox.childNodes[i];
- if (btn.nodeName == "toolbarbutton") {
- if (btn.getAttribute("selected") == "true")
- selectedIndex = sidebarButtons.length;
- sidebarButtons.push(btn);
- }
+ try {
+ var pref = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ return pref.getBoolPref(aPrefname);
+ }
+ catch(e) {
+ return aDefault;
}
- if (selectedIndex == -1)
- return;
- selectedIndex += goForward ? 1 : -1;
- if (selectedIndex >= sidebarButtons.length)
- selectedIndex = 0;
- else if (selectedIndex < 0)
- selectedIndex = sidebarButtons.length - 1;
- sidebarButtons[selectedIndex].doCommand();
}
# getXulWin - Returns the current Help window as a nsIXULWindow.
diff --git a/toolkit/components/help/content/help.xul b/toolkit/components/help/content/help.xul
index a8de142290f..59f18f8d180 100644
--- a/toolkit/components/help/content/help.xul
+++ b/toolkit/components/help/content/help.xul
@@ -39,7 +39,6 @@
# ***** END LICENSE BLOCK *****
-
@@ -73,365 +72,308 @@
onload="init();"
onunload="uninitFindBar(); window.XULBrowserWindow.destroy();">
-
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
#ifdef XP_UNIX
-
-
+
+
#endif
#ifdef XP_MACOSX
-
-
+
+
#else
-
-
-
-
+
+
+
+
#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
#include ../../typeaheadfind/content/findBar.inc
-
-
-
+
+
+
diff --git a/toolkit/components/help/jar.mn b/toolkit/components/help/jar.mn
index 2adbb314703..6eebfbda02b 100644
--- a/toolkit/components/help/jar.mn
+++ b/toolkit/components/help/jar.mn
@@ -4,6 +4,4 @@ toolkit.jar:
* content/help/contextHelp.js (content/contextHelp.js)
* content/help/help.js (content/help.js)
* content/help/helpContextOverlay.xul (content/helpContextOverlay.xul)
-* content/help/customizeToolbar.xul (content/customizeToolbar.xul)
-* content/help/toolbarCustomization.js (content/toolbarCustomization.js)
* content/help/platformClasses.css (content/platformClasses.css)
diff --git a/toolkit/locales/en-US/chrome/mozapps/help/help.dtd b/toolkit/locales/en-US/chrome/mozapps/help/help.dtd
index 292cf26b4a0..037060506e2 100644
--- a/toolkit/locales/en-US/chrome/mozapps/help/help.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/help/help.dtd
@@ -1,8 +1,5 @@
-
-
-
@@ -19,16 +16,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -36,25 +23,22 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/toolkit/locales/en-US/chrome/mozapps/help/help.properties b/toolkit/locales/en-US/chrome/mozapps/help/help.properties
index 1e67fd3e179..a3d9794a4e6 100644
--- a/toolkit/locales/en-US/chrome/mozapps/help/help.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/help/help.properties
@@ -1,3 +1 @@
-showSidebarLabel=Show Sidebar
-hideSidebarLabel=Hide Sidebar
emptySearchText=No search items found.
diff --git a/toolkit/themes/pinstripe/help/help.css b/toolkit/themes/pinstripe/help/help.css
index f1d153a5071..a55465276df 100644
--- a/toolkit/themes/pinstripe/help/help.css
+++ b/toolkit/themes/pinstripe/help/help.css
@@ -37,15 +37,19 @@
@import url("chrome://global/skin/");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+toolbarbutton {
+ -moz-box-orient: horizontal;
+}
+
toolbarbutton[type="menu-button"] {
margin: 0px;
padding: 0px;
}
.toolbarbutton-1 {
- min-width: 0px;
- list-style-image: url("chrome://help/skin/Toolbar.png");
- -moz-box-orient: vertical;
+ min-width: 16px;
+ list-style-image: url("chrome://help/skin/Toolbar.png");
+ -moz-box-orient: vertical;
}
.toolbarbutton-menubutton-stack {
@@ -53,29 +57,26 @@ toolbarbutton[type="menu-button"] {
}
.toolbarbutton-menubutton-stack > .toolbarbutton-menubutton-button {
- -moz-box-orient: vertical;
+ -moz-box-orient: horizontal;
}
.browserButton {
- min-width: 0px;
+ min-width: 16px;
list-style-image: url("chrome://browser/skin/Toolbar.png");
- -moz-box-orient: vertical;
+ -moz-box-orient: horizontal;
}
-#help-zoom-large-button,
-#help-zoom-small-button,
-#help-sidebar-button {
- list-style-image: url("chrome://help/skin/Toolbar.png");
- -moz-box-orient: vertical;
-}
toolbarbutton:not([disabled="true"]):hover,
menubutton:not([disabled="true"]):hover,
toolbarbutton:not([disabled="true"]):hover:active,
menubutton:not([disabled="true"]):hover:active {
- color: ButtonText !important;
+ color: ButtonText !important;
}
+/* Set the minimum sidebar width so the help contents aren't squeezed together.*/
+#help-sidebar { min-width: 15em; width: 20em; max-width: 25em; }
+
#help-back-button { -moz-image-region: rect(0px 32px 32px 0px); }
#help-back-button:hover:active { -moz-image-region: rect(32px 32px 64px 0px); }
#help-back-button[disabled="true"] { -moz-image-region: rect(64px 32px 96px 0px); }
@@ -90,91 +91,34 @@ menubutton:not([disabled="true"]):hover:active {
#help-print-button { -moz-image-region: rect(0px 288px 32px 256px); }
#help-print-button:hover:active { -moz-image-region: rect(32px 288px 64px 256px); }
-#help-toolbar-customization { -moz-image-region: rect(0px 32px 32px 0px); }
-#help-toolbar-customization:hover:active { -moz-image-region: rect(32px 32px 64px 0px); }
-
-#help-find-button { -moz-image-region: rect(0px 64px 32px 32px); }
-#help-find-button:hover:active { -moz-image-region: rect(32px 64px 64px 32px); }
-
-#help-zoom-large-button { -moz-image-region: rect(0px 96px 32px 64px); }
-#help-zoom-large-button:hover:active { -moz-image-region: rect(32px 96px 64px 64px); }
-
-#help-zoom-small-button { -moz-image-region: rect(0px 128px 32px 96px); }
-#help-zoom-small-button:hover:active { -moz-image-region: rect(32px 128px 64px 96px); }
-
-#help-sidebar-button { -moz-image-region: rect(0px 160px 32px 128px); }
-
-/** Toolbar Customization stuff **/
-toolbar[mode="icons"] > toolbarbutton > .toolbarbutton-icon,
-toolbar[mode="text"] > toolbarbutton > .toolbarbutton-text,
-toolbar[mode="icons"] > toolbarbutton[type="menu-button"] > .toolbarbutton-icon,
-toolbar[mode="text"] > toolbarbutton[type="menu-button"] > .toolbarbutton-text {
- display: -moz-box;
-}
-
-toolbar[mode="icons"] > toolbarbutton > .toolbarbutton-text,
-toolbar[mode="text"] > toolbarbutton > .toolbarbutton-icon,
-toolbar[mode="text"] > toolbarbutton > toolbarbutton > .toolbarbutton-icon,
-toolbar[mode="icons"] > toolbarbutton > toolbarbutton > .toolbarbutton-text {
- display: none;
-}
-
-/* Small icons are not supported. */
-#smallicons { display: none; }
-
-/*** THROBBER ***/
-#help-throbber {
- -moz-appearance: none;
- -moz-user-focus: ignore;
- -moz-box-pack: center;
- margin: 0 1px 0 1px !important;
- border: none !important;
- padding: 0 !important;
- min-width: 0;
- background-color: transparent;
- list-style-image: url("chrome://global/skin/icons/notloading_16.png");
- width: 24px;
-}
-
-#help-throbber[busy="true"] {
- list-style-image: url("chrome://global/skin/icons/loading_16.gif");
-}
-
-toolbar[mode="icons"] .toolbarbutton-text {
- display: none;
-}
-
-toolbar[mode="text"] .toolbarbutton-icon {
- display: none;
-}
#helpsidebar-splitter {
border-right: 1px solid #bebebe;
}
#helpsidebar-box toolbarbutton {
- background-image: url("chrome://global/skin/icons/white-gray-gradient.gif");
- background-repeat: repeat-x;
- background-position: bottom right;
- background-color: rgb(246, 246, 246);
- border-bottom: 1px solid #b3b3b3;
- border-right: 1px solid #bebebe;
- margin: 0px;
- text-align: left;
- color: #505050;
+ background-image: url("chrome://global/skin/icons/white-gray-gradient.gif");
+ background-repeat: repeat-x;
+ background-position: bottom right;
+ background-color: rgb(246, 246, 246);
+ border-bottom: 1px solid #b3b3b3;
+ border-right: 1px solid #bebebe;
+ margin: 0px;
+ text-align: left;
+ color: #505050;
}
#helpsidebar-box toolbarbutton[selected="true"] {
- color: #000;
+ color: #000;
}
#helpsidebar-box tree {
- margin: 0px !important;
- padding: 0px !important;
+ margin: 0px !important;
+ padding: 0px !important;
}
#appcontent {
- margin-bottom: 14px;
- border-bottom: 1px solid #bebebe;
+ margin-bottom: 14px;
+ border-bottom: 1px solid #bebebe;
}
diff --git a/toolkit/themes/pinstripe/help/jar.mn b/toolkit/themes/pinstripe/help/jar.mn
index 5fa471d97b9..68da5ca373e 100644
--- a/toolkit/themes/pinstripe/help/jar.mn
+++ b/toolkit/themes/pinstripe/help/jar.mn
@@ -3,10 +3,4 @@ classic.jar:
skin/classic/help/help.css
skin/classic/help/Toolbar.png
* skin/classic/help/helpFileLayout.css
- skin/classic/help/sbtab-twisty.gif
- skin/classic/help/sbtab-twisty-open.gif
-* skin/classic/help/sidebar.css
-* skin/classic/help/sidebarBindings.xml
skin/classic/help/Weblink.png
- skin/classic/help/throbber.png
- skin/classic/help/throbber-busy.gif
diff --git a/toolkit/themes/pinstripe/help/sbtab-twisty-open.gif b/toolkit/themes/pinstripe/help/sbtab-twisty-open.gif
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/pinstripe/help/sbtab-twisty.gif b/toolkit/themes/pinstripe/help/sbtab-twisty.gif
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/pinstripe/help/sidebar.css b/toolkit/themes/pinstripe/help/sidebar.css
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/pinstripe/help/sidebarBindings.xml b/toolkit/themes/pinstripe/help/sidebarBindings.xml
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/pinstripe/help/throbber-busy.gif b/toolkit/themes/pinstripe/help/throbber-busy.gif
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/pinstripe/help/throbber.png b/toolkit/themes/pinstripe/help/throbber.png
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/help.css b/toolkit/themes/winstripe/help/help.css
index ed4683cc2f9..20a1cdd622d 100644
--- a/toolkit/themes/winstripe/help/help.css
+++ b/toolkit/themes/winstripe/help/help.css
@@ -38,31 +38,27 @@
@import url("chrome://global/skin/");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+toolbarbutton {
+ -moz-box-orient: horizontal;
+}
+
.toolbarbutton-1 {
- -moz-box-orient: vertical;
+ -moz-box-orient: horizontal;
min-width: 0px;
list-style-image: url("chrome://help/skin/Toolbar.png");
}
.browserButton {
- -moz-box-orient: vertical;
+ -moz-box-orient: horizontal;
min-width: 0px;
list-style-image: url("chrome://browser/skin/Toolbar.png");
}
-.toolbarbutton-1, .browserButton, .toolbarbutton-menubutton-button {
- padding: 5px;
-}
-
-.toolbarbutton-1 .toolbarbutton-icon,
-.browserButton .toolbarbutton-icon {
- -moz-margin-end: 0px;
-}
-
-#helpToolbar[mode="full"] .toolbarbutton-1,
-#helpToolbar[mode="full"] .browserButton,
-#helpToolbar[mode="full"] .toolbarbutton-menubutton-button {
- min-width: 57px;
+#helpToolbar .toolbarbutton-1,
+#helpToolbar .browserButton,
+#helpToolbar .toolbarbutton-menubutton-button {
+ min-width: 16px;
+ -moz-box-orient: horizontal !important;
}
toolbarbutton:not([disabled="true"]):hover,
@@ -73,7 +69,7 @@ menubutton:not([disabled="true"]):hover:active {
}
/* Set the minimum sidebar width so the help contents aren't squeezed together.*/
-#helpsidebar-box { width: 200px; }
+#help-sidebar { min-width: 15em; width: 20em; max-width: 25em; }
#help-back-button,
#help-forward-button[chromedir="rtl"] { -moz-image-region: rect(0px 24px 24px 0px); }
@@ -82,17 +78,15 @@ menubutton:not([disabled="true"]):hover:active {
#help-back-button[disabled="true"],
#help-forward-button[disabled="true"][chromedir="rtl"] { -moz-image-region: rect(48px 24px 72px 0px); }
-#help-forward-button, #help-back-button[chromedir="rtl"] { -moz-image-region: rect(0px 48px 24px 24px); }
-#help-forward-button:hover,
-#help-back-button[chromedir="rtl"]:hover { -moz-image-region: rect(24px 48px 48px 24px); }
-#help-forward-button[disabled="true"],
-#help-back-button[disabled="true"][chromedir="rtl"] { -moz-image-region: rect(48px 48px 72px 24px); }
-
-#help-find-button { -moz-image-region: rect(0px 192px 24px 168px); }
-#help-find-button:hover { -moz-image-region: rect(24px 192px 48px 168px); }
-
-#help-toolbar-customization { -moz-image-region: rect(0px 216px 24px 192px); }
-#help-toolbar-customization:hover { -moz-image-region: rect(24px 216px 48px 192px); }
+#help-forward-button, #help-back-button[chromedir="rtl"] {
+ -moz-image-region: rect(0px 48px 24px 24px);
+}
+#help-forward-button:hover, #help-back-button[chromedir="rtl"]:hover {
+ -moz-image-region: rect(24px 48px 48px 24px);
+}
+#help-forward-button[disabled="true"],#help-back-button[disabled="true"][chromedir="rtl"] {
+ -moz-image-region: rect(48px 48px 72px 24px);
+}
#help-home-button { -moz-image-region: rect(0px 120px 24px 96px); }
#help-home-button:hover { -moz-image-region: rect(24px 120px 48px 96px); }
@@ -100,44 +94,5 @@ menubutton:not([disabled="true"]):hover:active {
#help-print-button { -moz-image-region: rect(0px 216px 24px 192px); }
#help-print-button:hover { -moz-image-region: rect(24px 216px 48px 192px); }
-#help-zoom-large-button { -moz-image-region: rect(0px 24px 24px 0px); }
-#help-zoom-large-button:hover { -moz-image-region: rect(24px 24px 48px 0px); }
-#help-zoom-small-button { -moz-image-region: rect(0px 48px 24px 24px); }
-#help-zoom-small-button:hover { -moz-image-region: rect(24px 48px 48px 24px); }
-#help-sidebar-button { -moz-image-region: rect(0px 72px 24px 48px); }
-#help-sidebar-button:hover { -moz-image-region: rect(24px 72px 48px 48px); }
-
-/** Toolbar Customization stuff **/
-toolbar[mode="icons"] > toolbarbutton > .toolbarbutton-icon,
-toolbar[mode="text"] > toolbarbutton > .toolbarbutton-text,
-toolbar[mode="icons"] > toolbarbutton[type="menu-button"] > .toolbarbutton-icon,
-toolbar[mode="text"] > toolbarbutton[type="menu-button"] > .toolbarbutton-text {
- display: -moz-box;
-}
-
-toolbar[mode="icons"] .toolbarbutton-text,
-toolbar[mode="text"] .toolbarbutton-icon {
- display: none;
-}
-
-/* Small icons are not supported. */
-#smallicons { display: none; }
-
-/*** THROBBER ***/
-#help-throbber {
- -moz-appearance: none;
- -moz-user-focus: ignore;
- margin: 0 !important;
- border: none !important;
- padding: 0 !important;
- min-width: 0;
- background-color: transparent;
- list-style-image: url("chrome://browser/skin/Throbber-small.png");
-}
-
-#help-throbber[busy="true"] {
- list-style-image: url("chrome://browser/skin/Throbber-small.gif");
- opacity: 0.5;
-}
diff --git a/toolkit/themes/winstripe/help/jar.mn b/toolkit/themes/winstripe/help/jar.mn
index 9cc907f2106..6895b4c9819 100644
--- a/toolkit/themes/winstripe/help/jar.mn
+++ b/toolkit/themes/winstripe/help/jar.mn
@@ -3,12 +3,5 @@ classic.jar:
skin/classic/help/help.css
skin/classic/help/Toolbar.png
* skin/classic/help/helpFileLayout.css
- skin/classic/help/sbtab-twisty.gif
- skin/classic/help/sbtab-twisty-rtl.gif
- skin/classic/help/sbtab-twisty-open.gif
-* skin/classic/help/sidebar.css
-* skin/classic/help/sidebarBindings.xml
skin/classic/help/Weblink.png
skin/classic/help/Weblink-rtl.png
- skin/classic/help/throbber.png
- skin/classic/help/throbber-busy.gif
diff --git a/toolkit/themes/winstripe/help/sbtab-twisty-open.gif b/toolkit/themes/winstripe/help/sbtab-twisty-open.gif
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/sbtab-twisty-rtl.gif b/toolkit/themes/winstripe/help/sbtab-twisty-rtl.gif
deleted file mode 100755
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/sbtab-twisty.gif b/toolkit/themes/winstripe/help/sbtab-twisty.gif
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/sidebar.css b/toolkit/themes/winstripe/help/sidebar.css
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/sidebarBindings.xml b/toolkit/themes/winstripe/help/sidebarBindings.xml
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/throbber-busy.gif b/toolkit/themes/winstripe/help/throbber-busy.gif
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/toolkit/themes/winstripe/help/throbber.png b/toolkit/themes/winstripe/help/throbber.png
deleted file mode 100644
index e69de29bb2d..00000000000