From c2364b357634e07c1b709c5cb120181ae3bc5e65 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 12 Oct 2015 12:53:40 +0800 Subject: Bug 1150358 - cannot remove other people from the cc list --- extensions/BugModal/web/bug_modal.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (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 098450cd9..74ee83312 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -166,6 +166,35 @@ $(function() { function(data) { $('#cc-list').html(data.html); latch.data('fetched', true); + $('#cc-list .cc-user').hover( + function() { + $('#ccr-' + $(this).data('n')).css('visibility', 'visible'); + }, + function() { + $('#ccr-' + $(this).data('n')).css('visibility', 'hidden'); + } + ); + $('#cc-list .cc-remove') + .click(function(event) { + event.preventDefault(); + $('#top-save-btn').show(); + var n = $(this).data('n'); + var ccu = $('#ccu-' + n); + if (ccu.hasClass('cc-removed')) { + ccu.removeClass('cc-removed'); + $('#cc-' + n).remove(); + } + else { + $('#removecc').val('on'); + ccu.addClass('cc-removed'); + $('').attr({ + type: 'hidden', + id: 'cc-' + n, + value: $('#ccr-' + n).data('login'), + name: 'cc' + }).appendTo('#changeform'); + } + }); } ); } -- cgit v1.2.3-24-g4f1b