From 4abac12e93a06c15f6a805eef4e2c92db8d91ab1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 7 Oct 2014 14:21:39 +0100 Subject: [PATCH] pz2 object is now created from contructed parameter array. --- src/mkws-team.js | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index 3894bad..070f21d 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -154,19 +154,24 @@ mkws.makeTeam = function($, teamName) { // then register the form submit event with the pz2.search function // autoInit is set to true on default that.makePz2 = function() { - m_paz = new pz2({ "windowid": teamName, - "pazpar2path": mkws.pazpar2_url(), - "usesessions" : config.use_service_proxy ? false : true, - "oninit": onInit, - "onbytarget": onBytarget, - "onstat": onStat, - "onterm": (config.facets.length ? onTerm : undefined), - "onshow": onShow, - "onrecord": onRecord, - "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way - "termlist": config.facets.join(',') - }); - log("created main pz2 object"); + log("m_queues=" + $.toJSON(m_queues)); + var params = { + "windowid": teamName, + "pazpar2path": mkws.pazpar2_url(), + "usesessions" : config.use_service_proxy ? false : true, + "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way + "termlist": config.facets.join(',') + }; + + params.oninit = onInit; + params.onbytarget = onBytarget; + params.onstat = onStat; + params.onterm = (config.facets.length ? onTerm : undefined); + params.onshow = onShow; + params.onrecord = onRecord; + + m_paz = new pz2(params); + log("ccreated main pz2 object"); } -- 1.7.10.4