← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rharding/launchpad/one_yui_instance into lp:launchpad

 

Richard Harding has proposed merging lp:~rharding/launchpad/one_yui_instance into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #923619 in Launchpad itself: "client model changed events broken"
  https://bugs.launchpad.net/launchpad/+bug/923619
  Bug #923973 in Launchpad itself: "sync page is broken"
  https://bugs.launchpad.net/launchpad/+bug/923973

For more details, see:
https://code.launchpad.net/~rharding/launchpad/one_yui_instance/+merge/91111

= Summary =
We're returning to the single YUI instance across all LP JS for now until we can get things cleaned up.

== Proposed Fix ==
/YUI()/LPJS/

== Tests ==
All of the tests should still pass.

Test files should still be able to use YUI(). Checking for instances with:
grep "YUI()" lib/lp/**/* | grep -v tests

lib/lp/app/doc/lazr-js-widgets.txt was replaced to make sure it checks for LPJS. vs YUI().
-- 
https://code.launchpad.net/~rharding/launchpad/one_yui_instance/+merge/91111
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rharding/launchpad/one_yui_instance into lp:launchpad.
=== modified file 'lib/lp/answers/templates/question-index.pt'
--- lib/lp/answers/templates/question-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/answers/templates/question-index.pt	2012-02-01 16:02:20 +0000
@@ -17,7 +17,7 @@
   }
     </style>
     <script type="text/javascript">
-        YUI().use('base', 'node', 'event',
+        LPJS.use('base', 'node', 'event',
                 'lp.comments.hide', 'lp.answers.subscribers',
             function(Y) {
         Y.on('domready', function() {

=== modified file 'lib/lp/answers/templates/questiontarget-portlet-answercontacts.pt'
--- lib/lp/answers/templates/questiontarget-portlet-answercontacts.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/answers/templates/questiontarget-portlet-answercontacts.pt	2012-02-01 16:02:20 +0000
@@ -7,7 +7,7 @@
 <tal:script
     replace="structure
     string:&lt;script id='milestone-script' type='text/javascript'&gt;" />
-    YUI().use('base', 'node', 'event',
+    LPJS.use('base', 'node', 'event',
             'lp.comments.hide', 'lp.answers.answercontacts',
         function(Y) {
     Y.on('domready', function() {

=== modified file 'lib/lp/app/doc/lazr-js-widgets.txt'
--- lib/lp/app/doc/lazr-js-widgets.txt	2012-01-19 22:59:03 +0000
+++ lib/lp/app/doc/lazr-js-widgets.txt	2012-02-01 16:02:20 +0000
@@ -331,7 +331,7 @@
       </span>
     </span>
     <script>
-    YUI().use('lp.app.choice', function(Y) {
+    LPJS.use('lp.app.choice', function(Y) {
     ...
     </script>
 
@@ -390,7 +390,7 @@
         </span>
     </span>
     <script>
-    YUI().use('lp.app.choice', function(Y) {
+    LPJS.use('lp.app.choice', function(Y) {
     ...
     </script>
 
@@ -478,7 +478,7 @@
       <div class="yui3-activator-message-box yui3-activator-hidden" />
       </span>
       <script>
-      YUI().use('lp.app.multicheckbox', function(Y) {
+      LPJS.use('lp.app.multicheckbox', function(Y) {
       ...
       </script>
 

=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
--- lib/lp/app/templates/base-layout-macros.pt	2012-01-20 00:25:56 +0000
+++ lib/lp/app/templates/base-layout-macros.pt	2012-02-01 16:02:20 +0000
@@ -139,7 +139,11 @@
   <metal:load-lavascript use-macro="context/@@+base-layout-macros/load-javascript" />
 
     <script id="base-layout-load-scripts" type="text/javascript">
-        YUI().use('base', 'node', 'console', 'event',
+        // we need this to create a single YUI instance all events and code
+        // talks across. All instances of YUI().use should be based off of
+        // LPJS instead.
+        LPJS = new YUI();
+        LPJS.use('base', 'node', 'console', 'event',
             'oop', 'lp', 'lp.app.privacy',
             'lp.app.beta_features', 'lp.app.foldables','lp.app.sorttable',
             'lp.app.inlinehelp', 'lp.app.links', 'lp.app.longpoll',
@@ -184,7 +188,7 @@
             // registers a function to fire onload.
             // Use this for initilaizing any javascript that should fire once the page
             // has been loaded.
-            YUI().use('node', function(Y) {
+            LPJS.use('node', function(Y) {
                 Y.on('load', function(e) {
                     func();
                 }, window);
@@ -221,7 +225,7 @@
                             node.focus();
                         }
                     } catch (e) {
-                        YUI().use('console', function(Y) {
+                        LPJS.use('console', function(Y) {
                             Y.log('In setFocusByName(<' +
                                 node.tagName + ' type=' + node.type + '>): ' + e);
                         });

=== modified file 'lib/lp/app/templates/base-layout.pt'
--- lib/lp/app/templates/base-layout.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/base-layout.pt	2012-02-01 16:02:20 +0000
@@ -206,7 +206,7 @@
     replace='structure string:&lt;script type="text/javascript"&gt;
   start_ajax_logging();
   var render_time = "${render_time}";
-  YUI().use("node", function(Y) {
+  LPJS.use("node", function(Y) {
     Y.on("domready", function() {
       var node = Y.one("#rendertime");
       node.set("innerHTML", render_time);

=== modified file 'lib/lp/app/templates/boolean-choice-widget.pt'
--- lib/lp/app/templates/boolean-choice-widget.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/boolean-choice-widget.pt	2012-02-01 16:02:20 +0000
@@ -10,7 +10,7 @@
 
 <script tal:condition="view/can_write"
         tal:content="structure string:
-YUI().use('lp.app.choice', function(Y) {
+LPJS.use('lp.app.choice', function(Y) {
     Y.lp.app.choice.addBinaryChoice(
         ${view/json_config},
         ${view/json_resource_uri},

=== modified file 'lib/lp/app/templates/enum-choice-widget.pt'
--- lib/lp/app/templates/enum-choice-widget.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/enum-choice-widget.pt	2012-02-01 16:02:20 +0000
@@ -9,7 +9,7 @@
 </span>
 <script tal:condition="view/can_write"
         tal:content="structure string:
-YUI().use('lp.app.choice', function(Y) {
+LPJS.use('lp.app.choice', function(Y) {
     Y.lp.app.choice.addEnumChoice(
         ${view/json_config},
         ${view/json_resource_uri},

=== modified file 'lib/lp/app/templates/inline-multicheckbox-widget.pt'
--- lib/lp/app/templates/inline-multicheckbox-widget.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/inline-multicheckbox-widget.pt	2012-02-01 16:02:20 +0000
@@ -31,7 +31,7 @@
 </span>
 <script tal:condition="view/can_write"
         tal:content="string:
-YUI().use('lp.app.multicheckbox', function(Y) {
+LPJS.use('lp.app.multicheckbox', function(Y) {
     if (Y.UA.ie) {
         return;
     }

=== modified file 'lib/lp/app/templates/inline-picker.pt'
--- lib/lp/app/templates/inline-picker.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/inline-picker.pt	2012-02-01 16:02:20 +0000
@@ -29,7 +29,7 @@
 
 <script tal:condition="view/can_write"
         tal:content="structure string:
-YUI().use('lp.app.picker', 'lp.client', function(Y) {
+LPJS.use('lp.app.picker', 'lp.client', function(Y) {
     if (Y.UA.ie) {
         return;
     }

=== modified file 'lib/lp/app/templates/launchpad-databaseunavailable.pt'
--- lib/lp/app/templates/launchpad-databaseunavailable.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/launchpad-databaseunavailable.pt	2012-02-01 16:02:20 +0000
@@ -159,7 +159,7 @@
 "
 ></script>
     <script id="load-status" type="text/javascript">
-YUI().use('node', 'io-xdr', 'json-parse', 'datatype-date', function(Y) {
+LPJS.use('node', 'io-xdr', 'json-parse', 'datatype-date', function(Y) {
   var tag = function(name) {
     return Y.Node.create('<'+name+'/>');
   }

=== modified file 'lib/lp/app/templates/launchpad-widget-macros.pt'
--- lib/lp/app/templates/launchpad-widget-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/launchpad-widget-macros.pt	2012-02-01 16:02:20 +0000
@@ -92,7 +92,7 @@
       tal:define="yui2 string:${icingroot}/yui_2.7.0b/build;">
 
       <script type="text/javascript">
-          YUI().use(
+          LPJS.use(
               'lang', 'node', 'lp.app.calendar', 'yui2-yahoo',
               'yui2-event', 'yui2-dom', 'yui2-calendar', 'yui2-dom-event',
               function(Y) {

=== modified file 'lib/lp/app/templates/root-index.pt'
--- lib/lp/app/templates/root-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/root-index.pt	2012-02-01 16:02:20 +0000
@@ -147,7 +147,7 @@
               <input id="search" type="submit" value="Search Launchpad" />
             </form>
             <script type="text/javascript">
-                YUI().use('lp', function () {
+                LPJS.use('lp', function () {
                     setFocusByName('field.text');
                 });
             </script>

=== modified file 'lib/lp/app/templates/text-area-editor.pt'
--- lib/lp/app/templates/text-area-editor.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/text-area-editor.pt	2012-02-01 16:02:20 +0000
@@ -16,7 +16,7 @@
        tal:content="structure view/value">some text</div>
 <script tal:condition="view/can_write"
         tal:content="structure string:
-        YUI().use('lazr.editor', 'lp.client.plugins', function (Y) {
+        LPJS.use('lazr.editor', 'lp.client.plugins', function (Y) {
             var widget = new Y.EditableText({
                 contentBox: ${view/widget_css_selector},
                 accept_empty: ${view/accept_empty},

=== modified file 'lib/lp/app/templates/text-line-editor.pt'
--- lib/lp/app/templates/text-line-editor.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/templates/text-line-editor.pt	2012-02-01 16:02:20 +0000
@@ -8,7 +8,7 @@
 
 <script tal:condition="view/can_write"
         tal:content="structure string:
-        YUI().use('lazr.editor', 'lp.client.plugins', function (Y) {
+        LPJS.use('lazr.editor', 'lp.client.plugins', function (Y) {
             var widget = new Y.EditableText({
                 contentBox: ${view/widget_css_selector},
                 accept_empty: ${view/accept_empty},

=== modified file 'lib/lp/app/widgets/location.py'
--- lib/lp/app/widgets/location.py	2012-01-19 22:59:03 +0000
+++ lib/lp/app/widgets/location.py	2012-02-01 16:02:20 +0000
@@ -132,7 +132,7 @@
             show_marker=self.show_marker)
         return """
             <script type="text/javascript">
-                YUI().use('node', 'lp.app.mapping', function(Y) {
+                LPJS.use('node', 'lp.app.mapping', function(Y) {
                     function renderMap() {
                         Y.lp.app.mapping.renderPersonMap(
                             %(center_lat)s, %(center_lng)s, %(displayname)s,

=== modified file 'lib/lp/app/widgets/templates/bugtracker-picker.pt'
--- lib/lp/app/widgets/templates/bugtracker-picker.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/widgets/templates/bugtracker-picker.pt	2012-02-01 16:02:20 +0000
@@ -5,7 +5,7 @@
 
 <metal:form-picker use-macro="context/@@form-picker-macros/form-picker"/>
 <script tal:content="structure string:
-YUI().use('lp.bugs.bugtracker_overlay', function(Y) {
+LPJS.use('lp.bugs.bugtracker_overlay', function(Y) {
     if (Y.UA.ie) {
         return;
     }

=== modified file 'lib/lp/app/widgets/templates/form-picker-macros.pt'
--- lib/lp/app/widgets/templates/form-picker-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/widgets/templates/form-picker-macros.pt	2012-02-01 16:02:20 +0000
@@ -19,7 +19,7 @@
             />
       </select>
       <script type="text/javascript" tal:content="string:
-          YUI().use('node', 'lp.app.picker', function(Y) {
+          LPJS.use('node', 'lp.app.picker', function(Y) {
               var text_input = Y.DOM.byId('${view/name}');
               var select_menu = Y.DOM.byId('${suggestion_id}');
               Y.lp.app.picker.connect_select_menu(
@@ -30,7 +30,7 @@
 
     <tal:chooseLink replace="structure view/chooseLink" />
     <script tal:content="structure string:
-    YUI().use('node', 'lp.app.picker', function(Y) {
+    LPJS.use('node', 'lp.app.picker', function(Y) {
         if (Y.UA.ie) {
             return;
         }

=== modified file 'lib/lp/app/widgets/templates/license.pt'
--- lib/lp/app/widgets/templates/license.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/app/widgets/templates/license.pt	2012-02-01 16:02:20 +0000
@@ -26,7 +26,7 @@
 // and breaks with every YUI/lazr-js upgrade.
 // Tread carefully, or else please make this better
 // and add tests, too (preferably in reverse order there.)
-YUI().use('node', 'lazr.effects', function(Y) {
+LPJS.use('node', 'lazr.effects', function(Y) {
     Y.on('domready', function() {
         function make_slider(cfg) {
             var table_name = '#' + cfg.which;

=== modified file 'lib/lp/blueprints/templates/specification-index.pt'
--- lib/lp/blueprints/templates/specification-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/blueprints/templates/specification-index.pt	2012-02-01 16:02:20 +0000
@@ -320,7 +320,7 @@
     </div>
 
   <script type="text/javascript">
-    YUI().use('lp.anim', 'lp.ui', function(Y) {
+    LPJS.use('lp.anim', 'lp.ui', function(Y) {
 
         Y.on('lp:context:implementation_status:changed', function(e) {
             var icon = Y.one('#informational-icon');

=== modified file 'lib/lp/blueprints/templates/specifications-index.pt'
--- lib/lp/blueprints/templates/specifications-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/blueprints/templates/specifications-index.pt	2012-02-01 16:02:20 +0000
@@ -65,7 +65,7 @@
         </table>
       </form>
       <script type="text/javascript">
-          YUI().use('lp', function (Y) {
+          LPJS.use('lp', function (Y) {
               setFocusByName('field.search_text');
           });
       </script>

=== modified file 'lib/lp/bugs/browser/bugalsoaffects.py'
--- lib/lp/bugs/browser/bugalsoaffects.py	2012-01-19 22:59:03 +0000
+++ lib/lp/bugs/browser/bugalsoaffects.py	2012-02-01 16:02:20 +0000
@@ -193,7 +193,7 @@
             structured("""
                 There is no project in Launchpad named "%s". Please
                 <a href="/projects"
-                onclick="YUI().use('event').Event.simulate(
+                onclick="LPJS.use('event').Event.simulate(
                          document.getElementById('%s'), 'click');
                          return false;"
                 >search for it</a> as it may be

=== modified file 'lib/lp/bugs/templates/bug-portlet-subscription.pt'
--- lib/lp/bugs/templates/bug-portlet-subscription.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bug-portlet-subscription.pt	2012-02-01 16:02:20 +0000
@@ -51,7 +51,7 @@
     </ul>
   </div>
   <script type="text/javascript">
-    YUI().use('io-base', 'node',
+    LPJS.use('io-base', 'node',
             'lp.bugs.bugtask_index.portlets.subscription', function(Y) {
         // Must be done inline here to ensure the load event fires.
         // This is a work around for a YUI3 issue with event handling.

=== modified file 'lib/lp/bugs/templates/bug-subscription-list.pt'
--- lib/lp/bugs/templates/bug-subscription-list.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bug-subscription-list.pt	2012-02-01 16:02:20 +0000
@@ -13,7 +13,7 @@
 <head>
   <tal:head-epilogue metal:fill-slot="head_epilogue">
     <script type="text/javascript">
-      YUI().use('lp.registry.structural_subscription', 'lp.bugs.subscription',
+      LPJS.use('lp.registry.structural_subscription', 'lp.bugs.subscription',
               function(Y) {
           var ss_module = Y.lp.registry.structural_subscription;
           var info_module = Y.lp.bugs.subscription;

=== modified file 'lib/lp/bugs/templates/bug-subscription.pt'
--- lib/lp/bugs/templates/bug-subscription.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bug-subscription.pt	2012-02-01 16:02:20 +0000
@@ -12,7 +12,7 @@
 
   <metal:block fill-slot="head_epilogue">
     <script type="text/javascript">
-        YUI().use('base', 'node', 'oop', 'event',
+        LPJS.use('base', 'node', 'oop', 'event',
                 'lp.bugs.bug_notification_level',
             function(Y) {
                 Y.on('domready', function () {

=== modified file 'lib/lp/bugs/templates/bugcomment-macros.pt'
--- lib/lp/bugs/templates/bugcomment-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugcomment-macros.pt	2012-02-01 16:02:20 +0000
@@ -116,7 +116,7 @@
           comment_form/actions/field.actions.save/render" />
     </form>
     <script type="text/javascript">
-      YUI().use('lp.app.comment', function(Y) {
+      LPJS.use('lp.app.comment', function(Y) {
           var comment = new Y.lp.app.comment.Comment();
           comment.render();
       });

=== modified file 'lib/lp/bugs/templates/buglisting-default.pt'
--- lib/lp/bugs/templates/buglisting-default.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/buglisting-default.pt	2012-02-01 16:02:20 +0000
@@ -18,7 +18,7 @@
 </tal:comment>
 <script type="text/javascript"
   tal:condition="not: view/shouldShowAdvancedForm">
-    YUI().use('lp.registry.structural_subscription', function(Y) {
+    LPJS.use('lp.registry.structural_subscription', function(Y) {
         Y.on('domready', function() {
             Y.lp.registry.structural_subscription.setup(
                 {content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/bugs/templates/bugs-listing-table.pt'
--- lib/lp/bugs/templates/bugs-listing-table.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugs-listing-table.pt	2012-02-01 16:02:20 +0000
@@ -33,7 +33,7 @@
   <tal:comment
     tal:condition="request/features/ajax.batch_navigator.enabled"
     replace='structure string:&lt;script type="text/javascript"&gt;
-    YUI().use("lp.app.batchnavigator",
+    LPJS.use("lp.app.batchnavigator",
         function(Y) {
             Y.on("domready", function () {
                 var config = {

=== modified file 'lib/lp/bugs/templates/bugtarget-filebug-search.pt'
--- lib/lp/bugs/templates/bugtarget-filebug-search.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-filebug-search.pt	2012-02-01 16:02:20 +0000
@@ -8,7 +8,7 @@
   <metal:block fill-slot="head_epilogue">
     <script type="text/javascript"
             tal:condition="context/enable_bugfiling_duplicate_search">
-        YUI().use(
+        LPJS.use(
           'base', 'node', 'oop', 'event', 'lp.bugs.filebug_dupefinder',
           function(Y) {
             Y.lp.bugs.filebug_dupefinder.setup_dupe_finder();

=== modified file 'lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt'
--- lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt	2012-02-01 16:02:20 +0000
@@ -7,7 +7,7 @@
 
   <metal:block fill-slot="head_epilogue">
     <script type="text/javascript">
-      YUI().use('base', 'node', 'oop', 'event', 'lp.bugs.filebug_dupefinder',
+      LPJS.use('base', 'node', 'oop', 'event', 'lp.bugs.filebug_dupefinder',
       function(Y) {
           Y.on('domready', function() {
               Y.lp.bugs.filebug_dupefinder.setup_dupes();

=== modified file 'lib/lp/bugs/templates/bugtarget-macros-filebug.pt'
--- lib/lp/bugs/templates/bugtarget-macros-filebug.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-macros-filebug.pt	2012-02-01 16:02:20 +0000
@@ -330,7 +330,7 @@
 <metal:privacy define-macro="bug-reporting-privacy">
     <tal:private condition="view/isPrivate">
         <script type="text/javascript">
-            YUI().use('lp.app.privacy',  function(Y) {
+            LPJS.use('lp.app.privacy',  function(Y) {
                 Y.on('domready', function() {
                    var cfg = {
                         notification_text: "This report will be private. "
@@ -344,7 +344,7 @@
     </tal:private>
     <tal:not-private condition="not:view/isPrivate">
         <script type="text/javascript">
-            YUI().use('lp.app.privacy', 'lp.bugs.filebug_dupefinder', function(Y) {
+            LPJS.use('lp.app.privacy', 'lp.bugs.filebug_dupefinder', function(Y) {
                 Y.on('domready', function() {
                    var cfg = {
                         notification_text: "This report will be private "

=== modified file 'lib/lp/bugs/templates/bugtarget-patches.pt'
--- lib/lp/bugs/templates/bugtarget-patches.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-patches.pt	2012-02-01 16:02:20 +0000
@@ -20,7 +20,7 @@
         tal:attributes="action string:${context/fmt:url}/+patches">
 
     <script type="text/javascript">
-      YUI().use('base', 'node', 'event', function(Y) {
+      LPJS.use('base', 'node', 'event', function(Y) {
         Y.on('domready', function(e) {
           Y.one('#sort-button').setStyle('display', 'none');
           Y.one('#orderby').on('change', function(e) {
@@ -87,7 +87,7 @@
                  <p tal:content="string:${patch/title}"></p>
                </div>
                <script type="text/javascript" tal:content="string:
-                 YUI().use('base', 'node', 'event', function(Y) {
+                 LPJS.use('base', 'node', 'event', function(Y) {
                    Y.on('domready', function(e) {
                      var cell_id = '#patch-cell-${repeat/patch_task/index}';
                      var target_id = '#patch-popup-${repeat/patch_task/index}';

=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt'
--- lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt	2012-02-01 16:02:20 +0000
@@ -55,7 +55,7 @@
     </tbody>
   </table>
   <script type="text/javascript">
-    YUI().use('io-base', 'node', function(Y) {
+    LPJS.use('io-base', 'node', function(Y) {
         Y.on('domready', function() {
             var url = Y.one('#bugtarget-bugfilters-link').getAttribute('href');
             var handlers = {

=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt'
--- lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt	2012-02-01 16:02:20 +0000
@@ -9,7 +9,7 @@
   <a id="tags-content-link"
      tal:attributes="href context/fmt:url/+bugtarget-portlet-tags-content"></a>
   <script type="text/javascript">
-    YUI().use('lp.bugs.bugtask.taglist', function(Y) {
+    LPJS.use('lp.bugs.bugtask.taglist', function(Y) {
       Y.on('domready', function() {
         Y.lp.bugs.bugtask.taglist.setup_taglist();
       });

=== modified file 'lib/lp/bugs/templates/bugtarget-subscription-list.pt'
--- lib/lp/bugs/templates/bugtarget-subscription-list.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtarget-subscription-list.pt	2012-02-01 16:02:20 +0000
@@ -13,7 +13,7 @@
 <head>
   <tal:head-epilogue metal:fill-slot="head_epilogue">
     <script type="text/javascript">
-      YUI().use('lp.registry.structural_subscription', function(Y) {
+      LPJS.use('lp.registry.structural_subscription', function(Y) {
           var module = Y.lp.registry.structural_subscription;
           var config = {
               content_box: "#structural-subscription-content-box",

=== modified file 'lib/lp/bugs/templates/bugtask-index.pt'
--- lib/lp/bugs/templates/bugtask-index.pt	2012-01-22 23:12:51 +0000
+++ lib/lp/bugs/templates/bugtask-index.pt	2012-02-01 16:02:20 +0000
@@ -10,7 +10,7 @@
       <script type='text/javascript' id='available-official-tags-js'
               tal:content="view/available_official_tags_js" />
       <script type="text/javascript">
-        YUI().use('base', 'node', 'oop', 'event', 'lp.bugs.bugtask_index',
+        LPJS.use('base', 'node', 'oop', 'event', 'lp.bugs.bugtask_index',
                   'lp.bugs.subscribers',
                   'lp.code.branchmergeproposal.diff', 'lp.comments.hide',
                   function(Y) {
@@ -158,7 +158,7 @@
                 <img src="/@@/spinner" id="tags-edit-spinner" class="hidden"/>
                 <a href="+edit" title="Edit tags" id="edit-tags-trigger" class="sprite edit"></a>
               <script type="text/javascript">
-                  YUI().use('event', 'node', 'lp.bugs.bug_tags_entry', function(Y) {
+                  LPJS.use('event', 'node', 'lp.bugs.bug_tags_entry', function(Y) {
                       // XXX intellectronica 2009-04-16 bug #362309:
                       // The load event fires very late on bug pages that take a
                       // long time to render, but we prefer to use it since the

=== modified file 'lib/lp/bugs/templates/bugtask-macros-tableview.pt'
--- lib/lp/bugs/templates/bugtask-macros-tableview.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtask-macros-tableview.pt	2012-02-01 16:02:20 +0000
@@ -655,7 +655,7 @@
       show_new_listings request/features/bugs.dynamic_bug_listings.enabled;
       advanced_search view/shouldShowAdvancedForm"
     tal:condition="python: show_new_listings and not advanced_search">
-    YUI().use('lp.bugs.buglisting', 'lp.ordering', 'lp.buglisting_utils',
+    LPJS.use('lp.bugs.buglisting', 'lp.ordering', 'lp.buglisting_utils',
       function(Y) {
         Y.on('domready', function() {
             var navigator = Y.lp.bugs.buglisting.BugListingNavigator

=== modified file 'lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt'
--- lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt	2012-02-01 16:02:20 +0000
@@ -37,7 +37,7 @@
           </a>
         </span>
         <script type="text/javascript" tal:content="string:
-          YUI().use('event', 'lp.bugs.bugtask_index', function(Y) {
+          LPJS.use('event', 'lp.bugs.bugtask_index', function(Y) {
               Y.on('load', function(e) {
                   Y.lp.bugs.bugtask_index.setup_me_too(
                       ${view/current_user_affected_js_status},

=== modified file 'lib/lp/bugs/templates/bugtracker-configure.pt'
--- lib/lp/bugs/templates/bugtracker-configure.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/bugtracker-configure.pt	2012-02-01 16:02:20 +0000
@@ -8,7 +8,7 @@
 
     <metal:block fill-slot="head_epilogue">
         <script type="text/javascript">
-            YUI().use('node', 'lang', function(Y) {
+            LPJS.use('node', 'lang', function(Y) {
                 // Constrain enable_bug_expiration to the Launchpad Bugs radio input.
                 // The Launchpad bug tracker is either the first item in a product's
                 // bugtracker field, or it is a distribution's official_malone field.

=== modified file 'lib/lp/bugs/templates/official-bug-target-manage-tags.pt'
--- lib/lp/bugs/templates/official-bug-target-manage-tags.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/official-bug-target-manage-tags.pt	2012-02-01 16:02:20 +0000
@@ -23,7 +23,7 @@
 
         <script tal:replace="structure view/tags_js_data" />
         <script type="text/javascript">
-            YUI().use('event', 'lp.bugs.official_bug_tags', function(Y) {
+            LPJS.use('event', 'lp.bugs.official_bug_tags', function(Y) {
                 Y.on('domready', function(e) {
                    Y.lp.bugs.official_bug_tags.setup_official_bug_tag_management();
                 });

=== modified file 'lib/lp/bugs/templates/projectgroup-filebug-search.pt'
--- lib/lp/bugs/templates/projectgroup-filebug-search.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/bugs/templates/projectgroup-filebug-search.pt	2012-02-01 16:02:20 +0000
@@ -7,7 +7,7 @@
 
   <metal:block fill-slot="head_epilogue">
     <script type="text/javascript">
-      YUI().use('base', 'node', 'oop', 'event', 'lp.bugs.filebug_dupefinder',
+      LPJS.use('base', 'node', 'oop', 'event', 'lp.bugs.filebug_dupefinder',
       function(Y) {
       Y.on('domready', function() {
       Y.lp.bugs.filebug_dupefinder.setup_dupes();

=== modified file 'lib/lp/code/templates/bazaar-index.pt'
--- lib/lp/code/templates/bazaar-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/bazaar-index.pt	2012-02-01 16:02:20 +0000
@@ -39,7 +39,7 @@
         <input type="submit" value="Find a Project" />
       </form>
       <script type="text/javascript">
-          YUI().use('lp', function (Y) {
+          LPJS.use('lp', function (Y) {
               setFocusByName('text');
           });
       </script>

=== modified file 'lib/lp/code/templates/branch-form-macros.pt'
--- lib/lp/code/templates/branch-form-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branch-form-macros.pt	2012-02-01 16:02:20 +0000
@@ -17,7 +17,7 @@
 
 <script type="text/javascript">
 //<![CDATA[
-YUI().use('lp.code.util', function(Y) {
+LPJS.use('lp.code.util', function(Y) {
   Y.on('domready', function(e) {
       Y.lp.code.util.hookUpBranchFieldFunctions(Y);
   }, window);

=== modified file 'lib/lp/code/templates/branch-import-details.pt'
--- lib/lp/code/templates/branch-import-details.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branch-import-details.pt	2012-02-01 16:02:20 +0000
@@ -32,7 +32,7 @@
                 Try again
               </a>
               <script type="text/javascript">
-                  YUI().use('event', 'node', function(Y) {
+                  LPJS.use('event', 'node', function(Y) {
                     Y.on("domready", function () { Y.one('#tryagainlink').setStyle('display', 'inline') });
                   });
               </script>

=== modified file 'lib/lp/code/templates/branch-index.pt'
--- lib/lp/code/templates/branch-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branch-index.pt	2012-02-01 16:02:20 +0000
@@ -30,7 +30,7 @@
   </style>
   <script type="text/javascript"
           tal:content="string:
-    YUI().use('node', 'event', 'widget', 'plugin', 'overlay',
+    LPJS.use('node', 'event', 'widget', 'plugin', 'overlay',
               'lazr.choiceedit',
               'lp.code.branch.status',
               'lp.code.branchmergeproposal.diff',

=== modified file 'lib/lp/code/templates/branch-listing.pt'
--- lib/lp/code/templates/branch-listing.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branch-listing.pt	2012-02-01 16:02:20 +0000
@@ -35,7 +35,7 @@
 <tal:comment
 tal:condition="not: request/features/ajax.batch_navigator.enabled"
 replace='structure string:&lt;script type="text/javascript"&gt;
-    YUI().use("lp.code.util", function(Y) {
+    LPJS.use("lp.code.util", function(Y) {
       Y.on("domready", function(e) {
           Y.lp.code.util.hookUpBranchFilterSubmission(Y);
       }, window);
@@ -191,7 +191,7 @@
   <tal:comment
     tal:condition="request/features/ajax.batch_navigator.enabled"
     replace='structure string:&lt;script type="text/javascript"&gt;
-    YUI().use("lp.app.batchnavigator",
+    LPJS.use("lp.app.batchnavigator",
         function(Y) {
             Y.on("domready", function () {
                 var config = {

=== modified file 'lib/lp/code/templates/branch-register-merge.pt'
--- lib/lp/code/templates/branch-register-merge.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branch-register-merge.pt	2012-02-01 16:02:20 +0000
@@ -65,7 +65,7 @@
       -->
       <tal:script>
         <script type="text/javascript" tal:content="string:
-          YUI().use('node', 'event', function(Y) {
+          LPJS.use('node', 'event', function(Y) {
               function reviewer_changed(value) {
                 reviewer = Y.Lang.trim(value);
                 review_type = document.getElementById('field.review_type');

=== modified file 'lib/lp/code/templates/branch-related-bugs-specs.pt'
--- lib/lp/code/templates/branch-related-bugs-specs.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branch-related-bugs-specs.pt	2012-02-01 16:02:20 +0000
@@ -73,7 +73,7 @@
     string:&lt;script id='branchlink-script' type='text/javascript'&gt;" />
     <!--
 
-    YUI().use('io-base', 'lp.code.branch.bugspeclinks', function(Y) {
+    LPJS.use('io-base', 'lp.code.branch.bugspeclinks', function(Y) {
 
     if(Y.UA.ie) {
         return;

=== modified file 'lib/lp/code/templates/branchmergeproposal-generic-listing.pt'
--- lib/lp/code/templates/branchmergeproposal-generic-listing.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branchmergeproposal-generic-listing.pt	2012-02-01 16:02:20 +0000
@@ -24,7 +24,7 @@
   </form>
 <script type="text/javascript">
 
-YUI().use('node', function(Y) {
+LPJS.use('node', function(Y) {
 
   function submit_filter() {
     Y.one('#filter_form').submit();

=== modified file 'lib/lp/code/templates/branchmergeproposal-index.pt'
--- lib/lp/code/templates/branchmergeproposal-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/branchmergeproposal-index.pt	2012-02-01 16:02:20 +0000
@@ -206,7 +206,7 @@
   string:&lt;script id='codereview-script' type='text/javascript'&gt;" />
   conf = <tal:status-config replace="view/status_config" />
   <!--
-  YUI().use('io-base', 'lp.code.branchmergeproposal.reviewcomment',
+  LPJS.use('io-base', 'lp.code.branchmergeproposal.reviewcomment',
           'lp.code.branchmergeproposal.status', 'lp.app.comment',
           'lp.code.branchmergeproposal.updater', 'lp.app.widgets.expander',
           'lp.code.branch.revisionexpander', function(Y) {

=== modified file 'lib/lp/code/templates/daily-builds-listing.pt'
--- lib/lp/code/templates/daily-builds-listing.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/daily-builds-listing.pt	2012-02-01 16:02:20 +0000
@@ -29,7 +29,7 @@
     </form>
 
     <script type="text/javascript">
-        YUI().use("lp.code.util", function(Y) {
+        LPJS.use("lp.code.util", function(Y) {
           Y.on("domready", function(e) {
               Y.lp.code.util.hookUpDailyBuildsFilterSubmission(Y);
           }, window);

=== modified file 'lib/lp/code/templates/sourcepackagerecipe-index.pt'
--- lib/lp/code/templates/sourcepackagerecipe-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-index.pt	2012-02-01 16:02:20 +0000
@@ -149,7 +149,7 @@
   </div>
 
   <script type="text/javascript">
-    YUI().use('io-base', 'lp.ui', 'lp.code.requestbuild_overlay', function(Y) {
+    LPJS.use('io-base', 'lp.ui', 'lp.code.requestbuild_overlay', function(Y) {
 
         Y.on('lp:context:deb_version_template:changed', function(e) {
             Y.lp.ui.update_field('#debian-version dd', e.new_value);

=== modified file 'lib/lp/code/templates/sourcepackagerecipe-new.pt'
--- lib/lp/code/templates/sourcepackagerecipe-new.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-new.pt	2012-02-01 16:02:20 +0000
@@ -86,7 +86,7 @@
               </tr>
 
               <script type="text/javascript">
-                YUI().use('lp.code.sourcepackagerecipe.new', function(Y) {
+                LPJS.use('lp.code.sourcepackagerecipe.new', function(Y) {
                   Y.on('domready', Y.lp.code.sourcepackagerecipe.new.setup);
                 });
               </script>

=== modified file 'lib/lp/registry/browser/__init__.py'
--- lib/lp/registry/browser/__init__.py	2012-02-01 15:16:20 +0000
+++ lib/lp/registry/browser/__init__.py	2012-02-01 16:02:20 +0000
@@ -118,7 +118,7 @@
             'milestone_row_uri': self.milestone_row_uri_template,
             }
         return """
-            YUI().use(
+            LPJS.use(
                 'node', 'lp.registry.milestoneoverlay',
                 'lp.registry.milestonetable',
                 function (Y) {

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2012-02-01 15:16:20 +0000
+++ lib/lp/registry/browser/person.py	2012-02-01 16:02:20 +0000
@@ -3026,7 +3026,7 @@
                         'center_lng': self.context.longitude}
         return u"""
             <script type="text/javascript">
-                YUI().use('node', 'lp.app.mapping', function(Y) {
+                LPJS.use('node', 'lp.app.mapping', function(Y) {
                     function renderMap() {
                         Y.lp.app.mapping.renderPersonMapSmall(
                             %(center_lat)s, %(center_lng)s);

=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py	2012-01-30 19:33:00 +0000
+++ lib/lp/registry/browser/team.py	2012-02-01 16:02:20 +0000
@@ -1244,7 +1244,7 @@
         """HTML which shows the map with location of the team's members."""
         return """
             <script type="text/javascript">
-                YUI().use('node', 'lp.app.mapping', function(Y) {
+                LPJS.use('node', 'lp.app.mapping', function(Y) {
                     function renderMap() {
                         Y.lp.app.mapping.renderTeamMap(
                             %(min_lat)s, %(max_lat)s, %(min_lng)s,
@@ -1259,7 +1259,7 @@
         """The HTML which shows a small version of the team's map."""
         return """
             <script type="text/javascript">
-                YUI().use('node', 'lp.app.mapping', function(Y) {
+                LPJS.use('node', 'lp.app.mapping', function(Y) {
                     function renderMap() {
                         Y.lp.app.mapping.renderTeamMapSmall(
                             %(center_lat)s, %(center_lng)s);

=== modified file 'lib/lp/registry/templates/distribution-index.pt'
--- lib/lp/registry/templates/distribution-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/distribution-index.pt	2012-02-01 16:02:20 +0000
@@ -11,7 +11,7 @@
       <tal:uses_launchpad_bugtracker
          condition="context/bug_tracking_usage/enumvalue:LAUNCHPAD">
         <script type="text/javascript">
-            YUI().use('lp.registry.structural_subscription', function(Y) {
+            LPJS.use('lp.registry.structural_subscription', function(Y) {
                 var module = Y.lp.registry.structural_subscription;
                 Y.on('domready', function() {
                   module.setup({content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/registry/templates/distributionsourcepackage-index.pt'
--- lib/lp/registry/templates/distributionsourcepackage-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/distributionsourcepackage-index.pt	2012-02-01 16:02:20 +0000
@@ -13,7 +13,7 @@
   <tal:uses_launchpad_bugtracker
      condition="context/distribution/bug_tracking_usage/enumvalue:LAUNCHPAD">
     <script type="text/javascript">
-      YUI().use('lp.registry.structural_subscription', function(Y) {
+      LPJS.use('lp.registry.structural_subscription', function(Y) {
           var module = Y.lp.registry.structural_subscription;
           Y.on('domready', function() {
             module.setup({content_box: "#structural-subscription-content-box"});
@@ -236,7 +236,7 @@
       </p>
     </div>
 <script type="text/javascript">
-YUI().use('node', 'event', 'lp.app.widgets.expander', function(Y) {
+LPJS.use('node', 'event', 'lp.app.widgets.expander', function(Y) {
 
     // XXX Michael Nelson 20090702 bug=340497 This slider
     // needs an integration test.

=== modified file 'lib/lp/registry/templates/distroseries-index.pt'
--- lib/lp/registry/templates/distroseries-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/distroseries-index.pt	2012-02-01 16:02:20 +0000
@@ -16,7 +16,7 @@
       <tal:uses_launchpad_bugtracker
          condition="context/bug_tracking_usage/enumvalue:LAUNCHPAD">
         <script type="text/javascript">
-            YUI().use('lp.registry.structural_subscription', function(Y) {
+            LPJS.use('lp.registry.structural_subscription', function(Y) {
                 var module = Y.lp.registry.structural_subscription;
                 Y.on('domready', function() {
                   module.setup({content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/registry/templates/distroseries-initialize.pt'
--- lib/lp/registry/templates/distroseries-initialize.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/distroseries-initialize.pt	2012-02-01 16:02:20 +0000
@@ -30,7 +30,7 @@
         <metal:form use-macro="context/@@launchpad_form/form" />
       </div>
       <script type="text/javascript">
-        YUI().use('lp.registry.distroseries.initseries', function(Y) {
+        LPJS.use('lp.registry.distroseries.initseries', function(Y) {
           Y.on('domready', Y.lp.registry.distroseries.initseries.setup);
         });
       </script>

=== modified file 'lib/lp/registry/templates/distroseries-localdifferences.pt'
--- lib/lp/registry/templates/distroseries-localdifferences.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/distroseries-localdifferences.pt	2012-02-01 16:02:20 +0000
@@ -60,7 +60,7 @@
       </span>
       <div metal:fill-slot="buttons">
         <script type="text/javascript">
-          YUI().use(
+          LPJS.use(
             'node', 'event', 'lp.registry.distroseriesdifferences_details',
             'lp.app.confirmationoverlay',function(Y) {
             Y.on('domready', function() {
@@ -295,14 +295,14 @@
       </div>
     </div>
 <script type="text/javascript">
-YUI().use('lp.registry.distroseriesdifferences_details', function(Y) {
+LPJS.use('lp.registry.distroseriesdifferences_details', function(Y) {
   Y.on('domready', function() {
     Y.lp.registry.distroseriesdifferences_details.setup();
   });
 });
 </script>
 <script type="text/javascript">
-  YUI().use("lp.registry.distroseries.differences", function(Y) {
+  LPJS.use("lp.registry.distroseries.differences", function(Y) {
     Y.on("domready", function() {
       var form = Y.one("form#distroseries-localdiff-search-filter");
       var differences = Y.lp.registry.distroseries.differences;

=== modified file 'lib/lp/registry/templates/milestone-index.pt'
--- lib/lp/registry/templates/milestone-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/milestone-index.pt	2012-02-01 16:02:20 +0000
@@ -17,7 +17,7 @@
     <tal:uses_launchpad_bugtracker
        condition="context/target/bug_tracking_usage/enumvalue:LAUNCHPAD">
       <script type="text/javascript">
-          YUI().use('lp.registry.structural_subscription', function(Y) {
+          LPJS.use('lp.registry.structural_subscription', function(Y) {
               var module = Y.lp.registry.structural_subscription;
               Y.on('domready', function() {
                 module.setup({content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/registry/templates/object-timeline-graph.pt'
--- lib/lp/registry/templates/object-timeline-graph.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/object-timeline-graph.pt	2012-02-01 16:02:20 +0000
@@ -47,7 +47,7 @@
           get_timeline_config.size = size;
       }
 
-      YUI().use('lp.registry.timeline', 'node', 'lp.app.dragscroll', 'lp.client',
+      LPJS.use('lp.registry.timeline', 'node', 'lp.app.dragscroll', 'lp.client',
         function(Y) {
           Y.on('domready', function(e) {
               if (Y.UA.ie) {

=== modified file 'lib/lp/registry/templates/people-index.pt'
--- lib/lp/registry/templates/people-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/people-index.pt	2012-02-01 16:02:20 +0000
@@ -106,7 +106,7 @@
             </table>
           </form>
           <script type="text/javascript">
-              YUI().use('lp', function (Y) {
+              LPJS.use('lp', function (Y) {
                   setFocusByName('name');
               });
           </script>

=== modified file 'lib/lp/registry/templates/person-macros.pt'
--- lib/lp/registry/templates/person-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/person-macros.pt	2012-02-01 16:02:20 +0000
@@ -253,7 +253,7 @@
               condition="private_prefix">
   <script type="text/javascript"
           tal:content="string:
-    YUI().use('node', 'event', function(Y) {
+    LPJS.use('node', 'event', function(Y) {
       // Prepend/remove 'private-' from team name based on visibility
       // setting.  User can choose to edit it back out, if they wish.
       function visibility_on_change(e) {

=== modified file 'lib/lp/registry/templates/product-index.pt'
--- lib/lp/registry/templates/product-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/product-index.pt	2012-02-01 16:02:20 +0000
@@ -34,7 +34,7 @@
     <tal:uses_launchpad_bugtracker
        condition="context/bug_tracking_usage/enumvalue:LAUNCHPAD">
       <script type="text/javascript">
-          YUI().use('lp.registry.structural_subscription', function(Y) {
+          LPJS.use('lp.registry.structural_subscription', function(Y) {
               var module = Y.lp.registry.structural_subscription;
               Y.on('domready', function() {
                 module.setup({content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/registry/templates/product-new.pt'
--- lib/lp/registry/templates/product-new.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/product-new.pt	2012-02-01 16:02:20 +0000
@@ -14,7 +14,7 @@
  * details widgets until the user states that the project they are
  * registering is not a duplicate.
  */
-YUI().use('node', 'lazr.effects', function(Y) {
+LPJS.use('node', 'lazr.effects', function(Y) {
     Y.on('domready', function() {
         /* These two regexps serve slightly different purposes.  The first
          * finds the leftmost run of valid url characters for the autofill

=== modified file 'lib/lp/registry/templates/productrelease-add-from-series.pt'
--- lib/lp/registry/templates/productrelease-add-from-series.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/productrelease-add-from-series.pt	2012-02-01 16:02:20 +0000
@@ -14,7 +14,7 @@
   <tal:script
     replace="structure
     string:&lt;script id='milestone-script' type='text/javascript'&gt;" />
-    YUI().use('node', 'lp.registry.milestoneoverlay', function (Y) {
+    LPJS.use('node', 'lp.registry.milestoneoverlay', function (Y) {
 
         // This is a value for the SELECT OPTION which is passed with
         // the SELECT's "change" event. It includes some symbols that are not

=== modified file 'lib/lp/registry/templates/products-index.pt'
--- lib/lp/registry/templates/products-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/products-index.pt	2012-02-01 16:02:20 +0000
@@ -47,7 +47,7 @@
         />
     </form>
     <script type="text/javascript">
-        YUI().use('lp', function (Y) {
+        LPJS.use('lp', function (Y) {
             setFocusByName('text');
         });
     </script>

=== modified file 'lib/lp/registry/templates/productseries-index.pt'
--- lib/lp/registry/templates/productseries-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/productseries-index.pt	2012-02-01 16:02:20 +0000
@@ -17,7 +17,7 @@
     <tal:uses_launchpad_bugtracker
        condition="context/bug_tracking_usage/enumvalue:LAUNCHPAD">
       <script type="text/javascript">
-          YUI().use('lp.registry.structural_subscription', function(Y) {
+          LPJS.use('lp.registry.structural_subscription', function(Y) {
               var module = Y.lp.registry.structural_subscription;
               Y.on('domready', function() {
                 module.setup({content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/registry/templates/productseries-setbranch.pt'
--- lib/lp/registry/templates/productseries-setbranch.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/productseries-setbranch.pt	2012-02-01 16:02:20 +0000
@@ -119,7 +119,7 @@
   </div>
 
   <script type="text/javascript">
-    YUI().use('lp.code.productseries_setbranch', function(Y) {
+    LPJS.use('lp.code.productseries_setbranch', function(Y) {
       Y.on('domready', Y.lp.code.productseries_setbranch.setup);
     });
   </script>

=== modified file 'lib/lp/registry/templates/project-index.pt'
--- lib/lp/registry/templates/project-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/project-index.pt	2012-02-01 16:02:20 +0000
@@ -12,7 +12,7 @@
       <tal:uses_launchpad_bugtracker
          condition="context/bug_tracking_usage/enumvalue:LAUNCHPAD">
         <script type="text/javascript">
-            YUI().use('lp.registry.structural_subscription', function(Y) {
+            LPJS.use('lp.registry.structural_subscription', function(Y) {
                 var module = Y.lp.registry.structural_subscription;
                 Y.on('domready', function() {
                   module.setup({content_box: "#structural-subscription-content-box"});

=== modified file 'lib/lp/registry/templates/projects-index.pt'
--- lib/lp/registry/templates/projects-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/projects-index.pt	2012-02-01 16:02:20 +0000
@@ -33,7 +33,7 @@
           type="submit" value="Search project groups" />
       </form>
       <script type="text/javascript">
-          YUI().use('lp', function (Y) {
+          LPJS.use('lp', function (Y) {
               setFocusByName('text');
           });
       </script>

=== modified file 'lib/lp/registry/templates/team-portlet-membership.pt'
--- lib/lp/registry/templates/team-portlet-membership.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/team-portlet-membership.pt	2012-02-01 16:02:20 +0000
@@ -105,7 +105,7 @@
           tal:condition="link/enabled">
         <script type="text/javascript"
                 tal:content="string:
-          YUI().use('lp.registry.team', function(Y) {
+          LPJS.use('lp.registry.team', function(Y) {
               Y.on('load',
                   function(e) {
                       Y.lp.registry.team.setup_add_member_handler(

=== modified file 'lib/lp/registry/templates/teammembership-index.pt'
--- lib/lp/registry/templates/teammembership-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/teammembership-index.pt	2012-02-01 16:02:20 +0000
@@ -20,7 +20,7 @@
       use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" />
 
     <script type="text/javascript">
-      YUI().use('node', 'lp.app.calendar', function(Y) {
+      LPJS.use('node', 'lp.app.calendar', function(Y) {
           // Ensure that when the picker is used the radio button switches
           // from 'Never' to 'On' and the expiry field is enabled.
           Y.on("available", function(e) {

=== modified file 'lib/lp/registry/templates/timeline-macros.pt'
--- lib/lp/registry/templates/timeline-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/registry/templates/timeline-macros.pt	2012-02-01 16:02:20 +0000
@@ -45,7 +45,7 @@
       if (size != NaN && size >= 1) {
           timeline_url += "size=" + size + "&";
       }
-      YUI().use('node', function(Y) {
+      LPJS.use('node', function(Y) {
           if (Y.UA.ie) {
               return;
           }

=== modified file 'lib/lp/services/profile/profile.pt'
--- lib/lp/services/profile/profile.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/services/profile/profile.pt	2012-02-01 16:02:20 +0000
@@ -347,7 +347,7 @@
   </tal:block>
 </div>
 <script>
-YUI().use('node', 'lp', 'transition', function (Y) {
+LPJS.use('node', 'lp', 'transition', function (Y) {
     Y.one('div#reveal_profiling').on('click', function (e) {
         Y.one('div#profiling_info').setStyle('display', 'block');
         e.preventDefault();
@@ -359,7 +359,7 @@
 });
 </script>
 <script tal:condition="not:options/sql_traceback_none|nothing">
-YUI().use('node', 'lp', 'transition', function (Y) {
+LPJS.use('node', 'lp', 'transition', function (Y) {
     function slideIn(target) {
         target.transition({
             easing: 'ease-in',

=== modified file 'lib/lp/soyuz/templates/archive-edit-dependencies.pt'
--- lib/lp/soyuz/templates/archive-edit-dependencies.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/soyuz/templates/archive-edit-dependencies.pt	2012-02-01 16:02:20 +0000
@@ -62,7 +62,7 @@
   </div> <!-- launchpad_form -->
 
 <script type="text/javascript">
-   YUI().use("node", function(Y) {
+   LPJS.use("node", function(Y) {
 
        // Highlight (setting bold font-weight) the label for the
        // selected option in a given NodesList. Assumes the input is

=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
--- lib/lp/soyuz/templates/archive-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/soyuz/templates/archive-index.pt	2012-02-01 16:02:20 +0000
@@ -148,7 +148,7 @@
             >Celso Providelo</a>.</p>
 
         <script type="text/javascript">
-          YUI().use('lp.app.widgets.expander', function(Y) {
+          LPJS.use('lp.app.widgets.expander', function(Y) {
               var widget_header = Y.one('#ppa-install .widget-header');
               var content = Y.one('.widget-body');
               var expander = new Y.lp.app.widgets.expander.Expander(

=== modified file 'lib/lp/soyuz/templates/archive-macros.pt'
--- lib/lp/soyuz/templates/archive-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/soyuz/templates/archive-macros.pt	2012-02-01 16:02:20 +0000
@@ -10,7 +10,7 @@
   </tal:comment>
 
 <script type="text/javascript">
-YUI().use('node', 'io-base', 'lp.anim', 'lp.soyuz.base',
+LPJS.use('node', 'io-base', 'lp.anim', 'lp.soyuz.base',
         'lp.app.widgets.expander', function(Y) {
 
 

=== modified file 'lib/lp/soyuz/templates/archive-packages.pt'
--- lib/lp/soyuz/templates/archive-packages.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/soyuz/templates/archive-packages.pt	2012-02-01 16:02:20 +0000
@@ -27,7 +27,7 @@
 
       <script type="text/javascript" id="repository-size-update"
               tal:condition="view/archive_url">
-YUI().use('io-base', 'lp.anim', 'node', 'lp.soyuz.base',
+LPJS.use('io-base', 'lp.anim', 'node', 'lp.soyuz.base',
           'lp.soyuz.update_archive_build_statuses', function(Y) {
 
 
@@ -92,7 +92,7 @@
 });
       </script>
       <script type="text/javascript" id="repository-size-update">
-YUI().use('lp.soyuz.archive_packages',
+LPJS.use('lp.soyuz.archive_packages',
           'lp.app.widgets.expander.Expander', function(Y) {
 
 Y.on('domready', function() {

=== modified file 'lib/lp/soyuz/templates/archive-subscribers.pt'
--- lib/lp/soyuz/templates/archive-subscribers.pt	2012-01-26 13:36:20 +0000
+++ lib/lp/soyuz/templates/archive-subscribers.pt	2012-02-01 16:02:20 +0000
@@ -97,7 +97,7 @@
         </form>
       </div><!-- class="portlet" -->
       <script type="text/javascript" id="setup-archivesubscribers-index">
-          YUI().use('lp.soyuz.archivesubscribers_index', function(Y) {
+          LPJS.use('lp.soyuz.archivesubscribers_index', function(Y) {
               Y.lp.soyuz.archivesubscribers_index.setup_archivesubscribers_index();
           });
       </script>

=== modified file 'lib/lp/soyuz/templates/distributionsourcepackage-publishinghistory.pt'
--- lib/lp/soyuz/templates/distributionsourcepackage-publishinghistory.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/soyuz/templates/distributionsourcepackage-publishinghistory.pt	2012-02-01 16:02:20 +0000
@@ -11,7 +11,7 @@
 
 <div metal:fill-slot="head_epilogue">
   <script type="text/javascript">
-    YUI().use('node', 'lp.app.widgets.expander', function(Y) {
+    LPJS.use('node', 'lp.app.widgets.expander', function(Y) {
       Y.on('domready', function() {
         var all_expanders = Y.all('.expander-icon');
         all_expanders.each(function(icon) {

=== modified file 'lib/lp/soyuz/templates/distroseries-queue.pt'
--- lib/lp/soyuz/templates/distroseries-queue.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/soyuz/templates/distroseries-queue.pt	2012-02-01 16:02:20 +0000
@@ -11,7 +11,7 @@
 
 <div metal:fill-slot="head_epilogue">
   <script type="text/javascript">
-    YUI().use('node', 'lp.app.widgets.expander', function(Y) {
+    LPJS.use('node', 'lp.app.widgets.expander', function(Y) {
         Y.on('domready', function() {
             var all_expanders = Y.all('.expander-link');
             all_expanders.each(function(link) {

=== modified file 'lib/lp/translations/templates/languageset-index.pt'
--- lib/lp/translations/templates/languageset-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/languageset-index.pt	2012-02-01 16:02:20 +0000
@@ -9,7 +9,7 @@
   <body>
     <div metal:fill-slot="head_epilogue">
       <script type="text/javascript">
-          YUI().use('lp.languages', 'event', function(Y) {
+          LPJS.use('lp.languages', 'event', function(Y) {
               Y.on('domready', function(e) {
                   Y.lp.languages.initialize_languages_page(Y);
               });

=== modified file 'lib/lp/translations/templates/object-templates.pt'
--- lib/lp/translations/templates/object-templates.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/object-templates.pt	2012-02-01 16:02:20 +0000
@@ -7,7 +7,7 @@
   <body>
     <tal:head_epilogue metal:fill-slot="head_epilogue">
       <script type="text/javascript">
-        YUI().use('lp.translations.sourcepackage_sharing_details', function(Y) {
+        LPJS.use('lp.translations.sourcepackage_sharing_details', function(Y) {
           Y.on('domready', function() {
               Y.lp.translations.sourcepackage_sharing_details.prepare(
                 LP.cache);
@@ -45,7 +45,7 @@
         }
       </style>
       <script language="JavaScript" type="text/javascript">
-      YUI().use('node-base', 'event-delegate', function(Y) {
+      LPJS.use('node-base', 'event-delegate', function(Y) {
           Y.on('domready', function(e) {
               Y.all('#templates_table .template_links').addClass(
                     'inactive_links');

=== modified file 'lib/lp/translations/templates/pofile-export.pt'
--- lib/lp/translations/templates/pofile-export.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/pofile-export.pt	2012-02-01 16:02:20 +0000
@@ -13,7 +13,7 @@
     }
     </style>
     <script type="text/javascript">
-    YUI().use('node', 'event', function(Y){
+    LPJS.use('node', 'event', function(Y){
         Y.on('domready', function(){
             // The pochanged option is only available for the PO format.
             var formatlist = Y.one('#div_format select');

=== modified file 'lib/lp/translations/templates/pofile-translate.pt'
--- lib/lp/translations/templates/pofile-translate.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/pofile-translate.pt	2012-02-01 16:02:20 +0000
@@ -15,7 +15,7 @@
     </style>
 
     <script type="text/javascript">
-      YUI().use('lp.translations.pofile', function(Y) {
+      LPJS.use('lp.translations.pofile', function(Y) {
         Y.on('domready', Y.lp.translations.pofile.initializePOFile);
       });
 

=== modified file 'lib/lp/translations/templates/sourcepackage-sharing-details.pt'
--- lib/lp/translations/templates/sourcepackage-sharing-details.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/sourcepackage-sharing-details.pt	2012-02-01 16:02:20 +0000
@@ -9,7 +9,7 @@
   <body>
     <metal:block fill-slot="head_epilogue">
       <script type="text/javascript">
-        YUI().use('lp.translations.sourcepackage_sharing_details', function(Y) {
+        LPJS.use('lp.translations.sourcepackage_sharing_details', function(Y) {
           Y.on('domready', function() {
               Y.lp.translations.sourcepackage_sharing_details.prepare(
                 LP.cache);

=== modified file 'lib/lp/translations/templates/translation-import-queue-macros.pt'
--- lib/lp/translations/templates/translation-import-queue-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/translation-import-queue-macros.pt	2012-02-01 16:02:20 +0000
@@ -13,7 +13,7 @@
       <script type="text/javascript" tal:content="view/choice_confs_js" />
 
       <script type="text/javascript">
-          YUI().use('lp.translations.importqueue', 'event', function(Y) {
+          LPJS.use('lp.translations.importqueue', 'event', function(Y) {
               Y.on('domready', function(e) {
                   Y.lp.translations.importqueue.initialize_import_queue_page(Y);
               });

=== modified file 'lib/lp/translations/templates/translationimportqueueentry-index.pt'
--- lib/lp/translations/templates/translationimportqueueentry-index.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/translationimportqueueentry-index.pt	2012-02-01 16:02:20 +0000
@@ -19,7 +19,7 @@
       var template_domains = {'name1': 'domain1', 'name2': 'domain2'};
     </script>
     <script type="text/javascript">
-      YUI().use('node', 'lp.translations.importqueueentry',
+      LPJS.use('node', 'lp.translations.importqueueentry',
       function (Y) {
         Y.on('domready', Y.lp.translations.importqueueentry.setup_page);
       });

=== modified file 'lib/lp/translations/templates/translationmessage-translate.pt'
--- lib/lp/translations/templates/translationmessage-translate.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/translationmessage-translate.pt	2012-02-01 16:02:20 +0000
@@ -14,7 +14,7 @@
     }
     </style>
     <script type="text/javascript">
-      YUI().use('lp.translations.pofile', function(Y) {
+      LPJS.use('lp.translations.pofile', function(Y) {
         Y.on('domready', Y.lp.translations.pofile.initializeTranslationMessage);
       });
     </script>

=== modified file 'lib/lp/translations/templates/translations-macros.pt'
--- lib/lp/translations/templates/translations-macros.pt	2012-01-19 22:14:01 +0000
+++ lib/lp/translations/templates/translations-macros.pt	2012-02-01 16:02:20 +0000
@@ -150,7 +150,7 @@
 
 <metal:languages-table-js define-macro="languages-table-js">
       <script type="text/javascript">
-      YUI().use('lp.translations.languages', 'event', function(Y) {
+      LPJS.use('lp.translations.languages', 'event', function(Y) {
           Y.on("click", function(e) {
             Y.lp.translations.languages.toggle_languages_visibility(e);
           }, "#toggle-languages-visibility");