|
|
|
|
@ -112,6 +112,8 @@ if (EXPO.profile.calendar) { |
|
|
|
|
this.scrollStep = scrollStep; |
|
|
|
|
this.$scrollBox = $scrollBox; |
|
|
|
|
this.$messages = []; |
|
|
|
|
this.stepWidth = self.opt.cellsToScroll*self.opt.cellWidth; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function () { |
|
|
|
|
$noEventsField.each(function () { |
|
|
|
|
@ -125,20 +127,10 @@ if (EXPO.profile.calendar) { |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$('.' + self.opt.eventsClass).each(function () { |
|
|
|
|
index++; |
|
|
|
|
if (index == 3) { |
|
|
|
|
$(this).addClass('grey'); |
|
|
|
|
} |
|
|
|
|
if (index == 4) { |
|
|
|
|
$(this).addClass('grey'); |
|
|
|
|
index = 0; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$('.' + self.opt.eventsClass+":even").addClass('grey'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$(window).load(function () { |
|
|
|
|
self.stepWidth = self.opt.cellsToScroll*self.opt.cellWidth; |
|
|
|
|
self.calendarWidth = self.opt.cellWidth* $calendar.find('.'+self.opt.daysClass+' td').length; |
|
|
|
|
$scrollBox.mCustomScrollbar({ |
|
|
|
|
axis: 'y', |
|
|
|
|
@ -250,8 +242,20 @@ if (EXPO.profile.calendar) { |
|
|
|
|
self = this; |
|
|
|
|
} |
|
|
|
|
for (var i =0; i< self.$messages.length; i++){ |
|
|
|
|
var marginLeft = parseInt(self.$messages[i].inlineStyle("margin-left")); |
|
|
|
|
self.offsetMessages(self); |
|
|
|
|
var parentWidth = self.$messages[i].parent().width(), |
|
|
|
|
parentOffset = parseInt(self.$messages[i].parent().offset().left, 10) ; |
|
|
|
|
if(parentOffset){ |
|
|
|
|
parentOffset -= 312 |
|
|
|
|
}else{ |
|
|
|
|
parentOffset += 312 |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if(parentWidth > self.stepWidth){ |
|
|
|
|
// message block went over the left edge
|
|
|
|
|
if(parentOffset <0){ |
|
|
|
|
self.$messages[i].css({marginLeft:Math.abs(parentOffset+ self.stepWidth)+'px'}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
return that; |
|
|
|
|
|