Merge lp:~bac/launchpad/bug-770342 into lp:launchpad

Proposed by Brad Crittenden
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 12950
Proposed branch: lp:~bac/launchpad/bug-770342
Merge into: lp:launchpad
Diff against target: 49 lines (+9/-6)
1 file modified
lib/lp/bugs/javascript/bugtask_index_portlets.js (+9/-6)
To merge this branch: bzr merge lp:~bac/launchpad/bug-770342
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+59415@code.launchpad.net

Commit message

[r=benji][bug=770342] Change the title of the overlay when unmuting.

Description of the change

= Summary =

The unmute overlay was titled "Subscribe" which is confusing.

== Proposed fix ==

Change the title when unmuting.

== Pre-implementation notes ==

None.

== Implementation details ==

Make the title a parameter to the method to create the overlay.

== Tests ==

None.

== Demo and Q/A ==

Mute a direct bug subscription then unmute it.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/bugs/javascript/bugtask_index_portlets.js

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

This branch looks good.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/javascript/bugtask_index_portlets.js'
2--- lib/lp/bugs/javascript/bugtask_index_portlets.js 2011-04-28 16:08:29 +0000
3+++ lib/lp/bugs/javascript/bugtask_index_portlets.js 2011-04-28 20:58:30 +0000
4@@ -294,10 +294,10 @@
5 /**
6 * Creates and shows a new subscription overlay for the given subscription.
7 */
8-function create_new_subscription_overlay(subscription) {
9+function create_new_subscription_overlay(subscription, header_text) {
10 remove_subscription_overlay();
11 subscription_overlay = setup_advanced_subscription_overlay(
12- subscription);
13+ subscription, header_text);
14 load_and_show_advanced_subscription_overlay(
15 subscription, subscription_overlay);
16 }
17@@ -324,7 +324,8 @@
18 mute_subscription.enable_spinner('Muting...');
19 mute_current_user(mute_subscription);
20 } else {
21- create_new_subscription_overlay(mute_subscription);
22+ create_new_subscription_overlay(
23+ mute_subscription, "Unmute subscription");
24 }
25 });
26 }
27@@ -449,7 +450,8 @@
28 subscription.set('is_team', false);
29 var parent = e.target.get('parentNode');
30 if (namespace.use_advanced_subscriptions) {
31- create_new_subscription_overlay(subscription);
32+ create_new_subscription_overlay(
33+ subscription, "Subscribe to bug");
34 } else {
35 // Look for the false conditions of subscription, which
36 // is_direct_subscription, etc. don't report correctly,
37@@ -655,9 +657,10 @@
38 * @method setup_advanced_subscription_overlay
39 * @param subscription {Object} A Y.lp.bugs.subscriber.Subscription object.
40 */
41-function setup_advanced_subscription_overlay(subscription) {
42+function setup_advanced_subscription_overlay(subscription, text) {
43+ var header = Y.Node.create('<h2 />').set('text', text);
44 var subscription_overlay = new Y.lazr.FormOverlay({
45- headerContent: '<h2>Subscribe to bug</h2>',
46+ headerContent: header,
47 form_submit_button:
48 Y.Node.create(submit_button_html),
49 form_cancel_button: