bug 295817 - Rework help viewer UI, r=vlad, a=asa

This commit is contained in:
mconnor%steelgryphon.com 2005-07-07 17:39:59 +00:00
Родитель 7e84be8fca
Коммит 0daf572ee2
22 изменённых файлов: 548 добавлений и 746 удалений

Просмотреть файл

@ -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
@ -149,9 +153,8 @@ function init() {
// Get the content pack, base URL, and help topic
var helpTopic = defaultTopic;
if ("arguments" in window
&& window.arguments[0]
instanceof Components.interfaces.nsIDialogParamBlock) {
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);
@ -167,7 +170,8 @@ function init() {
window.moveTo((screen.availWidth - width) / 2, (screen.availHeight - height) / 2);
// Initialize history.
getWebNavigation().sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"]
getWebNavigation().sessionHistory =
Components.classes["@mozilla.org/browser/shistory;1"]
.createInstance(Components.interfaces.nsISHistory);
window.XULBrowserWindow = new nsHelpStatusHandler();
@ -180,20 +184,35 @@ function init() {
webProgress.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
//Display the Table of Contents
showPanel("help-toc");
gClickSelectsAll = getBoolPref("browser.urlbar.clickSelectsAll", true);
}
// initialize the customizeDone method on the customizeable toolbar
var toolbox = document.getElementById("help-toolbox");
toolbox.customizeDone = ToolboxCustomizeDone;
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();
}
var toolbarset = document.getElementById("customToolbars");
toolbox.toolbarset = toolbarset;
var tableOfContents = document.getElementById("help-toc-sidebar");
tableOfContents.setAttribute("hidden", "true");
// 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 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() {
@ -205,6 +224,7 @@ function loadHelpRDF() {
} 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);
@ -218,11 +238,9 @@ function loadHelpRDF() {
var iterator = RDFContainer.GetElements();
while (iterator.hasMoreElements()) {
var panelDef = iterator.getNext();
var panelID = getAttribute(helpFileDS, panelDef, NC_PANELID,
null);
var panelID = getAttribute(helpFileDS, panelDef, NC_PANELID, null);
var datasources = getAttribute(helpFileDS, panelDef,
NC_DATASOURCES, "rdf:none");
var datasources = getAttribute(helpFileDS, panelDef, NC_DATASOURCES, "rdf:none");
datasources = normalizeLinks(helpBaseURI, datasources);
var panelPlatforms = getAttribute(helpFileDS, panelDef, NC_PLATFORM, platform);
@ -279,13 +297,12 @@ function normalizeLinks(helpBaseURI, links) {
return links;
}
for (var i=0; i < ls.length; ++i) {
if (ls[i] == "") {
if (ls[i] == "")
continue;
}
if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:") {
if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:")
ls[i] = helpBaseURI + ls[i];
}
}
return ls.join(" ");
}
@ -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) {
@ -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.
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;
}
@ -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");
try {
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
return pref.getBoolPref(aPrefname);
}
catch(e) {
return aDefault;
}
// 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);
}
}
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.

Просмотреть файл

