• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/json-c/doc/html/dynsections.js

  1 function toggleVisibility(linkObj)
  2 {
  3  var base = $(linkObj).attr('id');
  4  var summary = $('#'+base+'-summary');
  5  var content = $('#'+base+'-content');
  6  var trigger = $('#'+base+'-trigger');
  7  var src=$(trigger).attr('src');
  8  if (content.is(':visible')===true) {
  9    content.hide();
 10    summary.show();
 11    $(linkObj).addClass('closed').removeClass('opened');
 12    $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
 13  } else {
 14    content.show();
 15    summary.hide();
 16    $(linkObj).removeClass('closed').addClass('opened');
 17    $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
 18  } 
 19  return false;
 20 }
 21 
 22 function updateStripes()
 23 {
 24   $('table.directory tr').
 25        removeClass('even').filter(':visible:even').addClass('even');
 26 }
 27 function toggleLevel(level)
 28 {
 29   $('table.directory tr').each(function(){ 
 30     var l = this.id.split('_').length-1;
 31     var i = $('#img'+this.id.substring(3));
 32     var a = $('#arr'+this.id.substring(3));
 33     if (l<level+1) {
 34       i.attr('src','ftv2folderopen.png');
 35       a.attr('src','ftv2mnode.png');
 36       $(this).show();
 37     } else if (l==level+1) {
 38       i.attr('src','ftv2folderclosed.png');
 39       a.attr('src','ftv2pnode.png');
 40       $(this).show();
 41     } else {
 42       $(this).hide();
 43     }
 44   });
 45   updateStripes();
 46 }
 47 function toggleFolder(id) 
 48 {
 49   var n = $('[id^=row_'+id+']');
 50   var i = $('[id^=img_'+id+']');
 51   var a = $('[id^=arr_'+id+']');
 52   var c = n.slice(1);
 53   if (c.filter(':first').is(':visible')===true) {
 54     i.attr('src','ftv2folderclosed.png');
 55     a.attr('src','ftv2pnode.png');
 56     c.hide();
 57   } else {
 58     i.attr('src','ftv2folderopen.png');
 59     a.attr('src','ftv2mnode.png');
 60     c.show();
 61   }
 62   updateStripes();
 63 }
 64 
 65 function toggleInherit(id)
 66 {
 67   var rows = $('tr.inherit.'+id);
 68   var img = $('tr.inherit_header.'+id+' img');
 69   var src = $(img).attr('src');
 70   if (rows.filter(':first').is(':visible')===true) {
 71     rows.css('display','none');
 72     $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
 73   } else {
 74     rows.css('display','table-row'); // using show() causes jump in firefox
 75     $(img).attr('src',src.substring(0,src.length-10)+'open.png');
 76   }
 77 }
 78 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt