~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Raphael Badin
  • Date: 2012-01-06 08:27:55 UTC
  • mfrom: (14513.5.4 builder-history-lfa)
  • mto: This revision was merged to the branch mainline in revision 14654.
  • Revision ID: raphael.badin@canonical.com-20120106082755-95a0eh6nakv5hj3b
Merge devel.

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
 
            notificaxns = response.getResponseHeader('X-Lazr-Notifications');
347
 
            if (notificaxns !== null) {
348
 
                module.display_notifications(notificaxns);
 
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;
349
354
            }
350
355
            wrapped = client.wrap_resource(uri, representation);
351
 
            result = old_on_success(wrapped);
 
356
            var result = old_on_success(wrapped);
352
357
            if (update_cache) {
353
358
              module.update_cache(wrapped);
354
359
            }
801
806
        if (representation === null || representation === undefined) {
802
807
            return representation;
803
808
        }
804
 
        if (representation.lp_redirect_location !== undefined) {
805
 
            uri = representation.lp_redirect_location;
806
 
        }
807
809
        if (representation.resource_type_link === undefined) {
808
810
            // This is a non-entry object returned by a named operation.
809
811
            // It's either a list or a random JSON object.