From: Bill Erickson Date: Mon, 28 Mar 2011 21:26:42 +0000 (-0400) Subject: in the staff client, when only 1 record is found for a search, redirect to the record... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fa61007990749fe89403ff3e1e8c2f1543468691;p=evergreen%2Fequinox.git in the staff client, when only 1 record is found for a search, redirect to the record detail page; prevent unintended redirection when user uses Back button from rdetail --- diff --git a/Open-ILS/web/opac/skin/default/js/rresult.js b/Open-ILS/web/opac/skin/default/js/rresult.js index ff94bb8158..6ca4a74469 100644 --- a/Open-ILS/web/opac/skin/default/js/rresult.js +++ b/Open-ILS/web/opac/skin/default/js/rresult.js @@ -279,6 +279,18 @@ function rresultCollectRecords(ids, base) { runEvt("result", "preCollectRecords"); var x = 0; + // don't perform rdetail redirect if user was on rdetail and cliecked Back + if(findCurrentPage() == RRESULT && isXUL()) { + if(ids.length == 1 && !xulG.fromBack) { + var args = {}; + args.page = RDETAIL; + args[PARAM_OFFSET] = 0; + args[PARAM_RID] = ids[0]; + location.href = buildOPACLink(args); + } + } + } + if (!base) base = 0; if( rresultIsPaged ) base = 0;