bef6f92836
refactored css & html structure for all views (simpler & will work better with jqui themes). jQuery UI 1.8.9
38 lines
708 B
JavaScript
38 lines
708 B
JavaScript
|
|
fcViews.basicDay = BasicDayView;
|
|
|
|
//TODO: when calendar's date starts out on a weekend, shouldn't happen
|
|
|
|
|
|
function BasicDayView(element, calendar) {
|
|
var t = this;
|
|
|
|
|
|
// exports
|
|
t.render = render;
|
|
|
|
|
|
// imports
|
|
BasicView.call(t, element, calendar, 'basicDay');
|
|
var opt = t.opt;
|
|
var renderBasic = t.renderBasic;
|
|
var formatDate = calendar.formatDate;
|
|
|
|
|
|
|
|
function render(date, delta) {
|
|
if (delta) {
|
|
addDays(date, delta);
|
|
if (!opt('weekends')) {
|
|
skipWeekend(date, delta < 0 ? -1 : 1);
|
|
}
|
|
}
|
|
t.title = formatDate(date, opt('titleFormat'));
|
|
t.start = t.visStart = cloneDate(date, true);
|
|
t.end = t.visEnd = addDays(cloneDate(t.start), 1);
|
|
renderBasic(1, 1, 1, false);
|
|
}
|
|
|
|
|
|
}
|