Skip to content

Commit

Permalink
check if readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
jgallen23 committed Dec 19, 2014
1 parent 5b3fe10 commit 17b5afc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/weekly.js
Expand Up @@ -38,6 +38,7 @@
},

init: function() {
var self = this;
this.events = [];

this.oldDate = this.currentDate;
Expand All @@ -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();
}));
}
Expand Down

0 comments on commit 17b5afc

Please sign in to comment.