From 1030251963d7f4e2c7da6cb0486b36529a558860 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 9 Oct 2014 22:15:21 -0400 Subject: Bug 1062775 - Create a form to create/update bounty tracking tracking attachments --- extensions/BMO/web/js/attachment_bounty_form.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 extensions/BMO/web/js/attachment_bounty_form.js (limited to 'extensions/BMO/web/js/attachment_bounty_form.js') diff --git a/extensions/BMO/web/js/attachment_bounty_form.js b/extensions/BMO/web/js/attachment_bounty_form.js new file mode 100644 index 000000000..cdec78276 --- /dev/null +++ b/extensions/BMO/web/js/attachment_bounty_form.js @@ -0,0 +1,18 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This Source Code Form is "Incompatible With Secondary Licenses", as + * defined by the Mozilla Public License, v. 2.0. */ + +function add_bounty_attachment(bug_id) { + var nodes = YAHOO.util.Selector.query('#attachment_table tr.bz_attach_footer td'); + if (nodes) { + var td = nodes[0]; + var a = document.createElement('a'); + a.href = 'page.cgi?id=attachment_bounty_form.html&bug_id=' + bug_id; + a.appendChild(document.createTextNode('Add bounty tracking attachment')); + td.appendChild(document.createElement('br')); + td.appendChild(a); + } +} -- cgit v1.2.3-24-g4f1b