diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-04-29 17:51:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-04-29 17:51:51 (GMT) |
commit | 44ca9512aaeb19f7fbd07afda88ec4cfe53ce831 (patch) | |
tree | a8d7cbd0da612bb0b1fa97dcc1bac1838f845338 /src/dynsections.js | |
parent | f3e0c94b327d47e5c3d3a36a9a6300cee8d2a537 (diff) | |
download | Doxygen-44ca9512aaeb19f7fbd07afda88ec4cfe53ce831.zip Doxygen-44ca9512aaeb19f7fbd07afda88ec4cfe53ce831.tar.gz Doxygen-44ca9512aaeb19f7fbd07afda88ec4cfe53ce831.tar.bz2 |
Release-1.8.0-20120429
Diffstat (limited to 'src/dynsections.js')
-rw-r--r-- | src/dynsections.js | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/dynsections.js b/src/dynsections.js new file mode 100644 index 0000000..3c5c379 --- /dev/null +++ b/src/dynsections.js @@ -0,0 +1,78 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} +function toggleLevel(level) +{ + $('table.directory tr').each(function(){ + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l<level+1) { + i.attr('src','ftv2folderopen.png'); + a.attr('src','ftv2mnode.png'); + $(this).show(); + } else if (l==level+1) { + i.attr('src','ftv2folderclosed.png'); + a.attr('src','ftv2pnode.png'); + $(this).show(); + } else { + $(this).hide(); + } + }); + updateStripes(); +} +function toggleFolder(id) +{ + var n = $('[id^=row_'+id+']'); + var i = $('[id^=img_'+id+']'); + var a = $('[id^=arr_'+id+']'); + var c = n.slice(1); + if (c.filter(':first').is(':visible')===true) { + i.attr('src','ftv2folderclosed.png'); + a.attr('src','ftv2pnode.png'); + c.hide(); + } else { + i.attr('src','ftv2folderopen.png'); + a.attr('src','ftv2mnode.png'); + c.show(); + } + updateStripes(); +} + +function toggleInherit(id) +{ + var rows = $('tr.inherit.'+id); + var img = $('tr.inherit_header.'+id+' img'); + var src = $(img).attr('src'); + if (rows.filter(':first').is(':visible')===true) { + rows.hide(); + $(img).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + rows.show(); + $(img).attr('src',src.substring(0,src.length-10)+'open.png'); + } +} + |