Fix MKWS-284 ("facet widgets fails in koha")
authorMike Taylor <mike@indexdata.com>
Thu, 9 Oct 2014 15:43:01 +0000 (16:43 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 9 Oct 2014 15:43:01 +0000 (16:43 +0100)
On successful search, invoke context.show() only if there is a showCallback.
(That's not always the case since we fixed MKWS-272.)

js/pz2.js

index fb6264c..ab45cc0 100644 (file)
--- a/js/pz2.js
+++ b/js/pz2.js
@@ -319,7 +319,8 @@ pz2.prototype =
                         .childNodes[0].nodeValue == "OK" ) {
                     context.searchStatusOK = true;
                     //piggyback search
-                    context.show(start, num, sort);
+                    if (context.showCallback)
+                        context.show(start, num, sort);
                     if (context.statCallback)
                         context.stat();
                     if (context.termlistCallback)