Merge lp:~allenap/launchpad/last-changed-remove-person-button-bug-819227 into lp:launchpad

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 13576
Proposed branch: lp:~allenap/launchpad/last-changed-remove-person-button-bug-819227
Merge into: lp:launchpad
Prerequisite: lp:~allenap/launchpad/last-changed-scrolling-bug-819226
Diff against target: 24 lines (+9/-1)
1 file modified
lib/lp/registry/javascript/distroseries/differences.js (+9/-1)
To merge this branch: bzr merge lp:~allenap/launchpad/last-changed-remove-person-button-bug-819227
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+69996@code.launchpad.net

Commit message

[r=allenap][bug=819227] Ensure that the "Remove person" button appears when appropriate in the "Last changed" person picker on +localpackagediffs.

Description of the change

Update both selected_value and the search box on the picker instead of just the search box. See the XXX'ed bug (bug 819274) for more information.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/javascript/distroseries/differences.js'
2--- lib/lp/registry/javascript/distroseries/differences.js 2011-08-01 12:40:21 +0000
3+++ lib/lp/registry/javascript/distroseries/differences.js 2011-08-01 12:40:23 +0000
4@@ -239,11 +239,19 @@
5 picker.set("align", align); // Arg.
6 var changed_by = get_changed_by_in_query(window.location.search);
7 if (Y.Lang.isValue(changed_by)) {
8- picker._search_input.set("value", changed_by);
9+ picker.set("selected_value", changed_by);
10 }
11 }
12 });
13
14+ /* Update the search box. XXX: GavinPanella 2011-08-01 bug=819274:
15+ This should probably be handled by the picker itself. There is
16+ code in TextFieldPickerPlugin to do something similar, but
17+ that's probably not the right place either. */
18+ picker.after("selected_valueChange", function(e) {
19+ picker._search_input.set("value", e.newVal);
20+ });
21+
22 /* When the picker is saved the search filter form is modified and
23 submitted. */
24 picker.on("save", function(e) {