From: Lebbeous Fogle-Weekley Date: Wed, 20 Jun 2012 15:13:11 +0000 (-0400) Subject: Acq: fix widget choice for user-linked fields in Acquisitions Search X-Git-Tag: sprint4-merge-nov22~4131 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=55a82b570ee8562f3d9eaedad42f22d15b1b8205;p=working%2FEvergreen.git Acq: fix widget choice for user-linked fields in Acquisitions Search The Acquisitions Search interface (which also sits underneath the Purchase Orders inteface, My Selection Lists, and one or two others) stopped presenting the correct widget for search terms linked to actor.usr. This was brought on when PCRUD control was added to actor.usr, so that means the bug affects only master, not rel_2_2 or earlier. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/acq/search/unified.js b/Open-ILS/web/js/ui/default/acq/search/unified.js index 02e1d681b5..68fb3bb25a 100644 --- a/Open-ILS/web/js/ui/default/acq/search/unified.js +++ b/Open-ILS/web/js/ui/default/acq/search/unified.js @@ -128,6 +128,8 @@ function TermSelectorFactory(terms) { ) { var term = this.getTerm(); var widgetKey = this.uniq; + var target = termManager.getLinkTarget(term); + if (matchHow.getValue() == "__in") { new openils.widget.XULTermLoader({ "parentNode": parentNode @@ -147,7 +149,9 @@ function TermSelectorFactory(terms) { } ); } else if (term.hint == "acqlia" || - (term.hint == "jub" && term.field == "eg_bib_id")) { + (term.hint == "jub" && term.field == "eg_bib_id") || + term.datatype == "org_unit" || + (term.datatype == "link" && target == "au")) { /* The test for jub.eg_bib_id is a special case to prevent * AutoFieldWidget from trying to render a ridiculous dropdown * of every bib record ID in the system. */