summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/web/bug_modal.js
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2017-02-21 22:56:56 +0100
committerDavid Lawrence <dkl@mozilla.com>2017-02-21 22:56:56 +0100
commit318b9027db03bc7397fa8072811db33783d29976 (patch)
tree2cd3b8dd9848a4678402f473433e5e817ad4b2e0 /extensions/BugModal/web/bug_modal.js
parentbbd5ffb01a1f9feb277dd33e8b4333840fb26949 (diff)
downloadbugzilla-318b9027db03bc7397fa8072811db33783d29976.tar.gz
bugzilla-318b9027db03bc7397fa8072811db33783d29976.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) {