Created
October 23, 2012 07:32
-
-
Save orloffv/3937451 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#calendar', this.$el).fullCalendar({ | |
header: { | |
left: 'prev,next today', | |
center: 'title', | |
right: 'month,agendaWeek,agendaDay' | |
}, | |
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], | |
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'], | |
dayNames: ['Воскресенье','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота'], | |
dayNamesShort: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], | |
buttonText: { | |
today: 'сегодня', | |
month: 'месяц', | |
week: 'неделя', | |
day: 'день' | |
}, | |
editable: false, | |
titleFormat: { | |
month: 'MMMM yyyy', | |
week: "MMMM d[ yyyy]{ '—'[ MMMM] d yyyy}", | |
day: 'dddd, MMMM d, yyyy' | |
}, | |
columnFormat: { | |
month: 'ddd', | |
week: 'ddd, d MMM', | |
day: '' | |
}, | |
timeFormat: 'H:mm', | |
firstDay: 1, | |
firstHour: 9, | |
minTime: 7, | |
allDaySlot: false, | |
allDayDefault: false, | |
ignoreTimezone: false, | |
defaultView: 'agendaWeek', | |
axisFormat: 'H:mm', | |
eventClick: function(calEvent) { | |
var interview = _this.interviews.get(calEvent.id); | |
var vacancy = new vacancyModel({id: interview.get('vacancy')}); | |
var applicant = new applicantModel({id: interview.get('applicant'), vacancy: vacancy.id}); | |
$.whenHelper([vacancy.fetch(), applicant.fetch()], function() { | |
ViewHelper.interview(null, [applicant], vacancy, interview.getCollaborators(), interviewModel, interviewView, function() {_this.fetchEvents()}, Modal, interview); | |
}); | |
}, | |
viewDisplay: function(view) { | |
if (!_.isUndefined(_this.moment)) { | |
if (_this.moment.format("YYYY-MM") == staffimApp.moment(view.start).format("YYYY-MM")) { | |
return false; | |
} | |
} | |
_this.fetchEvents(staffimApp.moment(view.start)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment