projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refine facet behavior in the Topic demo MKWS-277
[mkws-moved-to-github.git]
/
examples
/
htdocs
/
topic.html
diff --git
a/examples/htdocs/topic.html
b/examples/htdocs/topic.html
index
af4e1d6
..
ff88fb4
100644
(file)
--- a/
examples/htdocs/topic.html
+++ b/
examples/htdocs/topic.html
@@
-34,6
+34,9
@@
return mkws.getParameterByName('q', obj[0]);
}
});
return mkws.getParameterByName('q', obj[0]);
}
});
+ Handlebars.registerHelper('mkws-topicurl', function(topic) {
+ return window.location.pathname + "?q=" + encodeURIComponent(topic);
+ });
</script>
<script class="mkwsTemplate_TopicImage" type="text/x-handlebars-template">
{{#each hits}}
</script>
<script class="mkwsTemplate_TopicImage" type="text/x-handlebars-template">
{{#each hits}}
@@
-52,7
+55,7
@@
{{#each terms}}
<li class="list-group-item mkwsTerm">
<span class="badge">{{count}}</span>
{{#each terms}}
<li class="list-group-item mkwsTerm">
<span class="badge">{{count}}</span>
- <a href="#" {{linkdata}}>{{term}}</a>
+ <a href="{{mkws-topicurl term}}">{{term}}</a>
</li>
{{/each}}
</script>
</li>
{{/each}}
</script>