Merge lp://staging/~abentley/launchpad/js-usage into lp://staging/launchpad
Status: | Merged |
---|---|
Merged at revision: | 12797 |
Proposed branch: | lp://staging/~abentley/launchpad/js-usage |
Merge into: | lp://staging/launchpad |
Prerequisite: | lp://staging/~abentley/launchpad/js-translation-2 |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp://staging/~abentley/launchpad/js-usage |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | code | Approve | |
Review via email: mp+56655@code.staging.launchpad.net |
Commit message
Allow inline editing of translation settings.
Description of the change
= Summary =
Ajaxify setting translation usage.
== Proposed fix ==
Since the form used for updating translations is complicated, submit the form
to the appserver instead of using the web service.
== Pre-implementation notes ==
Discussed with deryck.
== Implementation details ==
Extracted update_form from replace_
Extracted form_url from replace_
Implemented usage_overlay.
Implemented submit_form to submit the form data from the usage overlay.
Implemented FormErrorHandler as a subclass of ErrorHandler to handle web page
form submission errors instead of web service errors.
Allow error handler to be specified for IOHandler.
Update tests to use the *visible* overlay, not the first overlay.
== Tests ==
bin/test --layer=
firefox lib/lp/
== Demo and Q/A ==
Go to a +sharing-details page and click the edit icon next to "Translations
(are/are not) enabled on the upstream project."
A green checkmark should be shown when "Type of service for translations
application" is "External" or"Launchpad". The other values should be settable,
but have no impact on the main page.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
29: E501 line too long (80 characters)
35: E501 line too long (80 characters)
36: E501 line too long (81 characters)
95: E501 line too long (83 characters)
122: E301 expected 1 blank line, found 0
27: Line exceeds 78 characters.
29: Line exceeds 78 characters.
35: Line exceeds 78 characters.
36: Line exceeds 78 characters.
43: Line exceeds 78 characters.
95: Line exceeds 78 characters.
./lib/lp/
53: Expected '!==' and instead saw '!='.
117: Expected '!==' and instead saw '!='.
187: Expected '===' and instead saw '=='.
290: Expected '===' and instead saw '=='.
305: Expected '===' and instead saw '=='.
306: Expected '===' and instead saw '=='.
338: Move 'var' declarations to the top of the function.
338: Stopping. (76% scanned).
0: JSLINT had a fatal error.
./lib/lp/
30: Expected '===' and instead saw '=='.
33: Expected '===' and instead saw '=='.
54: Move 'var' declarations to the top of the function.
54: Stopping. (5% scanned).
0: JSLINT had a fatal error.
4: Line exceeds 78 characters.
191: Line exceeds 78 characters.
570: Line exceeds 78 characters.
618: Line exceeds 78 characters.
745: Line exceeds 78 characters.
./lib/lp/
43: Expected ';' and instead saw 'if'.
92: Expected '!==' and instead saw '!='.
223: Expected '!==' and instead saw '!='.
224: Expected '{' and instead saw 'temp_spinner'.
257: Expected '!==' and instead saw '!='.
270: 'header' used out of scope.
271: 'step_title' used out of scope.
319: Move 'var' declarations to the top of the function.
319: Stopping. (85% scanned).
0: JSLINT had a fatal error.
194: Line exceeds 78 characters.
Looks good again, Aaron. Well done on all this JavaScript work! The inheritance looks good for FormErrorHandler, and the branch otherwise is nice, too. I'll mention the brackets and spaces issue again, just for consistency, but again mark this as approved.
Thanks so much for your hard work on this! I know you put a lot of time and effort into this. The work will be extremely useful to people on this page, and I hope the next time you come to a non-small JavaScript feature it will be easier due to the time spent here.
Cheers,
deryck