mkws.registerWidgetType('records', function() {
var that = this;
var team = this.team;
- var m_dataToRedraw = null;
- var m_frozen = false;
this.team.queue("searchtriggered").subscribe(function() {
var op = that.config.newsearch_opacity;
if (op !== undefined) { that.node.fadeTo(500, op); }
});
+ var m_dataToRedraw = null;
function refreshRecordData() {
that.node.css('opacity', 1);
m_dataToRedraw = null;
}
- function setRecordData(data) {
+ var m_frozen = false;
+ this.team.queue("records").subscribe(function(data) {
m_dataToRedraw = data;
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);
+ var op = that.config.freeze_opacity;
+ if (op !== undefined) { that.node.css('opacity', op); }
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();