Bug 241469 - Help interface not keyboard accessible

r=rlk@trfenv.com, sr=bryner@brianryner.com
This commit is contained in:
pkw%us.ibm.com 2004-05-03 18:49:35 +00:00
Родитель eeaa4c5ae0
Коммит 86453cd23a
5 изменённых файлов: 51 добавлений и 99 удалений

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

@ -673,3 +673,27 @@ function displayIndex() {
treeview.toggleOpenState(i);
}
// 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 == "button") {
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();
}

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

@ -77,6 +77,8 @@
oncommand="BrowserViewSource();" modifiers="accel"/>
<key id="key_viewInfo" key="&pageInfoCmd.commandkey;"
oncommand="BrowserPageInfo();" modifiers="accel"/>
<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"/>
</keyset>
<stringbundle id="bundle_viewZoom"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
@ -124,8 +126,9 @@
<vbox id="helpsidebar-box" persist="width">
<!-- glossary panel -->
<button id="help-glossary-btn" class="box-texttab texttab-sidebar"
label="&glossarytab.label;" oncommand="showPanel('help-glossary')"/>
<button id="help-glossary-btn" class="box-texttab"
label="&glossarytab.label;" oncommand="showPanel('help-glossary')"
accesskey="&glossarytab.accesskey;"/>
<tree id="help-glossary-panel" flex="1" hidecolumnpicker="true" hidden="true"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#subheadings"
@ -171,8 +174,9 @@
</tree>
<!-- index panel -->
<button id="help-index-btn" class="box-texttab texttab-sidebar"
label="&indextab.label;" oncommand="showPanel('help-index');displayIndex();"/>
<button id="help-index-btn" class="box-texttab"
label="&indextab.label;" oncommand="showPanel('help-index');displayIndex();"
accesskey="&indextab.accesskey;"/>
<tree id="help-index-panel" flex="1"
datasources="rdf:null" hidecolumnpicker="true" hidden="true"
@ -222,8 +226,9 @@
</tree>
<!-- search panel -->
<button id="help-search-btn" class="box-texttab texttab-sidebar"
label="&searchtab.label;" oncommand="showPanel('help-search')"/>
<button id="help-search-btn" class="box-texttab"
label="&searchtab.label;" oncommand="showPanel('help-search')"
accesskey="&searchtab.accesskey;"/>
<vbox id="help-search-panel" hidden="true" flex="1">
<hbox align="center">
@ -281,8 +286,9 @@
</vbox>
<!-- table of contents panel -->
<button id="help-toc-btn" class="box-texttab texttab-sidebar"
label="&toctab.label;" oncommand="showPanel('help-toc')"/>
<button id="help-toc-btn" class="box-texttab"
label="&toctab.label;" oncommand="showPanel('help-toc')"
accesskey="&toctab.accesskey;"/>
<tree id="help-toc-panel" flex="1" hidecolumnpicker="true"
datasources="rdf:null"
containment="http://home.netscape.com/NC-rdf#subheadings"

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

@ -12,16 +12,20 @@
<!ENTITY tab1.label "Contents">
<!ENTITY tab2.label "Index">
<!-- added bt PW 1/29/02- please check for correctness-->
<!ENTITY searchtab.label "Search">
<!ENTITY searchbtn.label "Find">
<!ENTITY toctab.label "Contents">
<!ENTITY indextab.label "Index">
<!ENTITY ixname.label "Name">
<!ENTITY glossarytab.label "Glossary">
<!ENTITY glossname.label "Name">
<!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">
<!-- added IO 2/7/01 -->
<!ENTITY gobtn.label "Search">
<!ENTITY name.label "Item">
<!ENTITY gobtn.label "Search">
<!ENTITY name.label "Item">
<!ENTITY helpThrobber.tooltip "Go to the Help Home Page">

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

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<bindings id="sidebarBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="sbtab" extends="xul:button">
<content>
<xul:image class="sbtab-twisty" xbl:inherits="selected"/>
<xul:label class="sbtab-label" xbl:inherits="value=label" crop="right"/>
<xul:spacer flex="1"/>
<xul:image class="sbtab-texture"/>
</content>
</binding>
</bindings>

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

@ -1,65 +0,0 @@
<?xml version="1.0"?>
<bindings id="sidebarSplitterBindings.xml"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="sidebar-tab" extends="xul:button">
<content>
<xul:hbox class="sidebar-tab-left-box">
<xul:spacer class="sidebar-tab-left"/>
<xul:label class="sidebar-tab-text" xbl:inherits="value=label" crop="right" flex="1"/>
</xul:hbox>
<xul:vbox class="sidebar-tab-right-box" flex="1">
<xul:hbox class="sidebar-tab-right-top-box">
<xul:image class="sidebar-tab-right-img"/>
<xul:spacer class="sidebar-tab-right-line" flex="1"/>
</xul:hbox>
<xul:spacer class="sidebar-tab-right-btm" flex="1"/>
</xul:vbox>
</content>
</binding>
<binding id="DEAD" extends="xul:button">
<content>
<xul:vbox class="sidebar-tab-left">
<xul:spacer class="sidebar-tab-left-top" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"/>
<xul:spacer class="sidebar-tab-left-mid" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"
flex="1"/>
<xul:spacer class="sidebar-tab-left-btm" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"/>
</xul:vbox>
<xul:stack class="sidebar-tab-mid-1">
<xul:vbox class="sidebar-tab-mid-2">
<xul:spacer class="sidebar-tab-mid-top" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"
flex="1"/>
<xul:spacer class="sidebar-tab-mid-btm" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"/>
</xul:vbox>
<xul:vbox class="sidebar-tab-text-box">
<xul:label class="sidebar-tab-text" xbl:inherits="value=label" crop="right"/>
</xul:vbox>
</xul:stack>
<xul:vbox class="sidebar-tab-right">
<xul:spacer class="sidebar-tab-right-top" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"/>
<xul:spacer class="sidebar-tab-right-mid" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"
flex="1"/>
<xul:spacer class="sidebar-tab-right-btm" xbl:inherits="selected,first-panel-after-selected,top-panel,last-panel"/>
</xul:vbox>
<xul:spacer class="sidebar-tab-rightcap" flex="1"/>
</content>
</binding>
<binding id="sidebarheader">
<content>
<xul:label class="sidebar-header-text" xbl:inherits="value=label,crop" crop="right" flex="1"/>
<xul:hbox>
<children/>
</xul:hbox>
</content>
</binding>
</bindings>