diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-02-22 15:26:21 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-02-22 15:26:21 +0100 |
commit | aa3c437901f04eacc157330d4f868fdf3339722e (patch) | |
tree | 17eac737f5d855001e87582bea480d90529359e0 /extensions/BugModal/web/bug_modal.js | |
parent | 318b9027db03bc7397fa8072811db33783d29976 (diff) | |
download | bugzilla-aa3c437901f04eacc157330d4f868fdf3339722e.tar.gz bugzilla-aa3c437901f04eacc157330d4f868fdf3339722e.tar.xz |
Revert "Bug 1280363 - [a11y] Make the Actions menu button accessible for keyboard and screen readers"
This reverts commit 318b9027db03bc7397fa8072811db33783d29976.
Diffstat (limited to 'extensions/BugModal/web/bug_modal.js')
-rw-r--r-- | extensions/BugModal/web/bug_modal.js | 101 |
1 files changed, 100 insertions, 1 deletions
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index f65c12be3..894745016 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -377,7 +377,13 @@ $(function() { } }); - // action button actions + // action button menu + + $.contextMenu({ + selector: '#action-menu-btn', + trigger: 'left', + items: $.contextMenu.fromMenu($('#action-menu')) + }); // reset $('#action-reset') @@ -1000,6 +1006,99 @@ $(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) { |