Merge lp:~cjwatson/launchpad/eslint-remove-dead-code into lp:launchpad
- eslint-remove-dead-code
- Merge into devel
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | 18429 |
Proposed branch: | lp:~cjwatson/launchpad/eslint-remove-dead-code |
Merge into: | lp:launchpad |
Diff against target: |
1003 lines (+18/-186) 49 files modified
lib/lp/app/javascript/autocomplete/autocomplete.js (+0/-1) lib/lp/app/javascript/choiceedit/choiceedit.js (+0/-1) lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js (+2/-10) lib/lp/app/javascript/client.js (+0/-2) lib/lp/app/javascript/expander.js (+0/-1) lib/lp/app/javascript/formoverlay/formoverlay.js (+0/-2) lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js (+0/-3) lib/lp/app/javascript/indicator/tests/test_indicator.js (+0/-1) lib/lp/app/javascript/inlineedit/editor.js (+1/-6) lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js (+0/-15) lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js (+0/-1) lib/lp/app/javascript/listing_navigator.js (+0/-2) lib/lp/app/javascript/overlay/overlay.js (+1/-2) lib/lp/app/javascript/overlay/tests/test_overlay.js (+2/-3) lib/lp/app/javascript/picker/tests/test_picker.js (+0/-5) lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js (+0/-5) lib/lp/app/javascript/testing/tests/test_mockio.js (+1/-2) lib/lp/app/javascript/tests/test_comment.js (+1/-5) lib/lp/app/javascript/tests/test_information_type.js (+0/-4) lib/lp/app/javascript/tests/test_listing_navigator.js (+0/-1) lib/lp/app/javascript/tests/test_longpoll.js (+0/-1) lib/lp/blueprints/javascript/tests/test_workitems.js (+0/-2) lib/lp/bugs/javascript/bugtask_index.js (+0/-3) lib/lp/bugs/javascript/bugtracker_overlay.js (+0/-1) lib/lp/bugs/javascript/duplicates.js (+0/-1) lib/lp/bugs/javascript/filebug_dupefinder.js (+0/-22) lib/lp/bugs/javascript/tests/test_async_comment_loading.js (+1/-3) lib/lp/bugs/javascript/tests/test_duplicates.js (+0/-1) lib/lp/bugs/javascript/tests/test_me_too.js (+2/-3) lib/lp/bugs/javascript/tests/test_official_bug_tags.js (+0/-1) lib/lp/bugs/javascript/tests/test_subscription.js (+0/-16) lib/lp/code/javascript/branch.information_type_choice.js (+0/-1) lib/lp/code/javascript/productseries-setbranch.js (+0/-1) lib/lp/code/javascript/tests/test_bugspeclinks.js (+0/-4) lib/lp/registry/javascript/distroseries/differences.js (+1/-2) lib/lp/registry/javascript/distroseries/tests/test_initseries.js (+0/-1) lib/lp/registry/javascript/product_views.js (+0/-1) lib/lp/registry/javascript/sharing/granteetable.js (+0/-1) lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js (+0/-1) lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js (+0/-3) lib/lp/registry/javascript/structural-subscription.js (+0/-3) lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+0/-5) lib/lp/registry/javascript/tests/test_milestone_creation.js (+1/-4) lib/lp/registry/javascript/tests/test_structural_subscription.js (+0/-18) lib/lp/registry/javascript/tests/test_team_mailinglists.js (+2/-4) lib/lp/registry/javascript/timeline.js (+0/-2) lib/lp/soyuz/javascript/tests/test_archive-packages.html (+1/-1) lib/lp/soyuz/javascript/tests/test_archive-packages.js (+2/-4) lib/lp/translations/javascript/sourcepackage_sharing_details.js (+0/-4) |
To merge this branch: | bzr merge lp:~cjwatson/launchpad/eslint-remove-dead-code |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | Approve | ||
Review via email: mp+327892@code.launchpad.net |
Commit message
Remove lots of dead JavaScript code spotted by ESLint.
Description of the change
To post a comment you must log in.
Revision history for this message
William Grant (wgrant) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/app/javascript/autocomplete/autocomplete.js' |
2 | --- lib/lp/app/javascript/autocomplete/autocomplete.js 2013-03-20 03:41:40 +0000 |
3 | +++ lib/lp/app/javascript/autocomplete/autocomplete.js 2017-07-21 16:50:14 +0000 |
4 | @@ -428,7 +428,6 @@ |
5 | // is indexed by the start of the match. |
6 | |
7 | var midx; |
8 | - var match_key; |
9 | var match_string; |
10 | var start_indicies = []; |
11 | |
12 | |
13 | === modified file 'lib/lp/app/javascript/choiceedit/choiceedit.js' |
14 | --- lib/lp/app/javascript/choiceedit/choiceedit.js 2013-03-20 03:41:40 +0000 |
15 | +++ lib/lp/app/javascript/choiceedit/choiceedit.js 2017-07-21 16:50:14 +0000 |
16 | @@ -20,7 +20,6 @@ |
17 | C_NULLTEXTLOCATION = 'nulltext', |
18 | C_ADDICON = 'addicon', |
19 | SAVE = 'save', |
20 | - LEFT_MOUSE_BUTTON = 1, |
21 | RENDERUI = "renderUI", |
22 | BINDUI = "bindUI", |
23 | SYNCUI = "syncUI", |
24 | |
25 | === modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js' |
26 | --- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2013-04-09 07:20:39 +0000 |
27 | +++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2017-07-21 16:50:14 +0000 |
28 | @@ -5,9 +5,8 @@ |
29 | var tests = Y.namespace('lp.choiceedit.test'); |
30 | tests.suite = new Y.Test.Suite('choiceedit tests'); |
31 | |
32 | - // Local aliases |
33 | - var Assert = Y.Assert, |
34 | - ArrayAssert = Y.ArrayAssert; |
35 | + // Local alias. |
36 | + var Assert = Y.Assert; |
37 | |
38 | /* |
39 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
40 | @@ -172,7 +171,6 @@ |
41 | |
42 | test_choicelist_html_has_disabled: function() { |
43 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
44 | - var configcount = this.config.items.length; |
45 | var choicelist_lis = Y.one(document).all(".yui3-ichoicelist li"); |
46 | // confirm that disabled LIs are disabled |
47 | var that = this; |
48 | @@ -193,7 +191,6 @@ |
49 | |
50 | test_choicelist_html_has_current: function() { |
51 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
52 | - var configcount = this.config.items.length; |
53 | var choicelist_lis = Y.one(document).all(".yui3-ichoicelist li"); |
54 | // confirm that current value has an LI with current style |
55 | var that = this; |
56 | @@ -221,7 +218,6 @@ |
57 | |
58 | test_clicking_choicelist_item_fires_signal: function() { |
59 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
60 | - var that = this; |
61 | var fired = false; |
62 | this.choice_edit._choice_list.on("valueChosen", function() { |
63 | fired = true; |
64 | @@ -236,7 +232,6 @@ |
65 | |
66 | test_clicking_choicelist_item_does_green_flash: function() { |
67 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
68 | - var that = this; |
69 | var green_flash = Y.lp.anim.green_flash; |
70 | var flashed = false; |
71 | Y.lp.anim.green_flash = function() { |
72 | @@ -381,7 +376,6 @@ |
73 | |
74 | test_choicelist_html_has_current: function() { |
75 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
76 | - var configcount = this.config.items.length; |
77 | var choicelist_lis = Y.one(document) |
78 | .all(".yui3-ichoicelist li"); |
79 | |
80 | @@ -481,8 +475,6 @@ |
81 | }, |
82 | |
83 | test_action_icon: function() { |
84 | - var that = this; |
85 | - |
86 | Assert.areEqual( |
87 | this.null_choice_edit.get('actionicon'), |
88 | this.null_choice_edit.get('addicon'), |
89 | |
90 | === modified file 'lib/lp/app/javascript/client.js' |
91 | --- lib/lp/app/javascript/client.js 2017-07-20 13:29:41 +0000 |
92 | +++ lib/lp/app/javascript/client.js 2017-07-21 16:50:14 +0000 |
93 | @@ -610,7 +610,6 @@ |
94 | this.lp_client = client; |
95 | this.uri = uri; |
96 | this.dirty_attributes = []; |
97 | - var entry = this; |
98 | |
99 | // Copy the representation keys into our own set of attributes, and add |
100 | // an attribute-change event listener for caching purposes. |
101 | @@ -1106,7 +1105,6 @@ |
102 | // widget in a clean state. |
103 | this.doBefore("_saveData", this.doPATCH); |
104 | |
105 | - var self = this; |
106 | this.error_handler = new Y.lp.client.ErrorHandler(); |
107 | this.error_handler.clearProgressUI = function () { |
108 | config.host._uiClearWaiting(); |
109 | |
110 | === modified file 'lib/lp/app/javascript/expander.js' |
111 | --- lib/lp/app/javascript/expander.js 2017-07-20 13:29:41 +0000 |
112 | +++ lib/lp/app/javascript/expander.js 2017-07-21 16:50:14 +0000 |
113 | @@ -255,7 +255,6 @@ |
114 | */ |
115 | foldContentNode: function(expand, no_animation) { |
116 | var expander = this; |
117 | - var has_paused = false; |
118 | if (no_animation === true || Y.Lang.isUndefined(this._animation)) { |
119 | // Make the animation have the proper direction set from |
120 | // the start. |
121 | |
122 | === modified file 'lib/lp/app/javascript/formoverlay/formoverlay.js' |
123 | --- lib/lp/app/javascript/formoverlay/formoverlay.js 2014-01-30 15:04:06 +0000 |
124 | +++ lib/lp/app/javascript/formoverlay/formoverlay.js 2017-07-21 16:50:14 +0000 |
125 | @@ -18,7 +18,6 @@ |
126 | var ns = Y.namespace("lp.ui"); |
127 | var getCN = Y.ClassNameManager.getClassName, |
128 | NAME = 'lazr-formoverlay', |
129 | - CONTENT_BOX = 'contentBox', |
130 | RENDERUI = "renderUI", |
131 | BINDUI = "bindUI"; |
132 | |
133 | @@ -470,7 +469,6 @@ |
134 | var select_idx; |
135 | var num_options; |
136 | var option; |
137 | - var option_value; |
138 | |
139 | // Iterate over the form elements collection to construct the |
140 | // label-value pairs. |
141 | |
142 | === modified file 'lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js' |
143 | --- lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js 2013-03-20 03:41:40 +0000 |
144 | +++ lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js 2017-07-21 16:50:14 +0000 |
145 | @@ -109,7 +109,6 @@ |
146 | this.form_overlay.hide(); |
147 | first_input.blur(); |
148 | |
149 | - var test = this; |
150 | var focused = false; |
151 | |
152 | var onFocus = function(e) { |
153 | @@ -366,7 +365,6 @@ |
154 | }); |
155 | |
156 | var event_was_propagated = false; |
157 | - var test = this; |
158 | var onSubmit = function(e) { |
159 | event_was_propagated = true; |
160 | e.preventDefault(); |
161 | @@ -389,7 +387,6 @@ |
162 | }); |
163 | |
164 | var event_was_propagated = false; |
165 | - var test = this; |
166 | var onSubmit = function(e) { |
167 | event_was_propagated = true; |
168 | e.preventDefault(); |
169 | |
170 | === modified file 'lib/lp/app/javascript/indicator/tests/test_indicator.js' |
171 | --- lib/lp/app/javascript/indicator/tests/test_indicator.js 2017-01-13 13:32:06 +0000 |
172 | +++ lib/lp/app/javascript/indicator/tests/test_indicator.js 2017-07-21 16:50:14 +0000 |
173 | @@ -66,7 +66,6 @@ |
174 | }); |
175 | this.indicator.render(); |
176 | var content = this.indicator.get('boundingBox'); |
177 | - var test = content.getContent(); |
178 | var img = content.one('img'); |
179 | Assert.areEqual('file:///@@/spinner-big', img.get('src')); |
180 | }, |
181 | |
182 | === modified file 'lib/lp/app/javascript/inlineedit/editor.js' |
183 | --- lib/lp/app/javascript/inlineedit/editor.js 2013-12-12 04:47:30 +0000 |
184 | +++ lib/lp/app/javascript/inlineedit/editor.js 2017-07-21 16:50:14 +0000 |
185 | @@ -63,11 +63,7 @@ |
186 | C_ERROR_HIDDEN = getCN(EDITOR, 'errors', HIDDEN), |
187 | |
188 | SAVE = 'save', |
189 | - CANCEL = 'cancel', |
190 | - SHRINK = 'shrink'; |
191 | - |
192 | -// To strip the 'px' unit suffix off widget sizes. |
193 | -var strip_px = /px$/; |
194 | + CANCEL = 'cancel'; |
195 | |
196 | var InlineEditor = function() { |
197 | InlineEditor.superclass.constructor.apply(this, arguments); |
198 | @@ -723,7 +719,6 @@ |
199 | |
200 | // hook up the resizing textarea to handle those changes |
201 | var cfg = this.cfg; |
202 | - var input = this.get(INPUT_EL); |
203 | var that = this; |
204 | |
205 | if (!this.get(MULTILINE)) { |
206 | |
207 | === modified file 'lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js' |
208 | --- lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js 2013-03-20 03:41:40 +0000 |
209 | +++ lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js 2017-07-21 16:50:14 +0000 |
210 | @@ -26,19 +26,6 @@ |
211 | ].join(''); |
212 | |
213 | |
214 | - /* Helper to stamp a Node with an ID attribute. Needed for YUI 2.X |
215 | - * testing, which is heavily ID-based. |
216 | - * |
217 | - * Returns the node's 'id' attribute. |
218 | - */ |
219 | - function id_for(node) { |
220 | - if (!node.getAttribute('id')) { |
221 | - var id = Y.stamp(node); |
222 | - node.setAttribute('id', id); |
223 | - } |
224 | - return node.getAttribute('id'); |
225 | - } |
226 | - |
227 | /* |
228 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
229 | * CSS selectors and Node instances instead of raw nodes. |
230 | @@ -290,7 +277,6 @@ |
231 | this.editor.render(); |
232 | |
233 | var input = this.editor.get('input_field'), |
234 | - test = this, |
235 | focused = false; |
236 | |
237 | Y.on('focus', function() { |
238 | @@ -323,7 +309,6 @@ |
239 | // empty string. |
240 | input.set('value', ''); |
241 | |
242 | - var test = this; |
243 | // Add our focus event listener. |
244 | Y.on('focus', function() { |
245 | got_focus = true; |
246 | |
247 | === modified file 'lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js' |
248 | --- lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js 2013-03-20 03:41:40 +0000 |
249 | +++ lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js 2017-07-21 16:50:14 +0000 |
250 | @@ -5,7 +5,6 @@ |
251 | |
252 | var tests = Y.namespace('lp.app.inlinehelp.test'); |
253 | tests.suite = new Y.Test.Suite('InlineHelp Tests'); |
254 | - var Assert = Y.Assert; |
255 | tests.suite.add(new Y.Test.Case({ |
256 | name: 'inlinehelp.init_help', |
257 | |
258 | |
259 | === modified file 'lib/lp/app/javascript/listing_navigator.js' |
260 | --- lib/lp/app/javascript/listing_navigator.js 2012-09-12 01:45:17 +0000 |
261 | +++ lib/lp/app/javascript/listing_navigator.js 2017-07-21 16:50:14 +0000 |
262 | @@ -181,8 +181,6 @@ |
263 | */ |
264 | default_history_changed: function(e) { |
265 | if (e.newVal.hasOwnProperty('batch_key')) { |
266 | - var batch_key = e.newVal.batch_key; |
267 | - var batch = this.get('batches')[batch_key]; |
268 | this.pre_fetch_batches(); |
269 | this.render(); |
270 | this._bindUI(); |
271 | |
272 | === modified file 'lib/lp/app/javascript/overlay/overlay.js' |
273 | --- lib/lp/app/javascript/overlay/overlay.js 2013-03-20 03:41:40 +0000 |
274 | +++ lib/lp/app/javascript/overlay/overlay.js 2017-07-21 16:50:14 +0000 |
275 | @@ -11,8 +11,7 @@ |
276 | |
277 | var ns = Y.namespace('lp.ui'); |
278 | |
279 | -var ESCAPE = 27, |
280 | - TAB = 9, |
281 | +var TAB = 9, |
282 | CANCEL = 'cancel', |
283 | BOUNDING_BOX = 'boundingBox', |
284 | CONTENT_BOX = 'contentBox', |
285 | |
286 | === modified file 'lib/lp/app/javascript/overlay/tests/test_overlay.js' |
287 | --- lib/lp/app/javascript/overlay/tests/test_overlay.js 2013-03-20 03:41:40 +0000 |
288 | +++ lib/lp/app/javascript/overlay/tests/test_overlay.js 2017-07-21 16:50:14 +0000 |
289 | @@ -9,9 +9,8 @@ |
290 | // KeyCode for escape |
291 | var ESCAPE = 27; |
292 | |
293 | - // Local aliases |
294 | - var Assert = Y.Assert, |
295 | - ArrayAssert = Y.ArrayAssert; |
296 | + // Local alias. |
297 | + var Assert = Y.Assert; |
298 | |
299 | /* |
300 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
301 | |
302 | === modified file 'lib/lp/app/javascript/picker/tests/test_picker.js' |
303 | --- lib/lp/app/javascript/picker/tests/test_picker.js 2014-05-19 11:33:05 +0000 |
304 | +++ lib/lp/app/javascript/picker/tests/test_picker.js 2017-07-21 16:50:14 +0000 |
305 | @@ -456,7 +456,6 @@ |
306 | |
307 | test_results_updates_display_with_missing_data: function () { |
308 | this.picker.render(); |
309 | - var image_url = '../../ui/assets/skins/sam/search.png'; |
310 | this.picker.set('results', [ |
311 | { value: 'jschmo', title: 'Joe Schmo' } |
312 | ]); |
313 | @@ -942,7 +941,6 @@ |
314 | ]); |
315 | this.picker.render(); |
316 | |
317 | - var bb = this.picker.get('boundingBox'); |
318 | var event_has_fired = false; |
319 | this.picker.subscribe('search', function(e) { |
320 | event_has_fired = true; |
321 | @@ -965,7 +963,6 @@ |
322 | ]); |
323 | this.picker.render(); |
324 | |
325 | - var bb = this.picker.get('boundingBox'); |
326 | Assert.areEqual( |
327 | 0, this.picker.get('selected_batch'), |
328 | "First batch should be selected."); |
329 | @@ -1065,7 +1062,6 @@ |
330 | this.picker.set('selected_batch', 1); |
331 | this.picker.render(); |
332 | |
333 | - var bb = this.picker.get('boundingBox'); |
334 | simulate( |
335 | this.picker.get('boundingBox'), '.lazr-next.lazr-btn', 'click'); |
336 | Assert.areEqual( |
337 | @@ -1104,7 +1100,6 @@ |
338 | this.picker.set('selected_batch', 1); |
339 | this.picker.render(); |
340 | |
341 | - var bb = this.picker.get('boundingBox'); |
342 | simulate( |
343 | this.picker.get('boundingBox'), '.lazr-prev.lazr-btn', 'click'); |
344 | Assert.areEqual( |
345 | |
346 | === modified file 'lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js' |
347 | --- lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js 2013-03-20 03:41:40 +0000 |
348 | +++ lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js 2017-07-21 16:50:14 +0000 |
349 | @@ -1799,11 +1799,6 @@ |
350 | test_loadSubscribers_failure: function() { |
351 | // On failure to load, activity indication is set to an error |
352 | // message received from the server. |
353 | - var details = [ |
354 | - { subscriber: { name: "subscriber" }, |
355 | - subscription_level: 'Level3' } |
356 | - ]; |
357 | - |
358 | var loader = setUpLoader(this.root); |
359 | |
360 | // Mock lp_client for testing erroring out with 'BOOM'. |
361 | |
362 | === modified file 'lib/lp/app/javascript/testing/tests/test_mockio.js' |
363 | --- lib/lp/app/javascript/testing/tests/test_mockio.js 2013-03-20 03:41:40 +0000 |
364 | +++ lib/lp/app/javascript/testing/tests/test_mockio.js 2017-07-21 16:50:14 +0000 |
365 | @@ -121,8 +121,7 @@ |
366 | var mockio = this._make_mockio(); |
367 | var response = new Y.lp.testing.mockio.MockHttpResponse(); |
368 | var expected_header_key = "X-My-Header", |
369 | - expected_header_val = "MyHeaderValue", |
370 | - response_headers = {}; |
371 | + expected_header_val = "MyHeaderValue"; |
372 | response.setResponseHeader( |
373 | expected_header_key, |
374 | expected_header_val); |
375 | |
376 | === modified file 'lib/lp/app/javascript/tests/test_comment.js' |
377 | --- lib/lp/app/javascript/tests/test_comment.js 2013-03-20 03:41:40 +0000 |
378 | +++ lib/lp/app/javascript/tests/test_comment.js 2017-07-21 16:50:14 +0000 |
379 | @@ -52,17 +52,13 @@ |
380 | var comment = this._get_mocked_comment(); |
381 | var progress_ui_called = false; |
382 | var post_comment_called = false; |
383 | - var extra_call_called = false; |
384 | comment.activateProgressUI = function () { |
385 | progress_ui_called = true; |
386 | }; |
387 | comment.post_comment = function () { |
388 | post_comment_called = true; |
389 | }; |
390 | - comment._add_comment_success = function () { |
391 | - extra_call_called = true; |
392 | - }; |
393 | - comment.validate = function () { return true }; |
394 | + comment.validate = function () { return true; }; |
395 | var mock_event = { halt: function () {} }; |
396 | |
397 | comment.add_comment(mock_event); |
398 | |
399 | === modified file 'lib/lp/app/javascript/tests/test_information_type.js' |
400 | --- lib/lp/app/javascript/tests/test_information_type.js 2013-03-20 03:41:40 +0000 |
401 | +++ lib/lp/app/javascript/tests/test_information_type.js 2017-07-21 16:50:14 +0000 |
402 | @@ -130,10 +130,6 @@ |
403 | // A successful save updates the subscribers portlet. |
404 | test_save_success_with_subscribers_data: function() { |
405 | this.makeWidget(); |
406 | - var flag = false; |
407 | - Y.on('test:banner:hide', function() { |
408 | - flag = true; |
409 | - }); |
410 | var summary = Y.one('#information-type-summary'); |
411 | summary.replaceClass('public', 'private'); |
412 | |
413 | |
414 | === modified file 'lib/lp/app/javascript/tests/test_listing_navigator.js' |
415 | --- lib/lp/app/javascript/tests/test_listing_navigator.js 2013-03-20 03:41:40 +0000 |
416 | +++ lib/lp/app/javascript/tests/test_listing_navigator.js 2017-07-21 16:50:14 +0000 |
417 | @@ -723,7 +723,6 @@ |
418 | * batch if Navigator.get('pre_fetch') is false. |
419 | */ |
420 | test_pre_fetch_disabled: function() { |
421 | - var last_url; |
422 | var navigator = this.get_pre_fetch_navigator({target: this.target}); |
423 | navigator.pre_fetch_batches(); |
424 | Y.Assert.areSame(null, navigator.get('io_provider').last_request); |
425 | |
426 | === modified file 'lib/lp/app/javascript/tests/test_longpoll.js' |
427 | --- lib/lp/app/javascript/tests/test_longpoll.js 2013-03-20 03:41:40 +0000 |
428 | +++ lib/lp/app/javascript/tests/test_longpoll.js 2017-07-21 16:50:14 +0000 |
429 | @@ -3,7 +3,6 @@ |
430 | YUI.add('lp.longpoll.test', function (Y) { |
431 | var longpoll = Y.lp.app.longpoll; |
432 | |
433 | - var suite = new Y.Test.Suite("longpoll Tests"); |
434 | var tests = Y.namespace('lp.longpoll.test'); |
435 | tests.suite = new Y.Test.Suite('longpoll Tests'); |
436 | |
437 | |
438 | === modified file 'lib/lp/blueprints/javascript/tests/test_workitems.js' |
439 | --- lib/lp/blueprints/javascript/tests/test_workitems.js 2012-10-26 10:00:20 +0000 |
440 | +++ lib/lp/blueprints/javascript/tests/test_workitems.js 2017-07-21 16:50:14 +0000 |
441 | @@ -29,7 +29,6 @@ |
442 | _all_expanders_are_closed: function(){ |
443 | var found_open = false; |
444 | Y.all('.collapsible-body').each(function(e) { |
445 | - found_collapsible_body = true; |
446 | if (!e.hasClass('hidden')) |
447 | { |
448 | found_open = true; |
449 | @@ -42,7 +41,6 @@ |
450 | _all_expanders_are_open: function(){ |
451 | var found_closed = false; |
452 | Y.all('.collapsible-body').each(function(e) { |
453 | - found_collapsible_body = true; |
454 | if (e.hasClass('hidden')) |
455 | { |
456 | found_closed = true; |
457 | |
458 | === modified file 'lib/lp/bugs/javascript/bugtask_index.js' |
459 | --- lib/lp/bugs/javascript/bugtask_index.js 2012-11-12 13:45:58 +0000 |
460 | +++ lib/lp/bugs/javascript/bugtask_index.js 2017-07-21 16:50:14 +0000 |
461 | @@ -1004,9 +1004,6 @@ |
462 | namespace.load_more_comments = function(batched_comments_url, |
463 | comments_container, |
464 | io_provider) { |
465 | - var spinner = Y.Node.create( |
466 | - '<img src="/@@/spinner" style="text_align: center; ' + |
467 | - 'display: none" />'); |
468 | var spinner_span = Y.one('#more-comments-spinner'); |
469 | spinner_span.setStyle('display', 'inline'); |
470 | var handlers = { |
471 | |
472 | === modified file 'lib/lp/bugs/javascript/bugtracker_overlay.js' |
473 | --- lib/lp/bugs/javascript/bugtracker_overlay.js 2012-09-10 18:44:11 +0000 |
474 | +++ lib/lp/bugs/javascript/bugtracker_overlay.js 2017-07-21 16:50:14 +0000 |
475 | @@ -38,7 +38,6 @@ |
476 | on: { |
477 | success: finish_new_bugtracker, |
478 | failure: function (ignore, response, args) { |
479 | - var error_box = Y.one('#bugtracker-error'); |
480 | var error_message = response.statusText + '\n\n' + |
481 | response.responseText; |
482 | bugtracker_form.showError(error_message); |
483 | |
484 | === modified file 'lib/lp/bugs/javascript/duplicates.js' |
485 | --- lib/lp/bugs/javascript/duplicates.js 2013-04-09 05:05:39 +0000 |
486 | +++ lib/lp/bugs/javascript/duplicates.js 2017-07-21 16:50:14 +0000 |
487 | @@ -322,7 +322,6 @@ |
488 | * @private |
489 | */ |
490 | _submit_bug: function(new_dup_id, new_dupe_title, widget) { |
491 | - var dupe_span = this.get('dupe_span'); |
492 | var new_dup_url = null; |
493 | |
494 | var qs; |
495 | |
496 | === modified file 'lib/lp/bugs/javascript/filebug_dupefinder.js' |
497 | --- lib/lp/bugs/javascript/filebug_dupefinder.js 2012-09-10 20:52:27 +0000 |
498 | +++ lib/lp/bugs/javascript/filebug_dupefinder.js 2017-07-21 16:50:14 +0000 |
499 | @@ -10,11 +10,8 @@ |
500 | |
501 | var BLOCK = 'block', |
502 | DISPLAY = 'display', |
503 | - EXPANDER_COLLAPSED = '/@@/treeCollapsed', |
504 | - EXPANDER_EXPANDED = '/@@/treeExpanded', |
505 | INNER_HTML = 'innerHTML', |
506 | NONE = 'none', |
507 | - SRC = 'src', |
508 | HIDDEN = 'hidden'; |
509 | |
510 | var namespace = Y.namespace('lp.bugs.filebug_dupefinder'); |
511 | @@ -56,25 +53,6 @@ |
512 | '<button type="button" name="field.actions.cancel">Choose Again</button>'; |
513 | |
514 | /** |
515 | - * Return the relevant duplicate-details div for a bug-already-reported |
516 | - * expander. |
517 | - * @param expander The expander for which to return the relevant div. |
518 | - */ |
519 | -function get_details_div(expander) { |
520 | - var details_div = expander.get( |
521 | - 'parentNode').get('parentNode').one('.duplicate-details'); |
522 | - |
523 | - // Check that the details_div actually exists and raise an error if |
524 | - // we can't find it. |
525 | - if (!Y.Lang.isValue(details_div)) { |
526 | - Y.fail( |
527 | - "Unable to find details div for expander " + expander.get('id')); |
528 | - } else { |
529 | - return details_div; |
530 | - } |
531 | -} |
532 | - |
533 | -/** |
534 | * Show the bug reporting form and collapse all bug details forms. |
535 | */ |
536 | function show_bug_reporting_form() { |
537 | |
538 | === modified file 'lib/lp/bugs/javascript/tests/test_async_comment_loading.js' |
539 | --- lib/lp/bugs/javascript/tests/test_async_comment_loading.js 2013-03-20 03:41:40 +0000 |
540 | +++ lib/lp/bugs/javascript/tests/test_async_comment_loading.js 2017-07-21 16:50:14 +0000 |
541 | @@ -4,10 +4,8 @@ |
542 | YUI.add('lp.bugs.async_comments.test', function (Y) { |
543 | |
544 | // Local aliases. |
545 | - var Assert = Y.Assert, |
546 | - ArrayAssert = Y.ArrayAssert; |
547 | + var Assert = Y.Assert; |
548 | var module = Y.lp.bugs.bugtask_index; |
549 | - var suite = new Y.Test.Suite("Async comment loading tests"); |
550 | |
551 | var comments_markup = |
552 | "<div>This is a comment</div>" + |
553 | |
554 | === modified file 'lib/lp/bugs/javascript/tests/test_duplicates.js' |
555 | --- lib/lp/bugs/javascript/tests/test_duplicates.js 2013-03-20 03:41:40 +0000 |
556 | +++ lib/lp/bugs/javascript/tests/test_duplicates.js 2017-07-21 16:50:14 +0000 |
557 | @@ -187,7 +187,6 @@ |
558 | test_picker_form_submission_failure: function() { |
559 | this.widget = this._createWidget(false); |
560 | this._assert_dupe_submission(3); |
561 | - var failure_called = false; |
562 | this.mockio.respond({ |
563 | status: 400, |
564 | responseText: |
565 | |
566 | === modified file 'lib/lp/bugs/javascript/tests/test_me_too.js' |
567 | --- lib/lp/bugs/javascript/tests/test_me_too.js 2013-03-20 03:41:40 +0000 |
568 | +++ lib/lp/bugs/javascript/tests/test_me_too.js 2017-07-21 16:50:14 +0000 |
569 | @@ -2,9 +2,8 @@ |
570 | * GNU Affero General Public License version 3 (see the file LICENSE). */ |
571 | |
572 | YUI.add('lp.bugs.bugtask_index.test_me_too', function (Y) { |
573 | - // Local aliases |
574 | - var Assert = Y.Assert, |
575 | - ArrayAssert = Y.ArrayAssert; |
576 | + // Local alias. |
577 | + var Assert = Y.Assert; |
578 | |
579 | /* |
580 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
581 | |
582 | === modified file 'lib/lp/bugs/javascript/tests/test_official_bug_tags.js' |
583 | --- lib/lp/bugs/javascript/tests/test_official_bug_tags.js 2013-03-20 03:41:40 +0000 |
584 | +++ lib/lp/bugs/javascript/tests/test_official_bug_tags.js 2017-07-21 16:50:14 +0000 |
585 | @@ -42,7 +42,6 @@ |
586 | new_tag_button.simulate('click'); |
587 | var message_overlay = Y.one('.official-tag-error-message'); |
588 | Y.Assert.isNotNull(message_overlay); |
589 | - var tag = message_overlay.one(".official-tag-error-message-value"); |
590 | Y.Assert.isTrue(message_overlay.get('text').indexOf('me!') !== -1); |
591 | } |
592 | })); |
593 | |
594 | === modified file 'lib/lp/bugs/javascript/tests/test_subscription.js' |
595 | --- lib/lp/bugs/javascript/tests/test_subscription.js 2013-03-20 03:41:40 +0000 |
596 | +++ lib/lp/bugs/javascript/tests/test_subscription.js 2017-07-21 16:50:14 +0000 |
597 | @@ -2680,14 +2680,6 @@ |
598 | }; |
599 | module.show_subscription_description(this.config); |
600 | // Simulated return values from the named_post call. |
601 | - var sub = { |
602 | - bug: { |
603 | - 'private': false, |
604 | - security_related: false |
605 | - }, |
606 | - principal_is_reporter: false, |
607 | - subscription: {bug_notification_level: 'Details'} |
608 | - }; |
609 | module._lp_client.named_post.args = []; |
610 | // Before clicking on the link the direct |
611 | // subscription count is 3. |
612 | @@ -2713,14 +2705,6 @@ |
613 | }; |
614 | module.show_subscription_description(this.config); |
615 | // Simulated return values from the named_post call. |
616 | - var sub = { |
617 | - bug: { |
618 | - 'private': false, |
619 | - security_related: false |
620 | - }, |
621 | - principal_is_reporter: false, |
622 | - subscription: {bug_notification_level: 'Details'} |
623 | - }; |
624 | module._lp_client.named_post.args = []; |
625 | // Before clicking on the link the direct subscription count |
626 | // is 3. |
627 | |
628 | === modified file 'lib/lp/code/javascript/branch.information_type_choice.js' |
629 | --- lib/lp/code/javascript/branch.information_type_choice.js 2015-06-04 17:13:54 +0000 |
630 | +++ lib/lp/code/javascript/branch.information_type_choice.js 2017-07-21 16:50:14 +0000 |
631 | @@ -8,7 +8,6 @@ |
632 | |
633 | var namespace = Y.namespace('lp.code.branch.information_type_choice'); |
634 | var information_type = Y.namespace('lp.app.information_type'); |
635 | -var superclass = Y.Widget; |
636 | |
637 | namespace.BranchInformationTypeWidget = Y.Base.create( |
638 | "branchInformationTypeWidget", Y.Widget, [], { |
639 | |
640 | === modified file 'lib/lp/code/javascript/productseries-setbranch.js' |
641 | --- lib/lp/code/javascript/productseries-setbranch.js 2016-11-11 14:22:40 +0000 |
642 | +++ lib/lp/code/javascript/productseries-setbranch.js 2017-07-21 16:50:14 +0000 |
643 | @@ -79,7 +79,6 @@ |
644 | module.onclick_rcs_type = function(e) { |
645 | /* Which rcs type radio button has been selected? */ |
646 | // CVS |
647 | - var rcs_types = module._rcs_types(); |
648 | var selectedRCS = module._get_selected_rcs(); |
649 | module.set_enabled('field.cvs_module', selectedRCS === 'CVS'); |
650 | }; |
651 | |
652 | === modified file 'lib/lp/code/javascript/tests/test_bugspeclinks.js' |
653 | --- lib/lp/code/javascript/tests/test_bugspeclinks.js 2017-04-24 14:23:36 +0000 |
654 | +++ lib/lp/code/javascript/tests/test_bugspeclinks.js 2017-07-21 16:50:14 +0000 |
655 | @@ -224,10 +224,6 @@ |
656 | // The link bug success function works as expected. |
657 | test_link_bug_success: function() { |
658 | this.widget = this._createWidget(); |
659 | - var data = { |
660 | - self_link: 'api/devel/bugs/1'}; |
661 | - var new_bug_entry = new Y.lp.client.Entry( |
662 | - this.lp_client, data, data.self_link); |
663 | var link_html = '<div id="buglink-3"></div>'; |
664 | this.widget._link_bug_success(3, link_html); |
665 | Y.Assert.areEqual( |
666 | |
667 | === modified file 'lib/lp/registry/javascript/distroseries/differences.js' |
668 | --- lib/lp/registry/javascript/distroseries/differences.js 2012-09-10 18:44:11 +0000 |
669 | +++ lib/lp/registry/javascript/distroseries/differences.js 2017-07-21 16:50:14 +0000 |
670 | @@ -14,7 +14,6 @@ |
671 | |
672 | var namespace = Y.namespace('lp.registry.distroseries.differences'), |
673 | testspace = Y.namespace('lp.registry.distroseries.differences.test'), |
674 | - formwidgets = Y.lp.app.formwidgets, |
675 | widgets = Y.lp.registry.distroseries.widgets; |
676 | |
677 | var PACKAGESET_FIELD = "field.packageset", |
678 | @@ -287,6 +286,6 @@ |
679 | |
680 | |
681 | }, "0.1", {"requires": [ |
682 | - "lp.ui.formoverlay", "lp.app.formwidgets", |
683 | + "lp.ui.formoverlay", |
684 | "lp.app.picker", "lp.registry.distroseries.widgets", |
685 | "node", "querystring-parse"]}); |
686 | |
687 | === modified file 'lib/lp/registry/javascript/distroseries/tests/test_initseries.js' |
688 | --- lib/lp/registry/javascript/distroseries/tests/test_initseries.js 2014-07-21 22:45:01 +0000 |
689 | +++ lib/lp/registry/javascript/distroseries/tests/test_initseries.js 2017-07-21 16:50:14 +0000 |
690 | @@ -18,7 +18,6 @@ |
691 | |
692 | var suite = new Y.Test.Suite("distroseries.initseries Tests"); |
693 | var initseries = Y.lp.registry.distroseries.initseries; |
694 | - var widgets = Y.lp.registry.distroseries.widgets; |
695 | |
696 | var testDeriveDistroSeriesActionsWidget = { |
697 | name: 'TestDeriveDistroSeriesActionsWidget', |
698 | |
699 | === modified file 'lib/lp/registry/javascript/product_views.js' |
700 | --- lib/lp/registry/javascript/product_views.js 2015-10-01 17:32:41 +0000 |
701 | +++ lib/lp/registry/javascript/product_views.js 2017-07-21 16:50:14 +0000 |
702 | @@ -168,7 +168,6 @@ |
703 | // Additional spice for the insanity stew is given by the |
704 | // rhino book, page 428. This code is basically a rip and |
705 | // remix of those two texts. |
706 | - var event = e || window.event; |
707 | var code = e.charCode || e.keyCode; |
708 | |
709 | if (/* Check for special characters. */ |
710 | |
711 | === modified file 'lib/lp/registry/javascript/sharing/granteetable.js' |
712 | --- lib/lp/registry/javascript/sharing/granteetable.js 2013-04-19 02:35:16 +0000 |
713 | +++ lib/lp/registry/javascript/sharing/granteetable.js 2017-07-21 16:50:14 +0000 |
714 | @@ -408,7 +408,6 @@ |
715 | return false; |
716 | } |
717 | Y.some(right, function(sharing_value, info_type) { |
718 | - var _value = left[info_type]; |
719 | if (!Y.Lang.isValue(left[info_type])) { |
720 | result = false; |
721 | return true; |
722 | |
723 | === modified file 'lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js' |
724 | --- lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js 2015-10-22 00:13:43 +0000 |
725 | +++ lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js 2017-07-21 16:50:14 +0000 |
726 | @@ -252,7 +252,6 @@ |
727 | this.view = this._create_Widget(); |
728 | this.view.render(); |
729 | var remove_grantee_success_called = false; |
730 | - var self = this; |
731 | this.view.remove_grantee_success = function(person_uri) { |
732 | Y.Assert.areEqual('~fred', person_uri); |
733 | remove_grantee_success_called = true; |
734 | |
735 | === modified file 'lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js' |
736 | --- lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js 2015-10-22 00:13:43 +0000 |
737 | +++ lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js 2017-07-21 16:50:14 +0000 |
738 | @@ -239,7 +239,6 @@ |
739 | }); |
740 | this.view.render(); |
741 | var remove_grant_success_called = false; |
742 | - var self = this; |
743 | this.view.remove_grant_success = function(artifact_uri) { |
744 | Y.Assert.areEqual('api/devel/bugs/2', artifact_uri); |
745 | remove_grant_success_called = true; |
746 | @@ -277,7 +276,6 @@ |
747 | }); |
748 | this.view.render(); |
749 | var remove_grant_success_called = false; |
750 | - var self = this; |
751 | this.view.remove_grant_success = function(artifact_uri) { |
752 | Y.Assert.areEqual( |
753 | 'api/devel/~someone/+junk/somebranch', artifact_uri); |
754 | @@ -316,7 +314,6 @@ |
755 | }); |
756 | this.view.render(); |
757 | var remove_grant_success_called = false; |
758 | - var self = this; |
759 | this.view.remove_grant_success = function(artifact_uri) { |
760 | Y.Assert.areEqual( |
761 | 'api/devel/~someone/+git/somerepo', artifact_uri); |
762 | |
763 | === modified file 'lib/lp/registry/javascript/structural-subscription.js' |
764 | --- lib/lp/registry/javascript/structural-subscription.js 2012-12-13 17:16:39 +0000 |
765 | +++ lib/lp/registry/javascript/structural-subscription.js 2017-07-21 16:50:14 +0000 |
766 | @@ -311,7 +311,6 @@ |
767 | function edit_subscription_handler(context, form_data) { |
768 | var has_errors = check_for_errors_in_overlay( |
769 | namespace._add_subscription_overlay); |
770 | - var filter_id = '#filter-description-'+context.filter_id.toString(); |
771 | var filter_node = Y.one( |
772 | '#subscription-filter-'+context.filter_id.toString()); |
773 | var submit_button = namespace._add_subscription_overlay.bodyNode.one( |
774 | @@ -321,7 +320,6 @@ |
775 | } |
776 | var on = {success: function (new_data) { |
777 | submit_button.replaceClass('spinner', 'lazr-pos'); |
778 | - var description_node = Y.one(filter_id); |
779 | var filter = new_data.getAttrs(); |
780 | fill_filter_description( |
781 | filter_node, context.filter_info, filter); |
782 | @@ -1336,7 +1334,6 @@ |
783 | * Attach activation (click) handlers to all of the edit links on the page. |
784 | */ |
785 | function wire_up_edit_links(config) { |
786 | - var listing = Y.one(config.content_box); |
787 | var subscription_info = LP.cache.subscription_info; |
788 | var filter_id = 0; |
789 | var i; |
790 | |
791 | === modified file 'lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js' |
792 | --- lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2013-04-09 05:05:39 +0000 |
793 | +++ lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2017-07-21 16:50:14 +0000 |
794 | @@ -657,7 +657,6 @@ |
795 | }, |
796 | |
797 | test_clean: function() { |
798 | - var that = this; |
799 | var comment_text = 'Content'; |
800 | this.widget.get('srcNode').one('textarea').set('value', comment_text); |
801 | var comment_entry = new Comment(); |
802 | @@ -779,10 +778,8 @@ |
803 | |
804 | test_add_comment_handler_empty: function() { |
805 | // An empty comment is treated as a mistake. |
806 | - var that = this; |
807 | var comment_text = ''; |
808 | this.widget.get('srcNode').one('textarea').set('value', comment_text); |
809 | - var comment_entry = new Comment(); |
810 | var post_called = false; |
811 | module.lp_client.named_post = function(url, method, config) { |
812 | post_called = true; |
813 | @@ -840,9 +837,7 @@ |
814 | .addClass('FAILED'); |
815 | module.setup_packages_diff_states( |
816 | placeholder.one('.diff-extra-container'), dsd_uri); |
817 | - var func_req; |
818 | module.lp_client.named_post = function(url, func, config) { |
819 | - func_req = func; |
820 | config.on.success(); |
821 | }; |
822 | var wrong_button = placeholder.one('.package-diff-placeholder'); |
823 | |
824 | === modified file 'lib/lp/registry/javascript/tests/test_milestone_creation.js' |
825 | --- lib/lp/registry/javascript/tests/test_milestone_creation.js 2013-04-08 08:06:09 +0000 |
826 | +++ lib/lp/registry/javascript/tests/test_milestone_creation.js 2017-07-21 16:50:14 +0000 |
827 | @@ -44,7 +44,6 @@ |
828 | test_configure: function() { |
829 | // Ensure configuring the module works as it will be needed in |
830 | // subsequent tests. |
831 | - var client = new Y.lp.client.Launchpad({sync: true}); |
832 | var config = { |
833 | milestone_form_uri: 'a', |
834 | series_uri: 'b', |
835 | @@ -68,7 +67,6 @@ |
836 | var data = serverfixture.setup(this, 'setup'); |
837 | |
838 | // Initialize the milestoneoverlay module. |
839 | - var milestone_table = Y.lp.registry.milestonetable; |
840 | var client = new Y.lp.client.Launchpad({sync: true}); |
841 | var config = { |
842 | milestone_form_uri: data.milestone_form_uri, |
843 | @@ -119,7 +117,6 @@ |
844 | var data = serverfixture.setup(this, 'setup'); |
845 | |
846 | // Initialize the milestoneoverlay module. |
847 | - var milestone_table = Y.lp.registry.milestonetable; |
848 | var client = new Y.lp.client.Launchpad({sync: true}); |
849 | var config = { |
850 | milestone_form_uri: data.milestone_form_uri, |
851 | @@ -170,6 +167,6 @@ |
852 | }, '0.1', { |
853 | requires: [ |
854 | 'test', 'lp.client', 'lp.testing.serverfixture', |
855 | - 'lp.registry.milestonetable', 'lp.registry.milestoneoverlay'] |
856 | + 'lp.registry.milestoneoverlay'] |
857 | }); |
858 | |
859 | |
860 | === modified file 'lib/lp/registry/javascript/tests/test_structural_subscription.js' |
861 | --- lib/lp/registry/javascript/tests/test_structural_subscription.js 2013-03-20 03:41:40 +0000 |
862 | +++ lib/lp/registry/javascript/tests/test_structural_subscription.js 2017-07-21 16:50:14 +0000 |
863 | @@ -17,23 +17,6 @@ |
864 | var content_box_name = 'ss-content-box'; |
865 | var content_box_id = '#' + content_box_name; |
866 | |
867 | - var target_link_class = '.menu-link-subscribe_to_bug_mail'; |
868 | - |
869 | - function array_compare(a,b) { |
870 | - if (a.length !== b.length) { |
871 | - return false; |
872 | - } |
873 | - a.sort(); |
874 | - b.sort(); |
875 | - var i; |
876 | - for (i=0; i<a.length; i++) { |
877 | - if (a[i] !== b[i]) { |
878 | - return false; |
879 | - } |
880 | - } |
881 | - return true; |
882 | - } |
883 | - |
884 | function create_test_node() { |
885 | var test_node = Y.Node.create('<div id="test-content">') |
886 | .append(Y.Node.create('<div></div>') |
887 | @@ -386,7 +369,6 @@ |
888 | // Long titles are cut down. |
889 | module.setup(this.configuration); |
890 | module._show_add_overlay(this.configuration); |
891 | - overlay = Y.one('#accordion-overlay'); |
892 | // This is the title we would expect if there were no shortening. |
893 | var header = Y.one(content_box_id).one('h2').get('text'); |
894 | // The actual title is a prefix of the unabridged title. |
895 | |
896 | === modified file 'lib/lp/registry/javascript/tests/test_team_mailinglists.js' |
897 | --- lib/lp/registry/javascript/tests/test_team_mailinglists.js 2013-03-20 03:41:40 +0000 |
898 | +++ lib/lp/registry/javascript/tests/test_team_mailinglists.js 2017-07-21 16:50:14 +0000 |
899 | @@ -2,10 +2,8 @@ |
900 | * GNU Affero General Public License version 3 (see the file LICENSE). */ |
901 | |
902 | YUI.add('lp.registry.team.mailinglists.test', function (Y) { |
903 | - // Local aliases. |
904 | - var Assert = Y.Assert, |
905 | - ArrayAssert = Y.ArrayAssert; |
906 | - var team_mailinglists = Y.lp.registry.team.mailinglists; |
907 | + // Local alias. |
908 | + var Assert = Y.Assert; |
909 | |
910 | var tests = Y.namespace('lp.registry.team.mailinglists.test'); |
911 | tests.suite = new Y.Test.Suite('lp.registry.team.mailinglists Tests'); |
912 | |
913 | === modified file 'lib/lp/registry/javascript/timeline.js' |
914 | --- lib/lp/registry/javascript/timeline.js 2012-05-12 02:36:41 +0000 |
915 | +++ lib/lp/registry/javascript/timeline.js 2017-07-21 16:50:14 +0000 |
916 | @@ -576,7 +576,6 @@ |
917 | var series_line = this.project_line.series_lines[0]; |
918 | var landmark = series_line.series.landmarks[0]; |
919 | if (landmark) { |
920 | - var landmark_label = series_line.labels[landmark.name]; |
921 | var date_label_width = 0; |
922 | if (series_line.series_date_label !== null) { |
923 | date_label_width = |
924 | @@ -648,7 +647,6 @@ |
925 | // Resizing the canvas requires destroying the old canvas and |
926 | // creating a new one due to rendering issues in WebKit. |
927 | this.calculate_landmark_spacing(); |
928 | - var contentBox = this.get('contentBox'); |
929 | this.recreate_canvas(); |
930 | var dom_canvas = Y.Node.getDOMNode(this.canvas); |
931 | this.canvas_context = dom_canvas.getContext('2d'); |
932 | |
933 | === modified file 'lib/lp/soyuz/javascript/tests/test_archive-packages.html' |
934 | --- lib/lp/soyuz/javascript/tests/test_archive-packages.html 2012-10-26 09:54:28 +0000 |
935 | +++ lib/lp/soyuz/javascript/tests/test_archive-packages.html 2017-07-21 16:50:14 +0000 |
936 | @@ -59,7 +59,7 @@ |
937 | <a class="remove-notification">Remove notification</a> |
938 | </div> |
939 | </script> |
940 | - <script type="text/x-template" id="pending-job-template-no-link"> |
941 | + <script type="text/x-template"> |
942 | <div class="pending-job" job_id="3"> |
943 | </div> |
944 | </script> |
945 | |
946 | === modified file 'lib/lp/soyuz/javascript/tests/test_archive-packages.js' |
947 | --- lib/lp/soyuz/javascript/tests/test_archive-packages.js 2012-01-06 10:15:37 +0000 |
948 | +++ lib/lp/soyuz/javascript/tests/test_archive-packages.js 2017-07-21 16:50:14 +0000 |
949 | @@ -16,8 +16,6 @@ |
950 | var module = Y.lp.soyuz.archive_packages; |
951 | |
952 | var pending_job = Y.one('#pending-job-template').getContent(); |
953 | - var pending_job_no_link = Y.one( |
954 | - '#pending-job-template-no-link').getContent(); |
955 | |
956 | var TestPendingCopyJobWidgetNoLink = { |
957 | name: "TestPendingCopyJobWidgetNoLink", |
958 | @@ -28,8 +26,8 @@ |
959 | .append(Y.Node.create(pending_job)); |
960 | }, |
961 | |
962 | - test_instanciation: function() { |
963 | - // The widget is instanciated even without a link to delete the |
964 | + test_instantiation: function() { |
965 | + // The widget is instantiated even without a link to delete the |
966 | // widget's html. |
967 | var area = Y.one('.pending-job-no-link'); |
968 | this.widget = new module.PendingCopyJobWidget( |
969 | |
970 | === modified file 'lib/lp/translations/javascript/sourcepackage_sharing_details.js' |
971 | --- lib/lp/translations/javascript/sourcepackage_sharing_details.js 2012-09-10 18:44:11 +0000 |
972 | +++ lib/lp/translations/javascript/sourcepackage_sharing_details.js 2017-07-21 16:50:14 +0000 |
973 | @@ -217,7 +217,6 @@ |
974 | |
975 | |
976 | function IOHandler(controller, check, error_handler) { |
977 | - that = this; |
978 | this.check = check; |
979 | this.controller = controller; |
980 | if (!Y.Lang.isValue(error_handler)){ |
981 | @@ -420,7 +419,6 @@ |
982 | select_productseries: function(productseries_summary) { |
983 | var that = this; |
984 | var productseries_check = that.get('tsconfig').get('product_series'); |
985 | - var lp_client = new Y.lp.client.Launchpad(); |
986 | function save_productseries(config) { |
987 | productseries_check.set('pending', true); |
988 | that.update_check(productseries_check); |
989 | @@ -435,7 +433,6 @@ |
990 | remove_productseries: function(productseries_summary) { |
991 | var that = this; |
992 | var productseries_check = that.get('tsconfig').get('product_series'); |
993 | - var lp_client = new Y.lp.client.Launchpad(); |
994 | function delete_packaging(config) { |
995 | productseries_check.set('pending', true); |
996 | var source_package = that.get('source_package'); |
997 | @@ -452,7 +449,6 @@ |
998 | }, |
999 | select_branch: function(branch_summary) { |
1000 | var that = this; |
1001 | - var lp_client = new Y.lp.client.Launchpad(); |
1002 | var branch_check = that.get('tsconfig').get('branch'); |
1003 | var productseries = that.get('productseries'); |
1004 |