Merge lp:~edwin-grubbs/launchpad/bug-513260-registry-js-module-names into lp:launchpad
- bug-513260-registry-js-module-names
- Merge into devel
Proposed by
Edwin Grubbs
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Edwin Grubbs | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~edwin-grubbs/launchpad/bug-513260-registry-js-module-names | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
937 lines (+240/-224) 18 files modified
lib/canonical/launchpad/javascript/lp/dragscroll.js (+132/-122) lib/canonical/launchpad/javascript/lp/mapping.js (+34/-34) lib/canonical/launchpad/javascript/lp/picker.js (+4/-4) lib/canonical/launchpad/javascript/registry/milestoneoverlay.js (+5/-5) lib/canonical/launchpad/javascript/registry/milestonetable.js (+35/-27) lib/canonical/launchpad/javascript/registry/tests/milestone_table.html (+5/-5) lib/canonical/launchpad/javascript/registry/tests/test_milestone_table.js (+3/-3) lib/canonical/launchpad/javascript/registry/tests/timeline-iframe.html (+4/-4) lib/canonical/launchpad/javascript/registry/tests/timeline.html (+2/-1) lib/canonical/launchpad/javascript/registry/tests/timeline.js (+1/-1) lib/lp/app/templates/base-layout-macros.pt (+2/-0) lib/lp/registry/browser/__init__.py (+4/-4) lib/lp/registry/browser/tests/productrelease-views.txt (+1/-1) lib/lp/registry/browser/tests/productseries-views.txt (+3/-3) lib/lp/registry/templates/distroseries-index.pt (+0/-3) lib/lp/registry/templates/object-timeline-graph.pt (+3/-2) lib/lp/registry/templates/productrelease-add-from-series.pt (+2/-2) lib/lp/registry/templates/productseries-index.pt (+0/-3) |
||||
To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-513260-registry-js-module-names | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+19142@code.launchpad.net |
Commit message
Fixed conflicts between YUI module names, namespaces, and filenames.
Description of the change
To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote : | # |
Revision history for this message
Abel Deuring (adeuring) wrote : | # |
Hi Edwin,
nice change. I think you should s/Copyright 2009/Copyright 2010/ in milestone_table.js and dragscroll.js.
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/canonical/launchpad/javascript/lp/dragscroll.js' | |||
2 | --- lib/canonical/launchpad/javascript/lp/dragscroll.js 2009-10-08 17:13:13 +0000 | |||
3 | +++ lib/canonical/launchpad/javascript/lp/dragscroll.js 2010-02-12 16:34:16 +0000 | |||
4 | @@ -1,4 +1,10 @@ | |||
6 | 1 | /* | 1 | /* Copyright 2010 Canonical Ltd. This software is licensed under the |
7 | 2 | * GNU Affero General Public License version 3 (see the file LICENSE). | ||
8 | 3 | * | ||
9 | 4 | * A milestone form overlay that can create a milestone within any page. | ||
10 | 5 | * | ||
11 | 6 | * @module Y.lp.dragscroll | ||
12 | 7 | * | ||
13 | 2 | * Based on dragscroll script by Nicolas Mendoza <nicolasm@opera.com>. | 8 | * Based on dragscroll script by Nicolas Mendoza <nicolasm@opera.com>. |
14 | 3 | * http://people.opera.com/nicolasm/userjs/dragscroll | 9 | * http://people.opera.com/nicolasm/userjs/dragscroll |
15 | 4 | */ | 10 | */ |
16 | @@ -9,126 +15,130 @@ | |||
17 | 9 | * @class DragScrollEventHandler | 15 | * @class DragScrollEventHandler |
18 | 10 | * @constructor | 16 | * @constructor |
19 | 11 | */ | 17 | */ |
119 | 12 | DragScrollEventHandler = function() { | 18 | YUI.add('lp.dragscroll', function(Y) { |
120 | 13 | this.dragging = false; | 19 | var module = Y.namespace('lp.dragscroll'); |
121 | 14 | this.last_position = null; | 20 | |
122 | 15 | this.event_listeners = []; | 21 | module.DragScrollEventHandler = function() { |
24 | 16 | } | ||
25 | 17 | |||
26 | 18 | DragScrollEventHandler.prototype = { | ||
27 | 19 | /** | ||
28 | 20 | * Add the event handlers and change the cursor to indicate | ||
29 | 21 | * that drag scrolling is active. | ||
30 | 22 | * | ||
31 | 23 | * @method activate | ||
32 | 24 | */ | ||
33 | 25 | activate: function() { | ||
34 | 26 | this._addEventListener("mousedown", this._startDragScroll); | ||
35 | 27 | this._addEventListener("mouseup", this._stopDragScroll); | ||
36 | 28 | this._addEventListener("mouseout", this._stopDragScroll); | ||
37 | 29 | this._addEventListener("mousemove", this._dragScroll); | ||
38 | 30 | this._setGrabCursor(); | ||
39 | 31 | }, | ||
40 | 32 | |||
41 | 33 | /** | ||
42 | 34 | * Remove the event handlers and change the cursor to indicate | ||
43 | 35 | * that drag scrolling is inactive. | ||
44 | 36 | * | ||
45 | 37 | * @method deactivate | ||
46 | 38 | */ | ||
47 | 39 | deactivate: function() { | ||
48 | 40 | document.removeEventListener( | ||
49 | 41 | "mousedown", this._startDragScroll, false); | ||
50 | 42 | this._removeEventListeners(); | ||
51 | 43 | this._unsetCursor(); | ||
52 | 44 | }, | ||
53 | 45 | |||
54 | 46 | _addEventListener: function(event_type, action) { | ||
55 | 47 | // Wrap the method in a different function that forces | ||
56 | 48 | // `this` to be the `DragScrollEventHandler` object. | ||
57 | 49 | var self = this; | ||
58 | 50 | var event_listener = function(e) { | ||
59 | 51 | action.call(self, e) | ||
60 | 52 | }; | ||
61 | 53 | var event_args = [event_type, event_listener, false]; | ||
62 | 54 | this.event_listeners.push(event_args); | ||
63 | 55 | document.addEventListener.apply(document, event_args); | ||
64 | 56 | }, | ||
65 | 57 | |||
66 | 58 | _removeEventListeners: function() { | ||
67 | 59 | for (var i=0; i<this.event_listeners.length; i++) { | ||
68 | 60 | var event_args = this.event_listeners[i]; | ||
69 | 61 | document.removeEventListener.apply(document, event_args); | ||
70 | 62 | } | ||
71 | 63 | }, | ||
72 | 64 | |||
73 | 65 | _unsetCursor: function() { | ||
74 | 66 | document.body.style.cursor = ''; | ||
75 | 67 | }, | ||
76 | 68 | |||
77 | 69 | _setGrabCursor: function() { | ||
78 | 70 | // Styles for W3C, IE, Mozilla, Webkit. | ||
79 | 71 | // Unknown styles will fail to change the value. | ||
80 | 72 | document.body.style.cursor = 'move'; | ||
81 | 73 | document.body.style.cursor = 'grab'; | ||
82 | 74 | document.body.style.cursor = '-moz-grab'; | ||
83 | 75 | document.body.style.cursor = '-webkit-grab'; | ||
84 | 76 | }, | ||
85 | 77 | |||
86 | 78 | _setGrabbingCursor: function() { | ||
87 | 79 | // Styles for IE, Mozilla, and Webkit. | ||
88 | 80 | // Unknown styles will fail to change the value. | ||
89 | 81 | document.body.style.cursor = 'grabbing'; | ||
90 | 82 | document.body.style.cursor = '-moz-grabbing'; | ||
91 | 83 | document.body.style.cursor = '-webkit-grabbing'; | ||
92 | 84 | }, | ||
93 | 85 | |||
94 | 86 | /** | ||
95 | 87 | * MouseDown event handler that causes _dragScroll to | ||
96 | 88 | * take action when it receives a MouseMove event. | ||
97 | 89 | * | ||
98 | 90 | * @method _startDragScroll | ||
99 | 91 | */ | ||
100 | 92 | _startDragScroll: function(e) { | ||
101 | 93 | if (e.button == 0) { | ||
102 | 94 | this.dragging = true; | ||
103 | 95 | this.last_position = e; | ||
104 | 96 | this._setGrabbingCursor(); | ||
105 | 97 | } | ||
106 | 98 | e.preventDefault(); | ||
107 | 99 | e.stopPropagation(); | ||
108 | 100 | }, | ||
109 | 101 | |||
110 | 102 | /** | ||
111 | 103 | * MouseUp & MouseOut event handler that causes _dragScroll to | ||
112 | 104 | * once again ignore MouseMove events. Stopping dragging when | ||
113 | 105 | * the MouseOut event occurs is helpful, since the MouseUp event | ||
114 | 106 | * is not reliable, when the mouse is outside the window. | ||
115 | 107 | * | ||
116 | 108 | * @method _stopDragScroll | ||
117 | 109 | */ | ||
118 | 110 | _stopDragScroll: function(e) { | ||
123 | 111 | this.dragging = false; | 22 | this.dragging = false; |
144 | 112 | this._setGrabCursor(); | 23 | this.last_position = null; |
145 | 113 | e.preventDefault(); | 24 | this.event_listeners = []; |
146 | 114 | e.stopPropagation(); | 25 | }; |
147 | 115 | }, | 26 | |
148 | 116 | 27 | module.DragScrollEventHandler.prototype = { | |
149 | 117 | /** | 28 | /** |
150 | 118 | * MouseMove event handler that calculates the movement | 29 | * Add the event handlers and change the cursor to indicate |
151 | 119 | * by comparing the mouse positions in the current event and | 30 | * that drag scrolling is active. |
152 | 120 | * the previous event. | 31 | * |
153 | 121 | * | 32 | * @method activate |
154 | 122 | * @method _dragScroll | 33 | */ |
155 | 123 | */ | 34 | activate: function() { |
156 | 124 | _dragScroll: function(e) { | 35 | this._addEventListener("mousedown", this._startDragScroll); |
157 | 125 | if (this.dragging) { | 36 | this._addEventListener("mouseup", this._stopDragScroll); |
158 | 126 | window.scrollBy( | 37 | this._addEventListener("mouseout", this._stopDragScroll); |
159 | 127 | this.last_position.clientX - e.clientX, | 38 | this._addEventListener("mousemove", this._dragScroll); |
160 | 128 | this.last_position.clientY - e.clientY); | 39 | this._setGrabCursor(); |
161 | 129 | this.last_position = e; | 40 | }, |
162 | 130 | e.preventDefault(); | 41 | |
163 | 131 | e.stopPropagation(); | 42 | /** |
164 | 43 | * Remove the event handlers and change the cursor to indicate | ||
165 | 44 | * that drag scrolling is inactive. | ||
166 | 45 | * | ||
167 | 46 | * @method deactivate | ||
168 | 47 | */ | ||
169 | 48 | deactivate: function() { | ||
170 | 49 | document.removeEventListener( | ||
171 | 50 | "mousedown", this._startDragScroll, false); | ||
172 | 51 | this._removeEventListeners(); | ||
173 | 52 | this._unsetCursor(); | ||
174 | 53 | }, | ||
175 | 54 | |||
176 | 55 | _addEventListener: function(event_type, action) { | ||
177 | 56 | // Wrap the method in a different function that forces | ||
178 | 57 | // `this` to be the `DragScrollEventHandler` object. | ||
179 | 58 | var self = this; | ||
180 | 59 | var event_listener = function(e) { | ||
181 | 60 | action.call(self, e); | ||
182 | 61 | }; | ||
183 | 62 | var event_args = [event_type, event_listener, false]; | ||
184 | 63 | this.event_listeners.push(event_args); | ||
185 | 64 | document.addEventListener.apply(document, event_args); | ||
186 | 65 | }, | ||
187 | 66 | |||
188 | 67 | _removeEventListeners: function() { | ||
189 | 68 | for (var i=0; i<this.event_listeners.length; i++) { | ||
190 | 69 | var event_args = this.event_listeners[i]; | ||
191 | 70 | document.removeEventListener.apply(document, event_args); | ||
192 | 71 | } | ||
193 | 72 | }, | ||
194 | 73 | |||
195 | 74 | _unsetCursor: function() { | ||
196 | 75 | document.body.style.cursor = ''; | ||
197 | 76 | }, | ||
198 | 77 | |||
199 | 78 | _setGrabCursor: function() { | ||
200 | 79 | // Styles for W3C, IE, Mozilla, Webkit. | ||
201 | 80 | // Unknown styles will fail to change the value. | ||
202 | 81 | document.body.style.cursor = 'move'; | ||
203 | 82 | document.body.style.cursor = 'grab'; | ||
204 | 83 | document.body.style.cursor = '-moz-grab'; | ||
205 | 84 | document.body.style.cursor = '-webkit-grab'; | ||
206 | 85 | }, | ||
207 | 86 | |||
208 | 87 | _setGrabbingCursor: function() { | ||
209 | 88 | // Styles for IE, Mozilla, and Webkit. | ||
210 | 89 | // Unknown styles will fail to change the value. | ||
211 | 90 | document.body.style.cursor = 'grabbing'; | ||
212 | 91 | document.body.style.cursor = '-moz-grabbing'; | ||
213 | 92 | document.body.style.cursor = '-webkit-grabbing'; | ||
214 | 93 | }, | ||
215 | 94 | |||
216 | 95 | /** | ||
217 | 96 | * MouseDown event handler that causes _dragScroll to | ||
218 | 97 | * take action when it receives a MouseMove event. | ||
219 | 98 | * | ||
220 | 99 | * @method _startDragScroll | ||
221 | 100 | */ | ||
222 | 101 | _startDragScroll: function(e) { | ||
223 | 102 | if (e.button === 0) { | ||
224 | 103 | this.dragging = true; | ||
225 | 104 | this.last_position = e; | ||
226 | 105 | this._setGrabbingCursor(); | ||
227 | 106 | } | ||
228 | 107 | e.preventDefault(); | ||
229 | 108 | e.stopPropagation(); | ||
230 | 109 | }, | ||
231 | 110 | |||
232 | 111 | /** | ||
233 | 112 | * MouseUp & MouseOut event handler that causes _dragScroll to | ||
234 | 113 | * once again ignore MouseMove events. Stopping dragging when | ||
235 | 114 | * the MouseOut event occurs is helpful, since the MouseUp event | ||
236 | 115 | * is not reliable, when the mouse is outside the window. | ||
237 | 116 | * | ||
238 | 117 | * @method _stopDragScroll | ||
239 | 118 | */ | ||
240 | 119 | _stopDragScroll: function(e) { | ||
241 | 120 | this.dragging = false; | ||
242 | 121 | this._setGrabCursor(); | ||
243 | 122 | e.preventDefault(); | ||
244 | 123 | e.stopPropagation(); | ||
245 | 124 | }, | ||
246 | 125 | |||
247 | 126 | /** | ||
248 | 127 | * MouseMove event handler that calculates the movement | ||
249 | 128 | * by comparing the mouse positions in the current event and | ||
250 | 129 | * the previous event. | ||
251 | 130 | * | ||
252 | 131 | * @method _dragScroll | ||
253 | 132 | */ | ||
254 | 133 | _dragScroll: function(e) { | ||
255 | 134 | if (this.dragging) { | ||
256 | 135 | window.scrollBy( | ||
257 | 136 | this.last_position.clientX - e.clientX, | ||
258 | 137 | this.last_position.clientY - e.clientY); | ||
259 | 138 | this.last_position = e; | ||
260 | 139 | e.preventDefault(); | ||
261 | 140 | e.stopPropagation(); | ||
262 | 141 | } | ||
263 | 132 | } | 142 | } |
266 | 133 | } | 143 | }; |
267 | 134 | }; | 144 | }, "0.1", {"requires": []}); |
268 | 135 | 145 | ||
269 | === modified file 'lib/canonical/launchpad/javascript/lp/mapping.js' | |||
270 | --- lib/canonical/launchpad/javascript/lp/mapping.js 2009-11-24 09:30:01 +0000 | |||
271 | +++ lib/canonical/launchpad/javascript/lp/mapping.js 2010-02-12 16:34:16 +0000 | |||
272 | @@ -8,19 +8,19 @@ | |||
273 | 8 | * @required Google GMap2 | 8 | * @required Google GMap2 |
274 | 9 | */ | 9 | */ |
275 | 10 | YUI.add('lp.mapping', function(Y) { | 10 | YUI.add('lp.mapping', function(Y) { |
277 | 11 | var mapping = Y.namespace('lp.mapping'); | 11 | var module = Y.namespace('lp.mapping'); |
278 | 12 | 12 | ||
281 | 13 | mapping.RETURN_FALSE = function() {return false;}; | 13 | module.RETURN_FALSE = function() {return false;}; |
282 | 14 | mapping.RETURN_NULL = function() {return null;}; | 14 | module.RETURN_NULL = function() {return null;}; |
283 | 15 | 15 | ||
284 | 16 | // Replace the crucial GMap functions so that the supporting functions | 16 | // Replace the crucial GMap functions so that the supporting functions |
285 | 17 | // will work if the GMap script is not loaded. | 17 | // will work if the GMap script is not loaded. |
292 | 18 | var gBrowserIsCompatible = mapping.RETURN_FALSE; | 18 | var gBrowserIsCompatible = module.RETURN_FALSE; |
293 | 19 | var gDownloadUrl = mapping.RETURN_NULL; | 19 | var gDownloadUrl = module.RETURN_NULL; |
294 | 20 | 20 | ||
295 | 21 | mapping.has_gmaps = (typeof(GBrowserIsCompatible) == 'function'); | 21 | module.has_gmaps = (typeof(GBrowserIsCompatible) == 'function'); |
296 | 22 | 22 | ||
297 | 23 | if (mapping.has_gmaps) { | 23 | if (module.has_gmaps) { |
298 | 24 | // The GMap2 is is loaded; use the real functions. | 24 | // The GMap2 is is loaded; use the real functions. |
299 | 25 | // jslint does not like functions that look like classes. | 25 | // jslint does not like functions that look like classes. |
300 | 26 | gBrowserIsCompatible = GBrowserIsCompatible; | 26 | gBrowserIsCompatible = GBrowserIsCompatible; |
301 | @@ -37,7 +37,7 @@ | |||
302 | 37 | * @param {GLatLngBounds} required_bounds the boundaries or null. | 37 | * @param {GLatLngBounds} required_bounds the boundaries or null. |
303 | 38 | * @param {limit} optional max number of markers to set. | 38 | * @param {limit} optional max number of markers to set. |
304 | 39 | */ | 39 | */ |
306 | 40 | mapping.setMarkersInfoWindow = function(data, map, required_bounds, | 40 | module.setMarkersInfoWindow = function(data, map, required_bounds, |
307 | 41 | limit) { | 41 | limit) { |
308 | 42 | var xml = GXml.parse(data); | 42 | var xml = GXml.parse(data); |
309 | 43 | var markers = xml.documentElement.getElementsByTagName("participant"); | 43 | var markers = xml.documentElement.getElementsByTagName("participant"); |
310 | @@ -79,9 +79,9 @@ | |||
311 | 79 | * @param {GMap2} map the Google map to add the markers to. | 79 | * @param {GMap2} map the Google map to add the markers to. |
312 | 80 | * @param {limit} optional max number of markers to set. | 80 | * @param {limit} optional max number of markers to set. |
313 | 81 | */ | 81 | */ |
315 | 82 | mapping.setMarkersInfoWindowForSmallMap = function(data, map, limit) { | 82 | module.setMarkersInfoWindowForSmallMap = function(data, map, limit) { |
316 | 83 | var required_bounds = new GLatLngBounds(); | 83 | var required_bounds = new GLatLngBounds(); |
318 | 84 | mapping.setMarkersInfoWindow(data, map, required_bounds, limit); | 84 | module.setMarkersInfoWindow(data, map, required_bounds, limit); |
319 | 85 | var zoom_level = map.getBoundsZoomLevel(required_bounds); | 85 | var zoom_level = map.getBoundsZoomLevel(required_bounds); |
320 | 86 | // Some browsers do not display the map when the zoom_level is at the | 86 | // Some browsers do not display the map when the zoom_level is at the |
321 | 87 | // end of the range, reduce the zoom_level by 1. | 87 | // end of the range, reduce the zoom_level by 1. |
322 | @@ -100,7 +100,7 @@ | |||
323 | 100 | * @param {String} lat_name the id of the latitude field. | 100 | * @param {String} lat_name the id of the latitude field. |
324 | 101 | * @param {String} lng_name the id of the longitude field. | 101 | * @param {String} lng_name the id of the longitude field. |
325 | 102 | */ | 102 | */ |
327 | 103 | mapping.setLocation = function(lat, lng, geoname, | 103 | module.setLocation = function(lat, lng, geoname, |
328 | 104 | tz_name, lat_name, lng_name) { | 104 | tz_name, lat_name, lng_name) { |
329 | 105 | Y.one(Y.DOM.byId(lat_name)).set('value', lat); | 105 | Y.one(Y.DOM.byId(lat_name)).set('value', lat); |
330 | 106 | Y.one(Y.DOM.byId(lng_name)).set('value', lng); | 106 | Y.one(Y.DOM.byId(lng_name)).set('value', lng); |
331 | @@ -134,13 +134,13 @@ | |||
332 | 134 | * @function toggleShowSmallMaps | 134 | * @function toggleShowSmallMaps |
333 | 135 | * @param {Event} e the event for this callback. | 135 | * @param {Event} e the event for this callback. |
334 | 136 | */ | 136 | */ |
336 | 137 | mapping.toggleShowSmallMaps = function (checkbox) { | 137 | module.toggleShowSmallMaps = function (checkbox) { |
337 | 138 | var is_shown = checkbox.get('checked'); | 138 | var is_shown = checkbox.get('checked'); |
338 | 139 | Y.lp.launchpad_views.set('small_maps', is_shown); | 139 | Y.lp.launchpad_views.set('small_maps', is_shown); |
339 | 140 | var display = is_shown ? 'block' : 'none'; | 140 | var display = is_shown ? 'block' : 'none'; |
340 | 141 | var maps = Y.all('.small-map'); | 141 | var maps = Y.all('.small-map'); |
341 | 142 | maps.each(function(map) {map.setStyle('display', display);}); | 142 | maps.each(function(map) {map.setStyle('display', display);}); |
343 | 143 | if (is_shown && !mapping.has_gmaps) { | 143 | if (is_shown && !module.has_gmaps) { |
344 | 144 | // The server must add the Google GMap2 dependencies to the page. | 144 | // The server must add the Google GMap2 dependencies to the page. |
345 | 145 | window.location.reload(); | 145 | window.location.reload(); |
346 | 146 | } | 146 | } |
347 | @@ -152,14 +152,14 @@ | |||
348 | 152 | * @function setupShowSmallMapsControl | 152 | * @function setupShowSmallMapsControl |
349 | 153 | * @param {String} div_id the CSS3 id of the div that controls the map. | 153 | * @param {String} div_id the CSS3 id of the div that controls the map. |
350 | 154 | */ | 154 | */ |
352 | 155 | mapping.setupShowSmallMapsControl = function (div_id) { | 155 | module.setupShowSmallMapsControl = function (div_id) { |
353 | 156 | var show_small_maps = Y.lp.launchpad_views.get('small_maps'); | 156 | var show_small_maps = Y.lp.launchpad_views.get('small_maps'); |
354 | 157 | var checkbox = Y.Node.create( | 157 | var checkbox = Y.Node.create( |
355 | 158 | '<input type="checkbox" name="show_small_maps" />'); | 158 | '<input type="checkbox" name="show_small_maps" />'); |
356 | 159 | checkbox.set( | 159 | checkbox.set( |
357 | 160 | 'checked', show_small_maps); | 160 | 'checked', show_small_maps); |
358 | 161 | checkbox.on( | 161 | checkbox.on( |
360 | 162 | 'click', function(e) {mapping.toggleShowSmallMaps(checkbox);}); | 162 | 'click', function(e) {module.toggleShowSmallMaps(checkbox);}); |
361 | 163 | var label_text = Y.Node.create('Display map'); | 163 | var label_text = Y.Node.create('Display map'); |
362 | 164 | var label = Y.Node.create('<label></label>'); | 164 | var label = Y.Node.create('<label></label>'); |
363 | 165 | label.appendChild(checkbox); | 165 | label.appendChild(checkbox); |
364 | @@ -167,7 +167,7 @@ | |||
365 | 167 | var action_div = Y.one(div_id); | 167 | var action_div = Y.one(div_id); |
366 | 168 | action_div.appendChild(label); | 168 | action_div.appendChild(label); |
367 | 169 | if (!show_small_maps) { | 169 | if (!show_small_maps) { |
369 | 170 | mapping.toggleShowSmallMaps(checkbox); | 170 | module.toggleShowSmallMaps(checkbox); |
370 | 171 | } | 171 | } |
371 | 172 | }; | 172 | }; |
372 | 173 | 173 | ||
373 | @@ -180,7 +180,7 @@ | |||
374 | 180 | * @param {Number} center_lng a GLatLng.lng bounded number. | 180 | * @param {Number} center_lng a GLatLng.lng bounded number. |
375 | 181 | * @return {GMap2} the Google map | 181 | * @return {GMap2} the Google map |
376 | 182 | */ | 182 | */ |
378 | 183 | mapping.getSmallMap = function(div_id, center_lat, center_lng) { | 183 | module.getSmallMap = function(div_id, center_lat, center_lng) { |
379 | 184 | var mapdiv = Y.DOM.byId(div_id); | 184 | var mapdiv = Y.DOM.byId(div_id); |
380 | 185 | mapdiv.style.width = '400px'; | 185 | mapdiv.style.width = '400px'; |
381 | 186 | var map = new GMap2(mapdiv); | 186 | var map = new GMap2(mapdiv); |
382 | @@ -197,12 +197,12 @@ | |||
383 | 197 | * @param {Number} center_lat a GLatLng.lat bounded number. | 197 | * @param {Number} center_lat a GLatLng.lat bounded number. |
384 | 198 | * @param {Number} center_lng a GLatLng.lng bounded number. | 198 | * @param {Number} center_lng a GLatLng.lng bounded number. |
385 | 199 | */ | 199 | */ |
388 | 200 | mapping.renderPersonMapSmall = function(center_lat, center_lng) { | 200 | module.renderPersonMapSmall = function(center_lat, center_lng) { |
389 | 201 | mapping.setupShowSmallMapsControl('#person_map_actions'); | 201 | module.setupShowSmallMapsControl('#person_map_actions'); |
390 | 202 | if (!gBrowserIsCompatible()) { | 202 | if (!gBrowserIsCompatible()) { |
391 | 203 | return; | 203 | return; |
392 | 204 | } | 204 | } |
394 | 205 | var map = mapping.getSmallMap( | 205 | var map = module.getSmallMap( |
395 | 206 | 'person_map_div', center_lat, center_lng); | 206 | 'person_map_div', center_lat, center_lng); |
396 | 207 | map.addControl(new GSmallZoomControl()); | 207 | map.addControl(new GSmallZoomControl()); |
397 | 208 | var center = new GLatLng(center_lat, center_lng); | 208 | var center = new GLatLng(center_lat, center_lng); |
398 | @@ -218,15 +218,15 @@ | |||
399 | 218 | * @param {Number} center_lat a GLatLng.lat bounded number. | 218 | * @param {Number} center_lat a GLatLng.lat bounded number. |
400 | 219 | * @param {Number} center_lng a GLatLng.lng bounded number. | 219 | * @param {Number} center_lng a GLatLng.lng bounded number. |
401 | 220 | */ | 220 | */ |
404 | 221 | mapping.renderTeamMapSmall = function(center_lat, center_lng) { | 221 | module.renderTeamMapSmall = function(center_lat, center_lng) { |
405 | 222 | mapping.setupShowSmallMapsControl('#team_map_actions'); | 222 | module.setupShowSmallMapsControl('#team_map_actions'); |
406 | 223 | if (!gBrowserIsCompatible()) { | 223 | if (!gBrowserIsCompatible()) { |
407 | 224 | return; | 224 | return; |
408 | 225 | } | 225 | } |
410 | 226 | var team_map = mapping.getSmallMap( | 226 | var team_map = module.getSmallMap( |
411 | 227 | 'team_map_div', center_lat, center_lng); | 227 | 'team_map_div', center_lat, center_lng); |
412 | 228 | gDownloadUrl("+mapdataltd", function(data) { | 228 | gDownloadUrl("+mapdataltd", function(data) { |
414 | 229 | mapping.setMarkersInfoWindowForSmallMap(data, team_map); | 229 | module.setMarkersInfoWindowForSmallMap(data, team_map); |
415 | 230 | }); | 230 | }); |
416 | 231 | }; | 231 | }; |
417 | 232 | 232 | ||
418 | @@ -237,7 +237,7 @@ | |||
419 | 237 | * @param {String} div_id the id of the map div. | 237 | * @param {String} div_id the id of the map div. |
420 | 238 | * @return {GMap2} The Google map | 238 | * @return {GMap2} The Google map |
421 | 239 | */ | 239 | */ |
423 | 240 | mapping.getLargeMap = function(div_id) { | 240 | module.getLargeMap = function(div_id) { |
424 | 241 | var mapdiv = Y.DOM.byId(div_id); | 241 | var mapdiv = Y.DOM.byId(div_id); |
425 | 242 | var mapheight = (parseInt(mapdiv.offsetWidth, 10) / 16 * 9); | 242 | var mapheight = (parseInt(mapdiv.offsetWidth, 10) / 16 * 9); |
426 | 243 | mapheight = Math.min(mapheight, Y.DOM.winHeight() - 180); | 243 | mapheight = Math.min(mapheight, Y.DOM.winHeight() - 180); |
427 | @@ -276,12 +276,12 @@ | |||
428 | 276 | * @param {Number} center_lat a GLatLng.lat bounded number. | 276 | * @param {Number} center_lat a GLatLng.lat bounded number. |
429 | 277 | * @param {Number} center_lng a GLatLng.lng bounded number. | 277 | * @param {Number} center_lng a GLatLng.lng bounded number. |
430 | 278 | */ | 278 | */ |
432 | 279 | mapping.renderTeamMap = function(min_lat, max_lat, min_lng, max_lng, | 279 | module.renderTeamMap = function(min_lat, max_lat, min_lng, max_lng, |
433 | 280 | center_lat, center_lng) { | 280 | center_lat, center_lng) { |
434 | 281 | if (!gBrowserIsCompatible()) { | 281 | if (!gBrowserIsCompatible()) { |
435 | 282 | return; | 282 | return; |
436 | 283 | } | 283 | } |
438 | 284 | var team_map = mapping.getLargeMap("team_map_div"); | 284 | var team_map = module.getLargeMap("team_map_div"); |
439 | 285 | var center = new GLatLng(center_lat, center_lng); | 285 | var center = new GLatLng(center_lat, center_lng); |
440 | 286 | team_map.setCenter(center, 0); | 286 | team_map.setCenter(center, 0); |
441 | 287 | var sw = new GLatLng(min_lat, min_lng); | 287 | var sw = new GLatLng(min_lat, min_lng); |
442 | @@ -294,7 +294,7 @@ | |||
443 | 294 | G_HYBRID_MAP.getMaximumResolution(), zoom_level - 1); | 294 | G_HYBRID_MAP.getMaximumResolution(), zoom_level - 1); |
444 | 295 | team_map.setZoom(zoom_level); | 295 | team_map.setZoom(zoom_level); |
445 | 296 | gDownloadUrl("+mapdata", function(data) { | 296 | gDownloadUrl("+mapdata", function(data) { |
447 | 297 | mapping.setMarkersInfoWindow(data, team_map); | 297 | module.setMarkersInfoWindow(data, team_map); |
448 | 298 | }); | 298 | }); |
449 | 299 | }; | 299 | }; |
450 | 300 | 300 | ||
451 | @@ -314,13 +314,13 @@ | |||
452 | 314 | * @param {number} zoom the initial zoom-level. | 314 | * @param {number} zoom the initial zoom-level. |
453 | 315 | * @param {Boolean} show_marker Show the marker for the person. | 315 | * @param {Boolean} show_marker Show the marker for the person. |
454 | 316 | */ | 316 | */ |
456 | 317 | mapping.renderPersonMap = function(center_lat, center_lng, displayname, | 317 | module.renderPersonMap = function(center_lat, center_lng, displayname, |
457 | 318 | name, logo_html, geoname, lat_name, | 318 | name, logo_html, geoname, lat_name, |
458 | 319 | lng_name, tz_name, zoom, show_marker) { | 319 | lng_name, tz_name, zoom, show_marker) { |
459 | 320 | if (!gBrowserIsCompatible()) { | 320 | if (!gBrowserIsCompatible()) { |
460 | 321 | return; | 321 | return; |
461 | 322 | } | 322 | } |
463 | 323 | var map = mapping.getLargeMap('map_div'); | 323 | var map = module.getLargeMap('map_div'); |
464 | 324 | var center = new GLatLng(center_lat, center_lng); | 324 | var center = new GLatLng(center_lat, center_lng); |
465 | 325 | map.setCenter(center, zoom); | 325 | map.setCenter(center, zoom); |
466 | 326 | var marker = new GMarker(center, {draggable: true}); | 326 | var marker = new GMarker(center, {draggable: true}); |
467 | @@ -333,7 +333,7 @@ | |||
468 | 333 | 333 | ||
469 | 334 | GEvent.addListener(marker, "dragend", function() { | 334 | GEvent.addListener(marker, "dragend", function() { |
470 | 335 | var point = marker.getLatLng(); | 335 | var point = marker.getLatLng(); |
472 | 336 | mapping.setLocation( | 336 | module.setLocation( |
473 | 337 | point.lat(), point.lng(), geoname, | 337 | point.lat(), point.lng(), geoname, |
474 | 338 | tz_name, lat_name, lng_name); | 338 | tz_name, lat_name, lng_name); |
475 | 339 | }); | 339 | }); |
476 | @@ -357,7 +357,7 @@ | |||
477 | 357 | marker.show(); | 357 | marker.show(); |
478 | 358 | map.panTo(point); | 358 | map.panTo(point); |
479 | 359 | } | 359 | } |
481 | 360 | mapping.setLocation( | 360 | module.setLocation( |
482 | 361 | point.lat(), point.lng(), geoname, | 361 | point.lat(), point.lng(), geoname, |
483 | 362 | tz_name, lat_name, lng_name); | 362 | tz_name, lat_name, lng_name); |
484 | 363 | }); | 363 | }); |
485 | 364 | 364 | ||
486 | === modified file 'lib/canonical/launchpad/javascript/lp/picker.js' | |||
487 | --- lib/canonical/launchpad/javascript/lp/picker.js 2010-01-29 10:52:58 +0000 | |||
488 | +++ lib/canonical/launchpad/javascript/lp/picker.js 2010-02-12 16:34:16 +0000 | |||
489 | @@ -2,7 +2,7 @@ | |||
490 | 2 | 2 | ||
491 | 3 | Y.log('loading lp.picker'); | 3 | Y.log('loading lp.picker'); |
492 | 4 | 4 | ||
494 | 5 | Y.namespace('lp.picker'); | 5 | var module = Y.namespace('lp.picker'); |
495 | 6 | 6 | ||
496 | 7 | var BATCH_SIZE = 6; | 7 | var BATCH_SIZE = 6; |
497 | 8 | var MAX_BATCHES = 20; | 8 | var MAX_BATCHES = 20; |
498 | @@ -24,7 +24,7 @@ | |||
499 | 24 | * config.step_title overrides the subtitle. | 24 | * config.step_title overrides the subtitle. |
500 | 25 | * description strings. | 25 | * description strings. |
501 | 26 | */ | 26 | */ |
503 | 27 | Y.lp.picker.addPickerPatcher = function ( | 27 | module.addPickerPatcher = function ( |
504 | 28 | vocabulary, resource_uri, attribute_name, | 28 | vocabulary, resource_uri, attribute_name, |
505 | 29 | content_box_id, show_remove_button, show_assign_me_button, config) { | 29 | content_box_id, show_remove_button, show_assign_me_button, config) { |
506 | 30 | 30 | ||
507 | @@ -151,7 +151,7 @@ | |||
508 | 151 | }; | 151 | }; |
509 | 152 | 152 | ||
510 | 153 | config.save = save; | 153 | config.save = save; |
512 | 154 | var picker = Y.lp.picker.create(vocabulary, config); | 154 | var picker = module.create(vocabulary, config); |
513 | 155 | picker._resource_uri = resource_uri; | 155 | picker._resource_uri = resource_uri; |
514 | 156 | var extra_buttons = Y.Node.create( | 156 | var extra_buttons = Y.Node.create( |
515 | 157 | '<div style="text-align: center; height: 3em; ' + | 157 | '<div style="text-align: center; height: 3em; ' + |
516 | @@ -200,7 +200,7 @@ | |||
517 | 200 | * config.save is a Function (optional) which takes | 200 | * config.save is a Function (optional) which takes |
518 | 201 | * a single string argument. | 201 | * a single string argument. |
519 | 202 | */ | 202 | */ |
521 | 203 | Y.lp.picker.create = function (vocabulary, config) { | 203 | module.create = function (vocabulary, config) { |
522 | 204 | if (Y.UA.ie) { | 204 | if (Y.UA.ie) { |
523 | 205 | return; | 205 | return; |
524 | 206 | } | 206 | } |
525 | 207 | 207 | ||
526 | === modified file 'lib/canonical/launchpad/javascript/registry/milestoneoverlay.js' | |||
527 | --- lib/canonical/launchpad/javascript/registry/milestoneoverlay.js 2009-11-24 09:30:01 +0000 | |||
528 | +++ lib/canonical/launchpad/javascript/registry/milestoneoverlay.js 2010-02-12 16:34:16 +0000 | |||
529 | @@ -3,12 +3,12 @@ | |||
530 | 3 | * | 3 | * |
531 | 4 | * A milestone form overlay that can create a milestone within any page. | 4 | * A milestone form overlay that can create a milestone within any page. |
532 | 5 | * | 5 | * |
534 | 6 | * @module Y.lp.milestoneoverlay | 6 | * @module Y.registry.milestoneoverlay |
535 | 7 | * @requires dom, node, io-base, lazr.anim, lazr.formoverlay | 7 | * @requires dom, node, io-base, lazr.anim, lazr.formoverlay |
536 | 8 | */ | 8 | */ |
540 | 9 | YUI.add('lp.milestoneoverlay', function(Y) { | 9 | YUI.add('registry.milestoneoverlay', function(Y) { |
541 | 10 | Y.log('loading lp.milestoneoverlay'); | 10 | Y.log('loading registry.milestoneoverlay'); |
542 | 11 | var milestoneoverlay = Y.namespace('lp.milestoneoverlay'); | 11 | var module = Y.namespace('registry.milestoneoverlay'); |
543 | 12 | 12 | ||
544 | 13 | var milestone_form; | 13 | var milestone_form; |
545 | 14 | var milestone_form_uri; | 14 | var milestone_form_uri; |
546 | @@ -96,7 +96,7 @@ | |||
547 | 96 | * next_step is the function to be called after | 96 | * next_step is the function to be called after |
548 | 97 | * the milestone is created. | 97 | * the milestone is created. |
549 | 98 | */ | 98 | */ |
551 | 99 | milestoneoverlay.attach_widget = function(config) { | 99 | module.attach_widget = function(config) { |
552 | 100 | if (Y.UA.ie) { | 100 | if (Y.UA.ie) { |
553 | 101 | return; | 101 | return; |
554 | 102 | } | 102 | } |
555 | 103 | 103 | ||
556 | === renamed file 'lib/canonical/launchpad/javascript/registry/milestone_table.js' => 'lib/canonical/launchpad/javascript/registry/milestonetable.js' | |||
557 | --- lib/canonical/launchpad/javascript/registry/milestone_table.js 2009-11-25 18:16:41 +0000 | |||
558 | +++ lib/canonical/launchpad/javascript/registry/milestonetable.js 2010-02-12 16:34:16 +0000 | |||
559 | @@ -1,13 +1,21 @@ | |||
563 | 1 | YUI.add('lp.milestonetable', function(Y) { | 1 | /* Copyright 2010 Canonical Ltd. This software is licensed under the |
564 | 2 | Y.log('loading lp.milestonetable'); | 2 | * GNU Affero General Public License version 3 (see the file LICENSE). |
565 | 3 | var self = Y.namespace('lp.milestonetable'); | 3 | * |
566 | 4 | * Dynamically add milestones to an HTML table. | ||
567 | 5 | * | ||
568 | 6 | * @module Y.registry.milestonetable | ||
569 | 7 | * @requires node, io-base, substitute, lazr.anim | ||
570 | 8 | */ | ||
571 | 9 | YUI.add('registry.milestonetable', function(Y) { | ||
572 | 10 | Y.log('loading registry.milestonetable'); | ||
573 | 11 | var module = Y.namespace('registry.milestonetable'); | ||
574 | 4 | 12 | ||
575 | 5 | // get_milestone_row() needs these when it is called. Other methods | 13 | // get_milestone_row() needs these when it is called. Other methods |
576 | 6 | // should get this information passed as an argument. | 14 | // should get this information passed as an argument. |
579 | 7 | self._milestone_row_uri_template = null; | 15 | module._milestone_row_uri_template = null; |
580 | 8 | self._tbody = null; | 16 | module._tbody = null; |
581 | 9 | 17 | ||
583 | 10 | self._prepend_node = function(parent_node, child_node) { | 18 | module._prepend_node = function(parent_node, child_node) { |
584 | 11 | // Add the child_node to the parent_node as the first item. | 19 | // Add the child_node to the parent_node as the first item. |
585 | 12 | var children = parent_node.get('children'); | 20 | var children = parent_node.get('children'); |
586 | 13 | if (children === null) { | 21 | if (children === null) { |
587 | @@ -17,13 +25,13 @@ | |||
588 | 17 | } | 25 | } |
589 | 18 | }; | 26 | }; |
590 | 19 | 27 | ||
592 | 20 | self._ensure_table_is_seen = function(tbody) { | 28 | module._ensure_table_is_seen = function(tbody) { |
593 | 21 | // Remove the 'unseen' class from the table to ensure it is visible. | 29 | // Remove the 'unseen' class from the table to ensure it is visible. |
594 | 22 | table = tbody.ancestor(); | 30 | table = tbody.ancestor(); |
595 | 23 | table.removeClass('unseen'); | 31 | table.removeClass('unseen'); |
596 | 24 | }; | 32 | }; |
597 | 25 | 33 | ||
599 | 26 | self._clear_add_handlers = function(data) { | 34 | module._clear_add_handlers = function(data) { |
600 | 27 | // Detach the callback and errorback functions from the Y.io events. | 35 | // Detach the callback and errorback functions from the Y.io events. |
601 | 28 | // The data has been used. If they are not detached, there will be | 36 | // The data has been used. If they are not detached, there will be |
602 | 29 | // multiple adds for each use of the Create milestone link. | 37 | // multiple adds for each use of the Create milestone link. |
603 | @@ -31,36 +39,36 @@ | |||
604 | 31 | data.failure_handle.detach(); | 39 | data.failure_handle.detach(); |
605 | 32 | }; | 40 | }; |
606 | 33 | 41 | ||
608 | 34 | self._on_add_success = function(id, response, data) { | 42 | module._on_add_success = function(id, response, data) { |
609 | 35 | // Add the milestone to the milestone table on Y.io success. | 43 | // Add the milestone to the milestone table on Y.io success. |
610 | 36 | var row = Y.Node.create(Y.Lang.trim(response.responseText)); | 44 | var row = Y.Node.create(Y.Lang.trim(response.responseText)); |
613 | 37 | self._ensure_table_is_seen(data.tbody); | 45 | module._ensure_table_is_seen(data.tbody); |
614 | 38 | self._prepend_node(data.tbody, row); | 46 | module._prepend_node(data.tbody, row); |
615 | 39 | Y.lazr.anim.green_flash({node: row}).run(); | 47 | Y.lazr.anim.green_flash({node: row}).run(); |
617 | 40 | self._clear_add_handlers(data); | 48 | module._clear_add_handlers(data); |
618 | 41 | }; | 49 | }; |
619 | 42 | 50 | ||
621 | 43 | self._on_add_failure = function(id, response, data) { | 51 | module._on_add_failure = function(id, response, data) { |
622 | 44 | // Add the failure message to the milestone table on Y.io failure. | 52 | // Add the failure message to the milestone table on Y.io failure. |
623 | 45 | var row = Y.Node.create(Y.substitute( | 53 | var row = Y.Node.create(Y.substitute( |
624 | 46 | '<tr><td colspan="0">' + | 54 | '<tr><td colspan="0">' + |
625 | 47 | 'Could not retrieve milestone {name}</td></tr>', data)); | 55 | 'Could not retrieve milestone {name}</td></tr>', data)); |
628 | 48 | self._ensure_table_is_seen(data.tbody); | 56 | module._ensure_table_is_seen(data.tbody); |
629 | 49 | self._prepend_node(data.tbody, row); | 57 | module._prepend_node(data.tbody, row); |
630 | 50 | Y.lazr.anim.red_flash({node: row}).run(); | 58 | Y.lazr.anim.red_flash({node: row}).run(); |
632 | 51 | self._clear_add_handlers(data); | 59 | module._clear_add_handlers(data); |
633 | 52 | }; | 60 | }; |
634 | 53 | 61 | ||
636 | 54 | self._setup_milestone_event_data = function(parameters, tbody) { | 62 | module._setup_milestone_event_data = function(parameters, tbody) { |
637 | 55 | // Attach the callback to the Y.io event and return their data | 63 | // Attach the callback to the Y.io event and return their data |
638 | 56 | var data = { | 64 | var data = { |
639 | 57 | name: parameters.name, | 65 | name: parameters.name, |
640 | 58 | tbody: tbody | 66 | tbody: tbody |
641 | 59 | }; | 67 | }; |
642 | 60 | data.success_handle = Y.on( | 68 | data.success_handle = Y.on( |
644 | 61 | 'io:success', self._on_add_success, this, data); | 69 | 'io:success', module._on_add_success, this, data); |
645 | 62 | data.failure_handle = Y.on( | 70 | data.failure_handle = Y.on( |
647 | 63 | 'io:failure', self._on_add_failure, this, data); | 71 | 'io:failure', module._on_add_failure, this, data); |
648 | 64 | return data; | 72 | return data; |
649 | 65 | }; | 73 | }; |
650 | 66 | 74 | ||
651 | @@ -73,24 +81,24 @@ | |||
652 | 73 | * @param {Object} parameters Object literal of config name/value pairs. | 81 | * @param {Object} parameters Object literal of config name/value pairs. |
653 | 74 | * The form parameters that were submitted to create the milestone. | 82 | * The form parameters that were submitted to create the milestone. |
654 | 75 | */ | 83 | */ |
657 | 76 | self.get_milestone_row = function(parameters) { | 84 | module.get_milestone_row = function(parameters) { |
658 | 77 | self._setup_milestone_event_data(parameters, self._tbody); | 85 | module._setup_milestone_event_data(parameters, module._tbody); |
659 | 78 | var milestone_row_uri = Y.substitute( | 86 | var milestone_row_uri = Y.substitute( |
661 | 79 | self._milestone_row_uri_template, parameters); | 87 | module._milestone_row_uri_template, parameters); |
662 | 80 | Y.io(milestone_row_uri); | 88 | Y.io(milestone_row_uri); |
663 | 81 | }; | 89 | }; |
664 | 82 | 90 | ||
665 | 83 | /** | 91 | /** |
666 | 84 | * Setup the URL to get the milestone and the table it will be added too. | 92 | * Setup the URL to get the milestone and the table it will be added too. |
667 | 85 | * | 93 | * |
669 | 86 | * @method get_milestone_row | 94 | * @method setup |
670 | 87 | * @param {Object} parameters Object literal of config name/value pairs. | 95 | * @param {Object} parameters Object literal of config name/value pairs. |
671 | 88 | * config.milestone_row_uri_template is the Y.substitute template | 96 | * config.milestone_row_uri_template is the Y.substitute template |
672 | 89 | * that is used to create the URL to get the milestone row. | 97 | * that is used to create the URL to get the milestone row. |
673 | 90 | * config.milestone_rows_id is the id the the tbody that the | 98 | * config.milestone_rows_id is the id the the tbody that the |
674 | 91 | * milestone row will be added too. | 99 | * milestone row will be added too. |
675 | 92 | */ | 100 | */ |
677 | 93 | self.setup = function(config) { | 101 | module.setup = function(config) { |
678 | 94 | if (config === undefined) { | 102 | if (config === undefined) { |
679 | 95 | throw new Error( | 103 | throw new Error( |
680 | 96 | "Missing setup config for milestonetable."); | 104 | "Missing setup config for milestonetable."); |
681 | @@ -100,9 +108,9 @@ | |||
682 | 100 | throw new Error( | 108 | throw new Error( |
683 | 101 | "Undefined properties in setup config for milestonetable."); | 109 | "Undefined properties in setup config for milestonetable."); |
684 | 102 | } | 110 | } |
688 | 103 | self._milestone_row_uri_template = config.milestone_row_uri_template; | 111 | module._milestone_row_uri_template = config.milestone_row_uri_template; |
689 | 104 | self._tbody = Y.one(config.milestone_rows_id); | 112 | module._tbody = Y.one(config.milestone_rows_id); |
690 | 105 | if (self._tbody === null) { | 113 | if (module._tbody === null) { |
691 | 106 | throw new Error( | 114 | throw new Error( |
692 | 107 | Y.substitute("'{milestone_rows_id}' not in page.", config)); | 115 | Y.substitute("'{milestone_rows_id}' not in page.", config)); |
693 | 108 | } | 116 | } |
694 | 109 | 117 | ||
695 | === modified file 'lib/canonical/launchpad/javascript/registry/tests/milestone_table.html' | |||
696 | --- lib/canonical/launchpad/javascript/registry/tests/milestone_table.html 2009-09-14 15:03:45 +0000 | |||
697 | +++ lib/canonical/launchpad/javascript/registry/tests/milestone_table.html 2010-02-12 16:34:16 +0000 | |||
698 | @@ -4,15 +4,15 @@ | |||
699 | 4 | <title>Launchpad milestonetable</title> | 4 | <title>Launchpad milestonetable</title> |
700 | 5 | 5 | ||
701 | 6 | <!-- YUI 3.0 Setup --> | 6 | <!-- YUI 3.0 Setup --> |
703 | 7 | <script type="text/javascript" src="../../../icing/yui/current/build/yui/yui.js"></script> | 7 | <script type="text/javascript" src="../../../icing/yui/yui/yui.js"></script> |
704 | 8 | <script type="text/javascript" src="../../../icing/lazr/build/lazr.js"></script> | 8 | <script type="text/javascript" src="../../../icing/lazr/build/lazr.js"></script> |
708 | 9 | <link rel="stylesheet" href="../../../icing/yui/current/build/cssreset/reset.css"/> | 9 | <link rel="stylesheet" href="../../../icing/yui/cssreset/reset.css"/> |
709 | 10 | <link rel="stylesheet" href="../../../icing/yui/current/build/cssfonts/fonts.css"/> | 10 | <link rel="stylesheet" href="../../../icing/yui/cssfonts/fonts.css"/> |
710 | 11 | <link rel="stylesheet" href="../../../icing/yui/current/build/cssbase/base.css"/> | 11 | <link rel="stylesheet" href="../../../icing/yui/cssbase/base.css"/> |
711 | 12 | <link rel="stylesheet" href="../../test.css" /> | 12 | <link rel="stylesheet" href="../../test.css" /> |
712 | 13 | 13 | ||
713 | 14 | <!-- The module under test --> | 14 | <!-- The module under test --> |
715 | 15 | <script type="text/javascript" src="../milestone_table.js"></script> | 15 | <script type="text/javascript" src="../milestonetable.js"></script> |
716 | 16 | 16 | ||
717 | 17 | <!-- The test suite --> | 17 | <!-- The test suite --> |
718 | 18 | <script type="text/javascript" src="test_milestone_table.js"></script> | 18 | <script type="text/javascript" src="test_milestone_table.js"></script> |
719 | 19 | 19 | ||
720 | === modified file 'lib/canonical/launchpad/javascript/registry/tests/test_milestone_table.js' | |||
721 | --- lib/canonical/launchpad/javascript/registry/tests/test_milestone_table.js 2009-11-25 19:21:59 +0000 | |||
722 | +++ lib/canonical/launchpad/javascript/registry/tests/test_milestone_table.js 2010-02-12 16:34:16 +0000 | |||
723 | @@ -1,11 +1,11 @@ | |||
724 | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ |
725 | 2 | 2 | ||
726 | 3 | YUI({ | 3 | YUI({ |
728 | 4 | base: '../../../icing/yui/current/build/', | 4 | base: '../../../icing/yui/', |
729 | 5 | filter: 'raw', combine: false | 5 | filter: 'raw', combine: false |
731 | 6 | }).use('test', 'console', 'lp.milestonetable', function(Y) { | 6 | }).use('test', 'console', 'registry.milestonetable', function(Y) { |
732 | 7 | 7 | ||
734 | 8 | var milestonetable = Y.lp.milestonetable; | 8 | var milestonetable = Y.registry.milestonetable; |
735 | 9 | var suite = new Y.Test.Suite("milestonetable Tests"); | 9 | var suite = new Y.Test.Suite("milestonetable Tests"); |
736 | 10 | 10 | ||
737 | 11 | suite.add(new Y.Test.Case({ | 11 | suite.add(new Y.Test.Case({ |
738 | 12 | 12 | ||
739 | === modified file 'lib/canonical/launchpad/javascript/registry/tests/timeline-iframe.html' | |||
740 | --- lib/canonical/launchpad/javascript/registry/tests/timeline-iframe.html 2009-10-08 22:52:35 +0000 | |||
741 | +++ lib/canonical/launchpad/javascript/registry/tests/timeline-iframe.html 2010-02-12 16:34:16 +0000 | |||
742 | @@ -4,10 +4,10 @@ | |||
743 | 4 | <title>Launchpad TimelineGraph Widget</title> | 4 | <title>Launchpad TimelineGraph Widget</title> |
744 | 5 | 5 | ||
745 | 6 | <!-- YUI 3.0 Setup --> | 6 | <!-- YUI 3.0 Setup --> |
750 | 7 | <script type="text/javascript" src="../../../icing/yui/current/build/yui/yui.js"></script> | 7 | <script type="text/javascript" src="../../../icing/yui/yui/yui.js"></script> |
751 | 8 | <link rel="stylesheet" href="../../../icing/yui/current/build/cssreset/reset.css"/> | 8 | <link rel="stylesheet" href="../../../icing/yui/cssreset/reset.css"/> |
752 | 9 | <link rel="stylesheet" href="../../../icing/yui/current/build/cssfonts/fonts.css"/> | 9 | <link rel="stylesheet" href="../../../icing/yui/cssfonts/fonts.css"/> |
753 | 10 | <link rel="stylesheet" href="../../../icing/yui/current/build/cssbase/base.css"/> | 10 | <link rel="stylesheet" href="../../../icing/yui/cssbase/base.css"/> |
754 | 11 | 11 | ||
755 | 12 | <!-- The module under test --> | 12 | <!-- The module under test --> |
756 | 13 | <script type="text/javascript" src="../timeline.js"></script> | 13 | <script type="text/javascript" src="../timeline.js"></script> |
757 | 14 | 14 | ||
758 | === modified file 'lib/canonical/launchpad/javascript/registry/tests/timeline.html' | |||
759 | --- lib/canonical/launchpad/javascript/registry/tests/timeline.html 2009-07-01 02:25:33 +0000 | |||
760 | +++ lib/canonical/launchpad/javascript/registry/tests/timeline.html 2010-02-12 16:34:16 +0000 | |||
761 | @@ -7,6 +7,7 @@ | |||
762 | 7 | name="timeline-iframe" | 7 | name="timeline-iframe" |
763 | 8 | src="timeline-iframe.html" | 8 | src="timeline-iframe.html" |
764 | 9 | height="100%" | 9 | height="100%" |
766 | 10 | width="100%" /> | 10 | width="100%"> |
767 | 11 | </iframe> | ||
768 | 11 | </body> | 12 | </body> |
769 | 12 | </html> | 13 | </html> |
770 | 13 | 14 | ||
771 | === modified file 'lib/canonical/launchpad/javascript/registry/tests/timeline.js' | |||
772 | --- lib/canonical/launchpad/javascript/registry/tests/timeline.js 2009-11-25 19:21:59 +0000 | |||
773 | +++ lib/canonical/launchpad/javascript/registry/tests/timeline.js 2010-02-12 16:34:16 +0000 | |||
774 | @@ -1,7 +1,7 @@ | |||
775 | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ | 1 | /* Copyright (c) 2009, Canonical Ltd. All rights reserved. */ |
776 | 2 | 2 | ||
777 | 3 | YUI({ | 3 | YUI({ |
779 | 4 | base: '../../../icing/yui/current/build/', | 4 | base: '../../../icing/yui/', |
780 | 5 | filter: 'raw', | 5 | filter: 'raw', |
781 | 6 | combine: false | 6 | combine: false |
782 | 7 | }).use('test', 'console', 'registry.timeline', function(Y) { | 7 | }).use('test', 'console', 'registry.timeline', function(Y) { |
783 | 8 | 8 | ||
784 | === modified file 'lib/lp/app/templates/base-layout-macros.pt' | |||
785 | --- lib/lp/app/templates/base-layout-macros.pt 2010-02-08 18:21:24 +0000 | |||
786 | +++ lib/lp/app/templates/base-layout-macros.pt 2010-02-12 16:34:16 +0000 | |||
787 | @@ -176,6 +176,8 @@ | |||
788 | 176 | <script type="text/javascript" | 176 | <script type="text/javascript" |
789 | 177 | tal:attributes="src string:${lp_js}/registry/milestoneoverlay.js"></script> | 177 | tal:attributes="src string:${lp_js}/registry/milestoneoverlay.js"></script> |
790 | 178 | <script type="text/javascript" | 178 | <script type="text/javascript" |
791 | 179 | tal:attributes="src string:${lp_js}/registry/milestonetable.js"></script> | ||
792 | 180 | <script type="text/javascript" | ||
793 | 179 | tal:attributes="src string:${lp_js}/registry/timeline.js"></script> | 181 | tal:attributes="src string:${lp_js}/registry/timeline.js"></script> |
794 | 180 | <script type="text/javascript" | 182 | <script type="text/javascript" |
795 | 181 | tal:attributes="src string:${lp_js}/sorttable/sorttable.js"></script> | 183 | tal:attributes="src string:${lp_js}/sorttable/sorttable.js"></script> |
796 | 182 | 184 | ||
797 | === modified file 'lib/lp/registry/browser/__init__.py' | |||
798 | --- lib/lp/registry/browser/__init__.py 2009-10-05 16:41:55 +0000 | |||
799 | +++ lib/lp/registry/browser/__init__.py 2010-02-12 16:34:16 +0000 | |||
800 | @@ -101,7 +101,7 @@ | |||
801 | 101 | } | 101 | } |
802 | 102 | return """ | 102 | return """ |
803 | 103 | YUI().use( | 103 | YUI().use( |
805 | 104 | 'node', 'lp.milestoneoverlay', 'lp.milestonetable', | 104 | 'node', 'registry.milestoneoverlay', 'registry.milestonetable', |
806 | 105 | function (Y) { | 105 | function (Y) { |
807 | 106 | 106 | ||
808 | 107 | var series_uri = '%(series_api_uri)s'; | 107 | var series_uri = '%(series_api_uri)s'; |
809 | @@ -116,15 +116,15 @@ | |||
810 | 116 | var config = { | 116 | var config = { |
811 | 117 | milestone_form_uri: milestone_form_uri, | 117 | milestone_form_uri: milestone_form_uri, |
812 | 118 | series_uri: series_uri, | 118 | series_uri: series_uri, |
814 | 119 | next_step: Y.lp.milestonetable.get_milestone_row, | 119 | next_step: Y.registry.milestonetable.get_milestone_row, |
815 | 120 | activate_node: create_milestone_link | 120 | activate_node: create_milestone_link |
816 | 121 | }; | 121 | }; |
818 | 122 | Y.lp.milestoneoverlay.attach_widget(config); | 122 | Y.registry.milestoneoverlay.attach_widget(config); |
819 | 123 | var table_config = { | 123 | var table_config = { |
820 | 124 | milestone_row_uri_template: milestone_row_uri, | 124 | milestone_row_uri_template: milestone_row_uri, |
821 | 125 | milestone_rows_id: milestone_rows_id | 125 | milestone_rows_id: milestone_rows_id |
822 | 126 | } | 126 | } |
824 | 127 | Y.lp.milestonetable.setup(table_config); | 127 | Y.registry.milestonetable.setup(table_config); |
825 | 128 | }); | 128 | }); |
826 | 129 | }); | 129 | }); |
827 | 130 | """ % uris | 130 | """ % uris |
828 | 131 | 131 | ||
829 | === modified file 'lib/lp/registry/browser/tests/productrelease-views.txt' | |||
830 | --- lib/lp/registry/browser/tests/productrelease-views.txt 2010-01-22 03:01:19 +0000 | |||
831 | +++ lib/lp/registry/browser/tests/productrelease-views.txt 2010-02-12 16:34:16 +0000 | |||
832 | @@ -124,7 +124,7 @@ | |||
833 | 124 | >>> script = find_tag_by_id(view.render(), 'milestone-script') | 124 | >>> script = find_tag_by_id(view.render(), 'milestone-script') |
834 | 125 | >>> print script | 125 | >>> print script |
835 | 126 | <script id="milestone-script" type="text/javascript"> | 126 | <script id="milestone-script" type="text/javascript"> |
837 | 127 | LPS.use(... 'lp.milestoneoverlay'... | 127 | LPS.use(... 'registry.milestoneoverlay'... |
838 | 128 | var milestone_form_uri = '.../app/simple/+addmilestone/++form++'; | 128 | var milestone_form_uri = '.../app/simple/+addmilestone/++form++'; |
839 | 129 | var series_uri = '/app/simple'; | 129 | var series_uri = '/app/simple'; |
840 | 130 | ... | 130 | ... |
841 | 131 | 131 | ||
842 | === modified file 'lib/lp/registry/browser/tests/productseries-views.txt' | |||
843 | --- lib/lp/registry/browser/tests/productseries-views.txt 2010-01-20 15:41:25 +0000 | |||
844 | +++ lib/lp/registry/browser/tests/productseries-views.txt 2010-02-12 16:34:16 +0000 | |||
845 | @@ -33,7 +33,7 @@ | |||
846 | 33 | >>> script = find_tag_by_id(view.render(), 'milestone-script') | 33 | >>> script = find_tag_by_id(view.render(), 'milestone-script') |
847 | 34 | >>> print script | 34 | >>> print script |
848 | 35 | <script id="milestone-script" type="text/javascript"> | 35 | <script id="milestone-script" type="text/javascript"> |
850 | 36 | YUI().use(... 'lp.milestoneoverlay', 'lp.milestonetable'... | 36 | YUI().use(... 'registry.milestoneoverlay', 'registry.milestonetable'... |
851 | 37 | var series_uri = '/app/simple'; | 37 | var series_uri = '/app/simple'; |
852 | 38 | var milestone_form_uri = '.../app/simple/+addmilestone/++form++'; | 38 | var milestone_form_uri = '.../app/simple/+addmilestone/++form++'; |
853 | 39 | var milestone_row_uri = | 39 | var milestone_row_uri = |
854 | @@ -43,8 +43,8 @@ | |||
855 | 43 | var create_milestone_link = Y.get( | 43 | var create_milestone_link = Y.get( |
856 | 44 | '.menu-link-create_milestone'); | 44 | '.menu-link-create_milestone'); |
857 | 45 | create_milestone_link.addClass('js-action');... | 45 | create_milestone_link.addClass('js-action');... |
860 | 46 | Y.lp.milestoneoverlay.attach_widget(config);... | 46 | Y.registry.milestoneoverlay.attach_widget(config);... |
861 | 47 | Y.lp.milestonetable.setup(table_config);... | 47 | Y.registry.milestonetable.setup(table_config);... |
862 | 48 | 48 | ||
863 | 49 | If the Create milestone link is not enabled, the script is not present. | 49 | If the Create milestone link is not enabled, the script is not present. |
864 | 50 | 50 | ||
865 | 51 | 51 | ||
866 | === modified file 'lib/lp/registry/templates/distroseries-index.pt' | |||
867 | --- lib/lp/registry/templates/distroseries-index.pt 2009-12-04 00:15:41 +0000 | |||
868 | +++ lib/lp/registry/templates/distroseries-index.pt 2010-02-12 16:34:16 +0000 | |||
869 | @@ -9,9 +9,6 @@ | |||
870 | 9 | <metal:block fill-slot="head_epilogue"> | 9 | <metal:block fill-slot="head_epilogue"> |
871 | 10 | <metal:yui-dependencies | 10 | <metal:yui-dependencies |
872 | 11 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> | 11 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> |
873 | 12 | <script type="text/javascript" | ||
874 | 13 | tal:define="lp_js string:${icingroot}/build" | ||
875 | 14 | tal:attributes="src string:${lp_js}/registry/milestone_table.js"></script> | ||
876 | 15 | <script id="milestone-script" type="text/javascript" | 12 | <script id="milestone-script" type="text/javascript" |
877 | 16 | tal:condition="context/menu:overview/create_milestone/enabled" | 13 | tal:condition="context/menu:overview/create_milestone/enabled" |
878 | 17 | tal:content="view/register_milestone_script"></script> | 14 | tal:content="view/register_milestone_script"></script> |
879 | 18 | 15 | ||
880 | === modified file 'lib/lp/registry/templates/object-timeline-graph.pt' | |||
881 | --- lib/lp/registry/templates/object-timeline-graph.pt 2009-12-19 18:50:39 +0000 | |||
882 | +++ lib/lp/registry/templates/object-timeline-graph.pt 2010-02-12 16:34:16 +0000 | |||
883 | @@ -34,7 +34,7 @@ | |||
884 | 34 | include_inactive = false; | 34 | include_inactive = false; |
885 | 35 | } | 35 | } |
886 | 36 | 36 | ||
888 | 37 | LPS.use('registry.timeline', 'node', function(Y) { | 37 | LPS.use('registry.timeline', 'node', 'lp.dragscroll', function(Y) { |
889 | 38 | Y.on('domready', function(e) { | 38 | Y.on('domready', function(e) { |
890 | 39 | if (Y.UA.ie) { | 39 | if (Y.UA.ie) { |
891 | 40 | return; | 40 | return; |
892 | @@ -88,7 +88,8 @@ | |||
893 | 88 | } | 88 | } |
894 | 89 | }); | 89 | }); |
895 | 90 | 90 | ||
897 | 91 | var drag_scroll_handler = new DragScrollEventHandler(); | 91 | var drag_scroll_handler = |
898 | 92 | new Y.lp.dragscroll.DragScrollEventHandler(); | ||
899 | 92 | drag_scroll_handler.activate(); | 93 | drag_scroll_handler.activate(); |
900 | 93 | }); | 94 | }); |
901 | 94 | }); | 95 | }); |
902 | 95 | 96 | ||
903 | === modified file 'lib/lp/registry/templates/productrelease-add-from-series.pt' | |||
904 | --- lib/lp/registry/templates/productrelease-add-from-series.pt 2009-12-03 18:33:22 +0000 | |||
905 | +++ lib/lp/registry/templates/productrelease-add-from-series.pt 2010-02-12 16:34:16 +0000 | |||
906 | @@ -14,7 +14,7 @@ | |||
907 | 14 | <tal:script | 14 | <tal:script |
908 | 15 | replace="structure | 15 | replace="structure |
909 | 16 | string:<script id='milestone-script' type='text/javascript'>" /> | 16 | string:<script id='milestone-script' type='text/javascript'>" /> |
911 | 17 | LPS.use('node', 'lp.milestoneoverlay', function (Y) { | 17 | LPS.use('node', 'registry.milestoneoverlay', function (Y) { |
912 | 18 | 18 | ||
913 | 19 | // This is a value for the SELECT OPTION which is passed with | 19 | // This is a value for the SELECT OPTION which is passed with |
914 | 20 | // the SELECT's "change" event. It includes some symbols that are not | 20 | // the SELECT's "change" event. It includes some symbols that are not |
915 | @@ -57,7 +57,7 @@ | |||
916 | 57 | activate_node: create_milestone_link | 57 | activate_node: create_milestone_link |
917 | 58 | }; | 58 | }; |
918 | 59 | if (!Y.UA.ie) { | 59 | if (!Y.UA.ie) { |
920 | 60 | Y.lp.milestoneoverlay.attach_widget(config); | 60 | Y.registry.milestoneoverlay.attach_widget(config); |
921 | 61 | } | 61 | } |
922 | 62 | }); | 62 | }); |
923 | 63 | }); | 63 | }); |
924 | 64 | 64 | ||
925 | === modified file 'lib/lp/registry/templates/productseries-index.pt' | |||
926 | --- lib/lp/registry/templates/productseries-index.pt 2009-11-25 18:04:43 +0000 | |||
927 | +++ lib/lp/registry/templates/productseries-index.pt 2010-02-12 16:34:16 +0000 | |||
928 | @@ -11,9 +11,6 @@ | |||
929 | 11 | <metal:block fill-slot="head_epilogue"> | 11 | <metal:block fill-slot="head_epilogue"> |
930 | 12 | <metal:yui-dependencies | 12 | <metal:yui-dependencies |
931 | 13 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> | 13 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> |
932 | 14 | <script type="text/javascript" | ||
933 | 15 | tal:define="lp_js string:${icingroot}/build" | ||
934 | 16 | tal:attributes="src string:${lp_js}/registry/milestone_table.js"></script> | ||
935 | 17 | <script id="milestone-script" type="text/javascript" | 14 | <script id="milestone-script" type="text/javascript" |
936 | 18 | tal:condition="context/menu:overview/create_milestone/enabled" | 15 | tal:condition="context/menu:overview/create_milestone/enabled" |
937 | 19 | tal:content="view/register_milestone_script"></script> | 16 | tal:content="view/register_milestone_script"></script> |
Summary
-------
Fixed conflicts between YUI module names, namespaces, and filenames.
Implementation details ------- ------- -
-------
The DragScrollEvent Handler was declared as a global instead of canonical/ launchpad/ javascript/ lp/dragscroll. js
in a YUI module, since it doesn't any YUI code. For consistency and
to avoid polluting the global namespace, I moved it into a YUI module.
This involved indenting all the code, so I have also provided a separate
diff at the bottom which shows the non-whitespace changes to the file.
lib/
The milestonetable.js file was being loaded by the productseries- index.pt ex.pt files directly instead of the base layout. This lp/app/ templates/ base-layout- macros. pt lp/registry/ templates/ distroseries- index.pt lp/registry/ templates/ productseries- index.pt
and distroseriesind
is bad since it prevents the js files from being combined.
lib/
lib/
lib/
Just renaming modules, namespaces, or files. The yui directory was current/ build to icing/yui a while ago, and canonical/ launchpad/ javascript/ lp/mapping. js canonical/ launchpad/ javascript/ lp/picker. js canonical/ launchpad/ javascript/ registry/ milestoneoverla y.js canonical/ launchpad/ javascript/ registry/ milestonetable. js canonical/ launchpad/ javascript/ registry/ tests/milestone _table. html canonical/ launchpad/ javascript/ registry/ tests/test_ milestone_ table.js canonical/ launchpad/ javascript/ registry/ tests/timeline- iframe. html canonical/ launchpad/ javascript/ registry/ tests/timeline. html canonical/ launchpad/ javascript/ registry/ tests/timeline. js lp/registry/ browser/ __init_ _.py lp/registry/ browser/ tests/productre lease-views. txt lp/registry/ browser/ tests/productse ries-views. txt lp/registry/ templates/ object- timeline- graph.pt lp/registry/ templates/ productrelease- add-from- series. pt
also moved from icing/yui/
these tests had not been run since then, so I fixed that also.
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
Tests
-----
./bin/test -vv --layer RegistryWindmil lLayer /./lib/ canonical/ launchpad/ javascript/ registry/ tests/milestone _table. html /./lib/ canonical/ launchpad/ javascript/ registry/ tests/timeline. html
file://
file://
Demo and Q/A
------------
* Open https:/ /launchpad. dev/firefox /launchpad. dev/firefox/ trunk /launchpad. dev/ubuntu/ warty /launchpad. dev/people/ +me/+editlocati on /bugs.launchpad .dev/bugs/ 3
* Ensure that timeline graph still shows up and that it can be
dragged if you zoom in until it doesn't fit.
* Open https:/
* The "Create milestone" link should bring up a form overlay,
and submitting the form should cause the milestone to appear
in the table with a green flash.
* Open https:/
* Same test as for the firefox/trunk product series.
* Open https:/
* The map should appear and it should be possible to edit the
location.
* Open https:/
* The "Subscribe someone else" link should bring up a working picker.
Dragscroll diff without whitespace ------- ------- ------- ------
-------
=== modified file 'lib/canonical/ launchpad/ javascript/ lp/dragscroll. js' launchpad/ javascript/ lp/dragscroll. js 2009-10-08 17:13:13 +0000 launchpad/ javascrip. ..
--- lib/canonical/
+++ lib/canonical/