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}}
{{#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>
if (message) greet += " :: " + message;
mkws.log(greet);
- // TODO: Let's remove this soon
- // Backwards compatibility: set new magic class names on any
- // elements that have the old magic IDs.
- var ids = [ "Switch", "Lang", "Search", "Pager", "Navi",
- "Results", "Records", "Targets", "Ranking",
- "Termlists", "Stat", "MOTD" ];
- for (var i = 0; i < ids.length; i++) {
- var id = 'mkws' + ids[i];
- var node = $('#' + id);
- if (node.attr('id')) {
- node.addClass(id);
- log("added magic class to '" + node.attr('id') + "'");
- }
- }
-
// MKWS is not active until init() has been run against an object with widget nodes.
// We only set initial configuration when MKWS is first activated.
if (!mkws.isActive) {
"jasmine-reporters": "<= 0.4.1",
"jasmine-node": "*",
"phantomjs": "*",
- "handlebars": "= 1.3.0"
+ "handlebars": "= 2.0.0"
},
"repository": {
"type": "git",
SRC= ../../src
-HANDLEBARS_FILE = handlebars-v1.3.0.js
+HANDLEBARS_FILE = handlebars-v2.0.0.js
JQUERY_FILE = jquery-1.10.0.min.js
JQUERY_JSON_FILE = jquery.json-2.4.js
PP2_FILE = pz2.js