Bug 1425891 - Remove malfunctioning accesskeys from Reorder Attachments panel, add shortcut for sorting attachments. r=Paenglab
This commit is contained in:
Родитель
b003b656ee
Коммит
e3b9608edc
|
@ -1039,7 +1039,6 @@ var attachmentBucketController = {
|
||||||
let toggleBtn = document.getElementById("btn_sortAttachmentsToggle");
|
let toggleBtn = document.getElementById("btn_sortAttachmentsToggle");
|
||||||
let sortDirection;
|
let sortDirection;
|
||||||
let btnLabelAttr;
|
let btnLabelAttr;
|
||||||
let btnAccKeyAttr;
|
|
||||||
|
|
||||||
if (attachmentsSelectedCount() > 1) {
|
if (attachmentsSelectedCount() > 1) {
|
||||||
// Sort selected attachments only.
|
// Sort selected attachments only.
|
||||||
|
@ -1056,11 +1055,9 @@ var attachmentBucketController = {
|
||||||
if (btnAscending) {
|
if (btnAscending) {
|
||||||
sortDirection = "ascending";
|
sortDirection = "ascending";
|
||||||
btnLabelAttr = "label-selection-AZ";
|
btnLabelAttr = "label-selection-AZ";
|
||||||
btnAccKeyAttr = "accesskey-selection-AZ";
|
|
||||||
} else {
|
} else {
|
||||||
sortDirection = "descending";
|
sortDirection = "descending";
|
||||||
btnLabelAttr = "label-selection-ZA";
|
btnLabelAttr = "label-selection-ZA";
|
||||||
btnAccKeyAttr = "accesskey-selection-ZA";
|
|
||||||
}
|
}
|
||||||
} else { // attachmentsSelectedCount() <= 1
|
} else { // attachmentsSelectedCount() <= 1
|
||||||
// Sort all attachments.
|
// Sort all attachments.
|
||||||
|
@ -1071,11 +1068,9 @@ var attachmentBucketController = {
|
||||||
if (btnAscending) {
|
if (btnAscending) {
|
||||||
sortDirection = "ascending";
|
sortDirection = "ascending";
|
||||||
btnLabelAttr = "label-AZ";
|
btnLabelAttr = "label-AZ";
|
||||||
btnAccKeyAttr = "accesskey-AZ";
|
|
||||||
} else {
|
} else {
|
||||||
sortDirection = "descending";
|
sortDirection = "descending";
|
||||||
btnLabelAttr = "label-ZA";
|
btnLabelAttr = "label-ZA";
|
||||||
btnAccKeyAttr = "accesskey-ZA";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1084,7 +1079,6 @@ var attachmentBucketController = {
|
||||||
// The button's icon is set dynamically via CSS involving the button's
|
// The button's icon is set dynamically via CSS involving the button's
|
||||||
// sortdirection attribute, which is forwarded by the command.
|
// sortdirection attribute, which is forwarded by the command.
|
||||||
toggleBtn.setAttribute("label", toggleBtn.getAttribute(btnLabelAttr));
|
toggleBtn.setAttribute("label", toggleBtn.getAttribute(btnLabelAttr));
|
||||||
toggleBtn.setAttribute("accesskey", toggleBtn.getAttribute(btnAccKeyAttr));
|
|
||||||
|
|
||||||
return sortSelection ? !(currSortOrder == "equivalent" && isBlock)
|
return sortSelection ? !(currSortOrder == "equivalent" && isBlock)
|
||||||
: !(currSortOrder == "equivalent");
|
: !(currSortOrder == "equivalent");
|
||||||
|
|
|
@ -302,6 +302,8 @@
|
||||||
<key id="key_moveAttachmentBottom" keycode="VK_End" modifiers="alt"
|
<key id="key_moveAttachmentBottom" keycode="VK_End" modifiers="alt"
|
||||||
command="cmd_moveAttachmentBottom"/>
|
command="cmd_moveAttachmentBottom"/>
|
||||||
#endif
|
#endif
|
||||||
|
<key id="key_sortAttachmentsToggle" key="&sortAttachmentsPanelBtn.key;"
|
||||||
|
modifiers="alt" command="cmd_sortAttachmentsToggle"/>
|
||||||
|
|
||||||
<!-- View Menu -->
|
<!-- View Menu -->
|
||||||
<key id="key_addressSidebar" keycode="VK_F9" oncommand="toggleAddressPicker();"/>
|
<key id="key_addressSidebar" keycode="VK_F9" oncommand="toggleAddressPicker();"/>
|
||||||
|
@ -370,45 +372,36 @@
|
||||||
<toolbarbutton id="btn_moveAttachmentTop"
|
<toolbarbutton id="btn_moveAttachmentTop"
|
||||||
class="panelButton"
|
class="panelButton"
|
||||||
label="&moveAttachmentTopPanelBtn.label;"
|
label="&moveAttachmentTopPanelBtn.label;"
|
||||||
accesskey="&moveAttachmentTopPanelBtn.accesskey;"
|
|
||||||
key="key_moveAttachmentTop"
|
key="key_moveAttachmentTop"
|
||||||
command="cmd_moveAttachmentTop"/>
|
command="cmd_moveAttachmentTop"/>
|
||||||
<toolbarbutton id="btn_moveAttachmentUp"
|
<toolbarbutton id="btn_moveAttachmentUp"
|
||||||
class="panelButton"
|
class="panelButton"
|
||||||
label="&moveAttachmentUpPanelBtn.label;"
|
label="&moveAttachmentUpPanelBtn.label;"
|
||||||
accesskey="&moveAttachmentUpPanelBtn.accesskey;"
|
|
||||||
key="key_moveAttachmentUp"
|
key="key_moveAttachmentUp"
|
||||||
command="cmd_moveAttachmentUp"/>
|
command="cmd_moveAttachmentUp"/>
|
||||||
<toolbarbutton id="btn_moveAttachmentBundleUp"
|
<toolbarbutton id="btn_moveAttachmentBundleUp"
|
||||||
class="panelButton"
|
class="panelButton"
|
||||||
label="&moveAttachmentBundleUpPanelBtn.label;"
|
label="&moveAttachmentBundleUpPanelBtn.label;"
|
||||||
accesskey="&moveAttachmentBundleUpPanelBtn.accesskey;"
|
|
||||||
key="key_moveAttachmentBundleUp"
|
key="key_moveAttachmentBundleUp"
|
||||||
command="cmd_moveAttachmentBundleUp"/>
|
command="cmd_moveAttachmentBundleUp"/>
|
||||||
<toolbarbutton id="btn_moveAttachmentDown"
|
<toolbarbutton id="btn_moveAttachmentDown"
|
||||||
class="panelButton"
|
class="panelButton"
|
||||||
label="&moveAttachmentDownPanelBtn.label;"
|
label="&moveAttachmentDownPanelBtn.label;"
|
||||||
accesskey="&moveAttachmentDownPanelBtn.accesskey;"
|
|
||||||
key="key_moveAttachmentDown"
|
key="key_moveAttachmentDown"
|
||||||
command="cmd_moveAttachmentDown"/>
|
command="cmd_moveAttachmentDown"/>
|
||||||
<toolbarbutton id="btn_moveAttachmentBottom"
|
<toolbarbutton id="btn_moveAttachmentBottom"
|
||||||
class="panelButton"
|
class="panelButton"
|
||||||
label="&moveAttachmentBottomPanelBtn.label;"
|
label="&moveAttachmentBottomPanelBtn.label;"
|
||||||
accesskey="&moveAttachmentBottomPanelBtn.accesskey;"
|
|
||||||
key="key_moveAttachmentBottom"
|
key="key_moveAttachmentBottom"
|
||||||
command="cmd_moveAttachmentBottom"/>
|
command="cmd_moveAttachmentBottom"/>
|
||||||
<toolbarbutton id="btn_sortAttachmentsToggle"
|
<toolbarbutton id="btn_sortAttachmentsToggle"
|
||||||
class="panelButton"
|
class="panelButton"
|
||||||
label="&sortAttachmentsPanelBtn.Sort.AZ.label;"
|
label="&sortAttachmentsPanelBtn.Sort.AZ.label;"
|
||||||
accesskey="&sortAttachmentsPanelBtn.Sort.AZ.accesskey;"
|
|
||||||
label-AZ="&sortAttachmentsPanelBtn.Sort.AZ.label;"
|
label-AZ="&sortAttachmentsPanelBtn.Sort.AZ.label;"
|
||||||
label-ZA="&sortAttachmentsPanelBtn.Sort.ZA.label;"
|
label-ZA="&sortAttachmentsPanelBtn.Sort.ZA.label;"
|
||||||
accesskey-AZ="&sortAttachmentsPanelBtn.Sort.AZ.accesskey;"
|
|
||||||
accesskey-ZA="&sortAttachmentsPanelBtn.Sort.ZA.accesskey;"
|
|
||||||
label-selection-AZ="&sortAttachmentsPanelBtn.SortSelection.AZ.label;"
|
label-selection-AZ="&sortAttachmentsPanelBtn.SortSelection.AZ.label;"
|
||||||
label-selection-ZA="&sortAttachmentsPanelBtn.SortSelection.ZA.label;"
|
label-selection-ZA="&sortAttachmentsPanelBtn.SortSelection.ZA.label;"
|
||||||
accesskey-selection-AZ="&sortAttachmentsPanelBtn.SortSelection.AZ.accesskey;"
|
key="key_sortAttachmentsToggle"
|
||||||
accesskey-selection-ZA="&sortAttachmentsPanelBtn.SortSelection.ZA.accesskey;"
|
|
||||||
command="cmd_sortAttachmentsToggle"/>
|
command="cmd_sortAttachmentsToggle"/>
|
||||||
</panel>
|
</panel>
|
||||||
|
|
||||||
|
|
|
@ -109,36 +109,22 @@
|
||||||
<!-- Reorder Attachment Panel -->
|
<!-- Reorder Attachment Panel -->
|
||||||
<!ENTITY reorderAttachmentsPanel.label "Reorder Attachments">
|
<!ENTITY reorderAttachmentsPanel.label "Reorder Attachments">
|
||||||
<!ENTITY moveAttachmentTopPanelBtn.label "Move to Top">
|
<!ENTITY moveAttachmentTopPanelBtn.label "Move to Top">
|
||||||
<!ENTITY moveAttachmentTopPanelBtn.accesskey "T">
|
|
||||||
<!ENTITY moveAttachmentUpPanelBtn.label "Move Up">
|
<!ENTITY moveAttachmentUpPanelBtn.label "Move Up">
|
||||||
<!ENTITY moveAttachmentUpPanelBtn.accesskey "U">
|
|
||||||
<!ENTITY moveAttachmentBundleUpPanelBtn.label "Move together">
|
<!ENTITY moveAttachmentBundleUpPanelBtn.label "Move together">
|
||||||
<!ENTITY moveAttachmentBundleUpPanelBtn.accesskey "v">
|
|
||||||
<!ENTITY moveAttachmentDownPanelBtn.label "Move Down">
|
<!ENTITY moveAttachmentDownPanelBtn.label "Move Down">
|
||||||
<!ENTITY moveAttachmentDownPanelBtn.accesskey "D">
|
|
||||||
<!ENTITY moveAttachmentBottomPanelBtn.label "Move to Bottom">
|
<!ENTITY moveAttachmentBottomPanelBtn.label "Move to Bottom">
|
||||||
<!ENTITY moveAttachmentBottomPanelBtn.accesskey "B">
|
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.Sort.AZ.label):
|
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.Sort.AZ.label):
|
||||||
Please ensure that this translation matches
|
Please ensure that this translation matches
|
||||||
sortAttachmentsPanelBtn.Sort.ZA.label, except for the sort direction. -->
|
sortAttachmentsPanelBtn.Sort.ZA.label, except for the sort direction. -->
|
||||||
<!ENTITY sortAttachmentsPanelBtn.Sort.AZ.label "Sort: A - Z">
|
<!ENTITY sortAttachmentsPanelBtn.Sort.AZ.label "Sort: A - Z">
|
||||||
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.Sort.AZ.accesskey):
|
|
||||||
This accesskey should be the same like
|
|
||||||
sortAttachmentsPanelBtn.Sort.ZA.accesskey,
|
|
||||||
sortAttachmentsPanelBtn.SortSelection.AZ.accesskey, and
|
|
||||||
sortAttachmentsPanelBtn.SortSelection.ZA.accesskey and it should therefore be
|
|
||||||
taken from the word "Sort", not from "Selection" or the sort direction part. -->
|
|
||||||
<!ENTITY sortAttachmentsPanelBtn.Sort.AZ.accesskey "o">
|
|
||||||
<!ENTITY sortAttachmentsPanelBtn.Sort.ZA.label "Sort: Z - A">
|
<!ENTITY sortAttachmentsPanelBtn.Sort.ZA.label "Sort: Z - A">
|
||||||
<!ENTITY sortAttachmentsPanelBtn.Sort.ZA.accesskey "o">
|
|
||||||
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.SortSelection.AZ.label):
|
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.SortSelection.AZ.label):
|
||||||
Please ensure that this translation matches
|
Please ensure that this translation matches
|
||||||
sortAttachmentsPanelBtn.SortSelection.ZA.label, except for the sort direction. -->
|
sortAttachmentsPanelBtn.SortSelection.ZA.label, except for the sort direction. -->
|
||||||
<!ENTITY sortAttachmentsPanelBtn.SortSelection.AZ.label "Sort Selection: A - Z">
|
<!ENTITY sortAttachmentsPanelBtn.SortSelection.AZ.label "Sort Selection: A - Z">
|
||||||
<!ENTITY sortAttachmentsPanelBtn.SortSelection.AZ.accesskey "o">
|
|
||||||
<!ENTITY sortAttachmentsPanelBtn.SortSelection.ZA.label "Sort Selection: Z - A">
|
<!ENTITY sortAttachmentsPanelBtn.SortSelection.ZA.label "Sort Selection: Z - A">
|
||||||
<!ENTITY sortAttachmentsPanelBtn.SortSelection.ZA.accesskey "o">
|
<!ENTITY sortAttachmentsPanelBtn.key "y">
|
||||||
|
|
||||||
<!-- View Menu -->
|
<!-- View Menu -->
|
||||||
<!ENTITY viewMenu.label "View">
|
<!ENTITY viewMenu.label "View">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче