- 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;
+ if (m_queues.targets) {
+ params.onbytarget = onBytarget;
+ log("setting bytarget callback");
+ }
+ if (m_queues.stat) {
+ params.onstat = onStat;
+ log("setting stat callback");
+ }
+ if (m_queues.termlists && config.facets.length) {
+ params.onterm = onTerm;
+ log("setting term callback");
+ }
+ if (m_queues.records) {
+ log("setting show callback");
+ params.onshow = onShow;
+ // Record callback is subscribed from records callback
+ log("setting record callback");
+ params.onrecord = onRecord;
+ }
+
+ m_paz = new pz2(params);
+ log("ccreated main pz2 object");