Merge lp:~michael.nelson/launchpad/561586-move-js-to-lp-app into lp:launchpad
- 561586-move-js-to-lp-app
- Merge into devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Graham Binns | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11346 | ||||
Proposed branch: | lp:~michael.nelson/launchpad/561586-move-js-to-lp-app | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
622 lines (+123/-91) 14 files modified
lib/lp/app/templates/base-layout-macros.pt (+10/-0) lib/lp/soyuz/javascript/archivesubscribers_index.js (+5/-4) lib/lp/soyuz/javascript/base.js (+5/-8) lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js (+12/-13) lib/lp/soyuz/javascript/tests/archivesubscribers_index.js (+13/-8) lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js (+29/-14) lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html (+5/-5) lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html (+5/-5) lib/lp/soyuz/javascript/update_archive_build_statuses.js (+11/-9) lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt (+0/-1) lib/lp/soyuz/templates/archive-packages.pt (+4/-17) lib/lp/soyuz/templates/archive-subscribers.pt (+2/-7) lib/lp/soyuz/windmill/tests/test_yuitests.py (+21/-0) utilities/lp-deps.py (+1/-0) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/561586-move-js-to-lp-app | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+32180@code.launchpad.net |
Commit message
Move soyuz js files to lp.soyuz.
Description of the change
Overview
========
This branch address bug 561586 for soyuz by moving the soyuz JavaScript files (and their tests) into lib/lp/
Details
=======
I followed Deryck's (and Maris') example at:
https:/
and also moved the imports from the templates to the base template (in devmode), and added a unittest for the windmill tests.
To test
=======
bin/test -vvm lp.soyuz -t test_yuitests
To demo:
1) view https:/
a) the 'Package totals' widget is updated correctly (async request)
b) if you check the JS log for your browser, you'll see the build status updates working correctly.
2) Log in as admin, create a new PPA for yourself, administer it and make it private, then click on 'Manage subscriptions'. You'll then see the 'Add access' link which expands the row for adding a new subscription.
I removed all the lint too.
Graham Binns (gmb) : | # |
Preview Diff
1 | === modified file 'lib/lp/app/templates/base-layout-macros.pt' | |||
2 | --- lib/lp/app/templates/base-layout-macros.pt 2010-08-03 11:18:34 +0000 | |||
3 | +++ lib/lp/app/templates/base-layout-macros.pt 2010-08-13 10:12:49 +0000 | |||
4 | @@ -231,6 +231,16 @@ | |||
5 | 231 | tal:attributes="src string:${lp_js}/translations/languages.js"></script> | 231 | tal:attributes="src string:${lp_js}/translations/languages.js"></script> |
6 | 232 | <script type="text/javascript" | 232 | <script type="text/javascript" |
7 | 233 | tal:attributes="src string:${lp_js}/translations/pofile.js"></script> | 233 | tal:attributes="src string:${lp_js}/translations/pofile.js"></script> |
8 | 234 | |||
9 | 235 | <script type="text/javascript" | ||
10 | 236 | tal:attributes="src string:${lp_js}/soyuz/archivesubscribers_index.js"></script> | ||
11 | 237 | <script type="text/javascript" | ||
12 | 238 | tal:attributes="src string:${lp_js}/soyuz/base.js"></script> | ||
13 | 239 | <script type="text/javascript" | ||
14 | 240 | tal:attributes="src string:${lp_js}/soyuz/lp_dynamic_dom_updater.js"></script> | ||
15 | 241 | <script type="text/javascript" | ||
16 | 242 | tal:attributes="src string:${lp_js}/soyuz/update_archive_build_statuses.js"></script> | ||
17 | 243 | |||
18 | 234 | <script type="text/javascript" | 244 | <script type="text/javascript" |
19 | 235 | tal:attributes="src string:${lp_js}/bugs/filebug_dupefinder.js"> | 245 | tal:attributes="src string:${lp_js}/bugs/filebug_dupefinder.js"> |
20 | 236 | </script> | 246 | </script> |
21 | 237 | 247 | ||
22 | === renamed directory 'lib/canonical/launchpad/javascript/soyuz' => 'lib/lp/soyuz/javascript' | |||
23 | === modified file 'lib/lp/soyuz/javascript/archivesubscribers_index.js' | |||
24 | --- lib/canonical/launchpad/javascript/soyuz/archivesubscribers_index.js 2009-11-24 09:30:01 +0000 | |||
25 | +++ lib/lp/soyuz/javascript/archivesubscribers_index.js 2010-08-13 10:12:49 +0000 | |||
26 | @@ -3,19 +3,20 @@ | |||
27 | 3 | * | 3 | * |
28 | 4 | * Enhancements for adding ppa subscribers. | 4 | * Enhancements for adding ppa subscribers. |
29 | 5 | * | 5 | * |
31 | 6 | * @module ArchiveSubscribersIndex | 6 | * @module soyuz |
32 | 7 | * @submodule archivesubscribers_index | ||
33 | 7 | * @requires event, node, oop | 8 | * @requires event, node, oop |
34 | 8 | */ | 9 | */ |
36 | 9 | YUI.add('soyuz.archivesubscribers_index', function(Y) { | 10 | YUI.add('lp.soyuz.archivesubscribers_index', function(Y) { |
37 | 10 | 11 | ||
39 | 11 | var soyuz = Y.namespace('soyuz'); | 12 | var namespace = Y.namespace('lp.soyuz.archivesubscribers_index'); |
40 | 12 | 13 | ||
41 | 13 | /* | 14 | /* |
42 | 14 | * Setup the style and click handler for the add subscriber link. | 15 | * Setup the style and click handler for the add subscriber link. |
43 | 15 | * | 16 | * |
44 | 16 | * @method setup_archivesubscribers_index | 17 | * @method setup_archivesubscribers_index |
45 | 17 | */ | 18 | */ |
47 | 18 | Y.soyuz.setup_archivesubscribers_index = function() { | 19 | namespace.setup_archivesubscribers_index = function() { |
48 | 19 | // If there are no errors then we hide the add-subscriber row and | 20 | // If there are no errors then we hide the add-subscriber row and |
49 | 20 | // potentially the whole table if there are no subscribers. | 21 | // potentially the whole table if there are no subscribers. |
50 | 21 | if (Y.Lang.isNull(Y.one('p.error.message'))) { | 22 | if (Y.Lang.isNull(Y.one('p.error.message'))) { |
51 | 22 | 23 | ||
52 | === modified file 'lib/lp/soyuz/javascript/base.js' | |||
53 | --- lib/canonical/launchpad/javascript/soyuz/base.js 2009-11-23 19:29:02 +0000 | |||
54 | +++ lib/lp/soyuz/javascript/base.js 2010-08-13 10:12:49 +0000 | |||
55 | @@ -4,24 +4,21 @@ | |||
56 | 4 | * Auxiliary functions used in Soyuz pages | 4 | * Auxiliary functions used in Soyuz pages |
57 | 5 | * | 5 | * |
58 | 6 | * @module soyuz | 6 | * @module soyuz |
60 | 7 | * @submodule soyuz-base | 7 | * @submodule base |
61 | 8 | * @namespace soyuz | 8 | * @namespace soyuz |
62 | 9 | * @requires yahoo, node | 9 | * @requires yahoo, node |
63 | 10 | */ | 10 | */ |
64 | 11 | 11 | ||
66 | 12 | YUI.add('soyuz-base', function(Y) { | 12 | YUI.add('lp.soyuz.base', function(Y) { |
67 | 13 | 13 | ||
72 | 14 | /* | 14 | var namespace = Y.namespace('lp.soyuz.base'); |
69 | 15 | * Define the 'Y.soyuz' namespace | ||
70 | 16 | */ | ||
71 | 17 | var soyuz = Y.namespace('soyuz'); | ||
73 | 18 | 15 | ||
74 | 19 | 16 | ||
75 | 20 | /* | 17 | /* |
76 | 21 | * Return a node containing a standard failure message to be used | 18 | * Return a node containing a standard failure message to be used |
77 | 22 | * in XHR-based page updates. | 19 | * in XHR-based page updates. |
78 | 23 | */ | 20 | */ |
80 | 24 | soyuz.makeFailureNode = function (text, handler) { | 21 | namespace.makeFailureNode = function (text, handler) { |
81 | 25 | var failure_message = Y.Node.create('<p>'); | 22 | var failure_message = Y.Node.create('<p>'); |
82 | 26 | failure_message.addClass('update-failure-message'); | 23 | failure_message.addClass('update-failure-message'); |
83 | 27 | 24 | ||
84 | @@ -44,7 +41,7 @@ | |||
85 | 44 | * Return a node containing a standard in-progress message to be used | 41 | * Return a node containing a standard in-progress message to be used |
86 | 45 | * in XHR-based page updates. | 42 | * in XHR-based page updates. |
87 | 46 | */ | 43 | */ |
89 | 47 | soyuz.makeInProgressNode = function (text) { | 44 | namespace.makeInProgressNode = function (text) { |
90 | 48 | var in_progress_message = Y.Node.create('<p>'); | 45 | var in_progress_message = Y.Node.create('<p>'); |
91 | 49 | var message = Y.Node.create('<span>'); | 46 | var message = Y.Node.create('<span>'); |
92 | 50 | 47 | ||
93 | 51 | 48 | ||
94 | === modified file 'lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js' | |||
95 | --- lib/canonical/launchpad/javascript/soyuz/lp_dynamic_dom_updater.js 2009-11-24 16:11:43 +0000 | |||
96 | +++ lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js 2010-08-13 10:12:49 +0000 | |||
97 | @@ -5,16 +5,16 @@ | |||
98 | 5 | * can be plugged in to a DOM subtree, so that the subtree can update itself | 5 | * can be plugged in to a DOM subtree, so that the subtree can update itself |
99 | 6 | * regularly using the Launchpad API. | 6 | * regularly using the Launchpad API. |
100 | 7 | * | 7 | * |
102 | 8 | * @module DynamicDomUpdater | 8 | * @module soyuz |
103 | 9 | * @submodule dynamic_dom_updater | ||
104 | 9 | * @requires yahoo, node, plugin, LP | 10 | * @requires yahoo, node, plugin, LP |
105 | 10 | */ | 11 | */ |
107 | 11 | YUI.add('soyuz.dynamic_dom_updater', function(Y) { | 12 | YUI.add('lp.soyuz.dynamic_dom_updater', function(Y) { |
108 | 12 | 13 | ||
111 | 13 | /* Ensure that the Y.lp namespace exists. */ | 14 | var namespace = Y.namespace('lp.soyuz.dynamic_dom_updater'); |
110 | 14 | var lp = Y.namespace('lp'); | ||
112 | 15 | 15 | ||
113 | 16 | /** | 16 | /** |
115 | 17 | * The DomUpdater class provides the ability to plugin functionality | 17 | * The DomUpdater class provides the ability to plugin functionality |
116 | 18 | * to a DOM subtree so that it can update itself when given data in an | 18 | * to a DOM subtree so that it can update itself when given data in an |
117 | 19 | * expected format. | 19 | * expected format. |
118 | 20 | * | 20 | * |
119 | @@ -74,12 +74,12 @@ | |||
120 | 74 | }); | 74 | }); |
121 | 75 | 75 | ||
122 | 76 | /* | 76 | /* |
124 | 77 | * Ensure that the DomUpdater is available within the Y.lp namespace. | 77 | * Ensure that the DomUpdater is available within the namespace. |
125 | 78 | */ | 78 | */ |
127 | 79 | Y.lp.DomUpdater = DomUpdater; | 79 | namespace.DomUpdater = DomUpdater; |
128 | 80 | 80 | ||
129 | 81 | /** | 81 | /** |
131 | 82 | * The DynamicDomUpdater class provides the ability to plug functionality | 82 | * The DynamicDomUpdater class provides the ability to plug functionality |
132 | 83 | * into a DOM subtree so that it can update itself using an LP api method. | 83 | * into a DOM subtree so that it can update itself using an LP api method. |
133 | 84 | * | 84 | * |
134 | 85 | * For example: | 85 | * For example: |
135 | @@ -94,7 +94,7 @@ | |||
136 | 94 | * Once configured, the 'table' dom subtree will now update itself | 94 | * Once configured, the 'table' dom subtree will now update itself |
137 | 95 | * by calling the user defined domUpdateFunction (with a default interval | 95 | * by calling the user defined domUpdateFunction (with a default interval |
138 | 96 | * of 6000ms) with the result of the LPs api call. | 96 | * of 6000ms) with the result of the LPs api call. |
140 | 97 | * | 97 | * |
141 | 98 | * @class DynamicDomUpdater | 98 | * @class DynamicDomUpdater |
142 | 99 | * @extends DomUpdater | 99 | * @extends DomUpdater |
143 | 100 | * @constructor | 100 | * @constructor |
144 | @@ -326,7 +326,7 @@ | |||
145 | 326 | } | 326 | } |
146 | 327 | 327 | ||
147 | 328 | if (actual_interval_updated) { | 328 | if (actual_interval_updated) { |
149 | 329 | Y.log("Actual poll interval updated to " + | 329 | Y.log("Actual poll interval updated to " + |
150 | 330 | this._actual_interval + "ms."); | 330 | this._actual_interval + "ms."); |
151 | 331 | } | 331 | } |
152 | 332 | 332 | ||
153 | @@ -350,9 +350,8 @@ | |||
154 | 350 | }); | 350 | }); |
155 | 351 | 351 | ||
156 | 352 | /* | 352 | /* |
159 | 353 | * Ensure that the DynamicDomUpdater is available within the Y.lp | 353 | * Ensure that the DynamicDomUpdater is available within the namespace. |
158 | 354 | * namespace. | ||
160 | 355 | */ | 354 | */ |
162 | 356 | Y.lp.DynamicDomUpdater = DynamicDomUpdater; | 355 | namespace.DynamicDomUpdater = DynamicDomUpdater; |
163 | 357 | 356 | ||
164 | 358 | }, "0.1", {"requires":["node", "plugin"]}); | 357 | }, "0.1", {"requires":["node", "plugin"]}); |
165 | 359 | 358 | ||
166 | === modified file 'lib/lp/soyuz/javascript/tests/archivesubscribers_index.js' | |||
167 | --- lib/canonical/launchpad/javascript/soyuz/tests/archivesubscribers_index.js 2010-07-26 13:42:32 +0000 | |||
168 | +++ lib/lp/soyuz/javascript/tests/archivesubscribers_index.js 2010-08-13 10:12:49 +0000 | |||
169 | @@ -2,11 +2,11 @@ | |||
170 | 2 | GNU Affero General Public License version 3 (see the file LICENSE). */ | 2 | GNU Affero General Public License version 3 (see the file LICENSE). */ |
171 | 3 | 3 | ||
172 | 4 | YUI({ | 4 | YUI({ |
174 | 5 | base: '../../../icing/yui/', | 5 | base: '../../../../canonical/launchpad/icing/yui/', |
175 | 6 | filter: 'raw', | 6 | filter: 'raw', |
176 | 7 | combine: false | 7 | combine: false |
177 | 8 | }).use( | 8 | }).use( |
179 | 9 | 'test', 'console', 'soyuz.archivesubscribers_index', function(Y) { | 9 | 'test', 'console', 'lp.soyuz.archivesubscribers_index', function(Y) { |
180 | 10 | 10 | ||
181 | 11 | var Assert = Y.Assert; // For easy access to isTrue(), etc. | 11 | var Assert = Y.Assert; // For easy access to isTrue(), etc. |
182 | 12 | 12 | ||
183 | @@ -68,7 +68,7 @@ | |||
184 | 68 | 68 | ||
185 | 69 | test_add_row_hidden_after_setup: function() { | 69 | test_add_row_hidden_after_setup: function() { |
186 | 70 | // The add subscriber row is hidden during setup. | 70 | // The add subscriber row is hidden during setup. |
188 | 71 | Y.soyuz.setup_archivesubscribers_index(); | 71 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
189 | 72 | Assert.areEqual( | 72 | Assert.areEqual( |
190 | 73 | 'none', this.add_subscriber_row.getStyle('display'), | 73 | 'none', this.add_subscriber_row.getStyle('display'), |
191 | 74 | 'The add subscriber row should be hidden during setup.'); | 74 | 'The add subscriber row should be hidden during setup.'); |
192 | @@ -76,7 +76,7 @@ | |||
193 | 76 | 76 | ||
194 | 77 | test_subscribers_section_displayed_after_setup: function() { | 77 | test_subscribers_section_displayed_after_setup: function() { |
195 | 78 | // The subscribers div normally remains displayed after setup. | 78 | // The subscribers div normally remains displayed after setup. |
197 | 79 | Y.soyuz.setup_archivesubscribers_index(); | 79 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
198 | 80 | Assert.areEqual( | 80 | Assert.areEqual( |
199 | 81 | 'block', this.subscribers_div.getStyle('display'), | 81 | 'block', this.subscribers_div.getStyle('display'), |
200 | 82 | 'The subscribers div should remain displayed after setup.'); | 82 | 'The subscribers div should remain displayed after setup.'); |
201 | @@ -87,7 +87,7 @@ | |||
202 | 87 | 87 | ||
203 | 88 | // Add a paragraph with the no-subscribers id. | 88 | // Add a paragraph with the no-subscribers id. |
204 | 89 | this.error_div.set('innerHTML', '<p id="no-subscribers">blah</p>'); | 89 | this.error_div.set('innerHTML', '<p id="no-subscribers">blah</p>'); |
206 | 90 | Y.soyuz.setup_archivesubscribers_index(); | 90 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
207 | 91 | Assert.areEqual( | 91 | Assert.areEqual( |
208 | 92 | 'none', this.subscribers_div.getStyle('display'), | 92 | 'none', this.subscribers_div.getStyle('display'), |
209 | 93 | 'The subscribers div should be hidden when there are ' + | 93 | 'The subscribers div should be hidden when there are ' + |
210 | @@ -100,7 +100,7 @@ | |||
211 | 100 | 100 | ||
212 | 101 | // Add an error paragraph. | 101 | // Add an error paragraph. |
213 | 102 | this.error_div.set('innerHTML', '<p class="error message">Blah</p>'); | 102 | this.error_div.set('innerHTML', '<p class="error message">Blah</p>'); |
215 | 103 | Y.soyuz.setup_archivesubscribers_index(); | 103 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
216 | 104 | Assert.areEqual( | 104 | Assert.areEqual( |
217 | 105 | 'table-row', this.add_subscriber_row.getStyle('display'), | 105 | 'table-row', this.add_subscriber_row.getStyle('display'), |
218 | 106 | 'The add subscriber row should not be hidden if there are ' + | 106 | 'The add subscriber row should not be hidden if there are ' + |
219 | @@ -110,7 +110,7 @@ | |||
220 | 110 | test_add_access_link_added_after_setup: function() { | 110 | test_add_access_link_added_after_setup: function() { |
221 | 111 | // The 'Add access' link is created during setup. | 111 | // The 'Add access' link is created during setup. |
222 | 112 | 112 | ||
224 | 113 | Y.soyuz.setup_archivesubscribers_index(); | 113 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
225 | 114 | Assert.areEqual( | 114 | Assert.areEqual( |
226 | 115 | '<a class="js-action sprite add" href="#">Add access</a>', | 115 | '<a class="js-action sprite add" href="#">Add access</a>', |
227 | 116 | this.add_subscriber_placeholder.get('innerHTML'), | 116 | this.add_subscriber_placeholder.get('innerHTML'), |
228 | @@ -119,7 +119,7 @@ | |||
229 | 119 | 119 | ||
230 | 120 | test_click_add_access_displays_add_row: function() { | 120 | test_click_add_access_displays_add_row: function() { |
231 | 121 | // The add subscriber row is displayed after clicking 'Add access'. | 121 | // The add subscriber row is displayed after clicking 'Add access'. |
233 | 122 | Y.soyuz.setup_archivesubscribers_index(); | 122 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
234 | 123 | var link_node = this.add_subscriber_placeholder.one('a'); | 123 | var link_node = this.add_subscriber_placeholder.one('a'); |
235 | 124 | Assert.areEqual( | 124 | Assert.areEqual( |
236 | 125 | 'Add access', link_node.get('innerHTML')); | 125 | 'Add access', link_node.get('innerHTML')); |
237 | @@ -133,6 +133,11 @@ | |||
238 | 133 | } | 133 | } |
239 | 134 | })); | 134 | })); |
240 | 135 | 135 | ||
241 | 136 | Y.Test.Runner.on('complete', function(data) { | ||
242 | 137 | status_node = Y.Node.create( | ||
243 | 138 | '<p id="complete">Test status: complete</p>'); | ||
244 | 139 | Y.get('body').appendChild(status_node); | ||
245 | 140 | }); | ||
246 | 136 | Y.Test.Runner.add(suite); | 141 | Y.Test.Runner.add(suite); |
247 | 137 | 142 | ||
248 | 138 | var yconsole = new Y.Console({ | 143 | var yconsole = new Y.Console({ |
249 | 139 | 144 | ||
250 | === modified file 'lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js' | |||
251 | --- lib/canonical/launchpad/javascript/soyuz/tests/lp_dynamic_dom_updater.js 2010-07-26 13:42:32 +0000 | |||
252 | +++ lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js 2010-08-13 10:12:49 +0000 | |||
253 | @@ -2,10 +2,10 @@ | |||
254 | 2 | GNU Affero General Public License version 3 (see the file LICENSE). */ | 2 | GNU Affero General Public License version 3 (see the file LICENSE). */ |
255 | 3 | 3 | ||
256 | 4 | YUI({ | 4 | YUI({ |
258 | 5 | base: '../../../icing/yui/', | 5 | base: '../../../../canonical/launchpad/icing/yui/', |
259 | 6 | filter: 'raw', | 6 | filter: 'raw', |
260 | 7 | combine: false | 7 | combine: false |
262 | 8 | }).use('test', 'console', 'soyuz.dynamic_dom_updater', function(Y) { | 8 | }).use('test', 'console', 'lp.soyuz.dynamic_dom_updater', function(Y) { |
263 | 9 | 9 | ||
264 | 10 | var Assert = Y.Assert; // For easy access to isTrue(), etc. | 10 | var Assert = Y.Assert; // For easy access to isTrue(), etc. |
265 | 11 | 11 | ||
266 | @@ -31,14 +31,15 @@ | |||
267 | 31 | this.eg_div.updater, | 31 | this.eg_div.updater, |
268 | 32 | "Sanity check: initially there is no updater attribute."); | 32 | "Sanity check: initially there is no updater attribute."); |
269 | 33 | 33 | ||
271 | 34 | this.eg_div.plug(Y.lp.DomUpdater, this.config); | 34 | this.eg_div.plug( |
272 | 35 | Y.lp.soyuz.dynamic_dom_updater.DomUpdater, this.config); | ||
273 | 35 | 36 | ||
274 | 36 | Assert.isNotUndefined( | 37 | Assert.isNotUndefined( |
275 | 37 | this.eg_div.updater, | 38 | this.eg_div.updater, |
276 | 38 | "After plugging, the object has an 'updater' attribute."); | 39 | "After plugging, the object has an 'updater' attribute."); |
277 | 39 | 40 | ||
278 | 40 | Assert.isInstanceOf( | 41 | Assert.isInstanceOf( |
280 | 41 | Y.lp.DomUpdater, | 42 | Y.lp.soyuz.dynamic_dom_updater.DomUpdater, |
281 | 42 | this.eg_div.updater, | 43 | this.eg_div.updater, |
282 | 43 | "DomUpdater was not plugged correctly."); | 44 | "DomUpdater was not plugged correctly."); |
283 | 44 | }, | 45 | }, |
284 | @@ -52,7 +53,8 @@ | |||
285 | 52 | "Sanity check that the innerHTML of our example div has not" + | 53 | "Sanity check that the innerHTML of our example div has not" + |
286 | 53 | "been modified."); | 54 | "been modified."); |
287 | 54 | 55 | ||
289 | 55 | this.eg_div.plug(Y.lp.DomUpdater, this.config); | 56 | this.eg_div.plug( |
290 | 57 | Y.lp.soyuz.dynamic_dom_updater.DomUpdater, this.config); | ||
291 | 56 | this.eg_div.updater.update({msg: "Boo. I've changed."}); | 58 | this.eg_div.updater.update({msg: "Boo. I've changed."}); |
292 | 57 | Assert.areEqual( | 59 | Assert.areEqual( |
293 | 58 | "Boo. I've changed.", | 60 | "Boo. I've changed.", |
294 | @@ -97,14 +99,15 @@ | |||
295 | 97 | this.eg_div.updater, | 99 | this.eg_div.updater, |
296 | 98 | "Sanity check: initially there is no updater attribute."); | 100 | "Sanity check: initially there is no updater attribute."); |
297 | 99 | 101 | ||
299 | 100 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 102 | this.eg_div.plug( |
300 | 103 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
301 | 101 | 104 | ||
302 | 102 | Assert.isNotUndefined( | 105 | Assert.isNotUndefined( |
303 | 103 | this.eg_div.updater, | 106 | this.eg_div.updater, |
304 | 104 | "After plugging, the object has an 'updater' attribute."); | 107 | "After plugging, the object has an 'updater' attribute."); |
305 | 105 | 108 | ||
306 | 106 | Assert.isInstanceOf( | 109 | Assert.isInstanceOf( |
308 | 107 | Y.lp.DynamicDomUpdater, | 110 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, |
309 | 108 | this.eg_div.updater, | 111 | this.eg_div.updater, |
310 | 109 | "DynamicDomUpdater was not plugged correctly."); | 112 | "DynamicDomUpdater was not plugged correctly."); |
311 | 110 | }, | 113 | }, |
312 | @@ -113,7 +116,8 @@ | |||
313 | 113 | // Requests to the LP API should only be re-issued if a successful | 116 | // Requests to the LP API should only be re-issued if a successful |
314 | 114 | // response was received previously. | 117 | // response was received previously. |
315 | 115 | 118 | ||
317 | 116 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 119 | this.eg_div.plug( |
318 | 120 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
319 | 117 | 121 | ||
320 | 118 | // Verify that our expectation of only one named_get was met: | 122 | // Verify that our expectation of only one named_get was met: |
321 | 119 | this.wait(function() { | 123 | this.wait(function() { |
322 | @@ -132,7 +136,8 @@ | |||
323 | 132 | callCount: 2 | 136 | callCount: 2 |
324 | 133 | }); | 137 | }); |
325 | 134 | 138 | ||
327 | 135 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 139 | this.eg_div.plug( |
328 | 140 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
329 | 136 | 141 | ||
330 | 137 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes | 142 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes |
331 | 138 | // its initialization. | 143 | // its initialization. |
332 | @@ -151,7 +156,8 @@ | |||
333 | 151 | // The actual polling interval is doubled if the elapsed time | 156 | // The actual polling interval is doubled if the elapsed time |
334 | 152 | // for the previous request was greater than the | 157 | // for the previous request was greater than the |
335 | 153 | // long_processing_time attribute. | 158 | // long_processing_time attribute. |
337 | 154 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 159 | this.eg_div.plug( |
338 | 160 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
339 | 155 | 161 | ||
340 | 156 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes | 162 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes |
341 | 157 | // its initialization. | 163 | // its initialization. |
342 | @@ -175,7 +181,8 @@ | |||
343 | 175 | // The actual polling interval remains unchanged if the elapsed time | 181 | // The actual polling interval remains unchanged if the elapsed time |
344 | 176 | // for the previous request was within the short/long processing | 182 | // for the previous request was within the short/long processing |
345 | 177 | // times. | 183 | // times. |
347 | 178 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 184 | this.eg_div.plug( |
348 | 185 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
349 | 179 | 186 | ||
350 | 180 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes | 187 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes |
351 | 181 | // its initialization. | 188 | // its initialization. |
352 | @@ -200,7 +207,8 @@ | |||
353 | 200 | // The actual polling interval is halved if the elapsed time | 207 | // The actual polling interval is halved if the elapsed time |
354 | 201 | // for the previous request was less than the short_processing_time | 208 | // for the previous request was less than the short_processing_time |
355 | 202 | 209 | ||
357 | 203 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 210 | this.eg_div.plug( |
358 | 211 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
359 | 204 | 212 | ||
360 | 205 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes | 213 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes |
361 | 206 | // its initialization. | 214 | // its initialization. |
362 | @@ -220,7 +228,8 @@ | |||
363 | 220 | Assert.areEqual( | 228 | Assert.areEqual( |
364 | 221 | 8, | 229 | 8, |
365 | 222 | this.eg_div.updater._actual_interval, | 230 | this.eg_div.updater._actual_interval, |
367 | 223 | "Poll interval is halved if request is faster than expected."); | 231 | "Poll interval is halved if request is faster than " + |
368 | 232 | "expected."); | ||
369 | 224 | 233 | ||
370 | 225 | }, 5); | 234 | }, 5); |
371 | 226 | }, | 235 | }, |
372 | @@ -229,7 +238,8 @@ | |||
373 | 229 | // Even if the processing time is quick, the actual interval | 238 | // Even if the processing time is quick, the actual interval |
374 | 230 | // is never smaller than the interval set in the configuration. | 239 | // is never smaller than the interval set in the configuration. |
375 | 231 | 240 | ||
377 | 232 | this.eg_div.plug(Y.lp.DynamicDomUpdater, this.config); | 241 | this.eg_div.plug( |
378 | 242 | Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, this.config); | ||
379 | 233 | 243 | ||
380 | 234 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes | 244 | // Wait 5ms just to ensure that the DynamicDomUpdater finishes |
381 | 235 | // its initialization. | 245 | // its initialization. |
382 | @@ -259,6 +269,11 @@ | |||
383 | 259 | 269 | ||
384 | 260 | })); | 270 | })); |
385 | 261 | 271 | ||
386 | 272 | Y.Test.Runner.on('complete', function(data) { | ||
387 | 273 | status_node = Y.Node.create( | ||
388 | 274 | '<p id="complete">Test status: complete</p>'); | ||
389 | 275 | Y.get('body').appendChild(status_node); | ||
390 | 276 | }); | ||
391 | 262 | Y.Test.Runner.add(suite); | 277 | Y.Test.Runner.add(suite); |
392 | 263 | 278 | ||
393 | 264 | var yconsole = new Y.Console({ | 279 | var yconsole = new Y.Console({ |
394 | 265 | 280 | ||
395 | === renamed file 'lib/canonical/launchpad/javascript/soyuz/tests/archivesubscribers_index.html' => 'lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html' | |||
396 | --- lib/canonical/launchpad/javascript/soyuz/tests/archivesubscribers_index.html 2010-07-26 13:42:32 +0000 | |||
397 | +++ lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html 2010-08-13 10:12:49 +0000 | |||
398 | @@ -4,11 +4,11 @@ | |||
399 | 4 | <title>Launchpad ArchiveSubscriberIndex</title> | 4 | <title>Launchpad ArchiveSubscriberIndex</title> |
400 | 5 | 5 | ||
401 | 6 | <!-- YUI 3.0 Setup --> | 6 | <!-- YUI 3.0 Setup --> |
407 | 7 | <script type="text/javascript" src="../../../icing/yui/yui/yui.js"></script> | 7 | <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script> |
408 | 8 | <link rel="stylesheet" href="../../../icing/yui/cssreset/reset.css"/> | 8 | <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/> |
409 | 9 | <link rel="stylesheet" href="../../../icing/yui/cssfonts/fonts.css"/> | 9 | <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/> |
410 | 10 | <link rel="stylesheet" href="../../../icing/yui/cssbase/base.css"/> | 10 | <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/> |
411 | 11 | <link rel="stylesheet" href="../../test.css" /> | 11 | <link rel="stylesheet" href="../../../../canonical/launchpad/test.css" /> |
412 | 12 | 12 | ||
413 | 13 | <!-- The module under test --> | 13 | <!-- The module under test --> |
414 | 14 | <script type="text/javascript" src="../archivesubscribers_index.js"></script> | 14 | <script type="text/javascript" src="../archivesubscribers_index.js"></script> |
415 | 15 | 15 | ||
416 | === renamed file 'lib/canonical/launchpad/javascript/soyuz/tests/lp_dynamic_dom_updater.html' => 'lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html' | |||
417 | --- lib/canonical/launchpad/javascript/soyuz/tests/lp_dynamic_dom_updater.html 2010-07-26 13:42:32 +0000 | |||
418 | +++ lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html 2010-08-13 10:12:49 +0000 | |||
419 | @@ -4,11 +4,11 @@ | |||
420 | 4 | <title>Launchpad DynamicDomUpdater</title> | 4 | <title>Launchpad DynamicDomUpdater</title> |
421 | 5 | 5 | ||
422 | 6 | <!-- YUI 3.0 Setup --> | 6 | <!-- YUI 3.0 Setup --> |
428 | 7 | <script type="text/javascript" src="../../../icing/yui/yui/yui.js"></script> | 7 | <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script> |
429 | 8 | <link rel="stylesheet" href="../../../icing/yui/cssreset/reset.css"/> | 8 | <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/> |
430 | 9 | <link rel="stylesheet" href="../../../icing/yui/cssfonts/fonts.css"/> | 9 | <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/> |
431 | 10 | <link rel="stylesheet" href="../../../icing/yui/cssbase/base.css"/> | 10 | <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/> |
432 | 11 | <link rel="stylesheet" href="../../test.css" /> | 11 | <link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" /> |
433 | 12 | 12 | ||
434 | 13 | <!-- The module under test --> | 13 | <!-- The module under test --> |
435 | 14 | <script type="text/javascript" src="../lp_dynamic_dom_updater.js"></script> | 14 | <script type="text/javascript" src="../lp_dynamic_dom_updater.js"></script> |
436 | 15 | 15 | ||
437 | === modified file 'lib/lp/soyuz/javascript/update_archive_build_statuses.js' | |||
438 | --- lib/canonical/launchpad/javascript/soyuz/update_archive_build_statuses.js 2009-11-24 09:30:01 +0000 | |||
439 | +++ lib/lp/soyuz/javascript/update_archive_build_statuses.js 2010-08-13 10:12:49 +0000 | |||
440 | @@ -11,7 +11,7 @@ | |||
441 | 11 | * The second is the Archive/PPA source package table, the configuration of | 11 | * The second is the Archive/PPA source package table, the configuration of |
442 | 12 | * which is set in source_package_table_dynamic_update_config. | 12 | * which is set in source_package_table_dynamic_update_config. |
443 | 13 | */ | 13 | */ |
445 | 14 | YUI.add('soyuz.update_archive_build_statuses', function(Y){ | 14 | YUI.add('lp.soyuz.update_archive_build_statuses', function(Y){ |
446 | 15 | 15 | ||
447 | 16 | /** | 16 | /** |
448 | 17 | * Create one Launchpad client to be used by both dynamic tables. | 17 | * Create one Launchpad client to be used by both dynamic tables. |
449 | @@ -86,7 +86,7 @@ | |||
450 | 86 | var portlet = Y.one('div#build-status-summary'); | 86 | var portlet = Y.one('div#build-status-summary'); |
451 | 87 | build_summary_portlet_dynamic_update_config.uri = | 87 | build_summary_portlet_dynamic_update_config.uri = |
452 | 88 | LP.client.cache.context.self_link; | 88 | LP.client.cache.context.self_link; |
454 | 89 | portlet.plug(Y.lp.DynamicDomUpdater, | 89 | portlet.plug(Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, |
455 | 90 | build_summary_portlet_dynamic_update_config); | 90 | build_summary_portlet_dynamic_update_config); |
456 | 91 | }); | 91 | }); |
457 | 92 | 92 | ||
458 | @@ -110,8 +110,8 @@ | |||
459 | 110 | domUpdateFunction: function(table_node, data_object){ | 110 | domUpdateFunction: function(table_node, data_object){ |
460 | 111 | // For each source id in the data object: | 111 | // For each source id in the data object: |
461 | 112 | Y.each(data_object, function(build_summary, source_id){ | 112 | Y.each(data_object, function(build_summary, source_id){ |
464 | 113 | // Grab the related td element (and fail silently if it doesn't | 113 | // Grab the related td element (and fail silently if it |
465 | 114 | // exist). | 114 | // doesn't exist). |
466 | 115 | var td_elem = Y.one("#pubstatus" + source_id); | 115 | var td_elem = Y.one("#pubstatus" + source_id); |
467 | 116 | if (td_elem === null) { | 116 | if (td_elem === null) { |
468 | 117 | return; | 117 | return; |
469 | @@ -221,12 +221,13 @@ | |||
470 | 221 | * @config parameterEvaluatorFunction | 221 | * @config parameterEvaluatorFunction |
471 | 222 | */ | 222 | */ |
472 | 223 | parameterEvaluatorFunction: function(table_node){ | 223 | parameterEvaluatorFunction: function(table_node){ |
475 | 224 | // Grab all the td's with the class 'build_status' and an additional | 224 | // Grab all the td's with the class 'build_status' and an |
476 | 225 | // class of either 'NEEDSBUILD' or 'BUILDING': | 225 | // additional class of either 'NEEDSBUILD' or 'BUILDING': |
477 | 226 | var td_list = table_node.all('td.build_status'); | 226 | var td_list = table_node.all('td.build_status'); |
478 | 227 | var tds_needsbuild = td_list.filter(".NEEDSBUILD"); | 227 | var tds_needsbuild = td_list.filter(".NEEDSBUILD"); |
479 | 228 | var tds_building = td_list.filter(".BUILDING"); | 228 | var tds_building = td_list.filter(".BUILDING"); |
481 | 229 | var tds_fullybuilt_pending = td_list.filter(".FULLYBUILT_PENDING"); | 229 | var tds_fullybuilt_pending = td_list.filter( |
482 | 230 | ".FULLYBUILT_PENDING"); | ||
483 | 230 | 231 | ||
484 | 231 | if (tds_needsbuild.size() === 0 && | 232 | if (tds_needsbuild.size() === 0 && |
485 | 232 | tds_building.size() === 0 && | 233 | tds_building.size() === 0 && |
486 | @@ -275,8 +276,9 @@ | |||
487 | 275 | if (table !== null) { | 276 | if (table !== null) { |
488 | 276 | source_package_table_dynamic_update_config.uri = | 277 | source_package_table_dynamic_update_config.uri = |
489 | 277 | LP.client.cache.context.self_link; | 278 | LP.client.cache.context.self_link; |
491 | 278 | table.plug(Y.lp.DynamicDomUpdater, | 279 | table.plug(Y.lp.soyuz.dynamic_dom_updater.DynamicDomUpdater, |
492 | 279 | source_package_table_dynamic_update_config); | 280 | source_package_table_dynamic_update_config); |
493 | 280 | } | 281 | } |
494 | 281 | }); | 282 | }); |
496 | 282 | }, "0.1", {"requires":["node", "lazr.anim", "anim", "soyuz.dynamic_dom_updater"]}); | 283 | }, "0.1", {"requires":[ |
497 | 284 | "node", "lazr.anim", "anim", "lp.soyuz.dynamic_dom_updater"]}); | ||
498 | 283 | 285 | ||
499 | === modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt' | |||
500 | --- lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt 2010-07-14 14:58:30 +0000 | |||
501 | +++ lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt 2010-08-13 10:12:49 +0000 | |||
502 | @@ -56,7 +56,6 @@ | |||
503 | 56 | ... | 56 | ... |
504 | 57 | http://launchpad.dev/+icing/.../build/app/calendar.js | 57 | http://launchpad.dev/+icing/.../build/app/calendar.js |
505 | 58 | http://launchpad.dev/+icing/.../yui_2.7.0b/build/calendar/assets/skins/sam/calendar.css | 58 | http://launchpad.dev/+icing/.../yui_2.7.0b/build/calendar/assets/skins/sam/calendar.css |
506 | 59 | ... | ||
507 | 60 | 59 | ||
508 | 61 | Initially there are no subscriptions for a newly privatized PPA (although, | 60 | Initially there are no subscriptions for a newly privatized PPA (although, |
509 | 62 | this may need to change, to add the owner/team). A heading is displayed | 61 | this may need to change, to add the owner/team). A heading is displayed |
510 | 63 | 62 | ||
511 | === modified file 'lib/lp/soyuz/templates/archive-packages.pt' | |||
512 | --- lib/lp/soyuz/templates/archive-packages.pt 2010-03-24 16:54:56 +0000 | |||
513 | +++ lib/lp/soyuz/templates/archive-packages.pt 2010-08-13 10:12:49 +0000 | |||
514 | @@ -8,23 +8,10 @@ | |||
515 | 8 | > | 8 | > |
516 | 9 | <body> | 9 | <body> |
517 | 10 | <metal:block fill-slot="head_epilogue"> | 10 | <metal:block fill-slot="head_epilogue"> |
518 | 11 | <tal:devmode condition="devmode"> | ||
519 | 12 | <tal:archive_js define="lp_js string:${icingroot}/build"> | ||
520 | 13 | <script type="text/javascript" | ||
521 | 14 | tal:attributes="src string:${lp_js}/soyuz/base.js"> | ||
522 | 15 | </script> | ||
523 | 16 | <script type="text/javascript" | ||
524 | 17 | tal:attributes="src string:${lp_js}/soyuz/lp_dynamic_dom_updater.js"> | ||
525 | 18 | </script> | ||
526 | 19 | <script type="text/javascript" | ||
527 | 20 | tal:attributes="src string:${lp_js}/soyuz/update_archive_build_statuses.js"> | ||
528 | 21 | </script> | ||
529 | 22 | </tal:archive_js> | ||
530 | 23 | </tal:devmode> | ||
531 | 24 | <script type="text/javascript" id="repository-size-update" | 11 | <script type="text/javascript" id="repository-size-update" |
532 | 25 | tal:condition="view/archive_url"> | 12 | tal:condition="view/archive_url"> |
535 | 26 | LPS.use('io-base', 'lazr.anim', 'node', 'soyuz-base', | 13 | LPS.use('io-base', 'lazr.anim', 'node', 'lp.soyuz.base', |
536 | 27 | 'soyuz.update_archive_build_statuses', function(Y) { | 14 | 'lp.soyuz.update_archive_build_statuses', function(Y) { |
537 | 28 | 15 | ||
538 | 29 | 16 | ||
539 | 30 | /* | 17 | /* |
540 | @@ -45,7 +32,7 @@ | |||
541 | 45 | dispatchUpdate(); | 32 | dispatchUpdate(); |
542 | 46 | }; | 33 | }; |
543 | 47 | 34 | ||
545 | 48 | var failure_message = Y.soyuz.makeFailureNode( | 35 | var failure_message = Y.lp.soyuz.base.makeFailureNode( |
546 | 49 | 'Failed to fetch repository size ...', retry_handler); | 36 | 'Failed to fetch repository size ...', retry_handler); |
547 | 50 | 37 | ||
548 | 51 | args.container.set('innerHTML', ''); | 38 | args.container.set('innerHTML', ''); |
549 | @@ -62,7 +49,7 @@ | |||
550 | 62 | * Communicate an update is in progress and fire the XHR. | 49 | * Communicate an update is in progress and fire the XHR. |
551 | 63 | */ | 50 | */ |
552 | 64 | function dispatchUpdate () { | 51 | function dispatchUpdate () { |
554 | 65 | in_progress_message = Y.soyuz.makeInProgressNode( | 52 | in_progress_message = Y.lp.soyuz.base.makeInProgressNode( |
555 | 66 | 'Fetching repository size ...') | 53 | 'Fetching repository size ...') |
556 | 67 | 54 | ||
557 | 68 | var container = Y.one('#package-counters'); | 55 | var container = Y.one('#package-counters'); |
558 | 69 | 56 | ||
559 | === modified file 'lib/lp/soyuz/templates/archive-subscribers.pt' | |||
560 | --- lib/lp/soyuz/templates/archive-subscribers.pt 2009-12-03 18:33:22 +0000 | |||
561 | +++ lib/lp/soyuz/templates/archive-subscribers.pt 2010-08-13 10:12:49 +0000 | |||
562 | @@ -10,11 +10,6 @@ | |||
563 | 10 | <metal:block fill-slot="head_epilogue"> | 10 | <metal:block fill-slot="head_epilogue"> |
564 | 11 | <metal:yui-dependencies | 11 | <metal:yui-dependencies |
565 | 12 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> | 12 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> |
566 | 13 | |||
567 | 14 | <tal:devmode condition="devmode"> | ||
568 | 15 | <script type="text/javascript" | ||
569 | 16 | tal:attributes="src string:${lp_js}/soyuz/archivesubscribers_index.js"></script> | ||
570 | 17 | </tal:devmode> | ||
571 | 18 | </metal:block> | 13 | </metal:block> |
572 | 19 | 14 | ||
573 | 20 | <div metal:fill-slot="main"> | 15 | <div metal:fill-slot="main"> |
574 | @@ -98,8 +93,8 @@ | |||
575 | 98 | </form> | 93 | </form> |
576 | 99 | </div><!-- class="portlet" --> | 94 | </div><!-- class="portlet" --> |
577 | 100 | <script type="text/javascript" id="setup-archivesubscribers-index"> | 95 | <script type="text/javascript" id="setup-archivesubscribers-index"> |
580 | 101 | LPS.use('soyuz.archivesubscribers_index', function(Y) { | 96 | LPS.use('lp.soyuz.archivesubscribers_index', function(Y) { |
581 | 102 | Y.soyuz.setup_archivesubscribers_index(); | 97 | Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index(); |
582 | 103 | }); | 98 | }); |
583 | 104 | </script> | 99 | </script> |
584 | 105 | </div> | 100 | </div> |
585 | 106 | 101 | ||
586 | === added file 'lib/lp/soyuz/windmill/tests/test_yuitests.py' | |||
587 | --- lib/lp/soyuz/windmill/tests/test_yuitests.py 1970-01-01 00:00:00 +0000 | |||
588 | +++ lib/lp/soyuz/windmill/tests/test_yuitests.py 2010-08-13 10:12:49 +0000 | |||
589 | @@ -0,0 +1,21 @@ | |||
590 | 1 | # Copyright 2010 Canonical Ltd. This software is licensed under the | ||
591 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | ||
592 | 3 | |||
593 | 4 | """Run YUI.test tests.""" | ||
594 | 5 | |||
595 | 6 | __metaclass__ = type | ||
596 | 7 | __all__ = [] | ||
597 | 8 | |||
598 | 9 | from lp.testing import build_yui_unittest_suite, YUIUnitTestCase | ||
599 | 10 | from lp.soyuz.windmill.testing import SoyuzWindmillLayer | ||
600 | 11 | |||
601 | 12 | |||
602 | 13 | class SoyuzYUIUnitTestCase(YUIUnitTestCase): | ||
603 | 14 | |||
604 | 15 | layer = SoyuzWindmillLayer | ||
605 | 16 | suite_name = 'SoyuzYUIUnitTests' | ||
606 | 17 | |||
607 | 18 | |||
608 | 19 | def test_suite(): | ||
609 | 20 | app_testing_path = 'lp/soyuz/javascript/tests' | ||
610 | 21 | return build_yui_unittest_suite(app_testing_path, SoyuzYUIUnitTestCase) | ||
611 | 0 | 22 | ||
612 | === modified file 'utilities/lp-deps.py' | |||
613 | --- utilities/lp-deps.py 2010-07-16 16:14:39 +0000 | |||
614 | +++ utilities/lp-deps.py 2010-08-13 10:12:49 +0000 | |||
615 | @@ -25,6 +25,7 @@ | |||
616 | 25 | (os.path.join('lib', 'lp', 'code', 'javascript'), 'code'), | 25 | (os.path.join('lib', 'lp', 'code', 'javascript'), 'code'), |
617 | 26 | (os.path.join('lib', 'lp', 'registry', 'javascript'), 'registry'), | 26 | (os.path.join('lib', 'lp', 'registry', 'javascript'), 'registry'), |
618 | 27 | (os.path.join('lib', 'lp', 'translations', 'javascript'), 'translations'), | 27 | (os.path.join('lib', 'lp', 'translations', 'javascript'), 'translations'), |
619 | 28 | (os.path.join('lib', 'lp', 'soyuz', 'javascript'), 'soyuz'), | ||
620 | 28 | ] | 29 | ] |
621 | 29 | ICING_ROOT = os.path.join(TOP, 'lib', 'canonical', 'launchpad', 'icing') | 30 | ICING_ROOT = os.path.join(TOP, 'lib', 'canonical', 'launchpad', 'icing') |
622 | 30 | ICING_BUILD = os.path.join(ICING_ROOT, 'build') | 31 | ICING_BUILD = os.path.join(ICING_ROOT, 'build') |