Merge lp:~stevenk/launchpad/step-one-mochi into lp:launchpad

Proposed by Steve Kowalik on 2012-01-09
Status: Merged
Approved by: Steve Kowalik on 2012-01-09
Approved revision: no longer in the source branch.
Merged at revision: 14656
Proposed branch: lp:~stevenk/launchpad/step-one-mochi
Merge into: lp:launchpad
Diff against target: 107 lines (+6/-40)
5 files modified
lib/lp/bugs/browser/bugtarget.py (+1/-13)
lib/lp/code/browser/configure.zcml (+0/-6)
lib/lp/code/templates/test-webservice-js.pt (+0/-16)
lib/lp/registry/javascript/structural-subscription.js (+5/-3)
lib/lp/registry/javascript/tests/test_structural_subscription.html (+0/-2)
To merge this branch: bzr merge lp:~stevenk/launchpad/step-one-mochi
Reviewer Review Type Date Requested Status
Ian Booth (community) code 2012-01-09 Approve on 2012-01-09
Review via email: mp+87921@code.launchpad.net

Commit Message

[r=wallyworld][no-qa] Remove all references to Mochi that don't use lp-mochi.js.

Description of the Change

This branch removes all references to Mochi that *aren't* in lp-mochi.js. Deryck and I are fairly confident that the removals are not used anywhere.

Structual subscriptions was using a Mochi function which is provided by core JS, which I have fixed.

To post a comment you must log in.
Ian Booth (wallyworld) wrote :

Looks good. Less code is better.

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/browser/bugtarget.py'
2--- lib/lp/bugs/browser/bugtarget.py 2012-01-01 02:58:52 +0000
3+++ lib/lp/bugs/browser/bugtarget.py 2012-01-09 11:54:25 +0000
4@@ -1,4 +1,4 @@
5-# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
6+# Copyright 2010-2012 Canonical Ltd. This software is licensed under the
7 # GNU Affero General Public License version 3 (see the file LICENSE).
8
9 """IBugTarget-related browser views."""
10@@ -1295,18 +1295,6 @@
11 return milestone_buglistings
12
13
14-class BugCountDataItem:
15- """Data about bug count for a status."""
16-
17- def __init__(self, label, count, color):
18- self.label = label
19- self.count = count
20- if color.startswith('#'):
21- self.color = 'MochiKit.Color.Color.fromHexString("%s")' % color
22- else:
23- self.color = 'MochiKit.Color.Color["%sColor"]()' % color
24-
25-
26 class BugTargetBugTagsView(LaunchpadView):
27 """Helper methods for rendering the bug tags portlet."""
28
29
30=== modified file 'lib/lp/code/browser/configure.zcml'
31--- lib/lp/code/browser/configure.zcml 2012-01-03 15:38:19 +0000
32+++ lib/lp/code/browser/configure.zcml 2012-01-09 11:54:25 +0000
33@@ -69,12 +69,6 @@
34 template="../templates/branch-listing-cross-product.pt"
35 permission="zope.Public"
36 />
37- <browser:page
38- for="zope.interface.Interface"
39- name="+test-webservice-js"
40- template="../templates/test-webservice-js.pt"
41- permission="zope.Public"
42- />
43
44 <browser:url
45 for="lp.code.interfaces.codereviewvote.ICodeReviewVoteReference"
46
47=== removed file 'lib/lp/code/templates/test-webservice-js.pt'
48--- lib/lp/code/templates/test-webservice-js.pt 2011-05-27 21:03:22 +0000
49+++ lib/lp/code/templates/test-webservice-js.pt 1970-01-01 00:00:00 +0000
50@@ -1,16 +0,0 @@
51-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
52-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
53- <head>
54- <title>Launchpad AJAX client test page</title>
55- <script src="/+icing/MochiKit.js" type="text/javascript"></script>
56- <script src="/+icing/launchpad-ajax.js" type="text/javascript"></script>
57- </head>
58- <body>
59- <div id="topline"></div>
60- <div id="locationbar"></div>
61- <div>
62- <p>This page is used to test Launchpad's AJAX client.</p>
63- </div>
64- </body>
65-</html>
66-
67
68=== modified file 'lib/lp/registry/javascript/structural-subscription.js'
69--- lib/lp/registry/javascript/structural-subscription.js 2012-01-06 12:34:37 +0000
70+++ lib/lp/registry/javascript/structural-subscription.js 2012-01-09 11:54:25 +0000
71@@ -1405,14 +1405,15 @@
72
73 if (filter_info.team_has_contact_address
74 && !filter_info.user_is_team_admin) {
75- var subject = urlEncode('Team contact address and subscriptions');
76+ var subject = encodeURIComponent(
77+ 'Team contact address and subscriptions');
78 var user_participation;
79 if (filter_info.user_is_on_team_mailing_list) {
80 user_participation = 'subscribe to the team\'s mailing list';
81 } else {
82 user_participation = 'be a part of the team';
83 }
84- var message = urlEncode(
85+ var message = encodeURIComponent(
86 'Hello. I receive email notifications about bugs in '+
87 filter_info.target_title+' because of a team subscription for '+
88 filter_info.subscriber_title+'. I would like to continue to '+
89@@ -1866,5 +1867,6 @@
90
91 }, '0.1', {requires: [
92 'dom', 'node', 'lp.anim', 'lazr.formoverlay', 'lazr.overlay',
93- 'lazr.effects', 'lp.app.errors', 'lp.client', 'gallery-accordion', 'lp.app.inlinehelp'
94+ 'lazr.effects', 'lp.app.errors', 'lp.client', 'gallery-accordion',
95+ 'lp.app.inlinehelp'
96 ]});
97
98=== modified file 'lib/lp/registry/javascript/tests/test_structural_subscription.html'
99--- lib/lp/registry/javascript/tests/test_structural_subscription.html 2012-01-06 12:34:37 +0000
100+++ lib/lp/registry/javascript/tests/test_structural_subscription.html 2012-01-09 11:54:25 +0000
101@@ -32,8 +32,6 @@
102 src="../../../contrib/javascript/yui3-gallery/gallery-accordion/gallery-accordion.js">
103 </script>
104 <script type="text/javascript"
105- src="../../../../canonical/launchpad/icing/MochiKit.js"></script>
106- <script type="text/javascript"
107 src="../../../services/inlinehelp/javascript/inlinehelp.js"></script>
108
109