|
|
|
|
@ -46,19 +46,31 @@ if (EXPO.profile.calendar) { |
|
|
|
|
result = 0, |
|
|
|
|
width = self.opt.cellWidth, |
|
|
|
|
$calendar = $('#' + self.opt.calenadrId), |
|
|
|
|
currentDay = $calendar.find('td.' + self.opt.currentDayClass).index()+1, |
|
|
|
|
currentDay = $calendar.find('td.' + self.opt.currentDayClass).index(), |
|
|
|
|
onestep = self.opt.cellsToScroll, |
|
|
|
|
allDays = $calendar.find('.'+self.opt.daysClass+' td').length, |
|
|
|
|
stepsCount = allDays / onestep, |
|
|
|
|
currenCount = allDays / currentDay; |
|
|
|
|
result = stepsCount - currenCount; |
|
|
|
|
stepsCount, |
|
|
|
|
currenCount; |
|
|
|
|
self.stepWidth = onestep*width; |
|
|
|
|
self.calendarWidth = width* allDays; |
|
|
|
|
if (result) { |
|
|
|
|
result = Math.floor(result); |
|
|
|
|
offset = onestep * result * width; |
|
|
|
|
} else { |
|
|
|
|
if(currentDay > 0){ |
|
|
|
|
currentDay++; |
|
|
|
|
stepsCount = allDays / onestep; |
|
|
|
|
currenCount = allDays / currentDay; |
|
|
|
|
|
|
|
|
|
result = stepsCount - currenCount; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.currentDay =currentDay; |
|
|
|
|
if (result) { |
|
|
|
|
result = Math.floor(result-1); |
|
|
|
|
offset = onestep * result * width; |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
offset = 0; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
self.currentDay = 0; |
|
|
|
|
offset = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|