~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/javascript/client.js

  • Committer: William Grant
  • Date: 2012-01-03 07:30:21 UTC
  • mto: This revision was merged to the branch mainline in revision 14621.
  • Revision ID: william.grant@canonical.com-20120103073021-qvprj6kbnpg0h1qv
Update a few templates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
343
343
            representation = Y.JSON.parse(response.responseText);
344
344
            // If the response contains a notification header, display the
345
345
            // notifications.
346
 
            var notifications = response.getResponseHeader(
347
 
                'X-Lazr-Notifications');
348
 
            if (notifications !== null) {
349
 
                module.display_notifications(notifications);
350
 
            }
351
 
            if (Y.Lang.isValue(representation) &&
352
 
                Y.Lang.isValue(representation.self_link)) {
353
 
                uri = representation.self_link;
 
346
            notificaxns = response.getResponseHeader('X-Lazr-Notifications');
 
347
            if (notificaxns !== null) {
 
348
                module.display_notifications(notificaxns);
354
349
            }
355
350
            wrapped = client.wrap_resource(uri, representation);
356
 
            var result = old_on_success(wrapped);
 
351
            result = old_on_success(wrapped);
357
352
            if (update_cache) {
358
353
              module.update_cache(wrapped);
359
354
            }
806
801
        if (representation === null || representation === undefined) {
807
802
            return representation;
808
803
        }
 
804
        if (representation.lp_redirect_location !== undefined) {
 
805
            uri = representation.lp_redirect_location;
 
806
        }
809
807
        if (representation.resource_type_link === undefined) {
810
808
            // This is a non-entry object returned by a named operation.
811
809
            // It's either a list or a random JSON object.