git repos / PlatformFolders

blame: html/doxygen/4.1.0/dynsections.js

normal view · raw

9e6bb466 Poul Sander 2021-08-08 15:42 1
/*
9e6bb466 Poul Sander 2021-08-08 15:42 2
 @licstart  The following is the entire license notice for the
9e6bb466 Poul Sander 2021-08-08 15:42 3
 JavaScript code in this file.
9e6bb466 Poul Sander 2021-08-08 15:42 4
9e6bb466 Poul Sander 2021-08-08 15:42 5
 Copyright (C) 1997-2017 by Dimitri van Heesch
9e6bb466 Poul Sander 2021-08-08 15:42 6
9e6bb466 Poul Sander 2021-08-08 15:42 7
 This program is free software; you can redistribute it and/or modify
9e6bb466 Poul Sander 2021-08-08 15:42 8
 it under the terms of the GNU General Public License as published by
9e6bb466 Poul Sander 2021-08-08 15:42 9
 the Free Software Foundation; either version 2 of the License, or
9e6bb466 Poul Sander 2021-08-08 15:42 10
 (at your option) any later version.
9e6bb466 Poul Sander 2021-08-08 15:42 11
9e6bb466 Poul Sander 2021-08-08 15:42 12
 This program is distributed in the hope that it will be useful,
9e6bb466 Poul Sander 2021-08-08 15:42 13
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9e6bb466 Poul Sander 2021-08-08 15:42 14
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9e6bb466 Poul Sander 2021-08-08 15:42 15
 GNU General Public License for more details.
9e6bb466 Poul Sander 2021-08-08 15:42 16
9e6bb466 Poul Sander 2021-08-08 15:42 17
 You should have received a copy of the GNU General Public License along
9e6bb466 Poul Sander 2021-08-08 15:42 18
 with this program; if not, write to the Free Software Foundation, Inc.,
9e6bb466 Poul Sander 2021-08-08 15:42 19
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
9e6bb466 Poul Sander 2021-08-08 15:42 20
9e6bb466 Poul Sander 2021-08-08 15:42 21
 @licend  The above is the entire license notice
9e6bb466 Poul Sander 2021-08-08 15:42 22
 for the JavaScript code in this file
9e6bb466 Poul Sander 2021-08-08 15:42 23
 */
