~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/templates/distributionsourcepackage-index.pt

  • Committer: Colin Watson
  • Date: 2011-08-19 00:25:11 UTC
  • mfrom: (7675.1045.728 db-devel)
  • mto: This revision was merged to the branch mainline in revision 13909.
  • Revision ID: cjwatson@canonical.com-20110819002511-0x8hrqs1ckiqk53g
merge db-devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
          <a class="expander"
152
152
             tal:attributes="id string:pub${pubid}-expander;
153
153
                             href string:${archive/fmt:url}/+sourcepub/${pubid}/+listing-archive-extra">
154
 
            <img style="padding-right:0.5em;" src="/@@/treeCollapsed"
155
 
                 alt="Show details" title="Show details"
156
 
                 tal:attributes="id string:pub${pubid}-arrow"/>
 
154
            &nbsp;
157
155
          </a>
158
156
          <a tal:attributes="href row/version">
159
157
            <img src="/@@/package-source" />
174
172
               content="string:(not published)"/>
175
173
        </td>
176
174
      </tr>
177
 
      <tr tal:attributes="id string:pub${pubid}" style="display: none">
 
175
      <tr tal:attributes="id string:pub${pubid}">
178
176
        <td colspan="3">
179
177
          <div class="package-details"
180
178
               tal:attributes="id string:pub${pubid}-container"></div>
190
188
 
191
189
      </tal:rows>
192
190
    </table>
193
 
    <script
194
 
       tal:content="string:LP.cache['archive_context_url'] = '${archive/fmt:url}';"></script>
195
191
    <metal:js use-macro="archive/@@+macros/expandable-table-js"/>
196
192
 
197
193
  </div>
240
236
      </p>
241
237
    </div>
242
238
<script type="text/javascript">
243
 
    LPS.use('node', 'event', 'lazr.effects', function(Y) {
 
239
LPS.use('node', 'event', 'lp.app.widgets.expander', function(Y) {
244
240
 
245
241
    // XXX Michael Nelson 20090702 bug=340497 This slider
246
242
    // needs an integration test.
247
 
    // Collapse the body of the slider widget initially.
248
 
    Y.one('#related-ppa-versions .widget-bd').addClass('lazr-closed');
249
 
 
250
 
    // Ensure that the widget header uses the correct sprite icon
251
 
    // and gets the styling for javascript actions applied.
252
 
    var widget_header = Y.one('#related-ppa-versions .widget-hd');
253
 
    widget_header.addClass('sprite');
254
 
    widget_header.addClass('treeCollapsed');
255
 
    widget_header.addClass('js-action');
256
 
 
257
 
    var slide;
258
 
    Y.on('click', function(e) {
259
 
        if (!slide) {
260
 
            slide = Y.lazr.effects.slide_out('#related-ppa-versions .widget-bd');
261
 
            widget_header.replaceClass('treeCollapsed', 'treeExpanded');
262
 
        } else {
263
 
            slide.set('reverse', !slide.get('reverse'));
264
 
            widget_header.toggleClass('treeExpanded');
265
 
            widget_header.toggleClass('treeCollapsed');
266
 
        }
267
 
        slide.stop();
268
 
        slide.run();
269
 
 
270
 
    }, '#slide-trigger');
 
243
 
 
244
    var related_ppas = Y.one('#related-ppa-versions');
 
245
    var widget_header = related_ppas.one('.widget-hd');
 
246
    var widget_body = related_ppas.one('.widget-bd');
 
247
    var expander = new Y.lp.app.widgets.expander.Expander(
 
248
        widget_header, widget_body);
 
249
    expander.setUp(true);
271
250
});
272
251
</script>
273
252