~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/javascript/picker_patcher.js

[r=abentley][bug=801388,
        806179] Re-lands wallyworlds fix to keep the assign me button from
        appearing in goofy places,
        and fixes a problem that prevented personpickers from rendering.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 * @param {Object} config Object literal of config name/value pairs.
22
22
 *     config.header: a line of text at the top of the widget.
23
23
 *     config.step_title: overrides the subtitle.
 
24
 *     config.assign_button_text: Override the default 'Assign' text.
24
25
 *     config.remove_button_text: Override the default 'Remove' text.
25
26
 *     config.null_display_value: Override the default 'None' text.
26
27
 *     config.show_remove_button: Should the remove button be shown?
40
41
 
41
42
    var show_remove_button = false;
42
43
    var show_assign_me_button = false;
43
 
    var remove_button_text = 'Remove';
44
44
    var null_display_value = 'None';
45
45
    var show_search_box = true;
46
46
 
47
47
    resource_uri = Y.lp.client.normalize_uri(resource_uri);
48
48
 
49
49
    if (config !== undefined) {
50
 
        if (config.remove_button_text !== undefined) {
51
 
            remove_button_text = config.remove_button_text;
52
 
        }
53
 
 
54
50
        if (config.null_display_value !== undefined) {
55
51
            null_display_value = config.null_display_value;
56
52
        }