git repos / PlatformFolders

blame: html/doxygen/4.0.0/dynsections.js

normal view · raw

3af4e794 Poul Sander 2021-07-07 21:02 1
/*
3af4e794 Poul Sander 2021-07-07 21:02 2
 @licstart  The following is the entire license notice for the JavaScript code in this file.
3af4e794 Poul Sander 2021-07-07 21:02 3
3af4e794 Poul Sander 2021-07-07 21:02 4
 The MIT License (MIT)
3af4e794 Poul Sander 2021-07-07 21:02 5
3af4e794 Poul Sander 2021-07-07 21:02 6
 Copyright (C) 1997-2020 by Dimitri van Heesch
3af4e794 Poul Sander 2021-07-07 21:02 7
3af4e794 Poul Sander 2021-07-07 21:02 8
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software
3af4e794 Poul Sander 2021-07-07 21:02 9
 and associated documentation files (the "Software"), to deal in the Software without restriction,
3af4e794 Poul Sander 2021-07-07 21:02 10
 including without limitation the rights to use, copy, modify, merge, publish, distribute,
3af4e794 Poul Sander 2021-07-07 21:02 11
 sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
3af4e794 Poul Sander 2021-07-07 21:02 12
 furnished to do so, subject to the following conditions:
3af4e794 Poul Sander 2021-07-07 21:02 13
3af4e794 Poul Sander 2021-07-07 21:02 14
 The above copyright notice and this permission notice shall be included in all copies or
3af4e794 Poul Sander 2021-07-07 21:02 15
 substantial portions of the Software.
3af4e794 Poul Sander 2021-07-07 21:02 16
3af4e794 Poul Sander 2021-07-07 21:02 17
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
3af4e794 Poul Sander 2021-07-07 21:02 18
 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3af4e794 Poul Sander 2021-07-07 21:02 19
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
3af4e794 Poul Sander 2021-07-07 21:02 20
 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3af4e794 Poul Sander 2021-07-07 21:02 21
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3af4e794 Poul Sander 2021-07-07 21:02 22
3af4e794 Poul Sander 2021-07-07 21:02 23
 @licend  The above is the entire license notice for the JavaScript code in this file
3af4e794 Poul Sander 2021-07-07 21:02 24
 */
