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 sortDirection;
|
||||
let btnLabelAttr;
|
||||
let btnAccKeyAttr;
|
||||
|
||||
if (attachmentsSelectedCount() > 1) {
|
||||
// Sort selected attachments only.
|
||||
|
@ -1056,11 +1055,9 @@ var attachmentBucketController = {
|
|||
if (btnAscending) {
|
||||
sortDirection = "ascending";
|
||||
btnLabelAttr = "label-selection-AZ";
|
||||
btnAccKeyAttr = "accesskey-selection-AZ";
|
||||
} else {
|
||||
sortDirection = "descending";
|
||||
btnLabelAttr = "label-selection-ZA";
|
||||
btnAccKeyAttr = "accesskey-selection-ZA";
|
||||
}
|
||||
} else { // attachmentsSelectedCount() <= 1
|
||||
// Sort all attachments.
|
||||
|
@ -1071,11 +1068,9 @@ var attachmentBucketController = {
|
|||
if (btnAscending) {
|
||||
sortDirection = "ascending";
|
||||
btnLabelAttr = "label-AZ";
|
||||
btnAccKeyAttr = "accesskey-AZ";
|
||||
} else {
|
||||
sortDirection = "descending";
|
||||
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
|
||||
// sortdirection attribute, which is forwarded by the command.
|
||||
toggleBtn.setAttribute("label", toggleBtn.getAttribute(btnLabelAttr));
|
||||
toggleBtn.setAttribute("accesskey", toggleBtn.getAttribute(btnAccKeyAttr));
|
||||
|
||||
return sortSelection ? !(currSortOrder == "equivalent" && isBlock)
|
||||
: !(currSortOrder == "equivalent");
|
||||
|
|
|
@ -302,6 +302,8 @@
|
|||
<key id="key_moveAttachmentBottom" keycode="VK_End" modifiers="alt"
|
||||
command="cmd_moveAttachmentBottom"/>
|
||||
#endif
|
||||
<key id="key_sortAttachmentsToggle" key="&sortAttachmentsPanelBtn.key;"
|
||||
modifiers="alt" command="cmd_sortAttachmentsToggle"/>
|
||||
|
||||
<!-- View Menu -->
|
||||
<key id="key_addressSidebar" keycode="VK_F9" oncommand="toggleAddressPicker();"/>
|
||||
|
@ -370,45 +372,36 @@
|
|||
<toolbarbutton id="btn_moveAttachmentTop"
|
||||
class="panelButton"
|
||||
label="&moveAttachmentTopPanelBtn.label;"
|
||||
accesskey="&moveAttachmentTopPanelBtn.accesskey;"
|
||||
key="key_moveAttachmentTop"
|
||||
command="cmd_moveAttachmentTop"/>
|
||||
<toolbarbutton id="btn_moveAttachmentUp"
|
||||
class="panelButton"
|
||||
label="&moveAttachmentUpPanelBtn.label;"
|
||||
accesskey="&moveAttachmentUpPanelBtn.accesskey;"
|
||||
key="key_moveAttachmentUp"
|
||||
command="cmd_moveAttachmentUp"/>
|
||||
<toolbarbutton id="btn_moveAttachmentBundleUp"
|
||||
class="panelButton"
|
||||
label="&moveAttachmentBundleUpPanelBtn.label;"
|
||||
accesskey="&moveAttachmentBundleUpPanelBtn.accesskey;"
|
||||
key="key_moveAttachmentBundleUp"
|
||||
command="cmd_moveAttachmentBundleUp"/>
|
||||
<toolbarbutton id="btn_moveAttachmentDown"
|
||||
class="panelButton"
|
||||
label="&moveAttachmentDownPanelBtn.label;"
|
||||
accesskey="&moveAttachmentDownPanelBtn.accesskey;"
|
||||
key="key_moveAttachmentDown"
|
||||
command="cmd_moveAttachmentDown"/>
|
||||
<toolbarbutton id="btn_moveAttachmentBottom"
|
||||
class="panelButton"
|
||||
label="&moveAttachmentBottomPanelBtn.label;"
|
||||
accesskey="&moveAttachmentBottomPanelBtn.accesskey;"
|
||||
key="key_moveAttachmentBottom"
|
||||
command="cmd_moveAttachmentBottom"/>
|
||||
<toolbarbutton id="btn_sortAttachmentsToggle"
|
||||
class="panelButton"
|
||||
label="&sortAttachmentsPanelBtn.Sort.AZ.label;"
|
||||
accesskey="&sortAttachmentsPanelBtn.Sort.AZ.accesskey;"
|
||||
label-AZ="&sortAttachmentsPanelBtn.Sort.AZ.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-ZA="&sortAttachmentsPanelBtn.SortSelection.ZA.label;"
|
||||
accesskey-selection-AZ="&sortAttachmentsPanelBtn.SortSelection.AZ.accesskey;"
|
||||
accesskey-selection-ZA="&sortAttachmentsPanelBtn.SortSelection.ZA.accesskey;"
|
||||
key="key_sortAttachmentsToggle"
|
||||
command="cmd_sortAttachmentsToggle"/>
|
||||
</panel>
|
||||
|
||||
|
|
|
@ -109,36 +109,22 @@
|
|||
<!-- Reorder Attachment Panel -->
|
||||
<!ENTITY reorderAttachmentsPanel.label "Reorder Attachments">
|
||||
<!ENTITY moveAttachmentTopPanelBtn.label "Move to Top">
|
||||
<!ENTITY moveAttachmentTopPanelBtn.accesskey "T">
|
||||
<!ENTITY moveAttachmentUpPanelBtn.label "Move Up">
|
||||
<!ENTITY moveAttachmentUpPanelBtn.accesskey "U">
|
||||
<!ENTITY moveAttachmentBundleUpPanelBtn.label "Move together">
|
||||
<!ENTITY moveAttachmentBundleUpPanelBtn.accesskey "v">
|
||||
<!ENTITY moveAttachmentDownPanelBtn.label "Move Down">
|
||||
<!ENTITY moveAttachmentDownPanelBtn.accesskey "D">
|
||||
<!ENTITY moveAttachmentBottomPanelBtn.label "Move to Bottom">
|
||||
<!ENTITY moveAttachmentBottomPanelBtn.accesskey "B">
|
||||
|
||||
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.Sort.AZ.label):
|
||||
Please ensure that this translation matches
|
||||
sortAttachmentsPanelBtn.Sort.ZA.label, except for the sort direction. -->
|
||||
<!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.accesskey "o">
|
||||
<!-- LOCALIZATION NOTE (sortAttachmentsPanelBtn.SortSelection.AZ.label):
|
||||
Please ensure that this translation matches
|
||||
sortAttachmentsPanelBtn.SortSelection.ZA.label, except for the sort direction. -->
|
||||
<!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.accesskey "o">
|
||||
<!ENTITY sortAttachmentsPanelBtn.key "y">
|
||||
|
||||
<!-- View Menu -->
|
||||
<!ENTITY viewMenu.label "View">
|
||||
|
|
Загрузка…
Ссылка в новой задаче