~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/javascript/distroseriesdifferences_details.js

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
     *                  class 'diff-extra-container' into which the results
216
216
     *                  are inserted.
217
217
     */
218
 
    var get_extra_diff_info = function(uri, container, source_name) {
 
218
    var get_extra_diff_info = function(uri, container, source_name,
 
219
                                       parent_distro_name,
 
220
                                       parent_series_name) {
219
221
        var in_progress_message = Y.lp.soyuz.base.makeInProgressNode(
220
222
            'Fetching difference details ...');
221
223
        container.one('div.diff-extra-container').insert(
225
227
                response.responseText, 'replace');
226
228
            var api_uri = [
227
229
                LP.cache.context.self_link,
 
230
                '+source',
 
231
                source_name,
228
232
                '+difference',
229
 
                source_name
 
233
                parent_distro_name,
 
234
                parent_series_name
230
235
                ].join('/');
231
236
            blacklist_slot = args.container.one('div.blacklist-options');
232
237
            // The blacklist slot can be null if the user's not allowed
244
249
            var retry_handler = function(e) {
245
250
                e.preventDefault();
246
251
                get_extra_diff_info(
247
 
                    args.uri, args.container, args.source_name);
 
252
                    args.uri, args.container, args.source_name,
 
253
                    args.parent_distro_name, args.parent_series_name);
248
254
            };
249
255
            var failure_message = Y.lp.soyuz.base.makeFailureNode(
250
256
                'Failed to fetch difference details.', retry_handler);
283
289
        var details_row;
284
290
        if (next_row == null || !next_row.hasClass('diff-extra')) {
285
291
            var source_name = row.one('a.toggle-extra').get('text');
 
292
            var rev_link = row
 
293
                .one('a.toggle-extra').get('href').split('/').reverse();
 
294
            var parent_series_name = rev_link[0];
 
295
            var parent_distro_name = rev_link[1];
286
296
            var nb_columns = row.all('td').size();
287
297
            details_row = Y.Node.create([
288
298
                '<table><tr class="diff-extra unseen ' + source_name + '">',
292
302
                ].join('')).one('tr');
293
303
            row.insert(details_row, 'after');
294
304
            var uri = toggle.get('href');
295
 
            get_extra_diff_info(uri, details_row.one('td'), source_name);
 
305
            get_extra_diff_info(
 
306
                uri, details_row.one('td'), source_name, parent_distro_name,
 
307
                parent_series_name);
296
308
        } else {
297
309
            details_row = next_row;
298
310
        }