~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/templates/base-layout-macros.pt

  • Committer: Curtis Hovey
  • Date: 2011-05-27 21:53:34 UTC
  • mto: This revision was merged to the branch mainline in revision 13136.
  • Revision ID: curtis.hovey@canonical.com-20110527215334-jqlkmt52nnl4bpeh
Moved launchpad.event into registry interfaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
  <script type="text/javascript">
80
80
    // Define a global YUI sandbox that should be used by everyone.
81
81
    var LPS = YUI({
 
82
      // Don't try to fetch the loader module.
 
83
      bootstrap: false,
82
84
      // Don't try to fetch CSS files.
83
85
      fetchCSS: false,
 
86
      // Turn off combo loading.
 
87
      combine: false,
84
88
      // For paranoia, set a low timeout to not wait on loading a resource.
85
89
      timeout: 50
86
90
      });
106
110
 
107
111
  <metal:load-lavascript use-macro="context/@@+base-layout-macros/load-javascript" />
108
112
 
109
 
  <tal:if condition="request/features/bugs.private_notification.enabled">
110
 
    <script type="text/javascript">
111
 
      var privacy_notification_enabled = true;
112
 
    </script>
113
 
  </tal:if>
114
 
  <tal:if condition="not:request/features/bugs.private_notification.enabled">
115
 
    <script type="text/javascript">
116
 
      var privacy_notification_enabled = false;
117
 
    </script>
118
 
  </tal:if>
119
 
 
120
113
  <script id="base-layout-load-scripts" type="text/javascript">
121
 
    LPS.use('node', 'event-delegate', 'lp', 'lp.app.links', 'lp.app.longpoll', function(Y) {
 
114
    LPS.use('node', 'event-delegate', 'lp', 'lp.app.links', function(Y) {
122
115
        Y.on('load', function(e) {
123
116
            sortables_init();
124
117
            initInlineHelp();
125
118
            Y.lp.activate_collapsibles();
126
119
            activateFoldables();
127
120
            activateConstrainBugExpiration();
128
 
            Y.lp.app.links.check_valid_lp_links();
129
 
            // Longpolling will only start if
130
 
            // LP.cache.longpoll is populated.
131
 
            Y.lp.app.longpoll.setupLongPollManager();
 
121
            Y.lp.app.links.check_valid_lp_links();
132
122
        }, window);
133
123
 
134
124
        // Hook up the function that dismisses the help window if we click
179
169
      tal:content="string:LP.links['${key}'] =
180
170
                   '${links/?key/fmt:api_url}';">
181
171
    </script>
 
172
    <script tal:repeat="key objects"
 
173
      tal:content="string:LP.cache['${key}'] =
 
174
                   ${objects/?key/webservice:json};">
 
175
    </script>
182
176
  </tal:cache>
183
177
 
184
 
  <script tal:content="string:LP.cache = ${view/getCacheJSON};">
 
178
  <script tal:condition="context/webservice:is_entry"
 
179
    tal:content="string:LP.cache['context'] =
 
180
                 ${context/webservice:json/fmt:obfuscate-email};">
185
181
  </script>
186
182
</metal:lp-client-cache>
187
183