Bug 142961 Tools/Form Manager/Form items should disable as per Edit/Form items also fix access key conflict with Edit/Find p=durbacher@gmx.de r=me sr=alecf

This commit is contained in:
neil%parkwaycc.co.uk 2004-02-19 11:20:08 +00:00
parent bf2ebba32d
commit ba0c81da0a
2 changed files with 20 additions and 25 deletions

View File

@ -32,12 +32,11 @@
<script type="application/x-javascript">
<![CDATA[
function initEditItems() {
// Determine if capture/prefill should be displayed and enabled.
function initWalletMenuItems() {
// Determine if capture/prefill should be enabled.
var state = getState(0);
setDisabledAttr("edit_capture", (state.capture != enable));
setDisabledAttr("edit_prefill", (state.prefill != enable));
setDisabledAttr("cmd_walletCapture", (state.capture != enable));
setDisabledAttr("cmd_walletPrefill", (state.prefill != enable));
}
/* form toolbar is out
@ -86,6 +85,15 @@
]]>
</script>
<commandset id="commands">
<commandset id="walletMenuItems">
<command id="cmd_walletPrefill" label="&prefillCmd.label;"
accesskey="&prefillCmd.accesskey;" oncommand="formPrefill();"/>
<command id="cmd_walletCapture" label="&captureCmd.label;"
accesskey="&captureCmd.accesskey;" oncommand="formCapture();"/>
</commandset>
</commandset>
<!-- menu items -->
<!-- form toolbar is out
@ -106,17 +114,11 @@
-->
<!-- edit menu -->
<menupopup id="menu_Edit_Popup" onpopupshowing="initEditItems();">
<menupopup id="menu_Edit_Popup" onpopupshowing="initWalletMenuItems();">
<menuseparator insertbefore="menu_PrefsSeparator"/>
<menuitem id="edit_prefill"
label="&prefillCmd.label;"
accesskey="&prefillCmd.accesskey;"
oncommand="formPrefill();"
<menuitem command="cmd_walletPrefill"
insertbefore="menu_PrefsSeparator"/>
<menuitem id="edit_capture"
label="&captureCmd.label;"
accesskey="&captureCmd.accesskey;"
oncommand="formCapture();"
<menuitem command="cmd_walletCapture"
insertbefore="menu_PrefsSeparator"/>
</menupopup>
@ -151,20 +153,14 @@
</toolbar>
</hbox>
-->
<menupopup id="taskPopup">
<menupopup id="taskPopup" onpopupshowing="initWalletMenuItems();">
<menu label="&walletFormManager.label;"
accesskey="&walletFormManager.accesskey;"
id="wallet"
insertbefore="navBeginGlobalItems">
<menupopup>
<menuitem id="edit_prefill"
label="&prefillCmd.label;"
accesskey="&prefillCmd.accesskey;"
oncommand="formPrefill();"/>
<menuitem id="edit_capture"
label="&captureCmd.label;"
accesskey="&captureCmd.accesskey;"
oncommand="formCapture();"/>
<menuitem command="cmd_walletPrefill"/>
<menuitem command="cmd_walletCapture"/>
<menuseparator/>
<menuitem label="&walletContentsCmd.label;"
accesskey="&walletContentsCmd.accesskey;"
@ -178,5 +174,4 @@
</menu>
</menupopup>
</overlay>

View File

@ -10,7 +10,7 @@
<!ENTITY captureCmd.label "Save Form Info">
<!ENTITY captureCmd.accesskey "S">
<!ENTITY prefillCmd.label "Fill in Form">
<!ENTITY prefillCmd.accesskey "F">
<!ENTITY prefillCmd.accesskey "n">
<!ENTITY walletContentsCmd.label "Edit Form Info">
<!ENTITY walletContentsCmd.accesskey "E">