Merge lp:~rharding/launchpad/meta_1000282 into lp:launchpad

Proposed by Richard Harding
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 15262
Proposed branch: lp:~rharding/launchpad/meta_1000282
Merge into: lp:launchpad
Diff against target: 23 lines (+7/-8)
1 file modified
lib/lp/translations/javascript/importqueue.js (+7/-8)
To merge this branch: bzr merge lp:~rharding/launchpad/meta_1000282
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+106013@code.launchpad.net

Commit message

Update JS so that the meta.js parser can properly parse the file.

Description of the change

= Summary =
The comment in the import queue js file caused it to not get loaded into the
list of modules in build/js/lp/meta.js. This means the combo loader didn't
know it existed and couldn't load it.

== Pre Implementation ==
N/A

== Implementation Notes ==
Adjust the comment out of the JS block so that the parser that generates the
meta.js can correctly parse the file.

Note that while working this out I hit an error with the addClass() for a non-existent submit button. I wrapped that so that it only applies the class if the button is found.

== Q/A ==
https://translations.launchpad.net/+imports/+index
should load without any JS errors.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

We agreed to remove the comment because there is nothing special about loading oops or event in a module.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/javascript/importqueue.js'
2--- lib/lp/translations/javascript/importqueue.js 2012-04-28 02:51:07 +0000
3+++ lib/lp/translations/javascript/importqueue.js 2012-05-16 16:56:53 +0000
4@@ -178,12 +178,11 @@
5 Y.all('.status-select').each(function(content_box, index, list) {
6 content_box.addClass('hidden');
7 });
8- Y.one('#import-queue-submit').addClass('hidden');
9+ var submit_button = Y.one('#import-queue-submit');
10+ if (submit_button) {
11+ submit_button.addClass('hidden');
12+ }
13 };
14-
15-}, "0.1", {
16- // "oop" and "event" are required to fix known bugs in YUI, which
17- // are apparently fixed in a later version.
18- "requires": ["oop", "event", "node", "widget", "plugin", "overlay",
19- "lazr.choiceedit", "lp.client", "lp.client.plugins",
20- "lp.app.errors"]});
21+}, "0.1", { "requires": ["oop", "event", "node", "widget", "plugin",
22+ "overlay", "lazr.choiceedit", "lp.client", "lp.client.plugins",
23+ "lp.app.errors"]});