highlight the current view
This commit is contained in:
parent
0ac9e56da9
commit
b1433119cc
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
|
* Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
|
||||||
* Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
|
* Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
|
||||||
* This file is licensed under the Affero General Public License version 3 or
|
* This file is licensed under the Affero General Public License version 3 or
|
||||||
* later.
|
* later.
|
||||||
|
@ -345,6 +345,11 @@ Calendar={
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
reseticonhighlight: function(){
|
||||||
|
$('#oneweekview_radio').css('color', '#000000');
|
||||||
|
$('#onemonthview_radio').css('color', '#000000');
|
||||||
|
$('#listview_radio').css('color', '#000000');
|
||||||
|
},
|
||||||
Calendar:{
|
Calendar:{
|
||||||
overview:function(){
|
overview:function(){
|
||||||
if($('#choosecalendar_dialog').dialog('isOpen') == true){
|
if($('#choosecalendar_dialog').dialog('isOpen') == true){
|
||||||
|
@ -669,12 +674,18 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
$('#oneweekview_radio').click(function(){
|
$('#oneweekview_radio').click(function(){
|
||||||
$('#calendar_holder').fullCalendar('changeView', 'agendaWeek');
|
$('#calendar_holder').fullCalendar('changeView', 'agendaWeek');
|
||||||
|
Calendar.UI.reseticonhighlight();
|
||||||
|
$('#oneweekview_radio').css('color', '#6193CF');
|
||||||
});
|
});
|
||||||
$('#onemonthview_radio').click(function(){
|
$('#onemonthview_radio').click(function(){
|
||||||
$('#calendar_holder').fullCalendar('changeView', 'month');
|
$('#calendar_holder').fullCalendar('changeView', 'month');
|
||||||
|
Calendar.UI.reseticonhighlight();
|
||||||
|
$('#onemonthview_radio').css('color', '#6193CF');
|
||||||
});
|
});
|
||||||
$('#listview_radio').click(function(){
|
$('#listview_radio').click(function(){
|
||||||
$('#calendar_holder').fullCalendar('changeView', 'list');
|
$('#calendar_holder').fullCalendar('changeView', 'list');
|
||||||
|
Calendar.UI.reseticonhighlight();
|
||||||
|
$('#listview_radio').css('color', '#6193CF');
|
||||||
});
|
});
|
||||||
$('#today_input').click(function(){
|
$('#today_input').click(function(){
|
||||||
$('#calendar_holder').fullCalendar('today');
|
$('#calendar_holder').fullCalendar('today');
|
||||||
|
|
|
@ -27,6 +27,20 @@
|
||||||
echo '$(\'#calendar_holder\').fullCalendar(\'gotoDate\', ' . $year . ', ' . --$month . ', ' . $day . ');';
|
echo '$(\'#calendar_holder\').fullCalendar(\'gotoDate\', ' . $year . ', ' . --$month . ', ' . $day . ');';
|
||||||
echo '$(\'#dialog_holder\').load(OC.filePath(\'calendar\', \'ajax\', \'editeventform.php\') + \'?id=\' + ' . $_['showevent'] . ' , Calendar.UI.startEventDialog);';
|
echo '$(\'#dialog_holder\').load(OC.filePath(\'calendar\', \'ajax\', \'editeventform.php\') + \'?id=\' + ' . $_['showevent'] . ' , Calendar.UI.startEventDialog);';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue