2011-11-11 18:51:44 +04:00
|
|
|
<script type='text/javascript'>
|
2012-05-02 17:54:34 +04:00
|
|
|
var defaultView = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') ?>';
|
2011-11-11 18:51:44 +04:00
|
|
|
var eventSources = <?php echo json_encode($_['eventSources']) ?>;
|
2012-04-13 01:06:45 +04:00
|
|
|
var categories = <?php echo json_encode($_['categories']); ?>;
|
2012-07-16 22:25:45 +04:00
|
|
|
var dayNames = new Array("<?php echo $l -> t("Sunday");?>", "<?php echo $l -> t("Monday");?>", "<?php echo $l -> t("Tuesday");?>", "<?php echo $l -> t("Wednesday");?>", "<?php echo $l -> t("Thursday");?>", "<?php echo $l -> t("Friday");?>", "<?php echo $l -> t("Saturday");?>");
|
|
|
|
var dayNamesShort = new Array("<?php echo $l -> t("Sun.");?>", "<?php echo $l -> t("Mon.");?>", "<?php echo $l -> t("Tue.");?>", "<?php echo $l -> t("Wed.");?>", "<?php echo $l -> t("Thu.");?>", "<?php echo $l -> t("Fri.");?>", "<?php echo $l -> t("Sat.");?>");
|
|
|
|
var monthNames = new Array("<?php echo $l -> t("January");?>", "<?php echo $l -> t("February");?>", "<?php echo $l -> t("March");?>", "<?php echo $l -> t("April");?>", "<?php echo $l -> t("May");?>", "<?php echo $l -> t("June");?>", "<?php echo $l -> t("July");?>", "<?php echo $l -> t("August");?>", "<?php echo $l -> t("September");?>", "<?php echo $l -> t("October");?>", "<?php echo $l -> t("November");?>", "<?php echo $l -> t("December");?>");
|
|
|
|
var monthNamesShort = new Array("<?php echo $l -> t("Jan.");?>", "<?php echo $l -> t("Feb.");?>", "<?php echo $l -> t("Mar.");?>", "<?php echo $l -> t("Apr.");?>", "<?php echo $l -> t("May.");?>", "<?php echo $l -> t("Jun.");?>", "<?php echo $l -> t("Jul.");?>", "<?php echo $l -> t("Aug.");?>", "<?php echo $l -> t("Sep.");?>", "<?php echo $l -> t("Oct.");?>", "<?php echo $l -> t("Nov.");?>", "<?php echo $l -> t("Dec.");?>");
|
2012-05-02 17:54:34 +04:00
|
|
|
var agendatime = '<?php echo ((int) OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>{ - <?php echo ((int) OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>}';
|
|
|
|
var defaulttime = '<?php echo ((int) OCP\Config::getUserValue(OCP\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')) ?>';
|
2012-05-07 22:22:55 +04:00
|
|
|
var totalurl = '<?php echo OCP\Util::linkToRemote('caldav'); ?>calendars';
|
2012-05-02 17:54:34 +04:00
|
|
|
var firstDay = '<?php echo (OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'firstday', 'mo') == 'mo' ? '1' : '0'); ?>';
|
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
|
|
|
}
|
|
|
|
?>
|
|
|
|
});
|
2011-11-11 18:51:44 +04:00
|
|
|
</script>
|
2011-08-12 16:29:45 +04:00
|
|
|
<div id="controls">
|
2012-06-09 18:15:25 +04:00
|
|
|
<form id="view">
|
|
|
|
<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"/>
|
|
|
|
<img id="loading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" />
|
|
|
|
</form>
|
|
|
|
<form id="choosecalendar">
|
|
|
|
<input type="button" id="today_input" value="<?php echo $l->t("Today");?>"/>
|
|
|
|
<input type="button" id="choosecalendar_input" value="<?php echo $l->t("Calendars");?>" onclick="Calendar.UI.Calendar.overview();" />
|
|
|
|
</form>
|
|
|
|
<form id="datecontrol">
|
|
|
|
<input type="button" value=" < " id="datecontrol_left"/>
|
2012-06-13 11:05:00 +04:00
|
|
|
<input type="button" value="" id="datecontrol_date"/>
|
2012-06-09 18:15:25 +04:00
|
|
|
<input type="button" value=" > " id="datecontrol_right"/>
|
|
|
|
</form>
|
2011-08-11 13:22:07 +04:00
|
|
|
</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 -->
|