if( feature_enabled(local_user(), 'richtext') )
$editselect = 'textareas';
+ // First day of the week (0 = Sunday)
+ // To-Do: Needs to be configurable
+ $firstDay = 0;
+
+ $i18n = array(
+ "firstDay" => $firstDay,
+ "Sun" => t("Sun"),
+ "Mon" => t("Mon"),
+ "Tue" => t("Tue"),
+ "Wed" => t("Wed"),
+ "Thu" => t("Thu"),
+ "Fri" => t("Fri"),
+ "Sat" => t("Sat"),
+ "Sunday" => t("Sunday"),
+ "Monday" => t("Monday"),
+ "Tuesday" => t("Tuesday"),
+ "Wednesday" => t("Wednesday"),
+ "Thursday" => t("Thursday"),
+ "Friday" => t("Friday"),
+ "Saturday" => t("Saturday"),
+ "Jan" => t("Jan"),
+ "Feb" => t("Feb"),
+ "Mar" => t("Mar"),
+ "Apr" => t("Apr"),
+ "May" => t("May"),
+ "Jun" => t("Jun"),
+ "Jul" => t("Jul"),
+ "Aug" => t("Aug"),
+ "Sep" => t("Sept"),
+ "Oct" => t("Oct"),
+ "Nov" => t("Nov"),
+ "Dec" => t("Dec"),
+ "January" => t("January"),
+ "February" => t("February"),
+ "March" => t("March"),
+ "April" => t("April"),
+ "May" => t("May"),
+ "June" => t("June"),
+ "July" => t("July"),
+ "August" => t("August"),
+ "September" => t("September"),
+ "October" => t("October"),
+ "November" => t("November"),
+ "December" => t("December"),
+ "today" => t("today"),
+ "month" => t("month"),
+ "week" => t("week"),
+ "day" => t("day"),
+ );
+
$htpl = get_markup_template('event_head.tpl');
$a->page['htmlhead'] .= replace_macros($htpl,array(
'$baseurl' => $a->get_baseurl(),
+ '$i18n' => $i18n,
'$editselect' => $editselect
));
<link rel='stylesheet' type='text/css' href='{{$baseurl}}/library/fullcalendar/fullcalendar.css' />
<script language="javascript" type="text/javascript"
- src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
+ src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
<script>
function showEvent(eventid) {
}
);
}
-
- function doEventPreview() {
- $('#event-edit-preview').val(1);
- $.post('events',$('#event-edit-form').serialize(), function(data) {
- $.colorbox({ html: data });
- });
- $('#event-edit-preview').val(0);
+
+ function doEventPreview() {
+ $('#event-edit-preview').val(1);
+ $.post('events',$('#event-edit-form').serialize(), function(data) {
+ $.colorbox({ html: data });
+ });
+ $('#event-edit-preview').val(0);
}
-
+
$(document).ready(function() {
$('#events-calendar').fullCalendar({
+ firstDay: {{$i18n.firstDay}},
+ monthNames: ['{{$i18n.January}}','{{$i18n.February}}','{{$i18n.March}}','{{$i18n.April}}','{{$i18n.May}}','{{$i18n.June}}','{{$i18n.July}}','{{$i18n.August}}','{{$i18n.September}}','{{$i18n.October}}','{{$i18n.November}}','{{$i18n.December}}'],
+ monthNamesShort: ['{{$i18n.Jan}}','{{$i18n.Feb}}','{{$i18n.Mar}}','{{$i18n.Apr}}','{{$i18n.May}}','{{$i18n.Jun}}','{{$i18n.Jul}}','{{$i18n.Aug}}','{{$i18n.Sep}}','{{$i18n.Oct}}','{{$i18n.Nov}}','{{$i18n.Dec}}'],
+ dayNames: ['{{$i18n.Sunday}}','{{$i18n.Monday}}','{{$i18n.Tuesday}}','{{$i18n.Wednesday}}','{{$i18n.Thursday}}','{{$i18n.Friday}}','{{$i18n.Saturday}}'],
+ dayNamesShort: ['{{$i18n.Sun}}','{{$i18n.Mon}}','{{$i18n.Tue}}','{{$i18n.Wed}}','{{$i18n.Thu}}','{{$i18n.Fri}}','{{$i18n.Sat}}'],
+ buttonText: {
+ prev: "<span class='fc-text-arrow'>‹</span>",
+ next: "<span class='fc-text-arrow'>›</span>",
+ prevYear: "<span class='fc-text-arrow'>«</span>",
+ nextYear: "<span class='fc-text-arrow'>»</span>",
+ today: '{{$i18n.today}}',
+ month: '{{$i18n.month}}',
+ week: '{{$i18n.week}}',
+ day: '{{$i18n.day}}'
+ },
events: '{{$baseurl}}/events/json/',
header: {
left: 'prev,next today',
eventClick: function(calEvent, jsEvent, view) {
showEvent(calEvent.id);
},
- loading: function(isLoading, view) {
+ loading: function(isLoading, view) {
if(!isLoading) {
$('td.fc-day').dblclick(function() { window.location.href='/events/new?start='+$(this).data('date'); });
}
{{if $editselect != 'none'}}
<script language="javascript" type="text/javascript"
- src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
+ src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript">
}
});
- {{else}}
+ {{else}}
<script language="javascript" type="text/javascript">
{{/if}}