9e6bb466 Poul Sander 2021-08-08 15:42 24
function toggleVisibility(linkObj)
9e6bb466 Poul Sander 2021-08-08 15:42 25
{
9e6bb466 Poul Sander 2021-08-08 15:42 26
 var base = $(linkObj).attr('id');
9e6bb466 Poul Sander 2021-08-08 15:42 27
 var summary = $('#'+base+'-summary');
9e6bb466 Poul Sander 2021-08-08 15:42 28
 var content = $('#'+base+'-content');
9e6bb466 Poul Sander 2021-08-08 15:42 29
 var trigger = $('#'+base+'-trigger');
9e6bb466 Poul Sander 2021-08-08 15:42 30
 var src=$(trigger).attr('src');
9e6bb466 Poul Sander 2021-08-08 15:42 31
 if (content.is(':visible')===true) {
9e6bb466 Poul Sander 2021-08-08 15:42 32
   content.hide();
9e6bb466 Poul Sander 2021-08-08 15:42 33
   summary.show();
9e6bb466 Poul Sander 2021-08-08 15:42 34
   $(linkObj).addClass('closed').removeClass('opened');
9e6bb466 Poul Sander 2021-08-08 15:42 35
   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
9e6bb466 Poul Sander 2021-08-08 15:42 36
 } else {
9e6bb466 Poul Sander 2021-08-08 15:42 37
   content.show();
9e6bb466 Poul Sander 2021-08-08 15:42 38
   summary.hide();
9e6bb466 Poul Sander 2021-08-08 15:42 39
   $(linkObj).removeClass('closed').addClass('opened');
9e6bb466 Poul Sander 2021-08-08 15:42 40
   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
9e6bb466 Poul Sander 2021-08-08 15:42 41
 }
9e6bb466 Poul Sander 2021-08-08 15:42 42
 return false;
9e6bb466 Poul Sander 2021-08-08 15:42 43
}
9e6bb466 Poul Sander 2021-08-08 15:42 44
9e6bb466 Poul Sander 2021-08-08 15:42 45
function updateStripes()
9e6bb466 Poul Sander 2021-08-08 15:42 46
{
9e6bb466 Poul Sander 2021-08-08 15:42 47
  $('table.directory tr').
9e6bb466 Poul Sander 2021-08-08 15:42 48
       removeClass('even').filter(':visible:even').addClass('even');
9e6bb466 Poul Sander 2021-08-08 15:42 49
}
9e6bb466 Poul Sander 2021-08-08 15:42 50
9e6bb466 Poul Sander 2021-08-08 15:42 51
function toggleLevel(level)
9e6bb466 Poul Sander 2021-08-08 15:42 52
{
9e6bb466 Poul Sander 2021-08-08 15:42 53
  $('table.directory tr').each(function() {
9e6bb466 Poul Sander 2021-08-08 15:42 54
    var l = this.id.split('_').length-1;
9e6bb466 Poul Sander 2021-08-08 15:42 55
    var i = $('#img'+this.id.substring(3));
9e6bb466 Poul Sander 2021-08-08 15:42 56
    var a = $('#arr'+this.id.substring(3));
9e6bb466 Poul Sander 2021-08-08 15:42 57
    if (l<level+1) {
9e6bb466 Poul Sander 2021-08-08 15:42 58
      i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
9e6bb466 Poul Sander 2021-08-08 15:42 59
      a.html('&#9660;');
9e6bb466 Poul Sander 2021-08-08 15:42 60
      $(this).show();
9e6bb466 Poul Sander 2021-08-08 15:42 61
    } else if (l==level+1) {
9e6bb466 Poul Sander 2021-08-08 15:42 62
      i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
9e6bb466 Poul Sander 2021-08-08 15:42 63
      a.html('&#9658;');
9e6bb466 Poul Sander 2021-08-08 15:42 64
      $(this).show();
9e6bb466 Poul Sander 2021-08-08 15:42 65
    } else {
9e6bb466 Poul Sander 2021-08-08 15:42 66
      $(this).hide();
9e6bb466 Poul Sander 2021-08-08 15:42 67
    }
9e6bb466 Poul Sander 2021-08-08 15:42 68
  });
9e6bb466 Poul Sander 2021-08-08 15:42 69
  updateStripes();
9e6bb466 Poul Sander 2021-08-08 15:42 70
}
9e6bb466 Poul Sander 2021-08-08 15:42 71
9e6bb466 Poul Sander 2021-08-08 15:42 72
function toggleFolder(id)
9e6bb466 Poul Sander 2021-08-08 15:42 73
{
9e6bb466 Poul Sander 2021-08-08 15:42 74
  // the clicked row
9e6bb466 Poul Sander 2021-08-08 15:42 75
  var currentRow = $('#row_'+id);
9e6bb466 Poul Sander 2021-08-08 15:42 76
9e6bb466 Poul Sander 2021-08-08 15:42 77
  // all rows after the clicked row
9e6bb466 Poul Sander 2021-08-08 15:42 78
  var rows = currentRow.nextAll("tr");
9e6bb466 Poul Sander 2021-08-08 15:42 79
9e6bb466 Poul Sander 2021-08-08 15:42 80
  var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
9e6bb466 Poul Sander 2021-08-08 15:42 81
9e6bb466 Poul Sander 2021-08-08 15:42 82
  // only match elements AFTER this one (can't hide elements before)
9e6bb466 Poul Sander 2021-08-08 15:42 83
  var childRows = rows.filter(function() { return this.id.match(re); });
9e6bb466 Poul Sander 2021-08-08 15:42 84
9e6bb466 Poul Sander 2021-08-08 15:42 85
  // first row is visible we are HIDING
9e6bb466 Poul Sander 2021-08-08 15:42 86
  if (childRows.filter(':first').is(':visible')===true) {
9e6bb466 Poul Sander 2021-08-08 15:42 87
    // replace down arrow by right arrow for current row
9e6bb466 Poul Sander 2021-08-08 15:42 88
    var currentRowSpans = currentRow.find("span");
9e6bb466 Poul Sander 2021-08-08 15:42 89
    currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
9e6bb466 Poul Sander 2021-08-08 15:42 90
    currentRowSpans.filter(".arrow").html('&#9658;');
9e6bb466 Poul Sander 2021-08-08 15:42 91
    rows.filter("[id^=row_"+id+"]").hide(); // hide all children
9e6bb466 Poul Sander 2021-08-08 15:42 92
  } else { // we are SHOWING
9e6bb466 Poul Sander 2021-08-08 15:42 93
    // replace right arrow by down arrow for current row
9e6bb466 Poul Sander 2021-08-08 15:42 94
    var currentRowSpans = currentRow.find("span");
9e6bb466 Poul Sander 2021-08-08 15:42 95
    currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
9e6bb466 Poul Sander 2021-08-08 15:42 96
    currentRowSpans.filter(".arrow").html('&#9660;');
9e6bb466 Poul Sander 2021-08-08 15:42 97
    // replace down arrows by right arrows for child rows
9e6bb466 Poul Sander 2021-08-08 15:42 98
    var childRowsSpans = childRows.find("span");
9e6bb466 Poul Sander 2021-08-08 15:42 99
    childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
9e6bb466 Poul Sander 2021-08-08 15:42 100
    childRowsSpans.filter(".arrow").html('&#9658;');
9e6bb466 Poul Sander 2021-08-08 15:42 101
    childRows.show(); //show all children
9e6bb466 Poul Sander 2021-08-08 15:42 102
  }
9e6bb466 Poul Sander 2021-08-08 15:42 103
  updateStripes();
9e6bb466 Poul Sander 2021-08-08 15:42 104
}
9e6bb466 Poul Sander 2021-08-08 15:42 105
9e6bb466 Poul Sander 2021-08-08 15:42 106
9e6bb466 Poul Sander 2021-08-08 15:42 107
function toggleInherit(id)
9e6bb466 Poul Sander 2021-08-08 15:42 108
{
9e6bb466 Poul Sander 2021-08-08 15:42 109
  var rows = $('tr.inherit.'+id);
9e6bb466 Poul Sander 2021-08-08 15:42 110
  var img = $('tr.inherit_header.'+id+' img');
9e6bb466 Poul Sander 2021-08-08 15:42 111
  var src = $(img).attr('src');
9e6bb466 Poul Sander 2021-08-08 15:42 112
  if (rows.filter(':first').is(':visible')===true) {
9e6bb466 Poul Sander 2021-08-08 15:42 113
    rows.css('display','none');
9e6bb466 Poul Sander 2021-08-08 15:42 114
    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
9e6bb466 Poul Sander 2021-08-08 15:42 115
  } else {
9e6bb466 Poul Sander 2021-08-08 15:42 116
    rows.css('display','table-row'); // using show() causes jump in firefox
9e6bb466 Poul Sander 2021-08-08 15:42 117
    $(img).attr('src',src.substring(0,src.length-10)+'open.png');
9e6bb466 Poul Sander 2021-08-08 15:42 118
  }
9e6bb466 Poul Sander 2021-08-08 15:42 119
}
9e6bb466 Poul Sander 2021-08-08 15:42 120
/* @license-end */
1970-01-01 00:00 121