Files
PyRIGS/static/debug_toolbar/js/toolbar.profiling.js
tomtom5152 c6d89416a1 Fixed incorrect url on bootstrap fonts.
Fixed missing static files in repo
2015-01-30 13:47:56 +00:00

21 lines
682 B
JavaScript

(function ($) {
function getSubcalls(row) {
var id = row.attr('id');
return $('.djDebugProfileRow[id^="'+id+'_"]');
}
function getDirectSubcalls(row) {
var subcalls = getSubcalls(row);
var depth = parseInt(row.attr('depth'), 10) + 1;
return subcalls.filter('[depth='+depth+']');
}
$('.djDebugProfileRow .djDebugProfileToggle').on('click', function(){
var row = $(this).closest('.djDebugProfileRow');
var subcalls = getSubcalls(row);
if (subcalls.css('display') == 'none') {
getDirectSubcalls(row).show();
} else {
subcalls.hide();
}
});
})(djdt.jQuery);