~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/templates/archive-index.pt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-17 23:09:32 UTC
  • mfrom: (13452.1.1 revert-lots)
  • Revision ID: launchpad@pqm.canonical.com-20110717230932-sp6yro99is2077fx
[r=wgrant][rollback=13421] Revert r13421 and r13438 (already
 partially reverted in r13443 and restored in r13445). Fix for DSP:+index
 expanders has not yet landed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
              target="help">Read about installing</a>)
96
96
        </p>
97
97
 
98
 
        <div class="widget-header">
99
 
          Technical details about this PPA
 
98
        <div id="ppa-install-slide-trigger">
 
99
          <div class="widget-header">
 
100
            Technical details about this PPA
 
101
          </div>
100
102
        </div>
101
103
 
102
104
        <div class="widget-body">
146
148
            >Celso Providelo</a>.</p>
147
149
 
148
150
        <script type="text/javascript">
149
 
          LPS.use('lp.app.widgets.expander', function(Y) {
150
 
              var widget_header = Y.one('#ppa-install .widget-header');
151
 
              var content = Y.one('.widget-body');
152
 
              var expander = new Y.lp.app.widgets.expander.Expander(
153
 
                  widget_header, content);
154
 
              expander.setUp(true);
155
 
          });
 
151
    LPS.use('node', 'event', 'lazr.effects', function(Y) {
 
152
 
 
153
    // Hide the widget body contents.
 
154
    Y.one('#ppa-install .widget-body').addClass('lazr-closed');
 
155
 
 
156
    // Ensure that the widget header uses the correct sprite icon
 
157
    // and gets the styling for javascript actions applied.
 
158
    var widget_header = Y.one('#ppa-install .widget-header');
 
159
    widget_header.addClass('sprite');
 
160
    widget_header.addClass('treeCollapsed');
 
161
    widget_header.addClass('js-action');
 
162
 
 
163
    var slide;
 
164
    function toggle_body_visibility(e) {
 
165
        if (!slide) {
 
166
            slide = Y.lazr.effects.slide_out('#ppa-install .widget-body');
 
167
            widget_header.replaceClass('treeCollapsed', 'treeExpanded');
 
168
        } else {
 
169
            slide.set('reverse', !slide.get('reverse'));
 
170
            widget_header.toggleClass('treeExpanded');
 
171
            widget_header.toggleClass('treeCollapsed');
 
172
        }
 
173
        slide.stop();
 
174
        slide.run();
 
175
    }
 
176
    Y.on('click', toggle_body_visibility,
 
177
         '#ppa-install-slide-trigger');
 
178
});
156
179
        </script>
157
180
      </tal:is-active>
158
181