git repos / PlatformFolders

blame: html/doxygen/3.2.0/dynsections.js

normal view · raw

04ab3520 sago007 2018-05-27 13:05 1
function toggleVisibility(linkObj)
04ab3520 sago007 2018-05-27 13:05 2
{
04ab3520 sago007 2018-05-27 13:05 3
 var base = $(linkObj).attr('id');
04ab3520 sago007 2018-05-27 13:05 4
 var summary = $('#'+base+'-summary');
04ab3520 sago007 2018-05-27 13:05 5
 var content = $('#'+base+'-content');
04ab3520 sago007 2018-05-27 13:05 6
 var trigger = $('#'+base+'-trigger');
04ab3520 sago007 2018-05-27 13:05 7
 var src=$(trigger).attr('src');
04ab3520 sago007 2018-05-27 13:05 8
 if (content.is(':visible')===true) {
04ab3520 sago007 2018-05-27 13:05 9
   content.hide();
04ab3520 sago007 2018-05-27 13:05 10
   summary.show();
04ab3520 sago007 2018-05-27 13:05 11
   $(linkObj).addClass('closed').removeClass('opened');
04ab3520 sago007 2018-05-27 13:05 12
   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
04ab3520 sago007 2018-05-27 13:05 13
 } else {
04ab3520 sago007 2018-05-27 13:05 14
   content.show();
04ab3520 sago007 2018-05-27 13:05 15
   summary.hide();
04ab3520 sago007 2018-05-27 13:05 16
   $(linkObj).removeClass('closed').addClass('opened');
04ab3520 sago007 2018-05-27 13:05 17
   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
04ab3520 sago007 2018-05-27 13:05 18
 } 
04ab3520 sago007 2018-05-27 13:05 19
 return false;
04ab3520 sago007 2018-05-27 13:05 20
}
04ab3520 sago007 2018-05-27 13:05 21
04ab3520 sago007 2018-05-27 13:05 22
function updateStripes()
04ab3520 sago007 2018-05-27 13:05 23
{
04ab3520 sago007 2018-05-27 13:05 24
  $('table.directory tr').
04ab3520 sago007 2018-05-27 13:05 25
       removeClass('even').filter(':visible:even').addClass('even');
04ab3520 sago007 2018-05-27 13:05 26
}
04ab3520 sago007 2018-05-27 13:05 27
04ab3520 sago007 2018-05-27 13:05 28
function toggleLevel(level)
04ab3520 sago007 2018-05-27 13:05 29
{
04ab3520 sago007 2018-05-27 13:05 30
  $('table.directory tr').each(function() {
04ab3520 sago007 2018-05-27 13:05 31
    var l = this.id.split('_').length-1;
04ab3520 sago007 2018-05-27 13:05 32
    var i = $('#img'+this.id.substring(3));
04ab3520 sago007 2018-05-27 13:05 33
    var a = $('#arr'+this.id.substring(3));
04ab3520 sago007 2018-05-27 13:05 34
    if (l<level+1) {
04ab3520 sago007 2018-05-27 13:05 35
      i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
04ab3520 sago007 2018-05-27 13:05 36
      a.html('&#9660;');
04ab3520 sago007 2018-05-27 13:05 37
      $(this).show();
04ab3520 sago007 2018-05-27 13:05 38
    } else if (l==level+1) {
04ab3520 sago007 2018-05-27 13:05 39
      i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
04ab3520 sago007 2018-05-27 13:05 40
      a.html('&#9658;');
04ab3520 sago007 2018-05-27 13:05 41
      $(this).show();
04ab3520 sago007 2018-05-27 13:05 42
    } else {
04ab3520 sago007 2018-05-27 13:05 43
      $(this).hide();
04ab3520 sago007 2018-05-27 13:05 44
    }
04ab3520 sago007 2018-05-27 13:05 45
  });
04ab3520 sago007 2018-05-27 13:05 46
  updateStripes();
04ab3520 sago007 2018-05-27 13:05 47
}
04ab3520 sago007 2018-05-27 13:05 48
04ab3520 sago007 2018-05-27 13:05 49
function toggleFolder(id)
04ab3520 sago007 2018-05-27 13:05 50
{
04ab3520 sago007 2018-05-27 13:05 51
  // the clicked row
04ab3520 sago007 2018-05-27 13:05 52
  var currentRow = $('#row_'+id);
04ab3520 sago007 2018-05-27 13:05 53
04ab3520 sago007 2018-05-27 13:05 54
  // all rows after the clicked row
04ab3520 sago007 2018-05-27 13:05 55
  var rows = currentRow.nextAll("tr");
04ab3520 sago007 2018-05-27 13:05 56
04ab3520 sago007 2018-05-27 13:05 57
  var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
04ab3520 sago007 2018-05-27 13:05 58
04ab3520 sago007 2018-05-27 13:05 59
  // only match elements AFTER this one (can't hide elements before)
04ab3520 sago007 2018-05-27 13:05 60
  var childRows = rows.filter(function() { return this.id.match(re); });
04ab3520 sago007 2018-05-27 13:05 61
04ab3520 sago007 2018-05-27 13:05 62
  // first row is visible we are HIDING
04ab3520 sago007 2018-05-27 13:05 63
  if (childRows.filter(':first').is(':visible')===true) {
04ab3520 sago007 2018-05-27 13:05 64
    // replace down arrow by right arrow for current row
04ab3520 sago007 2018-05-27 13:05 65
    var currentRowSpans = currentRow.find("span");
04ab3520 sago007 2018-05-27 13:05 66
    currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
04ab3520 sago007 2018-05-27 13:05 67
    currentRowSpans.filter(".arrow").html('&#9658;');
04ab3520 sago007 2018-05-27 13:05 68
    rows.filter("[id^=row_"+id+"]").hide(); // hide all children
04ab3520 sago007 2018-05-27 13:05 69
  } else { // we are SHOWING
04ab3520 sago007 2018-05-27 13:05 70
    // replace right arrow by down arrow for current row
04ab3520 sago007 2018-05-27 13:05 71
    var currentRowSpans = currentRow.find("span");
04ab3520 sago007 2018-05-27 13:05 72
    currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
04ab3520 sago007 2018-05-27 13:05 73
    currentRowSpans.filter(".arrow").html('&#9660;');
04ab3520 sago007 2018-05-27 13:05 74
    // replace down arrows by right arrows for child rows
04ab3520 sago007 2018-05-27 13:05 75
    var childRowsSpans = childRows.find("span");
04ab3520 sago007 2018-05-27 13:05 76
    childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
04ab3520 sago007 2018-05-27 13:05 77
    childRowsSpans.filter(".arrow").html('&#9658;');
04ab3520 sago007 2018-05-27 13:05 78
    childRows.show(); //show all children
04ab3520 sago007 2018-05-27 13:05 79
  }
04ab3520 sago007 2018-05-27 13:05 80
  updateStripes();
04ab3520 sago007 2018-05-27 13:05 81
}
04ab3520 sago007 2018-05-27 13:05 82
04ab3520 sago007 2018-05-27 13:05 83
04ab3520 sago007 2018-05-27 13:05 84
function toggleInherit(id)
04ab3520 sago007 2018-05-27 13:05 85
{
04ab3520 sago007 2018-05-27 13:05 86
  var rows = $('tr.inherit.'+id);
04ab3520 sago007 2018-05-27 13:05 87
  var img = $('tr.inherit_header.'+id+' img');
04ab3520 sago007 2018-05-27 13:05 88
  var src = $(img).attr('src');
04ab3520 sago007 2018-05-27 13:05 89
  if (rows.filter(':first').is(':visible')===true) {
04ab3520 sago007 2018-05-27 13:05 90
    rows.css('display','none');
04ab3520 sago007 2018-05-27 13:05 91
    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
04ab3520 sago007 2018-05-27 13:05 92
  } else {
04ab3520 sago007 2018-05-27 13:05 93
    rows.css('display','table-row'); // using show() causes jump in firefox
04ab3520 sago007 2018-05-27 13:05 94
    $(img).attr('src',src.substring(0,src.length-10)+'open.png');
04ab3520 sago007 2018-05-27 13:05 95
  }
04ab3520 sago007 2018-05-27 13:05 96
}
04ab3520 sago007 2018-05-27 13:05 97
1970-01-01 00:00 98