for (var k in config_default) {
if (typeof mkws_config[k] === 'undefined')
mkws_config[k] = config_default[k];
- debug("Set config: " + k + ' => ' + mkws_config[k]);
+ //debug("Set config: " + k + ' => ' + mkws_config[k]);
}
}
// create a parameters array and pass it to the pz2's constructor
// then register the form submit event with the pz2.search function
// autoInit is set to true on default
- mkws.paz = new pz2({ "onshow": my_onshow,
- "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way
- "pazpar2path": mkws_config.pazpar2_url,
- "oninit": my_oninit,
- "onstat": my_onstat,
- "onterm": my_onterm,
- "termlist": "xtargets,subject,author",
- "onbytarget": my_onbytarget,
- "usesessions" : mkws_config.use_service_proxy ? false : true,
- "showResponseType": '', // or "json" (for debugging?)
- "onrecord": my_onrecord });
+ if (!mkws.paz) {
+ mkws.paz = new pz2({ "onshow": my_onshow,
+ "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way
+ "pazpar2path": mkws_config.pazpar2_url,
+ "oninit": my_oninit,
+ "onstat": my_onstat,
+ "onterm": my_onterm,
+ "termlist": "xtargets,subject,author",
+ "onbytarget": my_onbytarget,
+ "usesessions" : mkws_config.use_service_proxy ? false : true,
+ "showResponseType": '', // or "json" (for debugging?)
+ "onrecord": my_onrecord });
+ }
if (!isNaN(parseInt(mkws_config.perpage_default))) {
m_recPerPage = parseInt(mkws_config.perpage_default);
}
// Backwards compatibility: the special-case undefined team
+ // ### Will not be necessary when non-default teams are working
mkws.teams[''] = _make_mkws_team(j, undefined);
log("Made the unnamed MKWS team");