From d8df80a515879d22a48126ae226e9bf331809bdb Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 30 Apr 2013 16:45:55 -0400 Subject: [PATCH] Search clicked /and/ preceding sf values When looking for authority records to control a bib field, we currently search using exactly, and only, the subfield that was clicked. This commit changes that so that the full field up to and including the clicked subfield is used in the simple authority heading search we perform to find the best-match (pivot) authority record. Signed-off-by: Mike Rylander --- Open-ILS/xul/staff_client/server/cat/marcedit.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index 1fbf544dd6..08ce82cd18 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -1698,10 +1698,17 @@ function browseAuthority (sf_popup, menu_id, target, sf, limit, page) { page = 0; } + var sf_string = ''; + var sf_list = sf.parent().subfield; + for ( var i in sf_list) { + sf_string += sf_list[i].toString() + ' '; + if (sf_list[i] === sf) break; + } + var url = '/opac/extras/browse/marcxml/' + type + '.refs' + '/1' // OU - currently unscoped - + '/' + sf.toString() + + '/' + sf_string + '/' + page + '/' + limit ; -- 2.11.0