@ -39,7 +39,6 @@
# ***** END LICENSE BLOCK *****
<?xml-stylesheet href="chrome://help/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://help/skin/sidebar.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>
<?xul-overlay href="chrome://help/content/helpContextOverlay.xul"?>
@ -73,7 +72,6 @@
onload="init();"
onunload="uninitFindBar(); window.XULBrowserWindow.destroy();">
<script type="application/x-javascript" src="chrome://help/content/toolbarCustomization.js"/>
<script type="application/x-javascript" src="chrome://help/content/help.js"/>
<script type="application/x-javascript" src="chrome://global/content/findBar.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewZoomOverlay.js"/>
@ -88,11 +86,7 @@
onpopupshowing="return createForwardMenu(event);"
oncommand="gotoHistoryIndex(event);"/>
<popupset id="contentAreaContextSet"/>
<popup id="toolbar-context-menu">
<menuitem command="cmd_CustomizeToolbars"
label="&viewCustomizeToolbar.label;"
accesskey="&viewCustomizeToolbar.accesskey;"/>
</popup>
<broadcasterset id="helpBroadcasters">
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="canGoForward" disabled="true"/>
@ -107,7 +101,6 @@
<command id="cmd_closeWindow" oncommand="close();"/>
<command id="cmd_textZoomReduce" oncommand="ZoomManager.prototype.getInstance().reduce();"/>
<command id="cmd_textZoomEnlarge" oncommand="ZoomManager.prototype.getInstance().enlarge();"/>
<command id="cmd_CustomizeToolbars" oncommand="CustomizeToolbar('help-toolbox');"/>
<command id="cmd_find" oncommand="onFindCmd();"/>
<command id="cmd_findAgain" oncommand="onFindAgainCmd();"/>
<command id="cmd_findPrevious" oncommand="onFindPreviousCmd();"/>
@ -137,8 +130,8 @@
<key keycode="VK_F5" oncommand="reload();"/>
<key id="key_closeWindow" key="&closeWindow.commandkey;"
command="cmd_closeWindow" modifiers="accel"/>
<key id="key_closeWindow2" keycode="VK_ESCAPE"
command="cmd_closeWindow"/>
<key id="key_closeSearchSidebar" keycode="VK_ESCAPE"
oncommand="hideSearchSidebar(event)"/>
<key id="key_textZoomEnlarge" key="&textZoomEnlargeCmd.commandkey;"
command="cmd_textZoomEnlarge" modifiers="accel"/>
<key id="key_textZoomEnlarge2" key="&textZoomEnlargeCmd.commandkey2;"
@ -147,11 +140,9 @@
command="cmd_textZoomReduce" modifiers="accel"/>
<key id="key_textZoomReset" key="&textZoomResetCmd.commandkey;"
oncommand="ZoomManager.prototype.getInstance().reset();" modifiers="accel"/>
<key id="key_toggleSidebar" keycode="VK_F9" command="Help:ToggleSidebar"/>
<key id="key_viewNextHelpPanel" keycode="VK_TAB"
oncommand="showRelativePanel(true);" modifiers="control"/>
<key id="key_viewPrevHelpPanel" keycode="VK_TAB"
oncommand="showRelativePanel(false);" modifiers="control,shift"/>
<key id="key_focusSearch" key="&helpSearch.commandkey;"
oncommand="focusSearch()" modifiers="accel"/>
</keyset>
<stringbundle id="bundle_viewZoom"/>
<stringbundle id="findBundle"
@ -160,86 +151,56 @@
src="chrome://help/locale/help.properties"/>
<vbox flex="1">
<toolbox id="help-toolbox" class="toolbox-top" mode="icons" iconsize="small" customizable="true">
<toolbarpalette id="HelpToolbarPalette">
<toolbarbutton id="help-sidebar-button"
class="toolbarbutton-1"
tooltiptext="&sidebarBtn.tooltip;"
customizeable="true" label="&sidebarBtn.label;"
command="Help:ToggleSidebar"/>
<toolbox id="help-toolbox" class="toolbox-top">
<toolbar id="HelpToolbar" class="chromeclass-toolbar">
<toolbarbutton id="help-back-button" type="menu-button"
class="browserButton" label="&backButton.label;"
oncommand="if (event.target == this) goBack(); else gotoHistoryIndex(event);"
observes="canGoBack" context="backMenu"
tooltiptext="&backButton.tooltip;"
chromedir="&locale.dir;">
<menupopup context=""
onpopupshowing="createBackMenu(event);"/>
<menupopup context="" onpopupshowing="createBackMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="help-forward-button" type="menu-button"
class="browserButton"
label="&forwardButton.label;"
oncommand="if (event.target == this) goForward(); else gotoHistoryIndex(event);"
tooltiptext="&forwardButton.tooltip;"
observes="canGoForward"
chromedir="&locale.dir;">
<menupopup context=""
onpopupshowing="createForwardMenu(event);"/>
<menupopup context="" onpopupshowing="createForwardMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="help-home-button"
class="browserButton" label="&homeButton.label;"
<toolbarbutton id="help-home-button" class="browserButton"
tooltiptext="&homeButton.tooltip;"
command="Help:Home"/>
<toolbarbutton id="help-find-button"
class="toolbarbutton-1" label="&findBtn.label;"
command="cmd_find"/>
<toolbarbutton id="help-zoom-small-button"
class="toolbarbutton-1" label="&textZoomReduceBtn.label;"
tooltiptext="&textZoomReduceBtn.tooltip;"
command="cmd_textZoomReduce"/>
<toolbarbutton id="help-zoom-large-button"
class="toolbarbutton-1" label="&textZoomEnlargeBtn.label;"
tooltiptext="&textZoomEnlargeBtn.tooltip;"
command="cmd_textZoomEnlarge"/>
<toolbarseparator/>
<toolbarbutton id="help-print-button" class="browserButton"
label="&printButton.label;"
oncommand="print();"
tooltiptext="&printButton.tooltip;"/>
<toolbarbutton id="help-toolbar-customization" class="toolbarbutton-1"
label="&cmd_CustomizeToolbars.label;"
command="cmd_CustomizeToolbars"
tooltiptext="&customizeButton.tooltip;"/>
<toolbaritem id="throbber-box" title="&throbberItem.title;"
<toolbarspring flex="1"/>
<toolbaritem id="search-box"
align="center" pack="center">
<button id="help-throbber" tooltiptext="&throbber.tooltip;"
command="Help:Home"/>
<label value="&searchtab.label;" accesskey="&searchtab.accesskey;"
control="findText"/>
<textbox id="findText" type="timed" timeout="500"
onfocus="SearchbarFocusHandler(event, this);"
onmousedown="SearchbarMouseDownHandler(event, this);"
onclick="SearchbarClickHandler(event, this);"
oncommand="doFind();"/>
</toolbaritem>
</toolbarpalette>
<toolbar id="helpToolbar" toolbarname="Help Toolbar" class="toolbar-primary
chromeclass-toolbar" mode="icons" iconsize="small"
customizable="true"
defaultset="help-sidebar-button,separator,help-back-button,help-forward-button,help-home-button,separator,help-toolbar-customization,spring,help-print-button,separator,spacer,throbber-box"
context="toolbar-context-menu"/>
<toolbarset id="customToolbars"/>
</toolbar>
</toolbox>
<hbox flex="1">
<vbox id="helpsidebar-box" persist="width">
<!-- glossary panel -->
<toolbarbutton id="help-glossary-btn"
class="box-texttab texttab-sidebar"
label="&glossarytab.label;"
oncommand="showPanel('help-glossary')"
accesskey="&glossarytab.accesskey;"
chromedir="&locale.dir;"/>
<tree id="help-glossary-panel" class="focusring"
<vbox id="help-sidebar" persist="width">
<vbox flex="1" id="help-toc-sidebar">
<sidebarheader align="center">
<label id="help-toc-sidebar-header" flex="1" crop="end" value="&toctab.label;"
accesskey="&toctab.accesskey;" control="help-toc-panel"/>
</sidebarheader>
<tree id="help-toc-panel" class="focusring"
flex="1" hidecolumnpicker="true"
hidden="true" datasources="rdf:null"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#subheadings"
ref="urn:root" flags="dont-build-content"
onselect="onselect_loadURI(this)">
@ -258,7 +219,91 @@
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">
<treerow>
<treecell label="?name"/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
<treecols>
<treecol id="NameColumn" flex="1" hideheader="true"
primary="true"/>
</treecols>
</tree>
</vbox>
<vbox id="help-search-sidebar" hidden="true" flex="1">
<sidebarheader align="center">
<label id="help-search-sidebar-header" flex="1" crop="end" value="&searchtab.label;"/>
<toolbarbutton id="find-closebutton" oncommand="hideSearchSidebar();"/>
</sidebarheader>
<tree id="help-search-tree" class="focusring"
flex="1" hidecolumnpicker="true"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#child"
ref="urn:root" flags="dont-build-content"
onselect="onselect_loadURI(this)">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<member container="?uri"
child="?subheading"/>
</conditions>
<bindings>
<binding subject="?subheading"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">
<treerow>
<treecell label="?name"/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
<treecols>
<treecol id="ResultsColumn" flex="1"
hideheader="true" primary="true"
sortActive="true" sortDirection="ascending"
sort="?name"/>
</treecols>
</tree>
</vbox>
<!-- BEGIN hidden trees used for searching -->
<!-- xxxmpc: we need a better solution for this -->
<vbox id="help-sidebar-hidden-trees" hidden="true">
<tree id="help-glossary-panel" class="focusring"
flex="1" hidecolumnpicker="true"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#subheadings"
ref="urn:root" flags="dont-build-content"
onselect="onselect_loadURI(this)">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<triple subject="?uri"
predicate="http://home.netscape.com/NC-rdf#subheadings"
object="?subheadings"/>
<member container="?subheadings"
child="?subheading"/>
</conditions>
<bindings>
<binding subject="?subheading"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">
@ -275,16 +320,9 @@
hideheader="true" primary="true"/>
</treecols>
</tree>
<toolbarbutton id="help-index-btn" class="box-texttab texttab-sidebar"
label="&indextab.label;"
oncommand="showPanel('help-index');expandAllIndexEntries();"
accesskey="&indextab.accesskey;"
chromedir="&locale.dir;"/>
<tree id="help-index-panel" class="focusring"
flex="1" datasources="rdf:null"
hidecolumnpicker="true" hidden="true"
hidecolumnpicker="true"
containment="http://home.netscape.com/NC-rdf#subheadings"
ref="urn:root"
flags="dont-build-content dont-test-empty"
@ -304,7 +342,6 @@
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">
@ -322,107 +359,12 @@
sortDirection="ascending" sort="?name"/>
</treecols>
</tree>
<toolbarbutton id="help-search-btn" class="box-texttab texttab-sidebar"
label="&searchtab.label;"
oncommand="showPanel('help-search')"
accesskey="&searchtab.accesskey;"
chromedir="&locale.dir;"/>
<vbox id="help-search-panel" hidden="true" flex="1">
<textbox id="findText" type="timed" timeout="500"
oncommand="doFind();"/>
<tree id="help-search-tree" class="focusring"
flex="1" hidecolumnpicker="true"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#child"
ref="urn:root" flags="dont-build-content"
onselect="onselect_loadURI(this)">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<member container="?uri"
child="?subheading"/>
</conditions>
<bindings>
<binding subject="?subheading"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">
<treerow>
<treecell label="?name"/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
<treecols>
<treecol id="ResultsColumn" flex="1"
hideheader="true" primary="true"
sortActive="true" sortDirection="ascending"
sort="?name"/>
</treecols>
</tree>
</vbox>
<toolbarbutton id="help-toc-btn" class="box-texttab texttab-sidebar"
label="&toctab.label;"
oncommand="showPanel('help-toc')"
accesskey="&toctab.accesskey;"
chromedir="&locale.dir;"/>
<tree id="help-toc-panel" class="focusring"
flex="1" hidecolumnpicker="true"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#subheadings"
ref="urn:root" flags="dont-build-content"
onselect="onselect_loadURI(this)">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<triple subject="?uri"
predicate="http://home.netscape.com/NC-rdf#subheadings"
object="?subheadings"/>
<member container="?subheadings"
child="?subheading"/>
</conditions>
<bindings>
<binding subject="?subheading"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">
<treerow>
<treecell label="?name"/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
<treecols>
<treecol id="NameColumn" flex="1" hideheader="true"
primary="true"/>
</treecols>
</tree>
<!-- END HIDDEN ITEMS -->
</vbox>
<splitter id="helpsidebar-splitter" collapse="before"
persist="state hidden" state="open">
</splitter>
<splitter id="help-sidebar-splitter" collapse="before"/>
<vbox id="appcontent" flex="3">
<!-- type attribute is used by frame construction to locate

