X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=src%2Fmkws-team.js;h=8872eb3d1b4847ab92c5cbf1c3f637eaafb5291f;hp=0527c96351d86dfa22e3ca2008835c649e6d8fe4;hb=d4b50ec914581fac42d48fb7ac1b8e798a80f179;hpb=f5f7348f3d110ab62e571381d9d5ff2761e7304f diff --git a/src/mkws-team.js b/src/mkws-team.js index 0527c96..8872eb3 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -27,7 +27,8 @@ function team($, teamName) { }; var m_paz; // will be initialised below var m_template = {}; - var m_config = Object.create(mkws.config); + var m_config = mkws.objectInheritingFrom(mkws.config); + var m_widgets = {}; // Maps widget-type to object that.toString = function() { return '[Team ' + teamName + ']'; }; @@ -48,12 +49,12 @@ function team($, teamName) { // The following PubSub code is modified from the jQuery manual: - // https://api.jquery.com/jQuery.Callbacks/ + // http://api.jquery.com/jQuery.Callbacks/ // // Use as: // team.queue("eventName").subscribe(function(param1, param2 ...) { ... }); // team.queue("eventName").publish(arg1, arg2, ...); - + // var queues = {}; function queue(id) { if (!queues[id]) { @@ -115,8 +116,9 @@ function team($, teamName) { } function onStat(data) { - log("stat"); queue("stat").publish(data); + if (parseInt(data.activeclients[0], 10) === 0) + queue("complete").publish(parseInt(data.hits[0], 10)); } function onTerm(data) { @@ -239,6 +241,7 @@ function team($, teamName) { that.reShow = function() { + resetPage(); m_paz.show(0, m_perpage, m_sortOrder); }; @@ -427,24 +430,12 @@ function team($, teamName) { \ '); - mkws.facetConfig = { - xtargets: [ "Sources", 16, false ], - subject: [ "Subjects", 10, true ], - author: [ "Authors", 10, true ] - } - var acc = []; var facets = m_config.facets; acc.push('