From: Jakub Skoczen Date: Tue, 8 Mar 2011 11:06:20 +0000 (+0100) Subject: Hardcode the Ding1 theme X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=356e95677e372c244a2b5e92d3209b214cda739e;p=mkdru-moved-to-drupal.org.git Hardcode the Ding1 theme Since enabling the the theme externally breaks the site-layout, for some reason --- diff --git a/mkdru-results.tpl.php b/mkdru-results.tpl.php index 1dcfc53..1f72b89 100644 --- a/mkdru-results.tpl.php +++ b/mkdru-results.tpl.php @@ -1,7 +1,9 @@
+
+
-
\ No newline at end of file + diff --git a/mkdru.client.js b/mkdru.client.js index 5638dd1..fde7675 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -8,7 +8,7 @@ var mkdru = { totalRec: 0, pagerRange: 6, pazpar2Path: Drupal.settings.mkdru.pz2_path, - facetContainerSelector: Drupal.settings.mkdru.facetContainerSelector, + facetContainerSelector: '#mkdru-raw-facet-container', // Facets facets: { source: { diff --git a/mkdru.css b/mkdru.css index 7efeb50..772b332 100644 --- a/mkdru.css +++ b/mkdru.css @@ -1,7 +1,12 @@ -a.cross { +a.cross:hover { text-decoration: line-through; } +.mkdru-facets-table { + table-layout: fixed; + width: 700px; +} + .node-mkdru div { margin: 1em 0em; } diff --git a/mkdru.theme.js b/mkdru.theme.js index 034b403..4b0638f 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -1,18 +1,38 @@ Drupal.theme.prototype.mkdruResult = function(hit, num, detailLink) { + var link = choose_url(hit); + if (!link) link = choose_url(hit['location'][0]); var html = ""; - html += '
  • ' - + '' + num + '. ' - + '' - + hit["md-title"] + ' '; - if (hit["md-title-remainder"] !== undefined) { - html += '' - + hit["md-title-remainder"] + ' '; + html += '
  • ' + + '

    '; + if (link) html += ''; + html += hit["md-title"]; + if (link) html += ''; + html += '

    '; + html += '
    ' + + '

    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    '; + if (hit["md-author"]) { + html += '
    ' + + '' + + hit['md-author']+''; + if (hit['md-date']) { + html += ' ('+hit['md-date']+')'; + } + html += '

    '; } - if (hit["md-title-responsibility"] !== undefined) { - html += '' - + hit["md-title-responsibility"] - + ''; + html += "
    "; + if (hit["md-description"]) { + // limit description to 400 characters + html += hit["md-description"][0].substr(0, 400); } + html += '
    ' + html += '
    ' + html += '
    ' html += '
  • '; return html; }; @@ -141,6 +161,24 @@ Drupal.theme.prototype.mkdruFacet = function (terms, facet, max, selections) { return html; }; -Drupal.theme.prototype.mkdruFacetContainer = function (facetCfg) { - return ""; +Drupal.theme.prototype.mkdruFacetContainer = function (facetsCfg) { + var fs = []; + for (var fname in facetsCfg) { + facetsCfg[fname].originalKey = fname; + fs.push(facetsCfg[fname]); + } + fs.sort(function (a,b) { return a.orderWeight - b.orderWeight }); + var html = '
    '; + for (var i=0; i'; + html += '
    '; + html += '
    '; + html += '
    '; + html += '' + } + html += '
    '; + return html; };