+ var template = team.loadTemplate(that.config.template || "records");
+ var summaryPartial = team.loadTemplate(that.config['summary-template'] || "summary");
+ var tdata = $.extend({}, {"hits": m_data.hits}, that.config.template_vars);
+ that.node.html(template(tdata, {"partials":{"summary":summaryPartial}}));
+ }
+
+ m_needRedraw = false;
+ }
+
+ function setRecordData(data) {
+ m_data = data;
+ m_needRedraw = true;
+ if (!m_frozen) {
+ refreshRecordData();
+ }
+ }
+
+ this.team.queue("records").subscribe(setRecordData);
+
+ var m_timer;
+ this.node.mousemove(function() {
+ that.info("freezing display records");
+ that.node.css('opacity', 0.5);
+ m_frozen = true;
+ clearTimeout(m_timer);
+ m_timer = setTimeout(unfreezeRecordDisplay, 1000);
+ });
+
+ function unfreezeRecordDisplay() {
+ clearTimeout(m_timer);
+ that.info("refreshing records");
+ that.node.css('opacity', 1);
+ m_frozen = false;
+ refreshRecordData();
+ }
+ this.node.mouseleave(unfreezeRecordDisplay);
+
+/*
+ var m_busy = false;
+ this.node.mousemove(function() {
+ if (!m_busy) {
+ m_busy = true;
+ that.info("making semi-transparent in 0.001 s");
+ that.node.fadeTo(1, 0.5, function() {
+ that.info("making opaque in 2 s");
+ that.node.fadeTo(2000, 1, function() {
+ that.info("done making opaque");
+ m_busy = false;
+ });
+ });