[open-ils-commits] r18662 - trunk/Open-ILS/web/js/ui/default/acq/search (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 8 15:44:11 EST 2010
Author: senator
Date: 2010-11-08 15:44:06 -0500 (Mon, 08 Nov 2010)
New Revision: 18662
Modified:
trunk/Open-ILS/web/js/ui/default/acq/search/unified.js
Log:
Acq: in acq search, avoid trying to create a dropdown from every bib ID in
the system, providing a normal text input field instead (or search by file
of terms).
Modified: trunk/Open-ILS/web/js/ui/default/acq/search/unified.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/search/unified.js 2010-11-08 19:05:10 UTC (rev 18661)
+++ trunk/Open-ILS/web/js/ui/default/acq/search/unified.js 2010-11-08 20:44:06 UTC (rev 18662)
@@ -140,7 +140,11 @@
w.updateCount();
}
);
- } else if (term.hint == "acqlia") {
+ } else if (term.hint == "acqlia" ||
+ (term.hint == "jub" && term.field == "eg_bib_id")) {
+ /* 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. */
wStore[widgetKey] = dojo.create(
"input", {"type": "text"}, parentNode, "only"
);
@@ -306,8 +310,9 @@
can_do_fuzzy = false;
can_do_in = true;
} else if (term.datatype == "link") {
- can_do_fuzzy = (self.getLinkTarget(term) == "au");
- can_do_in = false; /* XXX might revise later */
+ var target = self.getLinkTarget(term);
+ can_do_fuzzy = (target == "au");
+ can_do_in = (target == "bre"); /* XXX might revise later */
} else if (typeof(w.declaredClass) != "undefined") {
can_do_fuzzy = can_do_in =
Boolean(w.declaredClass.match(/form\.Text|XULT/));
More information about the open-ils-commits
mailing list