Prevent low search results from suggesting a scope expansion to "Everywhere"
authordbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 18 Mar 2010 16:37:46 +0000 (16:37 +0000)
committerdbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 18 Mar 2010 16:37:46 +0000 (16:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_0@839 6d9bc8c9-1ec2-4278-b937-99fde70a366f

web/opac/skin/default/js/result_common.js

index 4edf388..ebbe15a 100644 (file)
@@ -284,7 +284,9 @@ function resultZeroHits() {
 
 function resultExpandSearch() {
        var top = findOrgDepth(globalOrgTree);
-       if(getDepth() == top) return;
+
+    /* We don't want to expand the scope to Everywhere in Conifer, that's just confusing */
+       if(getDepth() == top || getDepth() - 1 == top) return;
        unHideMe($('low_hits_expand_range'));
        var par = $('low_hits_expand_link').parentNode;
        var template = par.removeChild($('low_hits_expand_link'));