1
0
Fork 0
forked from 0x2620/oxjs

cleanup, again

This commit is contained in:
rolux 2011-11-03 16:42:41 +01:00
commit 094b1a59ec
34 changed files with 93 additions and 101 deletions

View file

@ -507,7 +507,7 @@ Ox.Calendar = function(options, self) {
.css({
textAlign: 'center'
});
self.$lines = [];
getLines();
renderCalendar();
@ -713,10 +713,11 @@ Ox.Calendar = function(options, self) {
width = getPosition(event.endTime, zoom) - left;
}
return Ox.Element()
.addClass('OxEvent' +
(event.type ? ' Ox' + Ox.toTitleCase(event.type) : '' ) +
(event.current ? ' OxCurrent' : '') +
(event.id == self.options.selected ? ' OxSelected' : '')
.addClass(
'OxEvent'
+ (event.type ? ' Ox' + Ox.toTitleCase(event.type) : '' )
+ (event.current ? ' OxCurrent' : '')
+ (event.id == self.options.selected ? ' OxSelected' : '')
)
.css({
left: left + 'px',
@ -803,14 +804,14 @@ Ox.Calendar = function(options, self) {
})
.appendTo(self.$content);
}
self.lineEvents[line].push(event);
self.lineEvents[line].push(event);
});
}
function getMouseDate(e) {
return new Date(+self.options.date + (
e.clientX - that.offset().left - self.options.width / 2 - 1
) * getSecondsPerPixel() * 1000);
) * getSecondsPerPixel() * 1000);
}
function getOverlayWidths() {
@ -830,9 +831,8 @@ Ox.Calendar = function(options, self) {
function getPosition(date, zoom) {
return Math.round(
self.options.width / 2 +
(date - self.options.date) / 1000 *
getPixelsPerSecond(zoom)
self.options.width / 2
+ (date - self.options.date) / 1000 * getPixelsPerSecond(zoom)
);
}