From: Mike Taylor Date: Tue, 7 Oct 2014 11:23:41 +0000 (+0100) Subject: Move mkaePz2 function down the file. X-Git-Tag: 1.0.0~293 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=5b22f5dbb32564454ce63cd73b33237bc2103b18;p=mkws-moved-to-github.git Move mkaePz2 function down the file. --- diff --git a/src/mkws-team.js b/src/mkws-team.js index 0c373c0..a8383e0 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -95,25 +95,6 @@ mkws.makeTeam = function($, teamName) { m_sortOrder = config.sort_default; m_perpage = config.perpage_default; - // 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 - 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"); - } - // pz2.js event handlers: function onInit() { log("init"); @@ -169,6 +150,26 @@ mkws.makeTeam = function($, teamName) { } + // 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 + 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"); + } + + // Used by the Records widget and onRecord() function recordElementId(s) { return 'mkwsRec_' + s.replace(/[^a-z0-9]/ig, '_');