Merge lp:~allenap/launchpad/lazr-anim-stuff into lp:launchpad
- lazr-anim-stuff
- Merge into devel
Proposed by
Gavin Panella
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13656 |
Proposed branch: | lp:~allenap/launchpad/lazr-anim-stuff |
Merge into: | lp:launchpad |
Prerequisite: | lp:~allenap/launchpad/packageset-picker-5 |
Diff against target: |
1910 lines (+361/-306) 55 files modified
lib/lp/app/javascript/activator/activator.js (+4/-4) lib/lp/app/javascript/activator/tests/test_activator.html (+1/-0) lib/lp/app/javascript/ajax_log.js (+3/-3) lib/lp/app/javascript/anim/anim.js (+94/-84) lib/lp/app/javascript/anim/tests/test_anim.html (+7/-3) lib/lp/app/javascript/anim/tests/test_anim.js (+106/-89) lib/lp/app/javascript/choiceedit/choiceedit.js (+4/-4) lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html (+1/-0) lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js (+3/-3) lib/lp/app/javascript/comment.js (+3/-3) lib/lp/app/javascript/errors.js (+2/-2) lib/lp/app/javascript/formwidgets/formwidgets.js (+4/-4) lib/lp/app/javascript/hide_comment.js (+3/-3) lib/lp/app/javascript/inlineedit/editor.js (+4/-4) lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html (+1/-0) lib/lp/app/javascript/lp.ui.js (+2/-2) lib/lp/app/javascript/picker/picker.js (+1/-1) lib/lp/app/javascript/picker/tests/test_personpicker.html (+1/-0) lib/lp/app/javascript/picker/tests/test_picker.html (+1/-0) lib/lp/app/javascript/picker/tests/test_picker_patcher.html (+1/-0) lib/lp/app/javascript/subscribers/subscribers_list.js (+3/-3) lib/lp/app/javascript/subscribers/tests/test_subscribers_list.html (+2/-0) lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js (+15/-15) lib/lp/blueprints/templates/specification-index.pt (+3/-3) lib/lp/bugs/javascript/bug_notification_level.js (+2/-2) lib/lp/bugs/javascript/bug_subscription_portlet.js (+3/-3) lib/lp/bugs/javascript/bug_tags_entry.js (+4/-4) lib/lp/bugs/javascript/bugtask_index.js (+7/-7) lib/lp/bugs/javascript/bugtracker_overlay.js (+2/-2) lib/lp/bugs/javascript/tests/test_bug_notification_level.html (+2/-0) lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html (+2/-0) lib/lp/bugs/javascript/tests/test_subscribers.html (+2/-0) lib/lp/bugs/javascript/tests/test_subscription.html (+2/-0) lib/lp/bugs/javascript/tests/test_subscription.js (+1/-1) lib/lp/code/javascript/branch.bugspeclinks.js (+5/-5) lib/lp/code/javascript/branch.subscription.js (+2/-2) lib/lp/code/javascript/branchmergeproposal.reviewcomment.js (+5/-5) lib/lp/code/javascript/requestbuild_overlay.js (+3/-3) lib/lp/registry/javascript/distroseries/tests/test_differences.html (+2/-0) lib/lp/registry/javascript/distroseries/widgets.js (+7/-7) lib/lp/registry/javascript/distroseriesdifferences_details.js (+10/-10) lib/lp/registry/javascript/milestoneoverlay.js (+2/-2) lib/lp/registry/javascript/milestonetable.js (+4/-4) lib/lp/registry/javascript/structural-subscription.js (+3/-3) lib/lp/registry/javascript/team.js (+2/-2) lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+1/-1) lib/lp/registry/javascript/tests/test_milestone_table.html (+2/-0) lib/lp/registry/javascript/tests/test_structural_subscription.html (+2/-0) lib/lp/registry/templates/productrelease-add-from-series.pt (+1/-1) lib/lp/soyuz/javascript/update_archive_build_statuses.js (+3/-3) lib/lp/soyuz/templates/archive-macros.pt (+2/-2) lib/lp/soyuz/templates/archive-packages.pt (+2/-2) lib/lp/translations/javascript/importqueueentry.js (+3/-3) lib/lp/translations/javascript/sourcepackage_sharing_details.js (+2/-2) lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html (+2/-0) |
To merge this branch: | bzr merge lp:~allenap/launchpad/lazr-anim-stuff |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | code | Approve | |
Review via email: mp+71016@code.launchpad.net |
Commit message
[r=danilo][bug=824138] Rename lazr.anim to lp.anim, and spring clean.
Description of the change
Some work on lazr.anim:
- Clean up the code and fix lint.
- Use things like Y.Lang.isString and instanceof instead of typeof or
attribute sniffing (i.e. if thing has a _nodes attribute, thing is a
NodeList).
- Change test_anim.js to be a module, lazr.anim.test.
- Anim.on was not tested. It is now.
- Rename lazr.anim to lp.anim. This branch has a lot of mechanical
changes for this.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/app/javascript/activator/activator.js' |
2 | --- lib/lp/app/javascript/activator/activator.js 2011-06-29 14:56:15 +0000 |
3 | +++ lib/lp/app/javascript/activator/activator.js 2011-08-10 14:04:35 +0000 |
4 | @@ -154,7 +154,7 @@ |
5 | } |
6 | this._setStatusClass(C_SUCCESS); |
7 | this._renderMessage('Message', message_node); |
8 | - var anim = Y.lazr.anim.green_flash({node: this.animation_node}); |
9 | + var anim = Y.lp.anim.green_flash({node: this.animation_node}); |
10 | anim.run(); |
11 | }, |
12 | |
13 | @@ -168,7 +168,7 @@ |
14 | renderFailure: function(message_node) { |
15 | this._renderMessage('Error', message_node); |
16 | this._setStatusClass(C_FAILURE); |
17 | - var anim = Y.lazr.anim.red_flash({node: this.animation_node}); |
18 | + var anim = Y.lp.anim.red_flash({node: this.animation_node}); |
19 | anim.run(); |
20 | }, |
21 | |
22 | @@ -182,7 +182,7 @@ |
23 | renderCancellation: function(message_node) { |
24 | this._renderMessage('Message', message_node); |
25 | this._setStatusClass(C_CANCEL); |
26 | - var anim = Y.lazr.anim.red_flash({node: this.animation_node}); |
27 | + var anim = Y.lp.anim.red_flash({node: this.animation_node}); |
28 | anim.run(); |
29 | }, |
30 | |
31 | @@ -282,4 +282,4 @@ |
32 | |
33 | }, "0.1", {"skinnable": true, |
34 | "requires": ["oop", "event", "node", "widget", |
35 | - "lazr.anim", "lazr.base"]}); |
36 | + "lp.anim", "lazr.base"]}); |
37 | |
38 | === modified file 'lib/lp/app/javascript/activator/tests/test_activator.html' |
39 | --- lib/lp/app/javascript/activator/tests/test_activator.html 2011-07-08 06:06:15 +0000 |
40 | +++ lib/lp/app/javascript/activator/tests/test_activator.html 2011-08-10 14:04:35 +0000 |
41 | @@ -16,6 +16,7 @@ |
42 | <script type="text/javascript" src="../activator.js"></script> |
43 | <script type="text/javascript" src="../../anim/anim.js"></script> |
44 | <script type="text/javascript" src="../../lazr/lazr.js"></script> |
45 | + <script type="text/javascript" src="../../extras/extras.js"></script> |
46 | |
47 | <!-- The test suite --> |
48 | <script type="text/javascript" src="test_activator.js"></script> |
49 | |
50 | === modified file 'lib/lp/app/javascript/ajax_log.js' |
51 | --- lib/lp/app/javascript/ajax_log.js 2011-04-19 18:03:50 +0000 |
52 | +++ lib/lp/app/javascript/ajax_log.js 2011-08-10 14:04:35 +0000 |
53 | @@ -5,12 +5,12 @@ |
54 | */ |
55 | var AJAX_OK_TIME = 1; |
56 | |
57 | - LPS.use('node', 'lazr.anim', function(Y) { |
58 | + LPS.use('node', 'lp.anim', function(Y) { |
59 | Y.on('contentready', function() { |
60 | var node = Y.one('#ajax-time-list'); |
61 | var ajax_request_times = {}; |
62 | var ajax_menu_animating = false; |
63 | - var flash_menu = Y.lazr.anim.green_flash({node:'#ajax-time'}); |
64 | + var flash_menu = Y.lp.anim.green_flash({node:'#ajax-time'}); |
65 | flash_menu.on('end', function() { |
66 | ajax_menu_animating = false; |
67 | }); |
68 | @@ -62,7 +62,7 @@ |
69 | node.prepend(log_node); |
70 | /* Highlight the new entry in the log. |
71 | */ |
72 | - Y.lazr.anim.green_flash({ |
73 | + Y.lp.anim.green_flash({ |
74 | node: '#ajax-time-list li.transaction-'+transactionid |
75 | }).run(); |
76 | /* Signify a new entry has been added to the log. |
77 | |
78 | === modified file 'lib/lp/app/javascript/anim/anim.js' |
79 | --- lib/lp/app/javascript/anim/anim.js 2011-06-29 14:56:15 +0000 |
80 | +++ lib/lp/app/javascript/anim/anim.js 2011-08-10 14:04:35 +0000 |
81 | @@ -1,8 +1,11 @@ |
82 | -/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ |
83 | - |
84 | -YUI.add('lazr.anim', function(Y) { |
85 | - |
86 | -Y.namespace('lazr.anim'); |
87 | +/* Copyright (c) 2009-2011, Canonical Ltd. All rights reserved. */ |
88 | + |
89 | +YUI.add('lp.anim', function(Y) { |
90 | + |
91 | +var namespace = Y.namespace('lp.anim'), |
92 | + testspace = Y.namespace('lp.anim.test'), |
93 | + attrcaller = Y.lp.extras.attrcaller; |
94 | + |
95 | |
96 | /** |
97 | * @function flash_in |
98 | @@ -11,14 +14,15 @@ |
99 | * @param cfg Additional Y.Anim configuration. |
100 | * @return Y.Anim instance |
101 | */ |
102 | -Y.lazr.anim.flash_in = function(cfg) { |
103 | - var acfg = Y.merge(Y.lazr.anim.flash_in.defaults, cfg); |
104 | - var anim = new Y.lazr.anim.Anim(acfg); |
105 | +var flash_in; |
106 | |
107 | +flash_in = function(cfg) { |
108 | + var acfg = Y.merge(flash_in.defaults, cfg); |
109 | + var anim = new Anim(acfg); |
110 | return anim; |
111 | }; |
112 | |
113 | -Y.lazr.anim.flash_in.defaults = { |
114 | +flash_in.defaults = { |
115 | duration: 1, |
116 | easing: Y.Easing.easeIn, |
117 | from: { backgroundColor: '#FFFF00' }, |
118 | @@ -26,19 +30,20 @@ |
119 | }; |
120 | |
121 | |
122 | - |
123 | /** |
124 | * @function green_flash |
125 | * @description A green flash and fade, used to indicate new page data. |
126 | * @param cfg Additional Y.Anim configuration. |
127 | * @return Y.Anim instance |
128 | */ |
129 | -Y.lazr.anim.green_flash = function(cfg) { |
130 | - return Y.lazr.anim.flash_in( |
131 | - Y.merge(Y.lazr.anim.green_flash.defaults, cfg)); |
132 | +var green_flash; |
133 | + |
134 | +green_flash = function(cfg) { |
135 | + return flash_in( |
136 | + Y.merge(green_flash.defaults, cfg)); |
137 | }; |
138 | |
139 | -Y.lazr.anim.green_flash.defaults = { |
140 | +green_flash.defaults = { |
141 | from: { backgroundColor: '#90EE90' } |
142 | }; |
143 | |
144 | @@ -49,100 +54,105 @@ |
145 | * @param cfg Additional Y.Anim configuration. |
146 | * @return Y.Anim instance |
147 | */ |
148 | -Y.lazr.anim.red_flash = function(cfg) { |
149 | - return Y.lazr.anim.flash_in( |
150 | - Y.merge(Y.lazr.anim.red_flash.defaults, cfg)); |
151 | +var red_flash; |
152 | + |
153 | +red_flash = function(cfg) { |
154 | + return flash_in( |
155 | + Y.merge(red_flash.defaults, cfg)); |
156 | }; |
157 | |
158 | -Y.lazr.anim.red_flash.defaults = { |
159 | +red_flash.defaults = { |
160 | from: { backgroundColor: '#FF6666' } |
161 | }; |
162 | |
163 | + |
164 | +/** |
165 | + * Resolve a selector, Node or NodeList into a NodeList. |
166 | + * |
167 | + * @return {Y.NodeList} |
168 | + */ |
169 | var resolveNodeListFrom = function(protonode) { |
170 | - if (typeof protonode === 'string') { |
171 | - // selector |
172 | + if (Y.Lang.isString(protonode)) { |
173 | return Y.all(protonode); |
174 | - } else if (protonode._node !== undefined) { |
175 | - // Node |
176 | + } else if (protonode instanceof Y.Node) { |
177 | return new Y.NodeList([protonode]); |
178 | - } else if (protonode._nodes !== undefined) { |
179 | - // NodeList |
180 | + } else if (protonode instanceof Y.NodeList) { |
181 | return protonode; |
182 | } |
183 | - |
184 | throw('Not a selector, Node, or NodeList'); |
185 | }; |
186 | |
187 | -/* |
188 | - * The Anim widget similar to Y.anim.Anim, but supports operating on a NodeList |
189 | + |
190 | +/** |
191 | + * The Anim widget similar to Y.anim.Anim, but supports operating on a |
192 | + * NodeList. |
193 | * |
194 | * @class Anim |
195 | */ |
196 | -Anim = function(cfg) { |
197 | - var nodelist = resolveNodeListFrom(cfg.node); |
198 | - this._anims = []; |
199 | - var self = this; |
200 | - var config = cfg; |
201 | - Y.each(nodelist, |
202 | - function(n) { |
203 | - var ncfg = Y.merge(config, {node: n}); |
204 | - var anim = new Y.Anim(ncfg); |
205 | - // We need to validate the config |
206 | - // afterwards because some of the |
207 | - // properties may be dynamic. |
208 | - var to = ncfg.to; |
209 | - |
210 | - // Check the background color to make sure |
211 | - // it isn't 'transparent'. |
212 | - if (to && typeof to.backgroundColor === 'function') { |
213 | - var bg = to.backgroundColor.call( |
214 | - anim, anim.get('node')); |
215 | - if (bg == 'transparent') { |
216 | - Y.error("Can not animate to a 'transparent' background " + |
217 | - "in '" + anim + "'"); |
218 | - } |
219 | - } |
220 | - |
221 | - // Reset the background color. This is |
222 | - // normally only necessary when the |
223 | - // original background color of the node |
224 | - // or its parent are not white, since we |
225 | - // normally fade to white. |
226 | - var original_bg = null; |
227 | - anim.on('start', function () { |
228 | - original_bg = anim.get('node').getStyle('backgroundColor'); |
229 | - }); |
230 | - anim.on('end', function () { |
231 | - anim.get('node').setStyle('backgroundColor', original_bg); |
232 | - }); |
233 | - |
234 | - self._anims.push(anim); |
235 | - } |
236 | - ); |
237 | +var Anim = function(config) { |
238 | + var nodelist = resolveNodeListFrom(config.node); |
239 | + this._anims = nodelist.map(function(node) { |
240 | + var ncfg = Y.merge(config, {node: node}); |
241 | + var anim = new Y.Anim(ncfg); |
242 | + // We need to validate the config |
243 | + // afterwards because some of the |
244 | + // properties may be dynamic. |
245 | + var to = ncfg.to; |
246 | + // Check the background color to make sure |
247 | + // it isn't 'transparent'. |
248 | + if (Y.Lang.isObject(to) && Y.Lang.isFunction(to.backgroundColor)) { |
249 | + var bg = to.backgroundColor.call(anim, anim.get('node')); |
250 | + if (bg === 'transparent') { |
251 | + Y.error("Can not animate to a 'transparent' background " + |
252 | + "in '" + anim + "'"); |
253 | + } |
254 | + } |
255 | + // Reset the background color. This is |
256 | + // normally only necessary when the |
257 | + // original background color of the node |
258 | + // or its parent are not white, since we |
259 | + // normally fade to white. |
260 | + var original_bg = null; |
261 | + anim.on('start', function () { |
262 | + original_bg = anim.get('node').getStyle('backgroundColor'); |
263 | + }); |
264 | + anim.on('end', function () { |
265 | + anim.get('node').setStyle('backgroundColor', original_bg); |
266 | + }); |
267 | + return anim; |
268 | + }); |
269 | }; |
270 | |
271 | Anim.prototype = { |
272 | + |
273 | + /** |
274 | + * Run all animations. |
275 | + */ |
276 | run: function() { |
277 | - // delegate all behavior back to our collection of Anims |
278 | - Y.each(this._anims, |
279 | - function(n) { |
280 | - n.run(); |
281 | - } |
282 | - ); |
283 | + Y.each(this._anims, attrcaller("run")); |
284 | }, |
285 | |
286 | + /** |
287 | + * Delegate all behavior back to the collection of animations. |
288 | + */ |
289 | on: function() { |
290 | - // delegate all behavior back to our collection of Anims |
291 | var args = arguments; |
292 | - Y.each(this._anims, |
293 | - function(n) { |
294 | - n.on.apply(n, args); |
295 | - } |
296 | - ); |
297 | + Y.each(this._anims, function(anim) { |
298 | + anim.on.apply(anim, args); |
299 | + }); |
300 | } |
301 | + |
302 | }; |
303 | |
304 | -Y.lazr.anim.Anim = Anim; |
305 | -Y.lazr.anim.resolveNodeListFrom = resolveNodeListFrom; |
306 | - |
307 | -}, "0.1", {"requires":["base", "node", "anim"]}); |
308 | + |
309 | +// Exports. |
310 | +namespace.Anim = Anim; |
311 | +namespace.flash_in = flash_in; |
312 | +namespace.green_flash = green_flash; |
313 | +namespace.red_flash = red_flash; |
314 | + |
315 | +// Exports for testing. |
316 | +testspace.resolveNodeListFrom = resolveNodeListFrom; |
317 | + |
318 | + |
319 | +}, "0.1", {"requires": ["base", "node", "anim", "lp.extras"]}); |
320 | |
321 | === modified file 'lib/lp/app/javascript/anim/tests/test_anim.html' |
322 | --- lib/lp/app/javascript/anim/tests/test_anim.html 2011-07-08 06:06:15 +0000 |
323 | +++ lib/lp/app/javascript/anim/tests/test_anim.html 2011-08-10 14:04:35 +0000 |
324 | @@ -9,8 +9,10 @@ |
325 | src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"> |
326 | </script> |
327 | <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" /> |
328 | - <script type="text/javascript" |
329 | + <script type="text/javascript" |
330 | src="../../../../app/javascript/testing/testrunner.js"></script> |
331 | + <script type="text/javascript" |
332 | + src="../../extras/extras.js"></script> |
333 | |
334 | <!-- The module under test --> |
335 | <script type="text/javascript" src="../anim.js"></script> |
336 | @@ -18,8 +20,10 @@ |
337 | |
338 | <!-- The test suite --> |
339 | <script type="text/javascript" src="test_anim.js"></script> |
340 | - |
341 | -</head> |
342 | + </head> |
343 | <body class="yui3-skin-sam"> |
344 | + <ul id="suites"> |
345 | + <li>lp.anim.test</li> |
346 | + </ul> |
347 | </body> |
348 | </html> |
349 | |
350 | === modified file 'lib/lp/app/javascript/anim/tests/test_anim.js' |
351 | --- lib/lp/app/javascript/anim/tests/test_anim.js 2011-07-08 05:12:39 +0000 |
352 | +++ lib/lp/app/javascript/anim/tests/test_anim.js 2011-08-10 14:04:35 +0000 |
353 | @@ -1,58 +1,60 @@ |
354 | -/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ |
355 | - |
356 | -YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.anim', |
357 | - 'event', 'event-simulate', function(Y) { |
358 | - |
359 | -var Assert = Y.Assert; // For easy access to isTrue(), etc. |
360 | +/* Copyright (c) 2009-2011, Canonical Ltd. All rights reserved. */ |
361 | + |
362 | +YUI.add('lp.anim.test', function(Y) { |
363 | + |
364 | +var namespace = Y.namespace('lp.anim.test'); |
365 | + |
366 | +var Assert = Y.Assert, // For easy access to isTrue(), etc. |
367 | + ArrayAssert = Y.ArrayAssert; |
368 | |
369 | var suite = new Y.Test.Suite("Anim Tests"); |
370 | |
371 | -suite.add(new Y.Test.Case({ |
372 | - |
373 | - name: 'anim_basics', |
374 | +var TestAnim = { |
375 | + name: 'TestAnim', |
376 | |
377 | setUp: function() { |
378 | - this.workspace = Y.one('#workspace'); |
379 | - if (!this.workspace){ |
380 | - Y.one(document.body).appendChild(Y.Node.create( |
381 | - '<div id="workspace">' |
382 | - + '<table id="anim-table">' |
383 | - + '<tr id="anim-table-tr">' |
384 | - + '<td id="anim-table-td1" style="background: #eeeeee">foo</td>' |
385 | - + '<td id="anim-table-td2" style="background: #eeeeee">bar</td>' |
386 | - + '</tr></table></div>')); |
387 | - this.workspace = Y.one('#workspace'); |
388 | - } |
389 | + this.workspace = Y.Node.create( |
390 | + '<div id="workspace">' |
391 | + + '<table id="anim-table">' |
392 | + + '<tr id="anim-table-tr">' |
393 | + + '<td id="anim-table-td1" style="background: #eeeeee">foo</td>' |
394 | + + '<td id="anim-table-td2" style="background: #eeeeee">bar</td>' |
395 | + + '</tr></table></div>' |
396 | + ); |
397 | + Y.one(document.body).append(this.workspace); |
398 | }, |
399 | |
400 | tearDown: function() { |
401 | - this.workspace.get('parentNode').removeChild(this.workspace); |
402 | + this.workspace.remove(true); |
403 | }, |
404 | |
405 | test_resolveNodeListFrom_selector: function() { |
406 | - var nodelist = Y.lazr.anim.resolveNodeListFrom('#anim-table-td1'); |
407 | - var nodelist_nodes = (nodelist._nodes !== undefined); |
408 | - Assert.isTrue(nodelist_nodes, 'Not a nodelist from a selector'); |
409 | + var selector = '#anim-table-td1'; |
410 | + var nodelist = namespace.resolveNodeListFrom(selector); |
411 | + Assert.isInstanceOf(Y.NodeList, nodelist); |
412 | + ArrayAssert.itemsAreSame( |
413 | + [Y.one(selector)], nodelist._nodes.map(Y.one)); |
414 | }, |
415 | |
416 | test_resolveNodeListFrom_node: function() { |
417 | var node = Y.one('#anim-table-td1'); |
418 | - var nodelist = Y.lazr.anim.resolveNodeListFrom(node); |
419 | - var nodelist_nodes = (nodelist._nodes !== undefined); |
420 | - Assert.isTrue(nodelist_nodes, 'Not a nodelist from a Node'); |
421 | + var nodelist = namespace.resolveNodeListFrom(node); |
422 | + Assert.isInstanceOf(Y.NodeList, nodelist); |
423 | + ArrayAssert.itemsAreSame( |
424 | + [node], nodelist._nodes.map(Y.one)); |
425 | }, |
426 | |
427 | test_resolveNodeListFrom_node_list: function() { |
428 | - var nodelist = Y.all('#anim-table td'); |
429 | - var nodelist = Y.lazr.anim.resolveNodeListFrom(nodelist); |
430 | - var nodelist_nodes = (nodelist._nodes !== undefined); |
431 | - Assert.isTrue(nodelist_nodes, 'Not a nodelist from a NodeList'); |
432 | + var nodelist_orig = Y.all('#anim-table td'); |
433 | + var nodelist = namespace.resolveNodeListFrom(nodelist_orig); |
434 | + Assert.isInstanceOf(Y.NodeList, nodelist); |
435 | + Assert.areSame(nodelist, nodelist_orig); |
436 | }, |
437 | |
438 | test_resolveNodeListFrom_anythine_else: function() { |
439 | var succeed = true; |
440 | try { |
441 | - var nodelist = Y.lazr.anim.resolveNodeListFrom( |
442 | + var nodelist = namespace.resolveNodeListFrom( |
443 | {crazy: true, broken: 'definitely'}); |
444 | } catch(e) { |
445 | succeed = false; |
446 | @@ -65,7 +67,7 @@ |
447 | // without coercion into a NodeList here |
448 | var node = Y.one('#anim-table-td1'); |
449 | var bgcolor = node.getStyle('backgroundColor'); |
450 | - var anim = Y.lazr.anim.green_flash( |
451 | + var anim = Y.lp.anim.green_flash( |
452 | {node: node, |
453 | to: {backgroundColor: bgcolor}, |
454 | duration: 0.2} |
455 | @@ -86,7 +88,7 @@ |
456 | // without coercion into a NodeList here |
457 | var node = Y.one('#anim-table-td1'); |
458 | var bgcolor = node.getStyle('backgroundColor'); |
459 | - var anim = Y.lazr.anim.green_flash( |
460 | + var anim = Y.lp.anim.green_flash( |
461 | {node: '#anim-table-td1', |
462 | to: {backgroundColor: bgcolor}, |
463 | duration: 0.2} |
464 | @@ -108,37 +110,36 @@ |
465 | var red = '#ff0000'; |
466 | var backgrounds = []; |
467 | Y.each(nodelist, function(n) { |
468 | - backgrounds.push({bg: n.getStyle('backgroundColor'), node: n}); |
469 | - }); |
470 | - var anim = Y.lazr.anim.green_flash( |
471 | + backgrounds.push({bg: n.getStyle('backgroundColor'), node: n}); |
472 | + }); |
473 | + var anim = Y.lp.anim.green_flash( |
474 | {node: nodelist, |
475 | to: {backgroundColor: red}, |
476 | duration: 5} |
477 | ); |
478 | anim.run(); |
479 | this.wait(function() { |
480 | - Assert.areNotEqual( |
481 | - backgrounds[0].node.getStyle('backgroundColor'), |
482 | - red, |
483 | - 'background of 0 has mysteriously jumped to the end color.' |
484 | - ); |
485 | - Assert.areNotEqual( |
486 | - backgrounds[1].node.getStyle('backgroundColor'), |
487 | - red, |
488 | - 'background of 1 has mysteriously jumped to the end color.' |
489 | - ); |
490 | - Assert.areNotEqual( |
491 | - backgrounds[0].node.getStyle('backgroundColor'), |
492 | - backgrounds[0].bg, |
493 | - 'background of 0 has not changed at all.' |
494 | - ); |
495 | - Assert.areNotEqual( |
496 | - backgrounds[1].node.getStyle('backgroundColor'), |
497 | - backgrounds[1].bg, |
498 | - 'background of 1 has not changed at all.' |
499 | - ); |
500 | - }, 1500 |
501 | - ); |
502 | + Assert.areNotEqual( |
503 | + backgrounds[0].node.getStyle('backgroundColor'), |
504 | + red, |
505 | + 'background of 0 has mysteriously jumped to the end color.' |
506 | + ); |
507 | + Assert.areNotEqual( |
508 | + backgrounds[1].node.getStyle('backgroundColor'), |
509 | + red, |
510 | + 'background of 1 has mysteriously jumped to the end color.' |
511 | + ); |
512 | + Assert.areNotEqual( |
513 | + backgrounds[0].node.getStyle('backgroundColor'), |
514 | + backgrounds[0].bg, |
515 | + 'background of 0 has not changed at all.' |
516 | + ); |
517 | + Assert.areNotEqual( |
518 | + backgrounds[1].node.getStyle('backgroundColor'), |
519 | + backgrounds[1].bg, |
520 | + 'background of 1 has not changed at all.' |
521 | + ); |
522 | + }, 1500); |
523 | }, |
524 | |
525 | test_green_flash_multi_by_selector: function() { |
526 | @@ -147,40 +148,56 @@ |
527 | var red = '#ff0000'; |
528 | var backgrounds = []; |
529 | Y.each(nodelist, function(n) { |
530 | - backgrounds.push({bg: n.getStyle('backgroundColor'), node: n}); |
531 | - }); |
532 | - var anim = Y.lazr.anim.green_flash( |
533 | + backgrounds.push({bg: n.getStyle('backgroundColor'), node: n}); |
534 | + }); |
535 | + var anim = Y.lp.anim.green_flash( |
536 | {node: '#anim-table td', |
537 | to: {backgroundColor: red}, |
538 | duration: 2} |
539 | ); |
540 | anim.run(); |
541 | this.wait(function() { |
542 | - Assert.areNotEqual( |
543 | - backgrounds[0].node.getStyle('backgroundColor'), |
544 | - red, |
545 | - 'background of 0 has mysteriously jumped to the end color.' |
546 | - ); |
547 | - Assert.areNotEqual( |
548 | - backgrounds[1].node.getStyle('backgroundColor'), |
549 | - red, |
550 | - 'background of 1 has mysteriously jumped to the end color.' |
551 | - ); |
552 | - Assert.areNotEqual( |
553 | - backgrounds[0].node.getStyle('backgroundColor'), |
554 | - backgrounds[0].bg, |
555 | - 'background of 0 has not changed at all.' |
556 | - ); |
557 | - Assert.areNotEqual( |
558 | - backgrounds[1].node.getStyle('backgroundColor'), |
559 | - backgrounds[1].bg, |
560 | - 'background of 1 has not changed at all.' |
561 | - ); |
562 | - }, 500 |
563 | - ); |
564 | + Assert.areNotEqual( |
565 | + backgrounds[0].node.getStyle('backgroundColor'), |
566 | + red, |
567 | + 'background of 0 has mysteriously jumped to the end color.' |
568 | + ); |
569 | + Assert.areNotEqual( |
570 | + backgrounds[1].node.getStyle('backgroundColor'), |
571 | + red, |
572 | + 'background of 1 has mysteriously jumped to the end color.' |
573 | + ); |
574 | + Assert.areNotEqual( |
575 | + backgrounds[0].node.getStyle('backgroundColor'), |
576 | + backgrounds[0].bg, |
577 | + 'background of 0 has not changed at all.' |
578 | + ); |
579 | + Assert.areNotEqual( |
580 | + backgrounds[1].node.getStyle('backgroundColor'), |
581 | + backgrounds[1].bg, |
582 | + 'background of 1 has not changed at all.' |
583 | + ); |
584 | + }, 500); |
585 | + }, |
586 | + |
587 | + test_on: function() { |
588 | + // Anim.on delegates to its component animations. |
589 | + var targets = []; |
590 | + var anim = new Y.lp.anim.Anim({node: "#anim-table td"}); |
591 | + Assert.areSame(2, anim._anims.length); |
592 | + anim.on("start", function(event) { targets.push(event.target); }); |
593 | + anim.run(); |
594 | + Assert.areSame(2, targets.length); |
595 | + ArrayAssert.containsItems(anim._anims, targets); |
596 | } |
597 | - })); |
598 | - |
599 | -Y.lp.testing.Runner.run(suite); |
600 | - |
601 | -}); |
602 | + |
603 | +}; |
604 | + |
605 | +suite.add(new Y.Test.Case(TestAnim)); |
606 | + |
607 | +// Exports. |
608 | +namespace.suite = suite; |
609 | + |
610 | +}, "0.1", {"requires": [ |
611 | + 'test', 'node', 'lp.anim', 'event', |
612 | + 'event-simulate']}); |
613 | |
614 | === modified file 'lib/lp/app/javascript/choiceedit/choiceedit.js' |
615 | --- lib/lp/app/javascript/choiceedit/choiceedit.js 2011-06-29 14:56:15 +0000 |
616 | +++ lib/lp/app/javascript/choiceedit/choiceedit.js 2011-08-10 14:04:35 +0000 |
617 | @@ -282,7 +282,7 @@ |
618 | * @method _showSucceeded |
619 | */ |
620 | _showSucceeded: function() { |
621 | - this._uiAnimateFlash(Y.lazr.anim.green_flash); |
622 | + this._uiAnimateFlash(Y.lp.anim.green_flash); |
623 | }, |
624 | |
625 | /** |
626 | @@ -292,14 +292,14 @@ |
627 | * @method _showFailed |
628 | */ |
629 | _showFailed: function() { |
630 | - this._uiAnimateFlash(Y.lazr.anim.red_flash); |
631 | + this._uiAnimateFlash(Y.lp.anim.red_flash); |
632 | }, |
633 | |
634 | /** |
635 | * Run a flash-in animation on the editable text node. |
636 | * |
637 | * @method _uiAnimateFlash |
638 | - * @param flash_fn {Function} A lazr.anim flash-in function. |
639 | + * @param flash_fn {Function} A lp.anim flash-in function. |
640 | * @protected |
641 | */ |
642 | _uiAnimateFlash: function(flash_fn) { |
643 | @@ -682,5 +682,5 @@ |
644 | },"0.2", {"skinnable": true, |
645 | "requires": ["oop", "event", "event-delegate", "node", |
646 | "widget", "widget-position", "widget-stdmod", |
647 | - "overlay", "lazr.overlay", "lazr.anim", "lazr.base"]}); |
648 | + "overlay", "lazr.overlay", "lp.anim", "lazr.base"]}); |
649 | |
650 | |
651 | === modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html' |
652 | --- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html 2011-07-08 06:06:15 +0000 |
653 | +++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html 2011-08-10 14:04:35 +0000 |
654 | @@ -15,6 +15,7 @@ |
655 | <script type="text/javascript" src="../../lazr/lazr.js"></script> |
656 | <script type="text/javascript" src="../../anim/anim.js"></script> |
657 | <script type="text/javascript" src="../../overlay/overlay.js"></script> |
658 | + <script type="text/javascript" src="../../extras/extras.js"></script> |
659 | |
660 | <!-- The module under test --> |
661 | <script type="text/javascript" src="../choiceedit.js"></script> |
662 | |
663 | === modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js' |
664 | --- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2011-07-08 05:12:39 +0000 |
665 | +++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2011-08-10 14:04:35 +0000 |
666 | @@ -221,9 +221,9 @@ |
667 | test_clicking_choicelist_item_does_green_flash: function() { |
668 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
669 | var that = this; |
670 | - var green_flash = Y.lazr.anim.green_flash; |
671 | + var green_flash = Y.lp.anim.green_flash; |
672 | var flashed = false; |
673 | - Y.lazr.anim.green_flash = function() { |
674 | + Y.lp.anim.green_flash = function() { |
675 | return { |
676 | run: function() { |
677 | flashed = true; |
678 | @@ -233,7 +233,7 @@ |
679 | simulate(this.choice_edit._choice_list.get('boundingBox'), |
680 | 'li a[href$=fixreleased]', 'click'); |
681 | Assert.isTrue(flashed, "green_flash animation was not fired"); |
682 | - Y.lazr.anim.green_flash = green_flash; |
683 | + Y.lp.anim.green_flash = green_flash; |
684 | }, |
685 | |
686 | test_clicking_choicelist_item_sets_page_value: function() { |
687 | |
688 | === modified file 'lib/lp/app/javascript/comment.js' |
689 | --- lib/lp/app/javascript/comment.js 2011-02-24 00:23:04 +0000 |
690 | +++ lib/lp/app/javascript/comment.js 2011-08-10 14:04:35 +0000 |
691 | @@ -143,7 +143,7 @@ |
692 | var comment = Y.Node.create(message_html); |
693 | fieldset.get('parentNode').insertBefore(comment, fieldset); |
694 | this.reset_contents(); |
695 | - Y.lazr.anim.green_flash({node: comment}).run(); |
696 | + Y.lp.anim.green_flash({node: comment}).run(); |
697 | }, |
698 | /** |
699 | * Reset the widget to a blank state. |
700 | @@ -365,7 +365,7 @@ |
701 | var comment = Y.Node.create(message_html); |
702 | conversation.appendChild(comment); |
703 | this.reset_contents(); |
704 | - Y.lazr.anim.green_flash({node: comment}).run(); |
705 | + Y.lp.anim.green_flash({node: comment}).run(); |
706 | }, |
707 | renderUI: function() { |
708 | CodeReviewComment.superclass.renderUI.apply(this); |
709 | @@ -413,7 +413,7 @@ |
710 | var username = LP.links.me.substring(2); |
711 | var new_reviewer = Y.one('#review-' + username); |
712 | if (Y.Lang.isValue(new_reviewer)) { |
713 | - var anim = Y.lazr.anim.green_flash({ |
714 | + var anim = Y.lp.anim.green_flash({ |
715 | node: new_reviewer}); |
716 | anim.run(); |
717 | } |
718 | |
719 | === modified file 'lib/lp/app/javascript/errors.js' |
720 | --- lib/lp/app/javascript/errors.js 2011-04-21 13:12:07 +0000 |
721 | +++ lib/lp/app/javascript/errors.js 2011-08-10 14:04:35 +0000 |
722 | @@ -57,7 +57,7 @@ |
723 | var maybe_red_flash = function(flash_node, callback) |
724 | { |
725 | if (flash_node) { |
726 | - var anim = Y.lazr.anim.red_flash({ node: flash_node }); |
727 | + var anim = Y.lp.anim.red_flash({ node: flash_node }); |
728 | anim.on('end', callback); |
729 | anim.run(); |
730 | } else { |
731 | @@ -112,4 +112,4 @@ |
732 | info_overlay.show(); |
733 | }; |
734 | |
735 | -}, "0.1", {"requires":["lazr.formoverlay", "lazr.overlay", "lazr.anim"]}); |
736 | +}, "0.1", {"requires":["lazr.formoverlay", "lazr.overlay", "lp.anim"]}); |
737 | |
738 | === modified file 'lib/lp/app/javascript/formwidgets/formwidgets.js' |
739 | --- lib/lp/app/javascript/formwidgets/formwidgets.js 2011-08-10 14:04:33 +0000 |
740 | +++ lib/lp/app/javascript/formwidgets/formwidgets.js 2011-08-10 14:04:35 +0000 |
741 | @@ -160,7 +160,7 @@ |
742 | showError: function(error) { |
743 | var message = Y.Node.create('<p />').set("text", error); |
744 | this.fieldNode.empty().append(message); |
745 | - Y.lazr.anim.red_flash({node: message}).run(); |
746 | + Y.lp.anim.red_flash({node: message}).run(); |
747 | } |
748 | |
749 | }); |
750 | @@ -375,7 +375,7 @@ |
751 | // Set back again. |
752 | this.set("choices", choices); |
753 | // Tell everyone! |
754 | - Y.lazr.anim.green_flash({node: this.fieldNode}).run(); |
755 | + Y.lp.anim.green_flash({node: this.fieldNode}).run(); |
756 | }, |
757 | |
758 | /** |
759 | @@ -404,7 +404,7 @@ |
760 | // Set back again. |
761 | this.set("choices", choices); |
762 | // Tell everyone! |
763 | - Y.lazr.anim.green_flash({node: this.fieldNode}).run(); |
764 | + Y.lp.anim.green_flash({node: this.fieldNode}).run(); |
765 | } |
766 | |
767 | }); |
768 | @@ -506,5 +506,5 @@ |
769 | |
770 | |
771 | }, "0.1", {"requires": ["node", "dom", "io", "widget", "lp.client", |
772 | - "lp.extras", "lazr.anim", "array-extras", |
773 | + "lp.extras", "lp.anim", "array-extras", |
774 | "transition"]}); |
775 | |
776 | === modified file 'lib/lp/app/javascript/hide_comment.js' |
777 | --- lib/lp/app/javascript/hide_comment.js 2011-05-16 19:42:48 +0000 |
778 | +++ lib/lp/app/javascript/hide_comment.js 2011-08-10 14:04:35 +0000 |
779 | @@ -2,7 +2,7 @@ |
780 | * GNU Affero General Public License version 3 (see the file LICENSE). |
781 | * |
782 | * @namespace Y.lp.comments.hide |
783 | - * @requires dom, node, lazr.anim, lp.client |
784 | + * @requires dom, node, lp.anim, lp.client |
785 | */ |
786 | YUI.add('lp.comments.hide', function(Y) { |
787 | var namespace = Y.namespace('lp.comments.hide'); |
788 | @@ -56,7 +56,7 @@ |
789 | comment.toggleClass(hidden_class); |
790 | }, |
791 | failure: function () { |
792 | - Y.lazr.anim.red_flash({node:comment}); |
793 | + Y.lp.anim.red_flash({node:comment}); |
794 | } |
795 | }); |
796 | } |
797 | @@ -69,4 +69,4 @@ |
798 | }, '.mark-spam'); |
799 | } |
800 | namespace.setup_hide_controls = setup_hide_controls; |
801 | -}, "0.1", {"requires": ["dom", "node", "lazr.anim", "lp.client"]}); |
802 | +}, "0.1", {"requires": ["dom", "node", "lp.anim", "lp.client"]}); |
803 | |
804 | === modified file 'lib/lp/app/javascript/inlineedit/editor.js' |
805 | --- lib/lp/app/javascript/inlineedit/editor.js 2011-06-29 14:56:15 +0000 |
806 | +++ lib/lp/app/javascript/inlineedit/editor.js 2011-08-10 14:04:35 +0000 |
807 | @@ -1230,7 +1230,7 @@ |
808 | * @protected |
809 | */ |
810 | _uiAnimateSave: function() { |
811 | - this._uiAnimateFlash(Y.lazr.anim.green_flash); |
812 | + this._uiAnimateFlash(Y.lp.anim.green_flash); |
813 | }, |
814 | |
815 | /** |
816 | @@ -1240,14 +1240,14 @@ |
817 | * @protected. |
818 | */ |
819 | _uiAnimateCancel: function() { |
820 | - this._uiAnimateFlash(Y.lazr.anim.red_flash); |
821 | + this._uiAnimateFlash(Y.lp.anim.red_flash); |
822 | }, |
823 | |
824 | /** |
825 | * Run a flash-in animation on the editable text node. |
826 | * |
827 | * @method _uiAnimateFlash |
828 | - * @param flash_fn {Function} A lazr.anim flash-in function. |
829 | + * @param flash_fn {Function} A lp.anim flash-in function. |
830 | * @protected |
831 | */ |
832 | _uiAnimateFlash: function(flash_fn) { |
833 | @@ -1515,4 +1515,4 @@ |
834 | |
835 | }, "0.2", {"skinnable": true, |
836 | "requires": ["oop", "anim", "event", "node", "widget", |
837 | - "lazr.anim", "lazr.base"]}); |
838 | + "lp.anim", "lazr.base"]}); |
839 | |
840 | === modified file 'lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html' |
841 | --- lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html 2011-07-08 06:21:11 +0000 |
842 | +++ lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html 2011-08-10 14:04:35 +0000 |
843 | @@ -16,6 +16,7 @@ |
844 | <script type="text/javascript" src="../editor.js"></script> |
845 | <script type="text/javascript" src="../../anim/anim.js"></script> |
846 | <script type="text/javascript" src="../../lazr/lazr.js"></script> |
847 | + <script type="text/javascript" src="../../extras/extras.js"></script> |
848 | |
849 | <!-- The test suite --> |
850 | <script type="text/javascript" src="test_inline_edit.js"></script> |
851 | |
852 | === modified file 'lib/lp/app/javascript/lp.ui.js' |
853 | --- lib/lp/app/javascript/lp.ui.js 2011-03-31 05:46:11 +0000 |
854 | +++ lib/lp/app/javascript/lp.ui.js 2011-08-10 14:04:35 +0000 |
855 | @@ -16,8 +16,8 @@ |
856 | |
857 | var element = Y.one(selector); |
858 | element.setContent(content); |
859 | - Y.lazr.anim.green_flash({node:element}).run(); |
860 | + Y.lp.anim.green_flash({node:element}).run(); |
861 | } |
862 | |
863 | - }, "0.1", {"requires": ["node", "escape", "lazr.anim"]} |
864 | + }, "0.1", {"requires": ["node", "escape", "lp.anim"]} |
865 | ); |
866 | |
867 | === modified file 'lib/lp/app/javascript/picker/picker.js' |
868 | --- lib/lp/app/javascript/picker/picker.js 2011-08-04 23:49:37 +0000 |
869 | +++ lib/lp/app/javascript/picker/picker.js 2011-08-10 14:04:35 +0000 |
870 | @@ -1130,6 +1130,6 @@ |
871 | }, "0.1", {"skinnable": true, |
872 | "requires": ["oop", "escape", "event", "event-focus", "node", |
873 | "plugin", "substitute", "widget", "widget-stdmod", |
874 | - "lazr.overlay", "lazr.anim", "lazr.base", |
875 | + "lazr.overlay", "lp.anim", "lazr.base", |
876 | "lp.app.widgets.expander"] |
877 | }); |
878 | |
879 | === modified file 'lib/lp/app/javascript/picker/tests/test_personpicker.html' |
880 | --- lib/lp/app/javascript/picker/tests/test_personpicker.html 2011-07-08 06:06:15 +0000 |
881 | +++ lib/lp/app/javascript/picker/tests/test_personpicker.html 2011-08-10 14:04:35 +0000 |
882 | @@ -17,6 +17,7 @@ |
883 | <script type="text/javascript" src="../../anim/anim.js"></script> |
884 | <script type="text/javascript" src="../../lazr/lazr.js"></script> |
885 | <script type="text/javascript" src="../../overlay/overlay.js"></script> |
886 | + <script type="text/javascript" src="../../extras/extras.js"></script> |
887 | <script type="text/javascript" src="../picker.js"></script> |
888 | <script type="text/javascript" src="../picker_patcher.js"></script> |
889 | |
890 | |
891 | === modified file 'lib/lp/app/javascript/picker/tests/test_picker.html' |
892 | --- lib/lp/app/javascript/picker/tests/test_picker.html 2011-08-04 13:56:55 +0000 |
893 | +++ lib/lp/app/javascript/picker/tests/test_picker.html 2011-08-10 14:04:35 +0000 |
894 | @@ -19,6 +19,7 @@ |
895 | <script type="text/javascript" src="../../anim/anim.js"></script> |
896 | <script type="text/javascript" src="../../effects/effects.js"></script> |
897 | <script type="text/javascript" src="../../lazr/lazr.js"></script> |
898 | + <script type="text/javascript" src="../../extras/extras.js"></script> |
899 | |
900 | <!-- The test suite --> |
901 | <script type="text/javascript" src="test_picker.js"></script> |
902 | |
903 | === modified file 'lib/lp/app/javascript/picker/tests/test_picker_patcher.html' |
904 | --- lib/lp/app/javascript/picker/tests/test_picker_patcher.html 2011-07-14 06:02:51 +0000 |
905 | +++ lib/lp/app/javascript/picker/tests/test_picker_patcher.html 2011-08-10 14:04:35 +0000 |
906 | @@ -18,6 +18,7 @@ |
907 | <script type="text/javascript" src="../../anim/anim.js"></script> |
908 | <script type="text/javascript" src="../../lazr/lazr.js"></script> |
909 | <script type="text/javascript" src="../../client.js"></script> |
910 | + <script type="text/javascript" src="../../extras/extras.js"></script> |
911 | <script type="text/javascript" src="../picker_patcher.js"></script> |
912 | |
913 | <!-- The module under test --> |
914 | |
915 | === modified file 'lib/lp/app/javascript/subscribers/subscribers_list.js' |
916 | --- lib/lp/app/javascript/subscribers/subscribers_list.js 2011-08-03 03:46:20 +0000 |
917 | +++ lib/lp/app/javascript/subscribers/subscribers_list.js 2011-08-10 14:04:35 +0000 |
918 | @@ -1157,9 +1157,9 @@ |
919 | if (success === true || success === false) { |
920 | var anim; |
921 | if (success === true) { |
922 | - anim = Y.lazr.anim.green_flash({ node: subscriber_node }); |
923 | + anim = Y.lp.anim.green_flash({ node: subscriber_node }); |
924 | } else { |
925 | - anim = Y.lazr.anim.red_flash({ node: subscriber_node }); |
926 | + anim = Y.lp.anim.red_flash({ node: subscriber_node }); |
927 | } |
928 | anim.on('end', callback); |
929 | anim.run(); |
930 | @@ -1167,5 +1167,5 @@ |
931 | }; |
932 | |
933 | |
934 | -}, "0.1", {"requires": ["node", "lazr.anim", "lp.app.picker", "lp.app.errors", |
935 | +}, "0.1", {"requires": ["node", "lp.anim", "lp.app.picker", "lp.app.errors", |
936 | "lp.client", "lp.names"]}); |
937 | |
938 | === modified file 'lib/lp/app/javascript/subscribers/tests/test_subscribers_list.html' |
939 | --- lib/lp/app/javascript/subscribers/tests/test_subscribers_list.html 2011-07-25 04:32:49 +0000 |
940 | +++ lib/lp/app/javascript/subscribers/tests/test_subscribers_list.html 2011-08-10 14:04:35 +0000 |
941 | @@ -35,6 +35,8 @@ |
942 | src="../../picker/picker.js"></script> |
943 | <script type="text/javascript" |
944 | src="../../picker/person_picker.js"></script> |
945 | + <script type="text/javascript" |
946 | + src="../../extras/extras.js"></script> |
947 | |
948 | <!-- The module under test --> |
949 | <script type="text/javascript" |
950 | |
951 | === modified file 'lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js' |
952 | --- lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js 2011-08-03 03:54:51 +0000 |
953 | +++ lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js 2011-08-10 14:04:35 +0000 |
954 | @@ -1192,13 +1192,13 @@ |
955 | this.root = Y.Node.create('<div />'); |
956 | Y.one('body').appendChild(this.root); |
957 | // Monkey-patch animation duration to make the tests quicker. |
958 | - this.anim_duration = Y.lazr.anim.flash_in.defaults.duration; |
959 | - Y.lazr.anim.flash_in.defaults.duration = 0; |
960 | + this.anim_duration = Y.lp.anim.flash_in.defaults.duration; |
961 | + Y.lp.anim.flash_in.defaults.duration = 0; |
962 | }, |
963 | |
964 | tearDown: function() { |
965 | this.root.remove(); |
966 | - Y.lazr.anim.flash_in.defaults.duration = this.anim_duration; |
967 | + Y.lp.anim.flash_in.defaults.duration = this.anim_duration; |
968 | }, |
969 | |
970 | _should: { |
971 | @@ -1709,13 +1709,13 @@ |
972 | this.root = Y.Node.create('<div />'); |
973 | Y.one('body').appendChild(this.root); |
974 | // Monkey-patch animation duration to make the tests quicker. |
975 | - this.anim_duration = Y.lazr.anim.flash_in.defaults.duration; |
976 | - Y.lazr.anim.flash_in.defaults.duration = 0; |
977 | + this.anim_duration = Y.lp.anim.flash_in.defaults.duration; |
978 | + Y.lp.anim.flash_in.defaults.duration = 0; |
979 | }, |
980 | |
981 | tearDown: function() { |
982 | this.root.remove(); |
983 | - Y.lazr.anim.flash_in.defaults.duration = this.anim_duration; |
984 | + Y.lp.anim.flash_in.defaults.duration = this.anim_duration; |
985 | }, |
986 | |
987 | test_unsubscribe_callback_success: function() { |
988 | @@ -1842,13 +1842,13 @@ |
989 | this.root = Y.Node.create('<div />'); |
990 | Y.one('body').appendChild(this.root); |
991 | // Monkey-patch animation duration to make the tests quicker. |
992 | - this.anim_duration = Y.lazr.anim.flash_in.defaults.duration; |
993 | - Y.lazr.anim.flash_in.defaults.duration = 0; |
994 | + this.anim_duration = Y.lp.anim.flash_in.defaults.duration; |
995 | + Y.lp.anim.flash_in.defaults.duration = 0; |
996 | }, |
997 | |
998 | tearDown: function() { |
999 | this.root.remove(); |
1000 | - Y.lazr.anim.flash_in.defaults.duration = this.anim_duration; |
1001 | + Y.lp.anim.flash_in.defaults.duration = this.anim_duration; |
1002 | }, |
1003 | |
1004 | test_constructor_calls_setup: function() { |
1005 | @@ -2074,13 +2074,13 @@ |
1006 | this.root.appendChild(link); |
1007 | |
1008 | // Monkey-patch animation duration to make the tests quicker. |
1009 | - this.anim_duration = Y.lazr.anim.flash_in.defaults.duration; |
1010 | - Y.lazr.anim.flash_in.defaults.duration = 0; |
1011 | + this.anim_duration = Y.lp.anim.flash_in.defaults.duration; |
1012 | + Y.lp.anim.flash_in.defaults.duration = 0; |
1013 | }, |
1014 | |
1015 | tearDown: function() { |
1016 | this.root.remove(); |
1017 | - Y.lazr.anim.flash_in.defaults.duration = this.anim_duration; |
1018 | + Y.lp.anim.flash_in.defaults.duration = this.anim_duration; |
1019 | }, |
1020 | |
1021 | _setUpLoaderWithSubscribeMeLink: function(setup_config) { |
1022 | @@ -2324,13 +2324,13 @@ |
1023 | this.root = Y.Node.create('<div />'); |
1024 | Y.one('body').appendChild(this.root); |
1025 | // Monkey-patch animation duration to make the tests quicker. |
1026 | - this.anim_duration = Y.lazr.anim.flash_in.defaults.duration; |
1027 | - Y.lazr.anim.flash_in.defaults.duration = 0; |
1028 | + this.anim_duration = Y.lp.anim.flash_in.defaults.duration; |
1029 | + Y.lp.anim.flash_in.defaults.duration = 0; |
1030 | }, |
1031 | |
1032 | tearDown: function() { |
1033 | this.root.remove(); |
1034 | - Y.lazr.anim.flash_in.defaults.duration = this.anim_duration; |
1035 | + Y.lp.anim.flash_in.defaults.duration = this.anim_duration; |
1036 | }, |
1037 | |
1038 | test_subscribePersonURI: function() { |
1039 | |
1040 | === modified file 'lib/lp/blueprints/templates/specification-index.pt' |
1041 | --- lib/lp/blueprints/templates/specification-index.pt 2011-04-14 22:33:16 +0000 |
1042 | +++ lib/lp/blueprints/templates/specification-index.pt 2011-08-10 14:04:35 +0000 |
1043 | @@ -319,7 +319,7 @@ |
1044 | </div> |
1045 | |
1046 | <script type="text/javascript"> |
1047 | - LPS.use('lazr.anim', 'lp.ui', function(Y) { |
1048 | + LPS.use('lp.anim', 'lp.ui', function(Y) { |
1049 | |
1050 | Y.on('lp:context:implementation_status:changed', function(e) { |
1051 | var icon = Y.one('#informational-icon'); |
1052 | @@ -337,7 +337,7 @@ |
1053 | if (e.new_value) { |
1054 | started.removeClass('unseen'); |
1055 | started.one('dd').setContent(e.entry.getHTML('starter')); |
1056 | - Y.lazr.anim.green_flash({node:started}).run(); |
1057 | + Y.lp.anim.green_flash({node:started}).run(); |
1058 | } else { |
1059 | started.addClass('unseen'); |
1060 | } |
1061 | @@ -347,7 +347,7 @@ |
1062 | if (e.new_value) { |
1063 | completed.removeClass('unseen'); |
1064 | completed.one('dd').setContent(e.entry.getHTML('completer')); |
1065 | - Y.lazr.anim.green_flash({node:completed}).run(); |
1066 | + Y.lp.anim.green_flash({node:completed}).run(); |
1067 | } else { |
1068 | completed.addClass('unseen'); |
1069 | } |
1070 | |
1071 | === modified file 'lib/lp/bugs/javascript/bug_notification_level.js' |
1072 | --- lib/lp/bugs/javascript/bug_notification_level.js 2011-04-28 07:35:01 +0000 |
1073 | +++ lib/lp/bugs/javascript/bug_notification_level.js 2011-08-10 14:04:35 +0000 |
1074 | @@ -5,7 +5,7 @@ |
1075 | * Also used in "Edit subscription" advanced overlay. |
1076 | * |
1077 | * @namespace Y.lp.bugs.bug_notification_level |
1078 | - * @requires dom, "node, lazr.anim, lazr.effects |
1079 | + * @requires dom, "node, lp.anim, lazr.effects |
1080 | */ |
1081 | YUI.add('lp.bugs.bug_notification_level', function(Y) { |
1082 | var namespace = Y.namespace('lp.bugs.bug_notification_level'); |
1083 | @@ -213,4 +213,4 @@ |
1084 | }; |
1085 | |
1086 | }, "0.1", {"requires": ["dom", "event-custom", "node", |
1087 | - "lazr.anim", "lazr.effects"]}); |
1088 | + "lp.anim", "lazr.effects"]}); |
1089 | |
1090 | === modified file 'lib/lp/bugs/javascript/bug_subscription_portlet.js' |
1091 | --- lib/lp/bugs/javascript/bug_subscription_portlet.js 2011-06-21 05:37:38 +0000 |
1092 | +++ lib/lp/bugs/javascript/bug_subscription_portlet.js 2011-08-10 14:04:35 +0000 |
1093 | @@ -114,7 +114,7 @@ |
1094 | }; |
1095 | }; |
1096 | }; |
1097 | - Y.lazr.anim.green_flash({ node: status }).run(); |
1098 | + Y.lp.anim.green_flash({ node: status }).run(); |
1099 | } |
1100 | namespace.update_subscription_status = update_subscription_status; |
1101 | |
1102 | @@ -162,7 +162,7 @@ |
1103 | link.replaceClass('spinner', destination_class); |
1104 | link.set('text', destination_text); |
1105 | update_subscription_status(); |
1106 | - Y.lazr.anim.green_flash( |
1107 | + Y.lp.anim.green_flash( |
1108 | { node: link.get('parentNode') }).run(); |
1109 | }, |
1110 | failure: handler.getFailureHandler() |
1111 | @@ -234,7 +234,7 @@ |
1112 | mute_link.replaceClass( |
1113 | UNMUTED_CLASS, MUTED_CLASS); |
1114 | mute_link.set('text', 'Unmute bug mail'); |
1115 | - Y.lazr.anim.green_flash( |
1116 | + Y.lp.anim.green_flash( |
1117 | { node: mute_link.get('parentNode') }).run(); |
1118 | } else if (method_name === 'unsubscribe') { |
1119 | // Special case: delete cache. |
1120 | |
1121 | === modified file 'lib/lp/bugs/javascript/bug_tags_entry.js' |
1122 | --- lib/lp/bugs/javascript/bug_tags_entry.js 2011-02-24 00:23:04 +0000 |
1123 | +++ lib/lp/bugs/javascript/bug_tags_entry.js 2011-08-10 14:04:35 +0000 |
1124 | @@ -107,7 +107,7 @@ |
1125 | cancel_button.setStyle(DISPLAY, NONE); |
1126 | edit_tags_trigger.setStyle(DISPLAY, INLINE); |
1127 | tags_edit_spinner.setStyle(DISPLAY, NONE); |
1128 | - Y.lazr.anim.green_flash({ node: tag_list_span }).run(); |
1129 | + Y.lp.anim.green_flash({ node: tag_list_span }).run(); |
1130 | if (Y.Lang.trim(tags_html) === '') { |
1131 | Y.one('#bug-tags').removeClass(TAGS_SHOW); |
1132 | Y.one('#bug-tags').addClass(TAGS_HIDE); |
1133 | @@ -117,7 +117,7 @@ |
1134 | }, |
1135 | failure: function(id, request) { |
1136 | tags_edit_spinner.setStyle(DISPLAY, NONE); |
1137 | - Y.lazr.anim.green_flash({ node: tag_list_span }).run(); |
1138 | + Y.lp.anim.green_flash({ node: tag_list_span }).run(); |
1139 | } |
1140 | }}); |
1141 | }; |
1142 | @@ -135,7 +135,7 @@ |
1143 | edit_tags_trigger.setStyle(DISPLAY, INLINE); |
1144 | tags_edit_spinner.setStyle(DISPLAY, NONE); |
1145 | autocomplete.hide(); |
1146 | - Y.lazr.anim.red_flash({ node: tag_list_span }).run(); |
1147 | + Y.lp.anim.red_flash({ node: tag_list_span }).run(); |
1148 | if (Y.Lang.trim(tag_list_span.get('innerHTML')) === '') { |
1149 | Y.one('#bug-tags').removeClass(TAGS_SHOW); |
1150 | Y.one('#bug-tags').addClass(TAGS_HIDE); |
1151 | @@ -241,6 +241,6 @@ |
1152 | }); |
1153 | }; |
1154 | }, "0.1", {"requires": ["base", "io-base", "node", "substitute", "node-menunav", |
1155 | - "lazr.base", "lazr.anim", "lazr.autocomplete", |
1156 | + "lazr.base", "lp.anim", "lazr.autocomplete", |
1157 | "lp.client"]}); |
1158 | |
1159 | |
1160 | === modified file 'lib/lp/bugs/javascript/bugtask_index.js' |
1161 | --- lib/lp/bugs/javascript/bugtask_index.js 2011-08-04 14:16:05 +0000 |
1162 | +++ lib/lp/bugs/javascript/bugtask_index.js 2011-08-10 14:04:35 +0000 |
1163 | @@ -243,7 +243,7 @@ |
1164 | dupe_span.one('a').set('href', update_dupe_url); |
1165 | hide_comment_on_duplicate_warning(); |
1166 | } |
1167 | - Y.lazr.anim.green_flash({node: dupe_span}).run(); |
1168 | + Y.lp.anim.green_flash({node: dupe_span}).run(); |
1169 | // ensure the new link is hooked up correctly: |
1170 | dupe_span.one('a').on( |
1171 | 'click', function(e){ |
1172 | @@ -352,7 +352,7 @@ |
1173 | privacy_link.setStyle('display', 'inline'); |
1174 | }; |
1175 | error_handler.showError = function (error_msg) { |
1176 | - Y.lazr.anim.red_flash({node: privacy_div}).run(); |
1177 | + Y.lp.anim.red_flash({node: privacy_div}).run(); |
1178 | privacy_form_overlay.showError(error_msg); |
1179 | privacy_form_overlay.show(); |
1180 | }; |
1181 | @@ -422,7 +422,7 @@ |
1182 | privacy_div.removeChild(security_message); |
1183 | } |
1184 | } |
1185 | - Y.lazr.anim.green_flash({node: privacy_div}).run(); |
1186 | + Y.lp.anim.green_flash({node: privacy_div}).run(); |
1187 | }, |
1188 | failure: error_handler.getFailureHandler() |
1189 | } |
1190 | @@ -563,9 +563,9 @@ |
1191 | |
1192 | var bug_branch_container = Y.one('#bug-branches-container'); |
1193 | bug_branch_container.appendChild(bug_branch_list); |
1194 | - anim = Y.lazr.anim.green_flash({node: bug_branch_list}); |
1195 | + anim = Y.lp.anim.green_flash({node: bug_branch_list}); |
1196 | } else { |
1197 | - anim = Y.lazr.anim.green_flash({node: bug_branch_node}); |
1198 | + anim = Y.lp.anim.green_flash({node: bug_branch_node}); |
1199 | } |
1200 | |
1201 | var existing_bug_branch_node = bug_branch_list.one( |
1202 | @@ -576,7 +576,7 @@ |
1203 | bug_branch_list.appendChild(bug_branch_node); |
1204 | } else { |
1205 | // If the bug branch exists already, flash it. |
1206 | - anim = Y.lazr.anim.green_flash({node: existing_bug_branch_node}); |
1207 | + anim = Y.lp.anim.green_flash({node: existing_bug_branch_node}); |
1208 | } |
1209 | anim.run(); |
1210 | // Fire of the generic branch linked event. |
1211 | @@ -1082,7 +1082,7 @@ |
1212 | |
1213 | }, "0.1", {"requires": ["base", "oop", "node", "event", "io-base", |
1214 | "json-parse", "substitute", "widget-position-ext", |
1215 | - "lazr.formoverlay", "lazr.anim", "lazr.base", |
1216 | + "lazr.formoverlay", "lp.anim", "lazr.base", |
1217 | "lazr.overlay", "lazr.choiceedit", "lp.app.picker", |
1218 | "lp.client", "escape", |
1219 | "lp.client.plugins", "lp.app.errors", |
1220 | |
1221 | === modified file 'lib/lp/bugs/javascript/bugtracker_overlay.js' |
1222 | --- lib/lp/bugs/javascript/bugtracker_overlay.js 2011-02-24 00:23:04 +0000 |
1223 | +++ lib/lp/bugs/javascript/bugtracker_overlay.js 2011-08-10 14:04:35 +0000 |
1224 | @@ -4,7 +4,7 @@ |
1225 | * A bugtracker form overlay that can create a bugtracker within any page. |
1226 | * |
1227 | * @namespace Y.lp.bugs.bugtracker_overlay |
1228 | - * @requires dom, node, io-base, lazr.anim, lazr.formoverlay |
1229 | + * @requires dom, node, io-base, lp.anim, lazr.formoverlay |
1230 | */ |
1231 | YUI.add('lp.bugs.bugtracker_overlay', function(Y) { |
1232 | Y.log('loading lp.bugs.bugtracker_overlay'); |
1233 | @@ -126,6 +126,6 @@ |
1234 | config.activate_node.on('click', show_bugtracker_form); |
1235 | }; |
1236 | |
1237 | -}, "0.1", {"requires": ["dom", "node", "io-base", "lazr.anim", |
1238 | +}, "0.1", {"requires": ["dom", "node", "io-base", "lp.anim", |
1239 | "lazr.formoverlay", "lp.app.calendar", "lp.client" |
1240 | ]}); |
1241 | |
1242 | === modified file 'lib/lp/bugs/javascript/tests/test_bug_notification_level.html' |
1243 | --- lib/lp/bugs/javascript/tests/test_bug_notification_level.html 2011-07-08 06:06:15 +0000 |
1244 | +++ lib/lp/bugs/javascript/tests/test_bug_notification_level.html 2011-08-10 14:04:35 +0000 |
1245 | @@ -16,6 +16,8 @@ |
1246 | src="../../../app/javascript/anim/anim.js"></script> |
1247 | <script type="text/javascript" |
1248 | src="../../../app/javascript/effects/effects.js"></script> |
1249 | + <script type="text/javascript" |
1250 | + src="../../../app/javascript/extras/extras.js"></script> |
1251 | |
1252 | <!-- The module under test --> |
1253 | <script type="text/javascript" |
1254 | |
1255 | === modified file 'lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html' |
1256 | --- lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html 2011-07-08 06:06:15 +0000 |
1257 | +++ lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html 2011-08-10 14:04:35 +0000 |
1258 | @@ -22,6 +22,8 @@ |
1259 | src="../../../app/javascript/formoverlay/formoverlay.js"></script> |
1260 | <script type="text/javascript" |
1261 | src="../../../app/javascript/overlay/overlay.js"></script> |
1262 | + <script type="text/javascript" |
1263 | + src="../../../app/javascript/extras/extras.js"></script> |
1264 | |
1265 | <!-- The module under test --> |
1266 | <script type="text/javascript" |
1267 | |
1268 | === modified file 'lib/lp/bugs/javascript/tests/test_subscribers.html' |
1269 | --- lib/lp/bugs/javascript/tests/test_subscribers.html 2011-07-25 04:32:49 +0000 |
1270 | +++ lib/lp/bugs/javascript/tests/test_subscribers.html 2011-08-10 14:04:35 +0000 |
1271 | @@ -36,6 +36,8 @@ |
1272 | src="../../../app/javascript/picker/person_picker.js"></script> |
1273 | <script type="text/javascript" |
1274 | src="../../../app/javascript/subscribers/subscribers_list.js"></script> |
1275 | + <script type="text/javascript" |
1276 | + src="../../../app/javascript/extras/extras.js"></script> |
1277 | |
1278 | <!-- The module under test --> |
1279 | <script type="text/javascript" |
1280 | |
1281 | === modified file 'lib/lp/bugs/javascript/tests/test_subscription.html' |
1282 | --- lib/lp/bugs/javascript/tests/test_subscription.html 2011-07-08 06:06:15 +0000 |
1283 | +++ lib/lp/bugs/javascript/tests/test_subscription.html 2011-08-10 14:04:35 +0000 |
1284 | @@ -23,6 +23,8 @@ |
1285 | src="../../../app/javascript/formoverlay/formoverlay.js"></script> |
1286 | <script type="text/javascript" |
1287 | src="../../../app/javascript/overlay/overlay.js"></script> |
1288 | + <script type="text/javascript" |
1289 | + src="../../../app/javascript/extras/extras.js"></script> |
1290 | |
1291 | <!-- The module under test --> |
1292 | <script type="text/javascript" |
1293 | |
1294 | === modified file 'lib/lp/bugs/javascript/tests/test_subscription.js' |
1295 | --- lib/lp/bugs/javascript/tests/test_subscription.js 2011-06-22 18:53:35 +0000 |
1296 | +++ lib/lp/bugs/javascript/tests/test_subscription.js 2011-08-10 14:04:35 +0000 |
1297 | @@ -2408,7 +2408,7 @@ |
1298 | // The page has rendered the error overlay. |
1299 | var error_box = Y.one('.yui3-lazr-formoverlay-errors'); |
1300 | // The way the LP error display works now is that it flashes the |
1301 | - // problem area red for 1 second (the lazr.anim default), and |
1302 | + // problem area red for 1 second (the lp.anim default), and |
1303 | // *then* shows the overlay. |
1304 | this.wait( |
1305 | function () { |
1306 | |
1307 | === modified file 'lib/lp/code/javascript/branch.bugspeclinks.js' |
1308 | --- lib/lp/code/javascript/branch.bugspeclinks.js 2011-08-04 08:10:54 +0000 |
1309 | +++ lib/lp/code/javascript/branch.bugspeclinks.js 2011-08-10 14:04:35 +0000 |
1310 | @@ -4,7 +4,7 @@ |
1311 | * Code for handling links to branches from bugs and specs. |
1312 | * |
1313 | * @module BranchLinks |
1314 | - * @requires base, lazr.anim, lazr.formoverlay |
1315 | + * @requires base, lp.anim, lazr.formoverlay |
1316 | */ |
1317 | |
1318 | YUI.add('lp.code.branch.bugspeclinks', function(Y) { |
1319 | @@ -117,7 +117,7 @@ |
1320 | var existing = Y.one('#buglink-' + bugnumber); |
1321 | if (Y.Lang.isValue(existing)) { |
1322 | // Bug is already linked, don't do unneccessary requests. |
1323 | - Y.lazr.anim.green_flash({node: existing}).run(); |
1324 | + Y.lp.anim.green_flash({node: existing}).run(); |
1325 | return; |
1326 | } |
1327 | |
1328 | @@ -165,7 +165,7 @@ |
1329 | Y.one('#buglink-list') |
1330 | .set('innerHTML', response.responseText); |
1331 | var new_buglink = Y.one('#buglink-' + bug.get('id')); |
1332 | - var anim = Y.lazr.anim.green_flash({node: new_buglink}); |
1333 | + var anim = Y.lp.anim.green_flash({node: new_buglink}); |
1334 | anim.on('end', connect_remove_links); |
1335 | anim.run(); |
1336 | }, |
1337 | @@ -196,7 +196,7 @@ |
1338 | success: function(updated_entry) { |
1339 | var element = Y.one('#buglink-' + bugnumber); |
1340 | var parent_element = element.get('parentNode'); |
1341 | - anim = Y.lazr.anim.red_flash({node: element}); |
1342 | + anim = Y.lp.anim.red_flash({node: element}); |
1343 | anim.on('end', function() { |
1344 | parent_element.removeChild(element); |
1345 | |
1346 | @@ -292,5 +292,5 @@ |
1347 | |
1348 | } |
1349 | |
1350 | -}, "0.1", {"requires": ["base", "lazr.anim", "lazr.formoverlay", |
1351 | +}, "0.1", {"requires": ["base", "lp.anim", "lazr.formoverlay", |
1352 | "lp.client", "lp.client.plugins"]}); |
1353 | |
1354 | === modified file 'lib/lp/code/javascript/branch.subscription.js' |
1355 | --- lib/lp/code/javascript/branch.subscription.js 2011-05-18 18:34:19 +0000 |
1356 | +++ lib/lp/code/javascript/branch.subscription.js 2011-08-10 14:04:35 +0000 |
1357 | @@ -178,7 +178,7 @@ |
1358 | success: function(id, response) { |
1359 | Y.one('#branch-subscribers-outer').set( |
1360 | 'innerHTML', response.responseText); |
1361 | - var anim = Y.lazr.anim.green_flash({ |
1362 | + var anim = Y.lp.anim.green_flash({ |
1363 | node: Y.one('#subscriber-' + user_name) |
1364 | }); |
1365 | anim.run(); |
1366 | @@ -186,7 +186,7 @@ |
1367 | failure: function(id, response) { |
1368 | Y.one('#branch-subscribers-outer').set( |
1369 | 'innerHTML', 'A problem has occurred.'); |
1370 | - var anim = Y.lazr.anim.red_flash({ |
1371 | + var anim = Y.lp.anim.red_flash({ |
1372 | node: Y.one('#branch-subscribers-outer') |
1373 | }); |
1374 | anim.run(); |
1375 | |
1376 | === modified file 'lib/lp/code/javascript/branchmergeproposal.reviewcomment.js' |
1377 | --- lib/lp/code/javascript/branchmergeproposal.reviewcomment.js 2011-02-24 00:23:04 +0000 |
1378 | +++ lib/lp/code/javascript/branchmergeproposal.reviewcomment.js 2011-08-10 14:04:35 +0000 |
1379 | @@ -4,7 +4,7 @@ |
1380 | * Library for code review javascript. |
1381 | * |
1382 | * @module lp.code.branchmergeproposal.reviewcomment |
1383 | - * @requires base, lazr.anim, lazr.formoverlay |
1384 | + * @requires base, lp.anim, lazr.formoverlay |
1385 | */ |
1386 | |
1387 | YUI.add('lp.code.branchmergeproposal.reviewcomment', function(Y) { |
1388 | @@ -122,11 +122,11 @@ |
1389 | link.removeClass('unseen'); |
1390 | if (saved) { |
1391 | // Flash green. |
1392 | - Y.lazr.anim.green_flash({node:link}).run(); |
1393 | + Y.lp.anim.green_flash({node:link}).run(); |
1394 | } |
1395 | else { |
1396 | // Flash red. |
1397 | - Y.lazr.anim.red_flash({node:link}).run(); |
1398 | + Y.lp.anim.red_flash({node:link}).run(); |
1399 | } |
1400 | } |
1401 | } |
1402 | @@ -233,7 +233,7 @@ |
1403 | |
1404 | namespace.connect_links(); |
1405 | var new_reviewer = Y.one('#review-' + username); |
1406 | - var anim = Y.lazr.anim.green_flash({node: new_reviewer}); |
1407 | + var anim = Y.lp.anim.green_flash({node: new_reviewer}); |
1408 | anim.run(); |
1409 | }, |
1410 | failure: function() {} |
1411 | @@ -280,5 +280,5 @@ |
1412 | |
1413 | namespace.NumberToggle = NumberToggle; |
1414 | |
1415 | -}, "0.1", {"requires": ["base", "widget", "lazr.anim", |
1416 | +}, "0.1", {"requires": ["base", "widget", "lp.anim", |
1417 | "lazr.formoverlay", "lp.app.picker", "lp.client"]}); |
1418 | |
1419 | === modified file 'lib/lp/code/javascript/requestbuild_overlay.js' |
1420 | --- lib/lp/code/javascript/requestbuild_overlay.js 2011-03-23 05:35:01 +0000 |
1421 | +++ lib/lp/code/javascript/requestbuild_overlay.js 2011-08-10 14:04:35 +0000 |
1422 | @@ -4,7 +4,7 @@ |
1423 | * A form overlay that can request builds for a recipe.. |
1424 | * |
1425 | * @namespace Y.lp.code.recipebuild_overlay |
1426 | - * @requires dom, node, io-base, lazr.anim, lazr.formoverlay |
1427 | + * @requires dom, node, io-base, lp.anim, lazr.formoverlay |
1428 | */ |
1429 | YUI.add('lp.code.requestbuild_overlay', function(Y) { |
1430 | |
1431 | @@ -239,7 +239,7 @@ |
1432 | return; |
1433 | nr_new_builds += 1; |
1434 | var row = Y.one('#'+row_id); |
1435 | - var anim = Y.lazr.anim.green_flash({node: row}); |
1436 | + var anim = Y.lp.anim.green_flash({node: row}); |
1437 | anim.run(); |
1438 | }); |
1439 | return nr_new_builds; |
1440 | @@ -489,6 +489,6 @@ |
1441 | LP.cache.context.self_link, 'getPendingBuildInfo', y_config); |
1442 | } |
1443 | }, "0.1", {"requires": [ |
1444 | - "dom", "node", "escape", "io-base", "lazr.anim", "lazr.formoverlay", |
1445 | + "dom", "node", "escape", "io-base", "lp.anim", "lazr.formoverlay", |
1446 | "lp.client" |
1447 | ]}); |
1448 | |
1449 | === modified file 'lib/lp/registry/javascript/distroseries/tests/test_differences.html' |
1450 | --- lib/lp/registry/javascript/distroseries/tests/test_differences.html 2011-07-27 19:34:02 +0000 |
1451 | +++ lib/lp/registry/javascript/distroseries/tests/test_differences.html 2011-08-10 14:04:35 +0000 |
1452 | @@ -29,6 +29,8 @@ |
1453 | src="../../../../app/javascript/picker/person_picker.js"></script> |
1454 | <script type="text/javascript" |
1455 | src="../../../../app/javascript/picker/picker_patcher.js"></script> |
1456 | + <script type="text/javascript" |
1457 | + src="../../../../app/javascript/extras/extras.js"></script> |
1458 | |
1459 | <!-- The module under test --> |
1460 | <script type="text/javascript" |
1461 | |
1462 | === modified file 'lib/lp/registry/javascript/distroseries/widgets.js' |
1463 | --- lib/lp/registry/javascript/distroseries/widgets.js 2011-08-10 14:04:33 +0000 |
1464 | +++ lib/lp/registry/javascript/distroseries/widgets.js 2011-08-10 14:04:35 +0000 |
1465 | @@ -202,7 +202,7 @@ |
1466 | var node = this.fieldNode.one("tr#parent-" + parent_id); |
1467 | var other = node.next('tr.parent'); |
1468 | if (other !== null) { node.swap(other);} |
1469 | - Y.lazr.anim.green_flash({node: node}).run(); |
1470 | + Y.lp.anim.green_flash({node: node}).run(); |
1471 | }, |
1472 | |
1473 | /** |
1474 | @@ -214,7 +214,7 @@ |
1475 | var node = this.fieldNode.one("tr#parent-" + parent_id); |
1476 | var other = node.previous('tr.parent'); |
1477 | if (other !== null) { node.swap(other);} |
1478 | - Y.lazr.anim.green_flash({node: node}).run(); |
1479 | + Y.lp.anim.green_flash({node: node}).run(); |
1480 | }, |
1481 | |
1482 | /** |
1483 | @@ -242,7 +242,7 @@ |
1484 | disable_overlay: function(parent_node) { |
1485 | var overlay = parent_node.one('input.overlay'); |
1486 | if (overlay.get('disabled') !== 'disabled') { |
1487 | - Y.lazr.anim.red_flash({node: parent_node}).run(); |
1488 | + Y.lp.anim.red_flash({node: parent_node}).run(); |
1489 | parent_node.one('input.overlay').set('disabled','disabled'); |
1490 | } |
1491 | }, |
1492 | @@ -259,7 +259,7 @@ |
1493 | } |
1494 | var item = this.fieldNode.one('tr#parent-' + parent.value); |
1495 | if (item !== null) { |
1496 | - Y.lazr.anim.red_flash({node: item}).run(); |
1497 | + Y.lp.anim.red_flash({node: item}).run(); |
1498 | return false; |
1499 | } |
1500 | item = Y.Node.create("<tr />") |
1501 | @@ -310,7 +310,7 @@ |
1502 | return false; |
1503 | }, this); |
1504 | |
1505 | - Y.lazr.anim.green_flash({node: item}).run(); |
1506 | + Y.lp.anim.green_flash({node: item}).run(); |
1507 | return true; |
1508 | } |
1509 | }); |
1510 | @@ -569,7 +569,7 @@ |
1511 | this._cleanDisplay(); |
1512 | /* Green-flash when the set of choices is changed. */ |
1513 | this.after("choicesChange", function(e) { |
1514 | - Y.lazr.anim.green_flash({node: this.fieldNode}).run(); |
1515 | + Y.lp.anim.green_flash({node: this.fieldNode}).run(); |
1516 | }); |
1517 | /* _packagesets maps each distroseries' id to a collection of |
1518 | ids of its packagesets. It's populated each time a new |
1519 | @@ -586,5 +586,5 @@ |
1520 | |
1521 | }, "0.1", {"requires": [ |
1522 | "node", "dom", "io", "widget", "lp.client", |
1523 | - "lp.app.formwidgets", "lazr.anim", "array-extras", |
1524 | + "lp.app.formwidgets", "lp.anim", "array-extras", |
1525 | "substitute", "transition"]}); |
1526 | |
1527 | === modified file 'lib/lp/registry/javascript/distroseriesdifferences_details.js' |
1528 | --- lib/lp/registry/javascript/distroseriesdifferences_details.js 2011-08-10 07:33:48 +0000 |
1529 | +++ lib/lp/registry/javascript/distroseriesdifferences_details.js 2011-08-10 14:04:35 +0000 |
1530 | @@ -183,10 +183,10 @@ |
1531 | success: function(comment_latest_fragment_html) { |
1532 | placeholder.set( |
1533 | "innerHTML", comment_latest_fragment_html); |
1534 | - Y.lazr.anim.green_flash({node: placeholder}).run(); |
1535 | + Y.lp.anim.green_flash({node: placeholder}).run(); |
1536 | }, |
1537 | failure: function(id, response) { |
1538 | - Y.lazr.anim.red_flash({node: placeholder}).run(); |
1539 | + Y.lp.anim.red_flash({node: placeholder}).run(); |
1540 | } |
1541 | }, |
1542 | accept: Y.lp.client.XHTML |
1543 | @@ -215,7 +215,7 @@ |
1544 | add_comment_placeholder.insert(comment_node, 'before'); |
1545 | var reveal = Y.lazr.effects.slide_out(comment_node); |
1546 | reveal.on("end", function() { |
1547 | - Y.lazr.anim.green_flash( |
1548 | + Y.lp.anim.green_flash( |
1549 | {node: comment_node}).run(); |
1550 | }); |
1551 | reveal.run(); |
1552 | @@ -249,7 +249,7 @@ |
1553 | |
1554 | // Treat empty comments as mistakes. |
1555 | if (Y.Lang.trim(comment_text).length === 0) { |
1556 | - Y.lazr.anim.red_flash({node: comment_area}).run(); |
1557 | + Y.lp.anim.red_flash({node: comment_area}).run(); |
1558 | return; |
1559 | } |
1560 | |
1561 | @@ -261,7 +261,7 @@ |
1562 | }; |
1563 | var failure_handler = function(id, response) { |
1564 | // Re-enable field with red flash. |
1565 | - Y.lazr.anim.red_flash({node: comment_form}).run(); |
1566 | + Y.lp.anim.red_flash({node: comment_form}).run(); |
1567 | }; |
1568 | |
1569 | var config = { |
1570 | @@ -432,7 +432,7 @@ |
1571 | 'Failed to fetch difference details.', retry_handler); |
1572 | container.insert(failure_message, 'replace'); |
1573 | |
1574 | - var anim = Y.lazr.anim.red_flash({ |
1575 | + var anim = Y.lp.anim.red_flash({ |
1576 | node: args.container |
1577 | }); |
1578 | anim.run(); |
1579 | @@ -592,7 +592,7 @@ |
1580 | var name = state_and_name.title; |
1581 | if (state === 'FAILED') { |
1582 | set_package_diff_status(container, 'FAILED', name); |
1583 | - Y.lazr.anim.red_flash({node: container}).run(); |
1584 | + Y.lp.anim.red_flash({node: container}).run(); |
1585 | } |
1586 | else if (state === 'COMPLETED') { |
1587 | set_package_diff_status(container, 'COMPLETED'); |
1588 | @@ -601,7 +601,7 @@ |
1589 | parent ? 'parent_package_diff_url' : 'package_diff_url' |
1590 | ].join('/'); |
1591 | namespace.add_link_to_package_diff(container, url_uri); |
1592 | - Y.lazr.anim.green_flash({node: container}).run(); |
1593 | + Y.lp.anim.green_flash({node: container}).run(); |
1594 | } |
1595 | }, |
1596 | |
1597 | @@ -694,7 +694,7 @@ |
1598 | set_package_diff_status(sub_container, 'PENDING', 'Pending'); |
1599 | // Setup polling |
1600 | namespace.setup_pending_package_diff(sub_container, dsd_link); |
1601 | - var anim = Y.lazr.anim.green_flash({ |
1602 | + var anim = Y.lp.anim.green_flash({ |
1603 | node: sub_container |
1604 | }); |
1605 | anim.run(); |
1606 | @@ -732,5 +732,5 @@ |
1607 | |
1608 | }, "0.1", {"requires": ["event-simulate", "io-base", |
1609 | "lp.soyuz.base", "lp.client", |
1610 | - "lazr.anim", "lazr.effects", |
1611 | + "lp.anim", "lazr.effects", |
1612 | "lp.soyuz.dynamic_dom_updater"]}); |
1613 | |
1614 | === modified file 'lib/lp/registry/javascript/milestoneoverlay.js' |
1615 | --- lib/lp/registry/javascript/milestoneoverlay.js 2011-02-24 00:23:04 +0000 |
1616 | +++ lib/lp/registry/javascript/milestoneoverlay.js 2011-08-10 14:04:35 +0000 |
1617 | @@ -4,7 +4,7 @@ |
1618 | * A milestone form overlay that can create a milestone within any page. |
1619 | * |
1620 | * @module Y.lp.registry.milestoneoverlay |
1621 | - * @requires dom, node, io-base, lazr.anim, lazr.formoverlay |
1622 | + * @requires dom, node, io-base, lp.anim, lazr.formoverlay |
1623 | */ |
1624 | YUI.add('lp.registry.milestoneoverlay', function(Y) { |
1625 | Y.log('loading lp.registry.milestoneoverlay'); |
1626 | @@ -120,7 +120,7 @@ |
1627 | }, "0.1", {"requires": ["dom", |
1628 | "node", |
1629 | "io-base", |
1630 | - "lazr.anim", |
1631 | + "lp.anim", |
1632 | "lazr.formoverlay", |
1633 | "lp.app.calendar", |
1634 | "lp.client" |
1635 | |
1636 | === modified file 'lib/lp/registry/javascript/milestonetable.js' |
1637 | --- lib/lp/registry/javascript/milestonetable.js 2010-04-29 15:21:05 +0000 |
1638 | +++ lib/lp/registry/javascript/milestonetable.js 2011-08-10 14:04:35 +0000 |
1639 | @@ -4,7 +4,7 @@ |
1640 | * Dynamically add milestones to an HTML table. |
1641 | * |
1642 | * @module Y.lp.registry.milestonetable |
1643 | - * @requires node, io-base, substitute, lazr.anim |
1644 | + * @requires node, io-base, substitute, lp.anim |
1645 | */ |
1646 | YUI.add('lp.registry.milestonetable', function(Y) { |
1647 | Y.log('loading lp.registry.milestonetable'); |
1648 | @@ -44,7 +44,7 @@ |
1649 | var row = Y.Node.create(Y.Lang.trim(response.responseText)); |
1650 | module._ensure_table_is_seen(data.tbody); |
1651 | module._prepend_node(data.tbody, row); |
1652 | - Y.lazr.anim.green_flash({node: row}).run(); |
1653 | + Y.lp.anim.green_flash({node: row}).run(); |
1654 | module._clear_add_handlers(data); |
1655 | }; |
1656 | |
1657 | @@ -55,7 +55,7 @@ |
1658 | 'Could not retrieve milestone {name}</td></tr>', data)); |
1659 | module._ensure_table_is_seen(data.tbody); |
1660 | module._prepend_node(data.tbody, row); |
1661 | - Y.lazr.anim.red_flash({node: row}).run(); |
1662 | + Y.lp.anim.red_flash({node: row}).run(); |
1663 | module._clear_add_handlers(data); |
1664 | }; |
1665 | |
1666 | @@ -117,5 +117,5 @@ |
1667 | }; |
1668 | |
1669 | }, "0.1", {"requires": [ |
1670 | - "node", "io-base", "substitute", "lazr.anim" |
1671 | + "node", "io-base", "substitute", "lp.anim" |
1672 | ]}); |
1673 | |
1674 | === modified file 'lib/lp/registry/javascript/structural-subscription.js' |
1675 | --- lib/lp/registry/javascript/structural-subscription.js 2011-06-16 13:50:58 +0000 |
1676 | +++ lib/lp/registry/javascript/structural-subscription.js 2011-08-10 14:04:35 +0000 |
1677 | @@ -920,7 +920,7 @@ |
1678 | input.on('change', function(e) { |
1679 | var error_text = validator(input.get('value')); |
1680 | if (error_text !== null) { |
1681 | - Y.lazr.anim.red_flash({node: input}).run(); |
1682 | + Y.lp.anim.red_flash({node: input}).run(); |
1683 | error_container.setContent(error_text); |
1684 | overlay.field_errors[field_name] = true; |
1685 | // Accordion sets fixed height for the accordion item, |
1686 | @@ -1760,7 +1760,7 @@ |
1687 | wire_up_edit_links_for_filter( |
1688 | config, subscription_info, 0, |
1689 | filter_info, filter_id, anim_node); |
1690 | - Y.lazr.anim.green_flash({node: anim_node}).run(); |
1691 | + Y.lp.anim.green_flash({node: anim_node}).run(); |
1692 | } else { |
1693 | // Since there is no filter description to update we need another |
1694 | // way to tell the user that the subscription was sucessfully |
1695 | @@ -1867,6 +1867,6 @@ |
1696 | }; // setup |
1697 | |
1698 | }, '0.1', {requires: [ |
1699 | - 'dom', 'node', 'lazr.anim', 'lazr.formoverlay', 'lazr.overlay', |
1700 | + 'dom', 'node', 'lp.anim', 'lazr.formoverlay', 'lazr.overlay', |
1701 | 'lazr.effects', 'lp.app.errors', 'lp.client', 'gallery-accordion' |
1702 | ]}); |
1703 | |
1704 | === modified file 'lib/lp/registry/javascript/team.js' |
1705 | --- lib/lp/registry/javascript/team.js 2011-02-24 00:23:04 +0000 |
1706 | +++ lib/lp/registry/javascript/team.js 2011-08-10 14:04:35 +0000 |
1707 | @@ -104,7 +104,7 @@ |
1708 | '<li>' + person_html + '</li>'); |
1709 | members_section.removeClass('unseen'); |
1710 | members_ul.insertBefore(person_repr, first_node); |
1711 | - anim = Y.lazr.anim.green_flash({node: person_repr}); |
1712 | + anim = Y.lp.anim.green_flash({node: person_repr}); |
1713 | anim.run(); |
1714 | disable_spinner(); |
1715 | }; |
1716 | @@ -134,7 +134,7 @@ |
1717 | }; |
1718 | |
1719 | }, '0.1', {requires: ['node', |
1720 | - 'lazr.anim', |
1721 | + 'lp.anim', |
1722 | 'lp.app.errors', |
1723 | 'lp.app.picker', |
1724 | 'lp.client', |
1725 | |
1726 | === modified file 'lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js' |
1727 | --- lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2011-08-02 08:20:42 +0000 |
1728 | +++ lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2011-08-10 14:04:35 +0000 |
1729 | @@ -3,7 +3,7 @@ |
1730 | |
1731 | YUI().use( |
1732 | 'lp.testing.runner', 'test', 'console', 'node-event-simulate', |
1733 | - 'lp.soyuz.base', "lazr.anim", "lazr.effects", |
1734 | + 'lp.soyuz.base', "lp.anim", "lazr.effects", |
1735 | 'lp.soyuz.dynamic_dom_updater', 'event-simulate', "io-base", |
1736 | 'lp.registry.distroseriesdifferences_details', function(Y) { |
1737 | |
1738 | |
1739 | === modified file 'lib/lp/registry/javascript/tests/test_milestone_table.html' |
1740 | --- lib/lp/registry/javascript/tests/test_milestone_table.html 2011-07-08 06:06:15 +0000 |
1741 | +++ lib/lp/registry/javascript/tests/test_milestone_table.html 2011-08-10 14:04:35 +0000 |
1742 | @@ -13,6 +13,8 @@ |
1743 | |
1744 | <script type="text/javascript" |
1745 | src="../../../app/javascript/anim/anim.js"></script> |
1746 | + <script type="text/javascript" |
1747 | + src="../../../app/javascript/extras/extras.js"></script> |
1748 | |
1749 | <!-- The module under test --> |
1750 | <script type="text/javascript" src="../milestonetable.js"></script> |
1751 | |
1752 | === modified file 'lib/lp/registry/javascript/tests/test_structural_subscription.html' |
1753 | --- lib/lp/registry/javascript/tests/test_structural_subscription.html 2011-07-08 06:06:15 +0000 |
1754 | +++ lib/lp/registry/javascript/tests/test_structural_subscription.html 2011-08-10 14:04:35 +0000 |
1755 | @@ -25,6 +25,8 @@ |
1756 | <script type="text/javascript" |
1757 | src="../../../app/javascript/errors.js"></script> |
1758 | <script type="text/javascript" |
1759 | + src="../../../app/javascript/extras/extras.js"></script> |
1760 | + <script type="text/javascript" |
1761 | src="../../../contrib/javascript/yui3-gallery/gallery-accordion/gallery-accordion.js"> |
1762 | </script> |
1763 | <script type="text/javascript" |
1764 | |
1765 | === modified file 'lib/lp/registry/templates/productrelease-add-from-series.pt' |
1766 | --- lib/lp/registry/templates/productrelease-add-from-series.pt 2010-10-10 21:54:16 +0000 |
1767 | +++ lib/lp/registry/templates/productrelease-add-from-series.pt 2011-08-10 14:04:35 +0000 |
1768 | @@ -41,7 +41,7 @@ |
1769 | var last_index = children.size() - 1; |
1770 | children.item(last_index).set('selected', true); |
1771 | var div = select_menu.ancestor(); |
1772 | - Y.lazr.anim.green_flash({node: div}).run(); |
1773 | + Y.lp.anim.green_flash({node: div}).run(); |
1774 | }; |
1775 | |
1776 | Y.on('domready', function () { |
1777 | |
1778 | === modified file 'lib/lp/soyuz/javascript/update_archive_build_statuses.js' |
1779 | --- lib/lp/soyuz/javascript/update_archive_build_statuses.js 2011-02-24 00:23:04 +0000 |
1780 | +++ lib/lp/soyuz/javascript/update_archive_build_statuses.js 2011-08-10 14:04:35 +0000 |
1781 | @@ -48,7 +48,7 @@ |
1782 | // If the value changed, just put a quick anim |
1783 | // on the parent row. |
1784 | if (previous_value != data_value.toString()){ |
1785 | - var anim = Y.lazr.anim.green_flash({ |
1786 | + var anim = Y.lp.anim.green_flash({ |
1787 | node: node.get("parentNode") |
1788 | }); |
1789 | anim.run(); |
1790 | @@ -205,7 +205,7 @@ |
1791 | |
1792 | // Finally, add an animation if we've changed... |
1793 | if (td_ui_changed) { |
1794 | - var anim = Y.lazr.anim.green_flash({node: td_elem}); |
1795 | + var anim = Y.lp.anim.green_flash({node: td_elem}); |
1796 | anim.run(); |
1797 | } |
1798 | |
1799 | @@ -282,6 +282,6 @@ |
1800 | }); |
1801 | }, "0.1", {"requires":["anim", |
1802 | "node", |
1803 | - "lazr.anim", |
1804 | + "lp.anim", |
1805 | "lp.client", |
1806 | "lp.soyuz.dynamic_dom_updater"]}); |
1807 | |
1808 | === modified file 'lib/lp/soyuz/templates/archive-macros.pt' |
1809 | --- lib/lp/soyuz/templates/archive-macros.pt 2011-07-18 09:23:10 +0000 |
1810 | +++ lib/lp/soyuz/templates/archive-macros.pt 2011-08-10 14:04:35 +0000 |
1811 | @@ -10,7 +10,7 @@ |
1812 | </tal:comment> |
1813 | |
1814 | <script type="text/javascript"> |
1815 | -LPS.use('node', 'io-base', 'lazr.anim', 'lp.soyuz.base', |
1816 | +LPS.use('node', 'io-base', 'lp.anim', 'lp.soyuz.base', |
1817 | 'lp.app.widgets.expander', function(Y) { |
1818 | |
1819 | |
1820 | @@ -24,7 +24,7 @@ |
1821 | |
1822 | args.expander.receive(failure_message); |
1823 | |
1824 | - var anim = Y.lazr.anim.red_flash({ |
1825 | + var anim = Y.lp.anim.red_flash({ |
1826 | node: args.expander.content_node |
1827 | }); |
1828 | anim.run(); |
1829 | |
1830 | === modified file 'lib/lp/soyuz/templates/archive-packages.pt' |
1831 | --- lib/lp/soyuz/templates/archive-packages.pt 2011-04-08 11:49:20 +0000 |
1832 | +++ lib/lp/soyuz/templates/archive-packages.pt 2011-08-10 14:04:35 +0000 |
1833 | @@ -10,7 +10,7 @@ |
1834 | <metal:block fill-slot="head_epilogue"> |
1835 | <script type="text/javascript" id="repository-size-update" |
1836 | tal:condition="view/archive_url"> |
1837 | -LPS.use('io-base', 'lazr.anim', 'node', 'lp.soyuz.base', |
1838 | +LPS.use('io-base', 'lp.anim', 'node', 'lp.soyuz.base', |
1839 | 'lp.soyuz.update_archive_build_statuses', function(Y) { |
1840 | |
1841 | |
1842 | @@ -38,7 +38,7 @@ |
1843 | args.container.set('innerHTML', ''); |
1844 | args.container.appendChild(failure_message); |
1845 | |
1846 | - var anim = Y.lazr.anim.red_flash({ |
1847 | + var anim = Y.lp.anim.red_flash({ |
1848 | node: failure_message |
1849 | }); |
1850 | anim.run(); |
1851 | |
1852 | === modified file 'lib/lp/translations/javascript/importqueueentry.js' |
1853 | --- lib/lp/translations/javascript/importqueueentry.js 2010-08-06 06:51:37 +0000 |
1854 | +++ lib/lp/translations/javascript/importqueueentry.js 2011-08-10 14:04:35 +0000 |
1855 | @@ -2,7 +2,7 @@ |
1856 | * GNU Affero General Public License version 3 (see the file LICENSE). |
1857 | * |
1858 | * @module lp.translations.importqueueentry |
1859 | - * @requires node, lazr.anim |
1860 | + * @requires node, lp.anim |
1861 | */ |
1862 | |
1863 | YUI.add('lp.translations.importqueueentry', function(Y) { |
1864 | @@ -157,7 +157,7 @@ |
1865 | if (interactively) { |
1866 | // Animate revealed fields. |
1867 | var animateElement = function (element) { |
1868 | - Y.lazr.anim.green_flash({node: element}).run(); |
1869 | + Y.lp.anim.green_flash({node: element}).run(); |
1870 | }; |
1871 | alterFields(file_type, animateElement); |
1872 | } |
1873 | @@ -254,4 +254,4 @@ |
1874 | file_type_field.on('change', handleFileTypeChange); |
1875 | }; |
1876 | |
1877 | -}, "0.1", {"requires": ['node', 'lazr.anim']}); |
1878 | +}, "0.1", {"requires": ['node', 'lp.anim']}); |
1879 | |
1880 | === modified file 'lib/lp/translations/javascript/sourcepackage_sharing_details.js' |
1881 | --- lib/lp/translations/javascript/sourcepackage_sharing_details.js 2011-07-27 18:41:24 +0000 |
1882 | +++ lib/lp/translations/javascript/sourcepackage_sharing_details.js 2011-08-10 14:04:35 +0000 |
1883 | @@ -530,7 +530,7 @@ |
1884 | }, |
1885 | flash_check_green: function(check) { |
1886 | var element = Y.one(this.visible_check_selector(check)); |
1887 | - var anim = Y.lazr.anim.green_flash({node: element}); |
1888 | + var anim = Y.lp.anim.green_flash({node: element}); |
1889 | anim.run(); |
1890 | } |
1891 | }); |
1892 | @@ -627,4 +627,4 @@ |
1893 | }; |
1894 | }, "0.1", {"requires": [ |
1895 | 'lp', 'lp.app.errors', 'lp.app.picker', 'oop', 'lp.client', |
1896 | - 'lazr.anim']}); |
1897 | + 'lp.anim']}); |
1898 | |
1899 | === modified file 'lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html' |
1900 | --- lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html 2011-07-15 20:47:42 +0000 |
1901 | +++ lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html 2011-08-10 14:04:35 +0000 |
1902 | @@ -13,6 +13,8 @@ |
1903 | <script type="text/javascript" src="../../../app/javascript/client.js"></script> |
1904 | <script type="text/javascript" src="../../../app/javascript/lp.js"></script> |
1905 | <script type="text/javascript" src="../../../app/javascript/anim/anim.js"></script> |
1906 | + <script type="text/javascript" |
1907 | + src="../../../app/javascript/extras/extras.js"></script> |
1908 | |
1909 | <!-- The module under test --> |
1910 | <script type="text/javascript" src="../sourcepackage_sharing_details.js"></script> |
Since you are replacing typeof with Y.Lang.isFunction (line 248 of the diff which will change :), we agreed that simple boolean check for `to` should be replaced with Y.Lang.isValue(to) instead. Nothing else that I could find, so go land this nice cleanup :)