disable half-baked list view, change for proper day view, fix #80

master
Jan-Christoph Borchardt 2013-11-18 18:14:34 +01:00
parent f2405416dd
commit fd8b9573fa
3 changed files with 14 additions and 10 deletions

View File

@ -12,11 +12,11 @@ $view = $_POST['v'];
switch($view) {
case 'agendaWeek':
case 'month';
case 'list':
case 'agendaDay':
break;
default:
OCP\JSON::error(array('message'=>'unexpected parameter: ' . $view));
exit;
}
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'currentview', $view);
OCP\JSON::success();
OCP\JSON::success();

View File

@ -401,8 +401,8 @@ Calendar={
case 'month':
id = 'onemonthview_radio';
break;
case 'list':
id = 'listview_radio';
case 'agendaDay':
id = 'onedayview_radio';
break;
}
$('#'+id).addClass('active');
@ -868,6 +868,11 @@ $(document).ready(function(){
$.post(OC.filePath('calendar', 'ajax', 'changeview.php'), {v:view.name});
defaultView = view.name;
}
if(view.name === 'agendaDay') {
$('td.fc-state-highlight').css('background-color', '#ffffff');
} else{
$('td.fc-state-highlight').css('background-color', '#ffc');
}
Calendar.UI.setViewActive(view.name);
if (view.name == 'agendaWeek') {
$('#fullcalendar').fullCalendar('option', 'aspectRatio', 0.1);
@ -921,8 +926,8 @@ $(document).ready(function(){
$('#onemonthview_radio').click(function(){
$('#fullcalendar').fullCalendar('changeView', 'month');
});
$('#listview_radio').click(function(){
$('#fullcalendar').fullCalendar('changeView', 'list');
$('#onedayview_radio').click(function(){
$('#fullcalendar').fullCalendar('changeView', 'agendaDay');
});
$('#today_input').click(function(){
$('#fullcalendar').fullCalendar('today');

View File

@ -3,10 +3,9 @@
<div id="notification" style="display:none;"></div>
<div id="controls">
<form id="view">
<input type="button" value="<?php p($l->t('Day'));?>" id="onedayview_radio"/>
<input type="button" value="<?php p($l->t('Week'));?>" id="oneweekview_radio"/>
<input type="button" value="<?php p($l->t('Month'));?>" id="onemonthview_radio"/>
<input type="button" value="<?php p($l->t('List'));?>" id="listview_radio"/>&nbsp;&nbsp;
<img id="loading" src="<?php print_unescaped(OCP\Util::imagePath('calendar', 'loading.gif')); ?>" />
<input type="button" value="<?php p($l->t('Month'));?>" id="onemonthview_radio"/>&nbsp;&nbsp;
</form>
<form id="choosecalendar">
<!--<input type="button" id="today_input" value="<?php p($l->t("Today"));?>"/>-->
@ -21,4 +20,4 @@
</div>
<div id="fullcalendar"></div>
<div id="dialog_holder"></div>
<div id="appsettings" class="popup topright hidden"></div>
<div id="appsettings" class="popup topright hidden"></div>