~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-04 05:02:39 UTC
  • mfrom: (12952.3.1 bug-771231)
  • Revision ID: launchpad@pqm.canonical.com-20110504050239-nta8ftup75e93s65
[r=bac][bug=771231] add feedback when creating a structural
        subscription

Show diffs side-by-side

added added

removed removed

Lines of Context:
1672
1672
                config, subscription_info, 0,
1673
1673
                filter_info, filter_id, anim_node);
1674
1674
            Y.lazr.anim.green_flash({node: anim_node}).run();
 
1675
        } else {
 
1676
            // Since there is no filter description to update we need another
 
1677
            // way to tell the user that the subscription was sucessfully
 
1678
            // added.  We'll do that by creating an informational message box.
 
1679
            var description = filter.get('description');
 
1680
            var header = Y.Node.create('<div/>')
 
1681
                .setStyle('marginBottom', '1em')
 
1682
                .append('The subscription')
 
1683
                .append('&#32;'); // a space
 
1684
            if (description) {
 
1685
                header
 
1686
                    .append('named "')
 
1687
                    .append(Y.Node.create('<span/>')
 
1688
                        .set('text', description))
 
1689
                    .append('"')
 
1690
                    .append('&#32;'); // a space
 
1691
            }
 
1692
            header.append('has been created.');
 
1693
 
 
1694
            Y.one('#request-notifications')
 
1695
                .empty()
 
1696
                .append(Y.Node.create('<div/>')
 
1697
                    // We're creating an informational message box.
 
1698
                    .addClass('informational')
 
1699
                    .addClass('message')
 
1700
                    // The box needs to be a little wider to accomodate the
 
1701
                    // wordy subscription description.
 
1702
                    .setStyle('width', '50em')
 
1703
                    .append(header)
 
1704
                    .append(create_filter_description(filter.getAttrs())));
1675
1705
        }
1676
1706
    };
1677
1707
}