2011-11-11 18:51:44 +04:00
|
|
|
<script type='text/javascript'>
|
|
|
|
var defaultView = '<?php echo OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') ?>';
|
|
|
|
var eventSources = <?php echo json_encode($_['eventSources']) ?>;
|
|
|
|
var dayNames = <?php echo json_encode($l->tA(array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'))) ?>;
|
|
|
|
var dayNamesShort = <?php echo json_encode($l->tA(array('Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'))) ?>;
|
|
|
|
var monthNames = <?php echo json_encode($l->tA(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'))) ?>;
|
|
|
|
var monthNamesShort = <?php echo json_encode($l->tA(array('Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'))) ?>;
|
2011-11-20 17:23:26 +04:00
|
|
|
var agendatime = '<?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>{ - <?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>}';
|
|
|
|
var defaulttime = '<?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>';
|
2012-01-17 18:18:01 +04:00
|
|
|
var allDayText = '<?php echo addslashes($l->t('All day')) ?>';
|
2012-01-17 18:38:32 +04:00
|
|
|
var newcalendar = '<?php echo addslashes($l->t('New Calendar')) ?>';
|
2012-01-17 18:18:01 +04:00
|
|
|
var missing_field = '<?php echo addslashes($l->t('Missing fields')) ?>';
|
|
|
|
var missing_field_title = '<?php echo addslashes($l->t('Title')) ?>';
|
|
|
|
var missing_field_calendar = '<?php echo addslashes($l->t('Calendar')) ?>';
|
|
|
|
var missing_field_fromdate = '<?php echo addslashes($l->t('From Date')) ?>';
|
|
|
|
var missing_field_fromtime = '<?php echo addslashes($l->t('From Time')) ?>';
|
|
|
|
var missing_field_todate = '<?php echo addslashes($l->t('To Date')) ?>';
|
|
|
|
var missing_field_totime = '<?php echo addslashes($l->t('To Time')) ?>';
|
|
|
|
var missing_field_startsbeforeends = '<?php echo addslashes($l->t('The event ends before it starts')) ?>';
|
|
|
|
var missing_field_dberror = '<?php echo addslashes($l->t('There was a database fail')) ?>';
|
2011-11-12 19:13:27 +04:00
|
|
|
var totalurl = '<?php echo OC_Helper::linkTo('apps/calendar', 'caldav.php', null, true); ?>/calendars';
|
2012-01-06 17:36:24 +04:00
|
|
|
$(document).ready(function() {
|
|
|
|
<?php
|
|
|
|
if(array_key_exists('showevent', $_)){
|
|
|
|
$data = OC_Calendar_App::getEventObject($_['showevent']);
|
|
|
|
$date = substr($data['startdate'], 0, 10);
|
|
|
|
list($year, $month, $day) = explode('-', $date);
|
|
|
|
echo '$(\'#calendar_holder\').fullCalendar(\'gotoDate\', ' . $year . ', ' . --$month . ', ' . $day . ');';
|
2012-01-07 17:31:47 +04:00
|
|
|
echo '$(\'#dialog_holder\').load(OC.filePath(\'calendar\', \'ajax\', \'editeventform.php\') + \'?id=\' + ' . $_['showevent'] . ' , Calendar.UI.startEventDialog);';
|
2012-01-06 17:36:24 +04:00
|
|
|
}
|
2012-01-15 03:06:26 +04:00
|
|
|
|
|
|
|
switch(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month')){
|
|
|
|
case 'agendaWeek':
|
|
|
|
echo '$(\'#oneweekview_radio\').css(\'color\', \'#6193CF\');';
|
|
|
|
break;
|
|
|
|
case 'month':
|
|
|
|
echo '$(\'#onemonthview_radio\').css(\'color\', \'#6193CF\');';
|
|
|
|
break;
|
|
|
|
case 'list':
|
|
|
|
echo '$(\'#listview_radio\').css(\'color\', \'#6193CF\');';
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2012-01-06 17:36:24 +04:00
|
|
|
?>
|
|
|
|
});
|
2011-11-11 18:51:44 +04:00
|
|
|
</script>
|
2011-12-28 00:48:04 +04:00
|
|
|
<div id="loading"><img src="<?php echo OC_Helper::imagePath('core', 'loading.gif'); ?>" /></div>
|
2011-08-12 16:29:45 +04:00
|
|
|
<div id="controls">
|
|
|
|
<div>
|
2011-08-11 13:22:07 +04:00
|
|
|
<form>
|
|
|
|
<div id="view">
|
2011-10-18 21:58:47 +04:00
|
|
|
<input type="button" value="<?php echo $l->t('Week');?>" id="oneweekview_radio"/>
|
|
|
|
<input type="button" value="<?php echo $l->t('Month');?>" id="onemonthview_radio"/>
|
|
|
|
<input type="button" value="<?php echo $l->t('List');?>" id="listview_radio"/>
|
2011-08-11 13:22:07 +04:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<form>
|
|
|
|
<div id="choosecalendar">
|
2011-10-18 21:58:47 +04:00
|
|
|
<input type="button" id="today_input" value="<?php echo $l->t("Today");?>"/>
|
2011-09-12 00:06:45 +04:00
|
|
|
<input type="button" id="choosecalendar_input" value="<?php echo $l->t("Calendars");?>" onclick="Calendar.UI.Calendar.overview();" />
|
2011-08-11 13:22:07 +04:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<form>
|
|
|
|
<div id="datecontrol">
|
2011-10-18 21:58:47 +04:00
|
|
|
<input type="button" value=" < " id="datecontrol_left"/>
|
2011-10-22 15:14:54 +04:00
|
|
|
<span class="button" id="datecontrol_date"></span>
|
2011-10-18 21:58:47 +04:00
|
|
|
<input type="button" value=" > " id="datecontrol_right"/>
|
2011-08-11 13:22:07 +04:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2011-11-11 18:51:44 +04:00
|
|
|
<div id="notification" style="display:none;"></div>
|
2011-08-12 16:29:45 +04:00
|
|
|
<div id="calendar_holder">
|
2011-08-11 13:22:07 +04:00
|
|
|
</div>
|
|
|
|
<!-- Dialogs -->
|
2011-08-19 22:33:48 +04:00
|
|
|
<div id="dialog_holder"></div>
|
2011-08-11 13:22:07 +04:00
|
|
|
<div id="parsingfail_dialog" title="Parsing Fail">
|
2011-08-28 22:13:40 +04:00
|
|
|
<?php echo $l->t("There was a fail, while parsing the file."); ?>
|
2011-08-11 13:22:07 +04:00
|
|
|
</div>
|
|
|
|
<!-- End of Dialogs -->
|