projects
/
mkdru-moved-to-drupal.org.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
There seem to be to many 'shows' at times
[mkdru-moved-to-drupal.org.git]
/
mkdru.theme.js
diff --git
a/mkdru.theme.js
b/mkdru.theme.js
index
5af43ee
..
034b403
100644
(file)
--- a/
mkdru.theme.js
+++ b/
mkdru.theme.js
@@
-124,13
+124,17
@@
Drupal.theme.prototype.mkdruFacet = function (terms, facet, max, selections) {
html += '</a><span> (' + terms[i].freq
+ ')</span><br/>';
}
html += '</a><span> (' + terms[i].freq
+ ')</span><br/>';
}
- //TODO, meed to look up target name from ID
if (terms.length == 0 && selections && selections.length) {
for (var i=0; i<selections.length; i++) {
if (selections[i]) {
if (terms.length == 0 && selections && selections.length) {
for (var i=0; i<selections.length; i++) {
if (selections[i]) {
+ // since we have no target name (only id) go for the basename
+ // FIXME get the proper target name
+ var name = facet == "source" ? selections[i].replace(/.*[\/\\]/, "")
+ .replace(/\?.*/, '')
+ : selections[i];
html += '<a class="cross" href="'
+ mkdru.removeLimit(facet, selections[i])
html += '<a class="cross" href="'
+ mkdru.removeLimit(facet, selections[i])
- + '"><strong>'+selections[i]+'</strong></a><span> (0)</span><br/>';
+ + '"><strong>'+name+'</strong></a><span> (0)</span><br/>';
}
}
}
}
}
}