/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: Jelmer Vernooij
  • Date: 2018-06-09 07:26:34 UTC
  • mto: (491.6.1 breezy)
  • mto: This revision was merged to the branch mainline in revision 494.
  • Revision ID: jelmer@jelmer.uk-20180609072634-cwklrpi8udykluwi
HACKING => HACKING.rst.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
function toggle_expand_all(action)
2
2
{
3
 
  $('.revision_log').each(
4
 
    function(i, item)
 
3
  var revlogs = Y.all('.revision_log');
 
4
  if (revlogs == null) return;
 
5
  revlogs.each(
 
6
    function(item, i)
5
7
    {
6
8
      var collapsable = item.collapsable;
7
9
      if(action == 'close')
8
10
      {
9
 
        $('#expand_all').css({'display': 'block'});
10
 
        $('#collapse_all').css({'display': 'none'});
 
11
        Y.get('#expand_all').setStyle('display','block');
 
12
        Y.get('#collapse_all').setStyle('display','none');
11
13
        collapsable.close();
12
14
      }
13
15
      else if(action == 'open')
14
16
      {
15
 
        $('#expand_all').css({'display': 'none'});
16
 
        $('#collapse_all').css({'display': 'block'});
 
17
        Y.get('#expand_all').setStyle('display','none');
 
18
        Y.get('#collapse_all').setStyle('display','block');
17
19
        collapsable.open();
18
20
      }
19
21
    });
20
22
}
21
23
 
22
 
$(function() {
23
 
$('#expand_all a').on('click',
 
24
Y.on(
 
25
  'click',
24
26
  function (event) {
25
27
    event.preventDefault();
26
28
    toggle_expand_all('open');
27
29
  },
 
30
  '#expand_all a'
28
31
);
29
 
});
30
32
 
31
 
$(function() {
32
 
$('#collapse_all a').on('click',
 
33
Y.on(
 
34
  'click',
33
35
  function (event) {
34
36
    event.preventDefault();
35
37
    toggle_expand_all('close');
36
38
  },
 
39
  '#collapse_all a'
37
40
);
38
 
});
39
 
 
40
 
$(function () {
41
 
    $(".show_if_js").removeClass("show_if_js");
42
 
});
43
 
 
44
 
$(function()
 
41
 
 
42
Y.on(
 
43
  "domready", function () {
 
44
    Y.all(".show_if_js").removeClass("show_if_js");
 
45
  });
 
46
 
 
47
Y.on(
 
48
  'domready',
 
49
  function()
45
50
  {
46
 
    $('.revision_log').each(
47
 
      function(i, item)
 
51
    var revlogs = Y.all('.revision_log');
 
52
    if (revlogs == null) return;
 
53
    revlogs.each(
 
54
      function(item, i)
48
55
      {
49
 
        var revid = revids[item.id.replace('log-', '')];
 
56
        var revid = revids[item.get('id').replace('log-', '')];
50
57
        var collapsable = new Collapsable(
51
58
          {
52
 
            expand_icon: $(item).find('.expand_icon'),
53
 
            open_node: $(item).find('.long_description'),
54
 
            close_node: $(item).find('.short_description'),
 
59
            expand_icon: item.query('.expand_icon'),
 
60
            open_node: item.query('.long_description'),
 
61
            close_node: item.query('.short_description'),
55
62
            source: global_path + '+revlog/' + revid,
56
 
            loading: $(item).find('.loading'),
 
63
            loading: item.query('.loading'),
57
64
            is_open: false
58
65
          });
59
66
 
60
 
        $(item).find('.expand_revisioninfo a').on(
 
67
        item.query('.expand_revisioninfo a').on(
61
68
          'click',
62
69
          function(e) {
63
70
            e.preventDefault();