summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel_themer.js11
-rw-r--r--devel_themer.module8
2 files changed, 12 insertions, 7 deletions
diff --git a/devel_themer.js b/devel_themer.js
index 169fe9a..cc6f421 100644
--- a/devel_themer.js
+++ b/devel_themer.js
@@ -220,13 +220,16 @@ function thmrRebuildPopup(objs) {
$('#themer-popup dd.candidates').empty();
$('#themer-popup div.attributes').empty();
$('#themer-popup div.used').empty();
+ $('#themer-popup div.duration').empty();
}
else {
+ $('#themer-popup div.duration').empty().prepend('<dt>' + strs.duration + '</dt><dd>' + vars.duration + ' ms</dd>');
if (type == 'func') {
- // populate the candidates
- $('#themer-popup dt.candidates-type').empty().prepend(strs.candidate_functions);
- $('#themer-popup dd.candidates').empty().prepend(vars.candidates);
-
+ if (vars.candidates != undefined && vars.candidates.length != 0) {
+ // populate the candidates
+ $('#themer-popup dt.candidates-type').empty().prepend(strs.candidate_functions);
+ $('#themer-popup dd.candidates').empty().prepend(vars.candidates.join(', '));
+ }
$('#themer-popup div.attributes').empty().prepend('<h4>'+ strs.function_arguments + '</h4>' + vars.args);
$('#themer-popup div.used').empty();
}
diff --git a/devel_themer.module b/devel_themer.module
index 325619a..19fc801 100644
--- a/devel_themer.module
+++ b/devel_themer.module
@@ -111,9 +111,9 @@ function devel_themer_log() {
}
}
$name = $call['type'] == 'func' ? $call['name']. '()' : $call['name']. $extension;
- $rows[] = array($call['time'], $marker. $name, implode(', ', $call['candidates']));
+ $rows[] = array($call['duration'], $marker. $name, implode(', ', $call['candidates']));
}
- $header = array('Time (ms)', 'Template/Function', "Candidate template files or function names");
+ $header = array('Duration (ms)', 'Template/Function', "Candidate template files or function names");
$output = theme('table', $header, $rows);
return $output;
}
@@ -230,7 +230,7 @@ function devel_themer_catch_function() {
'name' => $name,
'type' => $meta['type'],
'empty' => empty($return),
- 'time' => $time['time'],
+ 'duration' => $time['time'],
'used' => $used,
'candidates' => $candidates,
'args' => $variables
@@ -439,6 +439,7 @@ function devel_themer_popup() {
'function_arguments' => t('Function Arguments'),
'template_variables' => t('Template Variables'),
'file_used' => t('File used: '),
+ 'duration' => t('Duration: '),
'api_site' => variable_get('devel_api_site', 'http://api.drupal.org/'),
'drupal_version' => $majorver,
))
@@ -474,6 +475,7 @@ function devel_themer_popup() {
<dd class="candidates">
</dd>
+ <div class="duration"></div>
</dl>
</div><!-- /info -->
<div class="attributes row">