Bug 1158046 - Add access keys to all context menu items in the Network panel. r=bgrins r=jsantell

This commit is contained in:
Jan Keromnes 2015-05-06 10:28:00 +02:00
Родитель 44f5f63247
Коммит 0b6c76ca9b
3 изменённых файлов: 43 добавлений и 32 удалений

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

@ -1863,8 +1863,8 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
!selectedItem.attachment.responseContent || !selectedItem.attachment.responseContent ||
!selectedItem.attachment.responseContent.content.mimeType.includes("image/"); !selectedItem.attachment.responseContent.content.mimeType.includes("image/");
let separator = $("#request-menu-context-separator"); let separators = $all(".request-menu-context-separator");
separator.hidden = !selectedItem; Array.forEach(separators, separator => separator.hidden = !selectedItem);
let newTabElement = $("#request-menu-context-newtab"); let newTabElement = $("#request-menu-context-newtab");
newTabElement.hidden = !selectedItem; newTabElement.hidden = !selectedItem;

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

@ -25,9 +25,6 @@
<popupset id="networkPopupSet"> <popupset id="networkPopupSet">
<menupopup id="network-request-popup"> <menupopup id="network-request-popup">
<menuitem id="request-menu-context-newtab"
label="&netmonitorUI.context.newTab;"
accesskey="&netmonitorUI.context.newTab.accesskey;"/>
<menuitem id="request-menu-context-copy-url" <menuitem id="request-menu-context-copy-url"
label="&netmonitorUI.context.copyUrl;" label="&netmonitorUI.context.copyUrl;"
accesskey="&netmonitorUI.context.copyUrl.accesskey;"/> accesskey="&netmonitorUI.context.copyUrl.accesskey;"/>
@ -37,13 +34,16 @@
oncommand="NetMonitorView.RequestsMenu.copyUrlParams();"/> oncommand="NetMonitorView.RequestsMenu.copyUrlParams();"/>
<menuitem id="request-menu-context-copy-as-curl" <menuitem id="request-menu-context-copy-as-curl"
label="&netmonitorUI.context.copyAsCurl;" label="&netmonitorUI.context.copyAsCurl;"
accesskey="&netmonitorUI.context.copyAsCurl.accesskey;"
oncommand="NetMonitorView.RequestsMenu.copyAsCurl();"/> oncommand="NetMonitorView.RequestsMenu.copyAsCurl();"/>
<menuseparator class="request-menu-context-separator"/>
<menuitem id="request-menu-context-copy-request-headers" <menuitem id="request-menu-context-copy-request-headers"
label="&netmonitorUI.context.copyRequestHeaders;" label="&netmonitorUI.context.copyRequestHeaders;"
accesskey="&netmonitorUI.context.copyRequestHeaders.accesskey;" accesskey="&netmonitorUI.context.copyRequestHeaders.accesskey;"
oncommand="NetMonitorView.RequestsMenu.copyRequestHeaders();"/> oncommand="NetMonitorView.RequestsMenu.copyRequestHeaders();"/>
<menuitem id="response-menu-context-copy-response-headers" <menuitem id="response-menu-context-copy-response-headers"
label="&netmonitorUI.context.copyResponseHeaders;" label="&netmonitorUI.context.copyResponseHeaders;"
accesskey="&netmonitorUI.context.copyResponseHeaders.accesskey;"
oncommand="NetMonitorView.RequestsMenu.copyResponseHeaders();"/> oncommand="NetMonitorView.RequestsMenu.copyResponseHeaders();"/>
<menuitem id="request-menu-context-copy-response" <menuitem id="request-menu-context-copy-response"
label="&netmonitorUI.context.copyResponse;" label="&netmonitorUI.context.copyResponse;"
@ -54,7 +54,10 @@
<menuitem id="request-menu-context-resend" <menuitem id="request-menu-context-resend"
label="&netmonitorUI.summary.editAndResend;" label="&netmonitorUI.summary.editAndResend;"
accesskey="&netmonitorUI.summary.editAndResend.accesskey;"/> accesskey="&netmonitorUI.summary.editAndResend.accesskey;"/>
<menuseparator id="request-menu-context-separator"/> <menuseparator class="request-menu-context-separator"/>
<menuitem id="request-menu-context-newtab"
label="&netmonitorUI.context.newTab;"
accesskey="&netmonitorUI.context.newTab.accesskey;"/>
<menuitem id="request-menu-context-perf" <menuitem id="request-menu-context-perf"
label="&netmonitorUI.context.perfTools;" label="&netmonitorUI.context.perfTools;"
accesskey="&netmonitorUI.context.perfTools.accesskey;"/> accesskey="&netmonitorUI.context.perfTools.accesskey;"/>

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

