/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/static/javascript/changelog.js

  • Committer: Michael Hudson
  • Date: 2009-03-16 02:04:32 UTC
  • mto: (299.1.1 ajaxy-revision-page)
  • mto: This revision was merged to the branch mainline in revision 300.
  • Revision ID: michael.hudson@canonical.com-20090316020432-ivdoua3uk74iwymb
make Collapsable more flexible in the direction we actually need to be
flexible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    revlogs.each(
54
54
      function(item, i)
55
55
      {
56
 
        var item_slide = item.query('.revisioninfo');
57
 
        var open_content  = new Array();
58
 
        var close_content = new Array();
59
 
        open_content.push(item.query('.long_description'));
60
 
        close_content.push(item.query('.short_description'));
61
 
        var expand_icon = item.query('.expand_icon');
62
 
        var collapsable = new Collapsable(item_slide, expand_icon, open_content, close_content, false);
 
56
        var revid = revids[item.get('id').replace('log-', '')];
 
57
        var collapsable = new Collapsable(
 
58
          {
 
59
            expand_icon: item.query('.expand_icon'),
 
60
            open_node: item.query('.long_description'),
 
61
            close_node: item.query('.short_description'),
 
62
            source: global_path + '+revlog/' + revid,
 
63
            source_target: item.query('.revisioninfo'),
 
64
            is_open: false
 
65
          });
63
66
 
64
67
        item.query('.expand_revisioninfo a').on(
65
68
          'click',
67
70
            e.preventDefault();
68
71
            collapsable.toggle();
69
72
          });
70
 
        var revid = revids[item.get('id').replace('log-', '')];
71
 
        collapsable.source = global_path + '+revlog/' + revid;
72
73
        item.collapsable = collapsable;
73
74
      });
74
75