summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel_themer.css14
-rw-r--r--devel_themer.js2
-rw-r--r--devel_themer.module29
3 files changed, 15 insertions, 30 deletions
diff --git a/devel_themer.css b/devel_themer.css
index 25a3fa7..2baed41 100644
--- a/devel_themer.css
+++ b/devel_themer.css
@@ -84,8 +84,8 @@
margin: 0 0 0 15px;
display:block;
}
-#themer-popup dd.candidates {
- word-spacing: .7em;
+#themer-popup dd.candidates .delimiter {
+ color: #999;
}
#themer-popup .devel-obj-output {
@@ -115,16 +115,6 @@
color: #999;
}
-#themer-popup .item-list ul li {
- background: none;
- list-style-type: none;
- padding: 0 0 0 .5em;
- text-indent: -.5em;
-}
-#themer-popup .item-list ul li:before {
- content: "- ";
-}
-
#themer-toggle {
position: fixed;
bottom: 0;
diff --git a/devel_themer.js b/devel_themer.js
index a6e0e87..79cc076 100644
--- a/devel_themer.js
+++ b/devel_themer.js
@@ -224,7 +224,7 @@ function thmrRebuildPopup(objs) {
}
else {
$('#themer-popup div.duration').empty().prepend('<span class="dt">' + strs.duration + '</span>' + vars.duration + ' ms');
- $('#themer-popup dd.candidates').empty().prepend(vars.candidates_html);
+ $('#themer-popup dd.candidates').empty().prepend(vars.candidates.join('<span class="delimiter"> < </span>'));
if (type == 'func') {
if (vars.candidates != undefined && vars.candidates.length != 0) {
// populate the candidates
diff --git a/devel_themer.module b/devel_themer.module
index 5fd34fd..ef08957 100644
--- a/devel_themer.module
+++ b/devel_themer.module
@@ -186,17 +186,10 @@ function devel_themer_catch_function() {
if ($meta['type'] == 'func') {
$name = $meta['used'];
$used = $meta['used'];
- $candidates = array_map('devel_themer_ancestry', !empty($meta['wildcards']) ? array_keys($meta['wildcards']) : array($hook));
- if (count($candidates) > 1) {
- foreach ($candidates as $candidate) {
- $candidates_html_arr[] = implode(' ', $candidate);
- }
- $candidates_html = theme_item_list($candidates_html_arr);
- unset($candidates_html_arr);
- }
- else {
- $candidates_html = implode(' ', $candidates[0]);
- }
+ if (empty($meta['wildcards'])) {
+ $meta['wildcards'][$hook] = '';
+ }
+ $candidates = devel_themer_ancestry(array_reverse(array_keys($meta['wildcards'])));
$variables = devel_print_object($meta['variables'], NULL, FALSE);
}
else {
@@ -205,7 +198,6 @@ function devel_themer_catch_function() {
array_unshift($meta['suggestions'], $meta['hook']);
}
$candidates = array_reverse(array_map('devel_themer_append_extension', $meta['suggestions']));
- $candidates_html = implode(' ', $candidates);
$used = $meta['template_file'];
$variables = devel_print_object($meta['variables'], '$', FALSE);
}
@@ -217,7 +209,6 @@ function devel_themer_catch_function() {
'duration' => $time['time'],
'used' => $used,
'candidates' => $candidates,
- 'candidates_html' => $candidates_html,
'args' => $variables
);
}
@@ -237,10 +228,12 @@ function devel_themer_append_extension($string) {
* For given theme *function* call, return the ancestry of function names which could have handled the call.
* This mimics the way the theme registry is built.
*
+ * @param array
+ * A list of theme calls.
* @return array()
- * A list of function names.
+ * An array of function names.
**/
-function devel_themer_ancestry($call) {
+function devel_themer_ancestry($calls) {
global $theme, $theme_engine, $base_theme_info;
static $prefixes;
if (!isset($prefixes)) {
@@ -255,8 +248,10 @@ function devel_themer_ancestry($call) {
$prefixes = array_filter($prefixes);
}
- foreach ($prefixes as $prefix) {
- $candidates[] = $prefix. '_'. $call;
+ foreach ($calls as $call) {
+ foreach ($prefixes as $prefix) {
+ $candidates[] = $prefix. '_'. $call;
+ }
}
return array_reverse($candidates);
}