X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=js%2Fpz2.js;h=a9259948d16cf63891686c8b3bec7aa1976b02ed;hb=ca7f541350049a177ebae49504fa8dbbd8f7d0ef;hp=b4de590eec4361985502c1ab116dab791fa4d948;hpb=91cbaff33f868dd36f1bce0f8a4411a374cd34ca;p=pazpar2-moved-to-github.git diff --git a/js/pz2.js b/js/pz2.js index b4de590..a925994 100644 --- a/js/pz2.js +++ b/js/pz2.js @@ -1,5 +1,5 @@ /* -** $Id: pz2.js,v 1.34 2007-06-13 16:07:43 jakub Exp $ +** $Id: pz2.js,v 1.36 2007-06-13 17:25:02 jakub Exp $ ** pz2.js - pazpar2's javascript client library. */ @@ -109,7 +109,16 @@ var pz2 = function(paramArray) { if (paramArray.autoInit !== false) __myself.init(); }; -pz2.prototype = { +pz2.prototype = +{ + stop: function () + { + clearTimeout(__myself.statTimer); + clearTimeout(__myself.showTimer); + clearTimeout(__myself.termTimer); + clearTimeout(__myself.bytargetTimer); + }, + reset: function () { __myself.sessionID = null; @@ -117,10 +126,7 @@ pz2.prototype = { __myself.pingStatusOK = false; __myself.searchStatusOK = false; - clearTimeout(__myself.statTimer); - clearTimeout(__myself.showTimer); - clearTimeout(__myself.termTimer); - clearTimeout(__myself.bytargetTimer); + __myself.stop(); if ( __myself.resetCallback ) __myself.resetCallback(); @@ -628,6 +634,10 @@ pzQuery.prototype = { this.simpleFilter = null; this.numTerms = 0; }, + clearSimpleQuery: function() + { + this.simpleQuery = ''; + }, addTerm: function(field, value) { var term = {"field": field, "value": value};