[open-ils-commits] r18901 - trunk/Open-ILS/web/opac/skin/default/js (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 2 14:32:34 EST 2010
Author: miker
Date: 2010-12-02 14:32:30 -0500 (Thu, 02 Dec 2010)
New Revision: 18901
Modified:
trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
Log:
Normalize spaces in notcontains advance search query terms to address bug https://bugs.launchpad.net/evergreen/+bug/677122
Modified: trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2010-12-02 14:53:42 UTC (rev 18900)
+++ trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2010-12-02 19:32:30 UTC (rev 18901)
@@ -294,7 +294,8 @@
break;
case 'nocontains' : {
- var words = term.split(" ");
+ // Normalize spaces so we don't get "- " embedded in the query
+ var words = term.replace(/\s+/g,' ').replace(/^\s*/,'').replace(/\s*$/,'').split(" ");
for( var j in words )
string += " -" + words[j];
}
More information about the open-ils-commits
mailing list