'mkdru-facet-link-author', data.author[i].id);
}
$('#mkdru-authors').html(html);
+
+ $('.mkdru-facet-link-source').bind('click', function (e) {
+ mkdru.limitTarget(this.getAttribute('target_id'), this.firstChild.nodeValue);
+ return false;
+ });
+
+ $('.mkdru-facet-link-subject').bind('click', function (e) {
+ mkdru.limitQuery('su', this.firstChild.nodeValue);
+ return false;
+ });
+
+ $('.mkdru-facet-link-author').bind('click', function (e) {
+ mkdru.limitQuery('au', this.firstChild.nodeValue);
+ return false;
+ });
};
mkdru.pz2ByTarget = function (data) {
// mkdru.resetPage();
// mkdru.pollDropDowns();
mkdru.search();
+ return false;
};
mkdru.search = function () {
};
mkdru.limitQuery = function (field, value) {
-
+ $('.mkdru-search input:text').attr('value', function () {
+ return this.value += ' and ' + field + '="' + value + '"';
+ });
+ mkdru.submitQuery();
+};
+
+mkdru.limitTarget = function (id, name) {
+ var navi = document.getElementById('mkdru-navi');
+ navi.innerHTML =
+ 'Source: <a class="crossout" href="#" onclick="delimitTarget();return false;">'
+ + name + '</a>';
+ navi.innerHTML += '<hr/>';
+ mkdru.curFilter = 'pz:id=' + id;
+ mkdru.resetPage();
+ mkdru.pollDropDowns();
+ mkdru.search();
+ return false;
};
mkdru.resetPage = function () {
// wait until the DOM is ready, bind events
// and instantiate pz2 library
$(document).ready(function () {
- $('.mkdru-search input:button').bind('click', mkdru.submitQuery);
+ $('.mkdru-search').bind('submit', mkdru.submitQuery);
$('.mkdru-search input:text').attr('value', '');
$('#mkdru-perpage').bind('change', function () { mkdru.pollDropDowns() });
$('#mkdru-sort').bind('change', function () { mkdru.pollDropDowns() });