X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=800f2b3fcb953f13101a3918f40843ea55b3dbd8;hb=aa8e1fdaaa759602a95aa4cdd9186d209ae8abe6;hp=2183e1cbc5f942d611b8a9c609a0ca920ba96b4c;hpb=e4a8cff5ea6f81be77a9431ac7e7aa98b20b0248;p=mkdru-moved-to-drupal.org.git
diff --git a/mkdru.theme.js b/mkdru.theme.js
index 2183e1c..800f2b3 100644
--- a/mkdru.theme.js
+++ b/mkdru.theme.js
@@ -1,26 +1,49 @@
Drupal.theme.prototype.mkdruResult = function(hit, num) {
- var html = [];
- html.push('
'
- + '
' + num + '. '
- + '
'
- + hit["md-title"] + ' ');
+ var html = "";
+ html += '
'
+ + '' + num + '. '
+ + ''
+ + hit["md-title"] + ' ';
if (hit["md-title-remainder"] !== undefined) {
- html.push('' + hit["md-title-remainder"] + ' ');
+ html += ''
+ + hit["md-title-remainder"] + ' ';
}
if (hit["md-title-responsibility"] !== undefined) {
- html.push(''+hit["md-title-responsibility"]+'');
+ html += ''
+ + hit["md-title-responsibility"]
+ + '';
}
- html.push(' ');
- return (html.join(''));
+ html += '';
+ return html;
};
-Drupal.theme.prototype.mkdruPager = function (data, curPage, pages) {
- var caption = '
Displaying: '
- + (data.start + 1) + ' to ' + (data.start + data.num) +
- ' of ' + data.merged + ' (found: '
- + data.total + ')
';
+Drupal.theme.prototype.mkdruDetail = function(data) {
+ var html = '';
+ if (data["md-title"] != undefined) {
+ html += 'Title | : '+data["md-title"];
+ if (data["md-title-remainder"] !== undefined) {
+ html += ' : ' + data["md-title-remainder"] + ' ';
+ }
+ if (data["md-title-responsibility"] !== undefined) {
+ html += ' '+ data["md-title-responsibility"] +'';
+ }
+ html += ' |
';
+ }
+ if (data["md-date"] != undefined)
+ html += 'Date | : ' + data["md-date"] + ' |
';
+ if (data["md-author"] != undefined)
+ html += 'Author | : ' + data["md-author"] + ' |
';
+ if (data["md-electronic-url"] != undefined)
+ html += 'URL | : ' + data["md-electronic-url"] + '' + ' |
';
+ if (data["location"][0]["md-subject"] != undefined)
+ html += 'Subject | : ' + data["location"][0]["md-subject"] + ' |
';
+ if (data["location"][0]["@name"] != undefined)
+ html += 'Location | : ' + data["location"][0]["@name"] + " (" +data["location"][0]["@id"] + ")" + ' |
';
+ html += '
';
+ return html;
+};
+Drupal.theme.prototype.mkdruPager = function (data, curPage, pages) {
var onsides = 6;
var firstClkbl = ( curPage - onsides > 0 )
@@ -31,10 +54,10 @@ Drupal.theme.prototype.mkdruPager = function (data, curPage, pages) {
? firstClkbl + 2*onsides
: pages;
- var prev = '<< Prev | ';
+ var prev = '<< Prev | ';
if (curPage > 1)
var prev = ''
- +'<< Prev | ';
+ +'<< Prev | ';
var middle = '';
for(var i = firstClkbl; i <= lastClkbl; i++) {
@@ -46,9 +69,9 @@ Drupal.theme.prototype.mkdruPager = function (data, curPage, pages) {
+ numLabel + ' ';
}
- var next = ' | Next >>';
+ var next = ' | Next >>';
if (pages - curPage > 0)
- var next = ' | '
+ var next = ' | '
+'Next >>';
predots = '';
@@ -59,8 +82,7 @@ Drupal.theme.prototype.mkdruPager = function (data, curPage, pages) {
if (lastClkbl < pages)
postdots = '...';
- return ('' +
- caption + prev + predots + middle + postdots + next + '
');
+ return (prev + predots + middle + postdots + next);
};
Drupal.theme.prototype.mkdruTerm = function (term, freq, linkClass, id) {