7e54d64b sago007 2018-06-24 15:21 25
function toggleVisibility(linkObj)
7e54d64b sago007 2018-06-24 15:21 26
{
7e54d64b sago007 2018-06-24 15:21 27
 var base = $(linkObj).attr('id');
7e54d64b sago007 2018-06-24 15:21 28
 var summary = $('#'+base+'-summary');
7e54d64b sago007 2018-06-24 15:21 29
 var content = $('#'+base+'-content');
7e54d64b sago007 2018-06-24 15:21 30
 var trigger = $('#'+base+'-trigger');
7e54d64b sago007 2018-06-24 15:21 31
 var src=$(trigger).attr('src');
7e54d64b sago007 2018-06-24 15:21 32
 if (content.is(':visible')===true) {
7e54d64b sago007 2018-06-24 15:21 33
   content.hide();
7e54d64b sago007 2018-06-24 15:21 34
   summary.show();
7e54d64b sago007 2018-06-24 15:21 35
   $(linkObj).addClass('closed').removeClass('opened');
7e54d64b sago007 2018-06-24 15:21 36
   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
7e54d64b sago007 2018-06-24 15:21 37
 } else {
7e54d64b sago007 2018-06-24 15:21 38
   content.show();
7e54d64b sago007 2018-06-24 15:21 39
   summary.hide();
7e54d64b sago007 2018-06-24 15:21 40
   $(linkObj).removeClass('closed').addClass('opened');
7e54d64b sago007 2018-06-24 15:21 41
   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
3af4e794 Poul Sander 2021-07-07 21:02 42
 }
7e54d64b sago007 2018-06-24 15:21 43
 return false;
7e54d64b sago007 2018-06-24 15:21 44
}
7e54d64b sago007 2018-06-24 15:21 45
7e54d64b sago007 2018-06-24 15:21 46
function updateStripes()
7e54d64b sago007 2018-06-24 15:21 47
{
7e54d64b sago007 2018-06-24 15:21 48
  $('table.directory tr').
7e54d64b sago007 2018-06-24 15:21 49
       removeClass('even').filter(':visible:even').addClass('even');
7e54d64b sago007 2018-06-24 15:21 50
}
7e54d64b sago007 2018-06-24 15:21 51
7e54d64b sago007 2018-06-24 15:21 52
function toggleLevel(level)
7e54d64b sago007 2018-06-24 15:21 53
{
7e54d64b sago007 2018-06-24 15:21 54
  $('table.directory tr').each(function() {
7e54d64b sago007 2018-06-24 15:21 55
    var l = this.id.split('_').length-1;
7e54d64b sago007 2018-06-24 15:21 56
    var i = $('#img'+this.id.substring(3));
7e54d64b sago007 2018-06-24 15:21 57
    var a = $('#arr'+this.id.substring(3));
7e54d64b sago007 2018-06-24 15:21 58
    if (l<level+1) {
7e54d64b sago007 2018-06-24 15:21 59
      i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
7e54d64b sago007 2018-06-24 15:21 60
      a.html('&#9660;');
7e54d64b sago007 2018-06-24 15:21 61
      $(this).show();
7e54d64b sago007 2018-06-24 15:21 62
    } else if (l==level+1) {
7e54d64b sago007 2018-06-24 15:21 63
      i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
7e54d64b sago007 2018-06-24 15:21 64
      a.html('&#9658;');
7e54d64b sago007 2018-06-24 15:21 65
      $(this).show();
7e54d64b sago007 2018-06-24 15:21 66
    } else {
7e54d64b sago007 2018-06-24 15:21 67
      $(this).hide();
7e54d64b sago007 2018-06-24 15:21 68
    }
7e54d64b sago007 2018-06-24 15:21 69
  });
7e54d64b sago007 2018-06-24 15:21 70
  updateStripes();
7e54d64b sago007 2018-06-24 15:21 71
}
7e54d64b sago007 2018-06-24 15:21 72
7e54d64b sago007 2018-06-24 15:21 73
function toggleFolder(id)
7e54d64b sago007 2018-06-24 15:21 74
{
7e54d64b sago007 2018-06-24 15:21 75
  // the clicked row
7e54d64b sago007 2018-06-24 15:21 76
  var currentRow = $('#row_'+id);
7e54d64b sago007 2018-06-24 15:21 77
7e54d64b sago007 2018-06-24 15:21 78
  // all rows after the clicked row
7e54d64b sago007 2018-06-24 15:21 79
  var rows = currentRow.nextAll("tr");
7e54d64b sago007 2018-06-24 15:21 80
7e54d64b sago007 2018-06-24 15:21 81
  var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
7e54d64b sago007 2018-06-24 15:21 82
7e54d64b sago007 2018-06-24 15:21 83
  // only match elements AFTER this one (can't hide elements before)
7e54d64b sago007 2018-06-24 15:21 84
  var childRows = rows.filter(function() { return this.id.match(re); });
7e54d64b sago007 2018-06-24 15:21 85
7e54d64b sago007 2018-06-24 15:21 86
  // first row is visible we are HIDING
7e54d64b sago007 2018-06-24 15:21 87
  if (childRows.filter(':first').is(':visible')===true) {
7e54d64b sago007 2018-06-24 15:21 88
    // replace down arrow by right arrow for current row
7e54d64b sago007 2018-06-24 15:21 89
    var currentRowSpans = currentRow.find("span");
7e54d64b sago007 2018-06-24 15:21 90
    currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
7e54d64b sago007 2018-06-24 15:21 91
    currentRowSpans.filter(".arrow").html('&#9658;');
7e54d64b sago007 2018-06-24 15:21 92
    rows.filter("[id^=row_"+id+"]").hide(); // hide all children
7e54d64b sago007 2018-06-24 15:21 93
  } else { // we are SHOWING
7e54d64b sago007 2018-06-24 15:21 94
    // replace right arrow by down arrow for current row
7e54d64b sago007 2018-06-24 15:21 95
    var currentRowSpans = currentRow.find("span");
7e54d64b sago007 2018-06-24 15:21 96
    currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
7e54d64b sago007 2018-06-24 15:21 97
    currentRowSpans.filter(".arrow").html('&#9660;');
7e54d64b sago007 2018-06-24 15:21 98
    // replace down arrows by right arrows for child rows
7e54d64b sago007 2018-06-24 15:21 99
    var childRowsSpans = childRows.find("span");
7e54d64b sago007 2018-06-24 15:21 100
    childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
7e54d64b sago007 2018-06-24 15:21 101
    childRowsSpans.filter(".arrow").html('&#9658;');
7e54d64b sago007 2018-06-24 15:21 102
    childRows.show(); //show all children
7e54d64b sago007 2018-06-24 15:21 103
  }
7e54d64b sago007 2018-06-24 15:21 104
  updateStripes();
7e54d64b sago007 2018-06-24 15:21 105
}
7e54d64b sago007 2018-06-24 15:21 106
7e54d64b sago007 2018-06-24 15:21 107
7e54d64b sago007 2018-06-24 15:21 108
function toggleInherit(id)
7e54d64b sago007 2018-06-24 15:21 109
{
7e54d64b sago007 2018-06-24 15:21 110
  var rows = $('tr.inherit.'+id);
7e54d64b sago007 2018-06-24 15:21 111
  var img = $('tr.inherit_header.'+id+' img');
7e54d64b sago007 2018-06-24 15:21 112
  var src = $(img).attr('src');
7e54d64b sago007 2018-06-24 15:21 113
  if (rows.filter(':first').is(':visible')===true) {
7e54d64b sago007 2018-06-24 15:21 114
    rows.css('display','none');
7e54d64b sago007 2018-06-24 15:21 115
    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
7e54d64b sago007 2018-06-24 15:21 116
  } else {
7e54d64b sago007 2018-06-24 15:21 117
    rows.css('display','table-row'); // using show() causes jump in firefox
7e54d64b sago007 2018-06-24 15:21 118
    $(img).attr('src',src.substring(0,src.length-10)+'open.png');
7e54d64b sago007 2018-06-24 15:21 119
  }
7e54d64b sago007 2018-06-24 15:21 120
}
3af4e794 Poul Sander 2021-07-07 21:02 121
/* @license-end */
1970-01-01 00:00 122