~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Benji York
  • Date: 2011-10-11 17:05:30 UTC
  • mto: This revision was merged to the branch mainline in revision 14133.
  • Revision ID: benji.york@canonical.com-20111011170530-emccidl7z6v2ztlk
don't remove displayed notifications if there aren't any to replace them

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
        var media_type = response.getResponseHeader('Content-Type');
328
328
        if (media_type.substring(0,16) === 'application/json') {
329
329
            representation = Y.JSON.parse(response.responseText);
330
 
            module.display_notifications(
331
 
                    response.getResponseHeader('X-Lazr-Notifications'));
 
330
            // If the response contains a notification header, display the
 
331
            // notifications.
 
332
            notificaxns = response.getResponseHeader('X-Lazr-Notifications');
 
333
            if (notificaxns !== null) {
 
334
                module.display_notifications(notificaxns);
 
335
            }
332
336
            wrapped = client.wrap_resource(uri, representation);
333
337
            result = old_on_success(wrapped);
334
338
            if (update_cache) {