@ -248,21 +248,13 @@
- in the security tab describing the server certificate section. --> - in the security tab describing the server certificate section. -->
<!ENTITY netmonitorUI.security.certificate "Certificate:"> <!ENTITY netmonitorUI.security.certificate "Certificate:">
<!-- LOCALIZATION NOTE (netmonitorUI.context.perfTools): This is the label displayed
- on the context menu that shows the performance analysis tools -->
<!ENTITY netmonitorUI.context.perfTools "Start Performance Analysis…">
<!-- LOCALIZATION NOTE (netmonitorUI.context.perfTools.accesskey): This is the access key
- for the performance analysis menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.perfTools.accesskey "S">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyUrl): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.context.copyUrl): This is the label displayed
- on the context menu that copies the selected request's url --> - on the context menu that copies the selected request's url -->
<!ENTITY netmonitorUI.context.copyUrl "Copy URL"> <!ENTITY netmonitorUI.context.copyUrl "Copy URL">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyUrl.accesskey): This is the access key <!-- LOCALIZATION NOTE (netmonitorUI.context.copyUrl.accesskey): This is the access key
- for the Copy URL menu item displayed in the context menu for a request --> - for the Copy URL menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.copyUrl.accesskey "C"> <!ENTITY netmonitorUI.context.copyUrl.accesskey "U">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyUrlParams): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.context.copyUrlParams): This is the label displayed
- on the context menu that copies the selected request's url parameters --> - on the context menu that copies the selected request's url parameters -->
@ -278,13 +270,25 @@
- http://en.wikipedia.org/wiki/CURL --> - http://en.wikipedia.org/wiki/CURL -->
<!ENTITY netmonitorUI.context.copyAsCurl "Copy as cURL"> <!ENTITY netmonitorUI.context.copyAsCurl "Copy as cURL">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyImageAsDataUri): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.context.copyAsCUrl.accesskey): This is the access key
- on the context menu that copies the selected image as data uri --> - for the Copy as cURL menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.copyImageAsDataUri "Copy Image as Data URI"> <!ENTITY netmonitorUI.context.copyAsCurl.accesskey "C">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyImageAsDataUri.accesskey): This is the access key <!-- LOCALIZATION NOTE (netmonitorUI.context.copyRequestHeaders): This is the label displayed
- for the Copy Image As Data URI menu item displayed in the context menu for a request --> - on the context menu that copies the selected item's request headers -->
<!ENTITY netmonitorUI.context.copyImageAsDataUri.accesskey "I"> <!ENTITY netmonitorUI.context.copyRequestHeaders "Copy Request Headers">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyRequestHeaders.accesskey): This is the access key
- for the Copy Request Headers menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.copyRequestHeaders.accesskey "Q">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyResponseHeaders): This is the label displayed
- on the context menu that copies the selected item's response headers -->
<!ENTITY netmonitorUI.context.copyResponseHeaders "Copy Response Headers">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyResponseHeaders.accesskey): This is the access key
- for the Copy Response Headers menu item displayed in the context menu for a response -->
<!ENTITY netmonitorUI.context.copyResponseHeaders.accesskey "S">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyResponse): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.context.copyResponse): This is the label displayed
- on the context menu that copies the selected response as a string --> - on the context menu that copies the selected response as a string -->
@ -294,17 +298,13 @@
- for the Copy Response menu item displayed in the context menu for a request --> - for the Copy Response menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.copyResponse.accesskey "R"> <!ENTITY netmonitorUI.context.copyResponse.accesskey "R">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyRequestHeaders): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.context.copyImageAsDataUri): This is the label displayed
- on the context menu that copies the selected item's request headers --> - on the context menu that copies the selected image as data uri -->
<!ENTITY netmonitorUI.context.copyRequestHeaders "Copy Request Headers"> <!ENTITY netmonitorUI.context.copyImageAsDataUri "Copy Image as Data URI">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyRequestHeaders.accesskey): This is the access key <!-- LOCALIZATION NOTE (netmonitorUI.context.copyImageAsDataUri.accesskey): This is the access key
- for the Copy Request Headers menu item displayed in the context menu for a request --> - for the Copy Image As Data URI menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.copyRequestHeaders.accesskey "H"> <!ENTITY netmonitorUI.context.copyImageAsDataUri.accesskey "I">
<!-- LOCALIZATION NOTE (netmonitorUI.context.copyResponseHeaders): This is the label displayed
- on the context menu that copies the selected item's response headers -->
<!ENTITY netmonitorUI.context.copyResponseHeaders "Copy Response Headers">
<!-- LOCALIZATION NOTE (netmonitorUI.summary.editAndResend): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.summary.editAndResend): This is the label displayed
- on the button in the headers tab that opens a form to edit and resend the currently - on the button in the headers tab that opens a form to edit and resend the currently
@ -336,7 +336,15 @@
<!-- LOCALIZATION NOTE (netmonitorUI.context.newTab.accesskey): This is the access key <!-- LOCALIZATION NOTE (netmonitorUI.context.newTab.accesskey): This is the access key
- for the Open in New Tab menu item displayed in the context menu of the - for the Open in New Tab menu item displayed in the context menu of the
- network container --> - network container -->
<!ENTITY netmonitorUI.context.newTab.accesskey "O"> <!ENTITY netmonitorUI.context.newTab.accesskey "T">
<!-- LOCALIZATION NOTE (netmonitorUI.context.perfTools): This is the label displayed
- on the context menu that shows the performance analysis tools -->
<!ENTITY netmonitorUI.context.perfTools "Start Performance Analysis…">
<!-- LOCALIZATION NOTE (netmonitorUI.context.perfTools.accesskey): This is the access key
- for the performance analysis menu item displayed in the context menu for a request -->
<!ENTITY netmonitorUI.context.perfTools.accesskey "A">
<!-- LOCALIZATION NOTE (netmonitorUI.custom.newRequest): This is the label displayed <!-- LOCALIZATION NOTE (netmonitorUI.custom.newRequest): This is the label displayed
- as the title of the new custom request form --> - as the title of the new custom request form -->