~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-08-22 21:04:00 UTC
  • mfrom: (13261.7.21 bzr-2.4b4)
  • mto: This revision was merged to the branch mainline in revision 13941.
  • Revision ID: jelmer@canonical.com-20110822210400-3hfq31q2wgrtauad
Merge bzr-2.4b4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
  * @param {String} associated_field_id Optional Id of the text field to
267
267
  *                        to be updated with the value selected by the
268
268
  *                        picker.
 
269
  * @param {Object} vocabulary_filters Optional List of filters which are
 
270
  *                        supported by the vocabulary. Filter objects are a
 
271
 *                         dict of name, title, description values.
 
272
  *
269
273
  */
270
 
namespace.create = function (vocabulary, config, associated_field_id) {
 
274
namespace.create = function (vocabulary, config, associated_field_id,
 
275
                             vocabulary_filters) {
271
276
    if (Y.UA.ie) {
272
277
        return;
273
278
    }
313
318
        headerContent: "<h2>" + header + "</h2>",
314
319
        steptitle: step_title,
315
320
        zIndex: 1000,
316
 
        visible: false
 
321
        visible: false,
 
322
        filter_options: vocabulary_filters
317
323
        });
318
324
 
319
325
    var picker = null;
378
384
        // Was this search initiated automatically, perhaps to load
379
385
        // suggestions?
380
386
        var automated_search = e.details[2] || false;
 
387
        var search_filter = e.details[3];
381
388
        var start = BATCH_SIZE * selected_batch;
382
389
        var batch = 0;
383
390
 
461
468
            var qs = '';
462
469
            qs = Y.lp.client.append_qs(qs, 'name', vocabulary);
463
470
            qs = Y.lp.client.append_qs(qs, 'search_text', search_text);
 
471
            if (Y.Lang.isValue(search_filter)) {
 
472
                qs = Y.lp.client.append_qs(
 
473
                    qs, 'search_filter', search_filter);
 
474
            }
464
475
            qs = Y.lp.client.append_qs(qs, 'batch', BATCH_SIZE);
465
476
            qs = Y.lp.client.append_qs(qs, 'start', start);
466
477