~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/widgets/templates/form-picker-macros.pt

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        var vocabulary = config.vocabulary_name;
41
41
        var vocabulary_filters = config.vocabulary_filters;
42
42
        var input_element = config.input_element;
43
 
        Y.on('domready', function(e) {
 
43
        var show_widget_id = '${view/show_widget_id}';
 
44
        var namespace = Y.namespace('lp.app.picker.connect');
 
45
        namespace[show_widget_id] = function() {
44
46
            // Sort out the Choose... link.
45
 
            var show_widget_node = Y.one('#${view/show_widget_id}');
 
47
            var show_widget_node = Y.one('#'+show_widget_id);
46
48
 
47
49
            show_widget_node.set('innerHTML', 'Choose…');
48
50
            show_widget_node.addClass('js-action');
56
58
                picker.show();
57
59
                e.preventDefault();
58
60
            });
 
61
        };
 
62
        Y.on('domready', function(e) {
 
63
            namespace[show_widget_id]();
59
64
        });
60
65
    });
61
66
    "/>