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);
};
}
// 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();
return html;
};
-Drupal.theme.prototype.mkdruDetail = function(data) {
+Drupal.theme.prototype.mkdruDetail = function(data, linkBack) {
var html = '<table id="det_' + data.recid +'">';
if (data["md-title"] != undefined) {
html += '<tr><th>' + Drupal.t("Title") + '</th><td><strong>:</strong> '
+ data["location"][0]["@name"] + " (" + data["location"][0]["@id"] + ")"
+ '</td></tr>';
html += '</table></div>';
- html += '<a class="mkdru-detail-back">Return to result list...</a>';
+ html += '<a href="' + linkBack + '">Return to result list...</a>';
return html;
};