diff options
author | jokkedk <joakim@jokke.dk> | 2009-02-20 13:48:32 +0000 |
---|---|---|
committer | jokkedk <joakim@jokke.dk> | 2009-02-20 13:48:32 +0000 |
commit | 78850a704538040d3d5326cfe7a9d039abdc4d56 (patch) | |
tree | cf73c3f20abb042c4583bd0e2f96cee7b49ef41c | |
parent | edd25d1409ba6152d820f0a4276153b331b4ce62 (diff) | |
download | webgrind-78850a704538040d3d5326cfe7a9d039abdc4d56.zip webgrind-78850a704538040d3d5326cfe7a9d039abdc4d56.tar.gz webgrind-78850a704538040d3d5326cfe7a9d039abdc4d56.tar.bz2 |
- Added ability to click through from call info sublisting to main list (#29)1.0
- Bumped to v1.0
-rw-r--r-- | config.php | 2 | ||||
-rw-r--r-- | img/blank.gif | bin | 0 -> 1061 bytes | |||
-rw-r--r-- | templates/index.phtml | 12 |
3 files changed, 12 insertions, 2 deletions
@@ -45,7 +45,7 @@ class Webgrind_Config{ # BELOW NOT FOR EDITING # ######################### - static $webgrindVersion = '0.9'; + static $webgrindVersion = '1.0'; /** * Regex that matches the trace files generated by xdebug diff --git a/img/blank.gif b/img/blank.gif Binary files differnew file mode 100644 index 0000000..a3aa53f --- /dev/null +++ b/img/blank.gif diff --git a/templates/index.phtml b/templates/index.phtml index 98cfc35..2e7fc7c 100644 --- a/templates/index.phtml +++ b/templates/index.phtml @@ -134,7 +134,9 @@ function callTableRow(nr,data){ return '<tr> \ - <td>'+data.callerFunctionName+' @ '+data.line+'</td> \ + <td>' + +($("#callinfo_area_"+data.functionNr).length ? '<img src="img/right.gif"> <a href="javascript:openCallInfo('+data.functionNr+')">'+data.callerFunctionName+'</a>' : '<img src="img/blank.gif"> '+data.callerFunctionName) + + ' @ '+data.line+'</td> \ <td class="nr">'+data.callCount+'</td> \ <td class="nr">'+data.summedCallCost+'</td> \ <td><a title="Open file and show line" href="'+sprintf(fileUrlFormat,data.file,data.line)+'" target="_blank"><img src="img/file_line.png" alt="O"></a></td> \ @@ -155,6 +157,14 @@ $("#fold_marker_"+functionNr).get(0).src = 'img/right.gif'; } + function openCallInfo(functionNr) { + var areaEl = $("#callinfo_area_"+functionNr); + if (areaEl.length) { + if (areaEl.is(":hidden")) toggleCallInfo(functionNr); + window.scrollTo(0, areaEl.parent().offset().top); + } + } + function functionTableRow(data){ openLink = (data.file=='php:internal')?'':'<a title="Open file" href="'+sprintf(fileUrlFormat,data.file,-1)+'" target="_blank"><img src="img/file.png" alt="O"></a>'; return '<tr> \ |