totalRec: 0,
pagerRange: 6,
pazpar2Path: Drupal.settings.mkdru.pz2_path,
+ facetContainerSelector: Drupal.settings.mkdru.facetContainerSelector,
// Facets
facets: {
source: {
+ displayName: Drupal.settings.mkdru.source_dname || "Source",
+ orderWeight: Drupal.settings.mkdru.source_weight || 1,
pz2Name: 'xtargets',
- max: Drupal.settings.mkdru.source_max
+ max: Drupal.settings.mkdru.source_max || 10
},
subject: {
+ displayName: Drupal.settings.mkdru.subject_dname || "Subject",
+ orderWeight: Drupal.settings.mkdru.source_weight || 2,
pz2Name: 'subject',
- max: Drupal.settings.mkdru.subject_max,
+ max: Drupal.settings.mkdru.subject_max || 10,
multiLimit: true,
limiter: 'su'
},
author: {
+ displayName: Drupal.settings.mkdru.author_dname || "Author",
+ orderWeight: Drupal.settings.mkdru.source_weight || 3,
pz2Name: 'author',
- max: Drupal.settings.mkdru.author_max,
+ max: Drupal.settings.mkdru.author_max || 10,
multiLimit: false,
limiter: 'au'
}
};
mkdru.pz2Term = function (data) {
+ // if signaled, prepare container client-side
+ if (mkdru.facetContainerSelector) {
+ $(mkdru.facetContainerSelector).html(Drupal.theme('mkdruFacetContainer',
+ data, mkdru.facets));
+ }
for (var facet in mkdru.facets) {
// facet is limited
if (mkdru.state['limit_' + facet]) {
);
}
});
-})(jQuery);
\ No newline at end of file
+})(jQuery);
};
Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) {
+ debugger;
var html = "";
for (var i = 0; i < terms.length && i < max; i++ ) {
html += '<a href="';
return '<p>' + Drupal.t('Only displaying ') + term.name + '</p>'
+ '<p><a href="' + link + '">' + Drupal.t('Show all...') + '</a></p>';
}
-};
\ No newline at end of file
+};
+
+Drupal.theme.prototype.mkdruFacetContainer = function (facets, facetCfg) {
+ return "";
+};