summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjokkedk <joakim@jokke.dk>2009-02-20 13:48:32 +0000
committerjokkedk <joakim@jokke.dk>2009-02-20 13:48:32 +0000
commit78850a704538040d3d5326cfe7a9d039abdc4d56 (patch)
treecf73c3f20abb042c4583bd0e2f96cee7b49ef41c
parentedd25d1409ba6152d820f0a4276153b331b4ce62 (diff)
downloadwebgrind-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.php2
-rw-r--r--img/blank.gifbin0 -> 1061 bytes
-rw-r--r--templates/index.phtml12
3 files changed, 12 insertions, 2 deletions
diff --git a/config.php b/config.php
index 6499d5a..6ddc5c5 100644
--- a/config.php
+++ b/config.php
@@ -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
new file mode 100644
index 0000000..a3aa53f
--- /dev/null
+++ b/img/blank.gif
Binary files differ
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">&nbsp;&nbsp;<a href="javascript:openCallInfo('+data.functionNr+')">'+data.callerFunctionName+'</a>' : '<img src="img/blank.gif">&nbsp;&nbsp;'+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> \