|
|
|
|
@ -116,15 +116,28 @@ if (EXPO.profile.calendar) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function () { |
|
|
|
|
/** |
|
|
|
|
* no marked events message |
|
|
|
|
*/ |
|
|
|
|
$noEventsField.each(function () { |
|
|
|
|
var parentOffset = parseInt($(this).offset().left, 10), |
|
|
|
|
$message = $('.message',$(this)); |
|
|
|
|
/** |
|
|
|
|
* remove sidebar width |
|
|
|
|
*/ |
|
|
|
|
if(parentOffset){ |
|
|
|
|
parentOffset -=312; |
|
|
|
|
}else{ |
|
|
|
|
parentOffset +=312; |
|
|
|
|
} |
|
|
|
|
if (!$(this).attr('colspan') || $(this).attr('colspan') == 1) { |
|
|
|
|
$(this).find('.' + self.opt.eventWrapClass).addClass('small'); |
|
|
|
|
}else if($(this).width() > self.stepWidth){ |
|
|
|
|
self.$messages.push( |
|
|
|
|
$('.message',$(this)) |
|
|
|
|
.width(self.stepWidth) |
|
|
|
|
.css({marginLeft:self.currentOffset+'px'}) |
|
|
|
|
); |
|
|
|
|
$message.width(self.stepWidth) |
|
|
|
|
if(parentOffset <0){ |
|
|
|
|
$message.css({marginLeft:Math.abs(parentOffset+ self.stepWidth)+'px'}); |
|
|
|
|
} |
|
|
|
|
self.$messages.push($message); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$('.' + self.opt.eventsClass+":even").addClass('grey'); |
|
|
|
|
@ -162,10 +175,10 @@ if (EXPO.profile.calendar) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$leftScroll.one('click', function () { |
|
|
|
|
self.$leftScroll.one('click', function () { |
|
|
|
|
self.scrollLeft(self); |
|
|
|
|
}); |
|
|
|
|
$rightScroll.one('click', function () { |
|
|
|
|
self.$rightScroll.one('click', function () { |
|
|
|
|
self.scrollRight(self); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
@ -203,6 +216,11 @@ if (EXPO.profile.calendar) { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
/** |
|
|
|
|
* scroll calendar |
|
|
|
|
* @param self |
|
|
|
|
* @returns {boolean} |
|
|
|
|
*/ |
|
|
|
|
that.scrollRight = function (self) { |
|
|
|
|
if(!self){ |
|
|
|
|
self = this; |
|
|
|
|
@ -214,11 +232,18 @@ if (EXPO.profile.calendar) { |
|
|
|
|
console.log("!!! right scroll fired!"); |
|
|
|
|
self.$scrollBox.mCustomScrollbar("scrollTo", '-=' + self.scrollStep); |
|
|
|
|
self.offsetMessages(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
self.$rightScroll.one('click', function () { |
|
|
|
|
self.scrollRight(self); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
}; |
|
|
|
|
/** |
|
|
|
|
* scroll calendar backward |
|
|
|
|
* @param self |
|
|
|
|
* @returns {boolean} |
|
|
|
|
*/ |
|
|
|
|
that.scrollLeft = function (self) { |
|
|
|
|
if(!self){ |
|
|
|
|
self = this; |
|
|
|
|
@ -228,8 +253,10 @@ if (EXPO.profile.calendar) { |
|
|
|
|
console.log("!!! left scroll fired!"); |
|
|
|
|
self.$scrollBox.mCustomScrollbar("scrollTo", '+=' + self.scrollStep); |
|
|
|
|
self.offsetMessages(self); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
self.$leftScroll.one('click', function () { |
|
|
|
|
self.scrollLeft(self); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
}; |
|
|
|
|
|