added transition function from 'old' calendar to fullcalendar (fixed currentview bug) and removed listview (it is not implemented in fullcalendar yet)
This commit is contained in:
parent
d09b3ad2e7
commit
e48377d85b
|
@ -7,10 +7,9 @@
|
|||
*/
|
||||
|
||||
require_once ("../../../lib/base.php");
|
||||
if(!OC_USER::isLoggedIn()) {
|
||||
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
|
||||
}
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('calendar');
|
||||
$currentview = $_GET["v"];
|
||||
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", $currentview);
|
||||
OC_JSON::success();
|
||||
?>
|
||||
|
|
|
@ -19,6 +19,17 @@ $eventSources = array();
|
|||
foreach($calendars as $calendar){
|
||||
$eventSources[] = OC_Calendar_Calendar::getEventSourceInfo($calendar);
|
||||
}
|
||||
//Fix currentview for fullcalendar
|
||||
if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview"){
|
||||
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "agendaWeek");
|
||||
}
|
||||
if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview"){
|
||||
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "month");
|
||||
}
|
||||
if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "listview"){
|
||||
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "month");
|
||||
}
|
||||
|
||||
OC_Util::addScript('3rdparty/fullcalendar', 'fullcalendar');
|
||||
OC_Util::addStyle('3rdparty/fullcalendar', 'fullcalendar');
|
||||
OC_Util::addScript('calendar', 'calendar');
|
||||
|
|
|
@ -531,10 +531,10 @@ $(document).ready(function(){
|
|||
});
|
||||
$('#onemonthview_radio').click(function(){
|
||||
$('#calendar_holder').fullCalendar('changeView', 'month');
|
||||
});
|
||||
});/*
|
||||
$('#listview_radio').click(function(){
|
||||
$('#calendar_holder').fullCalendar('changeView', 'list');
|
||||
});
|
||||
});*/
|
||||
$('#today_input').click(function(){
|
||||
$('#calendar_holder').fullCalendar('today');
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ var allDayText = '<?php echo $l->t('All day') ?>';
|
|||
<div 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"/>
|
||||
<!--<input type="button" value="<?php echo $l->t('List');?>" id="listview_radio"/>-->
|
||||
</div>
|
||||
</form>
|
||||
<form>
|
||||
|
|
Loading…
Reference in New Issue