From 0f4a18a0a70bb59662ec12114ef940d443a2a405 Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Wed, 9 Feb 2011 18:54:54 +0100 Subject: [PATCH] Make detail back link more consistent. --- mkdru.client.js | 6 +++--- mkdru.theme.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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; }; -- 1.7.10.4