From 17b5afc94c55b10b3d9ef73ee740117296a7f83d Mon Sep 17 00:00:00 2001 From: Greg Allen Date: Fri, 19 Dec 2014 08:30:59 -0800 Subject: [PATCH] check if readonly --- lib/weekly.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/weekly.js b/lib/weekly.js index ea91d12..5d7fc1a 100644 --- a/lib/weekly.js +++ b/lib/weekly.js @@ -38,6 +38,7 @@ }, init: function() { + var self = this; this.events = []; this.oldDate = this.currentDate; @@ -60,11 +61,17 @@ this.hoverPreviewTimer = null; if(this.hoverPreviewDelay !== false) { this.el.on('mousemove', '.weekly-day', this.proxy(function(e) { + if (self.readOnly) { + return; + } this.removePreviewEvent(); this.hoverPreviewTimer = setTimeout(this.proxy(function() { this.showPreviewEvent(e); }), this.hoverPreviewDelay); })).on('mouseleave', '.weekly-day', this.proxy(function() { + if (self.readOnly) { + return; + } this.removePreviewEvent(); })); }