summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/web/bug_modal.js
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2017-02-28 00:41:03 +0100
committerDavid Lawrence <dkl@mozilla.com>2017-02-28 00:41:03 +0100
commit5a9e39a07ae23c86a2cfc71122b605951dc95924 (patch)
tree253e81c1d4b02911c0b5a530b4b2c36a901b9adb /extensions/BugModal/web/bug_modal.js
parente316d9661cd9e78e3ae8ffbd8d233623374d1f77 (diff)
downloadbugzilla-5a9e39a07ae23c86a2cfc71122b605951dc95924.tar.gz
bugzilla-5a9e39a07ae23c86a2cfc71122b605951dc95924.tar.xz
Bug 1280363 - [a11y] Make the Actions menu button accessible for keyboard and screen readers
Diffstat (limited to 'extensions/BugModal/web/bug_modal.js')
-rw-r--r--extensions/BugModal/web/bug_modal.js101
1 files changed, 1 insertions, 100 deletions
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index 894745016..f65c12be3 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -377,13 +377,7 @@ $(function() {
}
});
- // action button menu
-
- $.contextMenu({
- selector: '#action-menu-btn',
- trigger: 'left',
- items: $.contextMenu.fromMenu($('#action-menu'))
- });
+ // action button actions
// reset
$('#action-reset')
@@ -1006,99 +1000,6 @@ $(function() {
BUGZILLA.remaining_time = $('#remaining_time').val();
});
- // new bug button
- $.contextMenu({
- selector: '#new-bug-btn',
- trigger: 'left',
- items: [
- {
- name: 'Create a new Bug',
- callback: function() {
- window.open('enter_bug.cgi', '_blank');
- }
- },
- {
- name: '\u2026 in this product',
- callback: function() {
- window.open('enter_bug.cgi?product=' + encodeURIComponent($('#product').val()), '_blank');
- }
- },
- {
- name: '\u2026 in this component',
- callback: function() {
- window.open('enter_bug.cgi?' +
- 'product=' + encodeURIComponent($('#product').val()) +
- '&component=' + encodeURIComponent($('#component').val()), '_blank');
- }
- },
- {
- name: '\u2026 that blocks this bug',
- callback: function() {
- window.open('enter_bug.cgi?format=__default__' +
- '&product=' + encodeURIComponent($('#product').val()) +
- '&blocked=' + BUGZILLA.bug_id, '_blank');
- }
- },
- {
- name: '\u2026 that depends on this bug',
- callback: function() {
- window.open('enter_bug.cgi?format=__default__' +
- '&product=' + encodeURIComponent($('#product').val()) +
- '&dependson=' + BUGZILLA.bug_id, '_blank');
- }
- },
- {
- name: '\u2026 as a clone of this bug',
- callback: function() {
- window.open('enter_bug.cgi?format=__default__' +
- '&product=' + encodeURIComponent($('#product').val()) +
- '&cloned_bug_id=' + BUGZILLA.bug_id, '_blank');
- }
- },
- {
- name: '\u2026 as a clone, in a different product',
- callback: function() {
- window.open('enter_bug.cgi?format=__default__' +
- '&cloned_bug_id=' + BUGZILLA.bug_id, '_blank');
- }
- },
- ]
- });
-
- var format_items = [
- {
- name: 'For Printing',
- callback: function() {
- window.location.href = 'show_bug.cgi?format=multiple&id=' + BUGZILLA.bug_id;
- }
- },
- {
- name: 'XML',
- callback: function() {
- window.location.href = 'show_bug.cgi?ctype=xml&id=' + BUGZILLA.bug_id;
- }
- },
- {
- name: 'Legacy',
- callback: function() {
- window.location.href = 'show_bug.cgi?format=default&id=' + BUGZILLA.bug_id;
- }
- }
- ];
- if (!BUGZILLA.bug_secure) {
- format_items.push({
- name: 'JSON',
- callback: function() {
- window.location.href = 'rest/bug/' + BUGZILLA.bug_id;
- }
- });
- }
- $.contextMenu({
- selector: '#format-btn',
- trigger: 'left',
- items: format_items
- });
-
// "reset to default" checkboxes
$('#product, #component')
.change(function(event) {