From 5a9e39a07ae23c86a2cfc71122b605951dc95924 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 27 Feb 2017 23:41:03 +0000 Subject: Bug 1280363 - [a11y] Make the Actions menu button accessible for keyboard and screen readers --- extensions/BugModal/web/bug_modal.js | 101 +---------------------------------- 1 file changed, 1 insertion(+), 100 deletions(-) (limited to 'extensions/BugModal/web/bug_modal.js') 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) { -- cgit v1.2.3-24-g4f1b