From: Jason Skomorowski Date: Wed, 9 Feb 2011 17:54:54 +0000 (+0100) Subject: Make detail back link more consistent. X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=0f4a18a0a70bb59662ec12114ef940d443a2a405;p=mkdru-moved-to-drupal.org.git Make detail back link more consistent. --- diff --git a/mkdru.client.js b/mkdru.client.js index 2901928..88c09d5 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -130,8 +130,8 @@ mkdru.pz2ByTarget = function (data) { mkdru.pz2Record = function (data) { clearTimeout(mkdru.pz2.showTimer); $('.mkdru-results').hide(); - $('.mkdru-detail').html(Drupal.theme('mkdruDetail', data)); - $('.mkdru-detail-back').bind('click', function () {$.bbq.removeState('recid');}); + $('.mkdru-detail').html(Drupal.theme('mkdruDetail', data, + mkdru.hashAddDelOne(null, null, 'recid'))); $('.mkdru-detail').show(); clearTimeout(mkdru.pz2.recordTimer); }; @@ -190,7 +190,7 @@ mkdru.hashChange = function () { } // Other internal link else { - // need to run search again to limit targets + // may need to run search again to limit targets for (key in mkdru.state) { if (key.substring(0,5) === 'limit') { mkdru.search(); diff --git a/mkdru.theme.js b/mkdru.theme.js index 7d92e61..875d0f3 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -17,7 +17,7 @@ Drupal.theme.prototype.mkdruResult = function(hit, num, detailLink) { return html; }; -Drupal.theme.prototype.mkdruDetail = function(data) { +Drupal.theme.prototype.mkdruDetail = function(data, linkBack) { var html = ''; if (data["md-title"] != undefined) { html += ''; html += '
' + Drupal.t("Title") + ': ' @@ -48,7 +48,7 @@ Drupal.theme.prototype.mkdruDetail = function(data) { + data["location"][0]["@name"] + " (" + data["location"][0]["@id"] + ")" + '
'; - html += 'Return to result list...'; + html += 'Return to result list...'; return html; };