~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/javascript/bugtask_index.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-04 19:57:38 UTC
  • mfrom: (13599.3.6 global-privacy-ribbon)
  • Revision ID: launchpad@pqm.canonical.com-20110804195738-2j45crssly6eubq6
[r=sinzui][bug=298152] Moves the privacy ribbon template code into
 the base-layout, so that is now active and available on all private contexts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
370
370
                    privacy_text.set(
371
371
                        'innerHTML',
372
372
                        'This report is <strong>private</strong> ');
373
 
                    Y.lp.app.privacy.display_privacy_notification();
 
373
                    if (privacy_notification_enabled) {
 
374
                        var notification = Y.one('.global-notification');
 
375
                        if (notification === null) {
 
376
                            Y.lp.app.privacy.setup_privacy_notification();
 
377
                        }
 
378
                        Y.lp.app.privacy.display_privacy_notification();
 
379
                    }
374
380
                } else {
375
381
                    if (privacy_notification_enabled) {
376
382
                        var notification = Y.one('.global-notification');
 
383
                        if (notification === null) {
 
384
                            Y.lp.app.privacy.setup_privacy_notification();
 
385
                        }
377
386
                        if (notification.hasClass('hidden')) {
378
387
                            Y.one('.portlet.private').setStyles({
379
388
                                color: '#333',
385
394
                    privacy_div.replaceClass('private', 'public');
386
395
                    privacy_text.set(
387
396
                        'innerHTML', 'This report is public ');
388
 
                    Y.lp.app.privacy.hide_privacy_notification();
 
397
                    if (privacy_notification_enabled) {
 
398
                        Y.lp.app.privacy.hide_privacy_notification();
 
399
                    }
389
400
                }
390
401
                privacy_text.appendChild(privacy_link);
391
402
                privacy_text.appendChild(privacy_spinner);