X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=0ddc962337aa069d3aa534d5cc69b19e7a1acf5e;hb=9fa64f9996f951cf9c573ab19c21ffc72bc55a88;hp=70b355840bca932111c48e4ae1ad45c9442a9d6b;hpb=b6f09309f661eab9a141a70ab5de32d0d7885657;p=mkws-moved-to-github.git diff --git a/src/mkws-team.js b/src/mkws-team.js index 70b3558..0ddc962 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,13 +430,6 @@ function team($, teamName) { \ '); - // Can't be local, as the "Facet" widget also needs to consult this. - mkws.facetConfig = { - xtargets: [ "Sources", 16, false ], - subject: [ "Subjects", 10, true ], - author: [ "Authors", 10, true ] - } - var acc = []; var facets = m_config.facets; acc.push('