projects
/
mkdruding2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d6b8bfd
)
Fix target names when no results
author
Jakub Skoczen
<jakub@indexdata.dk>
Thu, 3 Mar 2011 12:08:55 +0000
(13:08 +0100)
committer
Jakub Skoczen
<jakub@indexdata.dk>
Thu, 3 Mar 2011 12:08:55 +0000
(13:08 +0100)
mkdruding2.js
patch
|
blob
|
history
diff --git
a/mkdruding2.js
b/mkdruding2.js
index
347f93b
..
d74b6bb
100644
(file)
--- a/
mkdruding2.js
+++ b/
mkdruding2.js
@@
-70,9
+70,14
@@
Drupal.theme.mkdruFacet = function (terms, facet, max, selections) {
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/>';
}
}
}
}
}
}