~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/javascript/structural-subscription.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-06 16:38:53 UTC
  • mfrom: (12981.3.2 bug-771239)
  • Revision ID: launchpad@pqm.canonical.com-20110506163853-1jxvdsevsq9kpxyt
[r=jcsackett][bug=771239] make the select all/select none links a
        little easier to read and use

Show diffs side-by-side

added added

removed removed

Lines of Context:
454
454
function make_selector_controls(parent) {
455
455
    var selectors_id = parent + '-selectors';
456
456
    var rv = {};
457
 
    rv.all_link = Y.Node.create(
458
 
        '<a href="#" class="select-all">Select all</a>');
459
 
    rv.none_link = Y.Node.create(
460
 
        '<a href="#" class="select-none">Select none</a>');
461
 
    rv.node = Y.Node.create(
462
 
            '<div style="margin-left: 10px;margin-bottom: 10px"></div>')
 
457
    rv.all_link = Y.Node.create('<a/>')
 
458
        .set('href', '#')
 
459
        .set('text', 'Select all')
 
460
        .addClass('select-all');
 
461
    rv.none_link = Y.Node.create('<a/>')
 
462
        .set('href', '#')
 
463
        .set('text', 'Select none')
 
464
        .addClass('select-none');
 
465
    rv.node = Y.Node.create('<div/>')
463
466
        .set('id', selectors_id)
 
467
        .setStyle('marginBottom', '1ex')
 
468
        .setStyle('marginLeft', '1ex')
464
469
        .append(rv.all_link)
465
 
        .append(' &nbsp; ')
 
470
        .append(Y.Node.create('<span/>')
 
471
            .set('text', 'or')
 
472
            // Why different margins?  Manual kerning.
 
473
            .setStyle('marginLeft', '0.9ex')
 
474
            .setStyle('marginRight', '0.7ex'))
466
475
        .append(rv.none_link);
467
476
 
468
477
    return rv;