Просмотреть файл

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

Просмотреть файл

@ -1,8 +1,5 @@
<!ENTITY printCmd.commandkey "p">
<!ENTITY viewCustomizeToolbar.label "Customize...">
<!ENTITY viewCustomizeToolbar.accesskey "C">
<!ENTITY findOnCmd.commandkey "F">
<!ENTITY findAgainCmd.commandkey "G">
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
@ -19,16 +16,6 @@
<!ENTITY homeButton.tooltip "Go to the Help Start Page">
<!ENTITY printButton.label "Print">
<!ENTITY printButton.tooltip "Print this page">
<!ENTITY findBtn.label "Find">
<!ENTITY sidebarBtn.label "Toggle Sidebar">
<!ENTITY sidebarBtn.tooltip "Show or Hide the Help Sidebar">
<!ENTITY textZoomReduceBtn.label "Decrease Text Size">
<!ENTITY textZoomReduceBtn.accesskey "D">
<!ENTITY textZoomReduceBtn.tooltip "Decrease the size of the text in Help documents.">
<!ENTITY textZoomEnlargeBtn.label "Increase Text Size">
<!ENTITY textZoomEnlargeBtn.accesskey "I">
<!ENTITY textZoomEnlargeBtn.tooltip "Increase the size of the text in Help documents.">
<!ENTITY customizeButton.tooltip "Customize which buttons are shown on the Help toolbar.">
<!ENTITY reloadCmd.label "Reload">
<!ENTITY reloadCmd.accesskey "R">
<!ENTITY closeWindow.commandkey "W">
@ -36,25 +23,22 @@
<!ENTITY throbberItem.title "Activity Indicator">
<!ENTITY throbber.tooltip "Go to the Help on Help section">
<!ENTITY cmd_CustomizeToolbars.label "Customize" >
<!ENTITY searchtab.label "Search">
<!ENTITY searchtab.accesskey "S">
<!ENTITY searchbtn.label "Find">
<!ENTITY toctab.label "Contents">
<!ENTITY toctab.accesskey "C">
<!ENTITY indextab.label "Index">
<!ENTITY indextab.accesskey "I">
<!ENTITY ixname.label "Name">
<!ENTITY glossarytab.label "Glossary">
<!ENTITY glossarytab.accesskey "G">
<!ENTITY glossname.label "Name">
<!ENTITY name.label "Item">
<!ENTITY textZoomReduceCmd.commandkey "-">
<!ENTITY textZoomEnlargeCmd.commandkey "+">
<!ENTITY textZoomEnlargeCmd.commandkey2 "="> <!-- + is above this key on many keyboards -->
<!ENTITY textZoomResetCmd.commandkey "0">
<!ENTITY helpSearch.commandkey "k">
<!ENTITY zLevel.label "Always on Top">
<!ENTITY zLevel.accesskey "T">
<!ENTITY textZoomReduceBtn.label "Decrease Text Size">
<!ENTITY textZoomReduceBtn.accesskey "D">
<!ENTITY textZoomEnlargeBtn.label "Increase Text Size">
<!ENTITY textZoomEnlargeBtn.accesskey "I">

Просмотреть файл

@ -1,3 +1 @@
showSidebarLabel=Show Sidebar
hideSidebarLabel=Hide Sidebar
emptySearchText=No search items found.

Просмотреть файл

@ -37,13 +37,17 @@
@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;
min-width: 16px;
list-style-image: url("chrome://help/skin/Toolbar.png");
-moz-box-orient: vertical;
}
@ -53,21 +57,15 @@ 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,
@ -76,6 +74,9 @@ menubutton:not([disabled="true"]):hover:active {
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,63 +91,6 @@ 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;

Просмотреть файл

@ -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

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

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

Просмотреть файл

@ -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

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл