move calendar settings from personal settings to in app settings

master
Georg Ehrke 2012-08-09 12:36:00 +02:00
parent ca912ddff6
commit d7e742c32d
11 changed files with 178 additions and 123 deletions

View File

@ -4,9 +4,7 @@
* 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.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
$l10n = OC_L10N::get('calendar'); $l10n = OC_L10N::get('calendar');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar'); OCP\JSON::checkAppEnabled('calendar');

View File

@ -33,5 +33,4 @@ OCP\App::addNavigationEntry( array(
'href' => OCP\Util::linkTo( 'calendar', 'index.php' ), 'href' => OCP\Util::linkTo( 'calendar', 'index.php' ),
'icon' => OCP\Util::imagePath( 'calendar', 'icon.svg' ), 'icon' => OCP\Util::imagePath( 'calendar', 'icon.svg' ),
'name' => $l->t('Calendar'))); 'name' => $l->t('Calendar')));
OCP\App::registerPersonal('calendar', 'settings');
OC_Search::registerProvider('OC_Search_Provider_Calendar'); OC_Search::registerProvider('OC_Search_Provider_Calendar');

12
calendar.php Normal file
View File

@ -0,0 +1,12 @@
<?php
/**
* Copyright (c) 2012 Georg Ehrke <ownClouddev at georgswebsite.de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
$l10n = OC_L10N::get('calendar');
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
$tmpl = new OCP\Template('calendar', 'part.choosecalendar');
$tmpl->printpage();

View File

@ -19,7 +19,7 @@
#loading { display: none;margin: 0;padding:0;margin-top:5px;} #loading { display: none;margin: 0;padding:0;margin-top:5px;}
#calendar_holder {position: relative;bottom: 0; right: 0; left: 0; top: 3em;} #fullcalendar {position: relative;bottom: 0; right: 0; left: 0; top: 3em;}
.fc-content{padding:2px 4px;} .fc-content{padding:2px 4px;}
#listview {margin: 0; padding: 10px; background: #EEEEEE;} #listview {margin: 0; padding: 10px; background: #EEEEEE;}
#listview #more_before, #listview #more_after {border: 1px solid #1a1a1a; width:25em;padding: 3px;text-align: center;} #listview #more_before, #listview #more_after {border: 1px solid #1a1a1a; width:25em;padding: 3px;text-align: center;}
@ -133,3 +133,12 @@ padding:0 8px 2px;
line-height:1.2; line-height:1.2;
margin-bottom:4px; margin-bottom:4px;
} }
#choosecalendar a.settings{
margin-top: 25px;
margin-right: 10px;
}
#fullcalendar{
overflow: scroll;
}

View File

@ -5,8 +5,7 @@
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
DEFINE('DEBUG', TRUE);
OCP\User::checkLoggedIn(); OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('calendar'); OCP\App::checkAppEnabled('calendar');

View File

@ -18,7 +18,7 @@ Calendar={
startEventDialog:function(){ startEventDialog:function(){
Calendar.UI.loading(false); Calendar.UI.loading(false);
$('.tipsy').remove(); $('.tipsy').remove();
$('#calendar_holder').fullCalendar('unselect'); $('#fullcalendar').fullCalendar('unselect');
Calendar.UI.lockTime(); Calendar.UI.lockTime();
$( "#from" ).datepicker({ $( "#from" ).datepicker({
dateFormat : 'dd-mm-yy' dateFormat : 'dd-mm-yy'
@ -88,7 +88,7 @@ Calendar={
$.post(url, post, function(data){ $.post(url, post, function(data){
Calendar.UI.loading(false); Calendar.UI.loading(false);
if(data.status == 'success'){ if(data.status == 'success'){
$('#calendar_holder').fullCalendar('removeEvents', $('#event_form input[name=id]').val()); $('#fullcalendar').fullCalendar('removeEvents', $('#event_form input[name=id]').val());
$('#event').dialog('destroy').remove(); $('#event').dialog('destroy').remove();
} else { } else {
$('#errorbox').html(t('calendar', 'Deletion failed')); $('#errorbox').html(t('calendar', 'Deletion failed'));
@ -133,7 +133,7 @@ Calendar={
} else } else
if(data.status == 'success'){ if(data.status == 'success'){
$('#event').dialog('destroy').remove(); $('#event').dialog('destroy').remove();
$('#calendar_holder').fullCalendar('refetchEvents'); $('#fullcalendar').fullCalendar('refetchEvents');
} }
},"json"); },"json");
}, },
@ -148,7 +148,7 @@ Calendar={
console.log("Event moved successfully"); console.log("Event moved successfully");
}else{ }else{
revertFunc(); revertFunc();
$('#calendar_holder').fullCalendar('refetchEvents'); $('#fullcalendar').fullCalendar('refetchEvents');
} }
}); });
}, },
@ -163,7 +163,7 @@ Calendar={
console.log("Event resized successfully"); console.log("Event resized successfully");
}else{ }else{
revertFunc(); revertFunc();
$('#calendar_holder').fullCalendar('refetchEvents'); $('#fullcalendar').fullCalendar('refetchEvents');
} }
}); });
}, },
@ -239,11 +239,11 @@ Calendar={
doc_height = $(document).height(), doc_height = $(document).height(),
win_height = $(window).height(); win_height = $(window).height();
if(direction == 'down' && win_height == (doc_height - scroll)){ if(direction == 'down' && win_height == (doc_height - scroll)){
$('#calendar_holder').fullCalendar('next'); $('#fullcalendar').fullCalendar('next');
$(document).scrollTop(0); $(document).scrollTop(0);
event.preventDefault(); event.preventDefault();
}else if (direction == 'top' && scroll == 0) { }else if (direction == 'top' && scroll == 0) {
$('#calendar_holder').fullCalendar('prev'); $('#fullcalendar').fullCalendar('prev');
$(document).scrollTop(win_height); $(document).scrollTop(win_height);
event.preventDefault(); event.preventDefault();
} }
@ -398,9 +398,9 @@ Calendar={
if (data.status == 'success'){ if (data.status == 'success'){
checkbox.checked = data.active == 1; checkbox.checked = data.active == 1;
if (data.active == 1){ if (data.active == 1){
$('#calendar_holder').fullCalendar('addEventSource', data.eventSource); $('#fullcalendar').fullCalendar('addEventSource', data.eventSource);
}else{ }else{
$('#calendar_holder').fullCalendar('removeEventSource', data.eventSource.url); $('#fullcalendar').fullCalendar('removeEventSource', data.eventSource.url);
} }
} }
}); });
@ -426,10 +426,10 @@ Calendar={
function(data) { function(data) {
if (data.status == 'success'){ if (data.status == 'success'){
var url = 'ajax/events.php?calendar_id='+calid; var url = 'ajax/events.php?calendar_id='+calid;
$('#calendar_holder').fullCalendar('removeEventSource', url); $('#fullcalendar').fullCalendar('removeEventSource', url);
$('#choosecalendar_dialog').dialog('destroy').remove(); $('#choosecalendar_dialog').dialog('destroy').remove();
Calendar.UI.Calendar.overview(); Calendar.UI.Calendar.overview();
$('#calendar_holder').fullCalendar('refetchEvents'); $('#fullcalendar').fullCalendar('refetchEvents');
} }
}); });
} }
@ -456,8 +456,8 @@ Calendar={
function(data){ function(data){
if(data.status == 'success'){ if(data.status == 'success'){
$(button).closest('tr').prev().html(data.page).show().next().remove(); $(button).closest('tr').prev().html(data.page).show().next().remove();
$('#calendar_holder').fullCalendar('removeEventSource', data.eventSource.url); $('#fullcalendar').fullCalendar('removeEventSource', data.eventSource.url);
$('#calendar_holder').fullCalendar('addEventSource', data.eventSource); $('#fullcalendar').fullCalendar('addEventSource', data.eventSource);
if (calendarid == 'new'){ if (calendarid == 'new'){
$('#choosecalendar_dialog > table:first').append('<tr><td colspan="6"><a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="' + newcalendar + '"></a></td></tr>'); $('#choosecalendar_dialog > table:first').append('<tr><td colspan="6"><a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="' + newcalendar + '"></a></td></tr>');
} }
@ -504,7 +504,7 @@ Calendar={
idtype: '', idtype: '',
activation:function(object,owner,id){ activation:function(object,owner,id){
$.post(OC.filePath('calendar', 'ajax/share', 'activation.php'),{id:id, idtype:'calendar', activation:object.checked?1:0}); $.post(OC.filePath('calendar', 'ajax/share', 'activation.php'),{id:id, idtype:'calendar', activation:object.checked?1:0});
$('#calendar_holder').fullCalendar('refetchEvents'); $('#fullcalendar').fullCalendar('refetchEvents');
}, },
dropdown:function(userid, calid){ dropdown:function(userid, calid){
$('.calendar_share_dropdown').remove(); $('.calendar_share_dropdown').remove();
@ -612,7 +612,7 @@ Calendar={
console.log('The drop-import feature is not supported in your browser :('); console.log('The drop-import feature is not supported in your browser :(');
return false; return false;
} }
droparea = document.getElementById('calendar_holder'); droparea = document.getElementById('fullcalendar');
droparea.ondrop = function(e){ droparea.ondrop = function(e){
e.preventDefault(); e.preventDefault();
Calendar.UI.Drop.drop(e); Calendar.UI.Drop.drop(e);
@ -626,7 +626,7 @@ Calendar={
reader = new FileReader(); reader = new FileReader();
reader.onload = function(event){ reader.onload = function(event){
Calendar.UI.Drop.import(event.target.result); Calendar.UI.Drop.import(event.target.result);
$('#calendar_holder').fullCalendar('refetchEvents'); $('#fullcalendar').fullCalendar('refetchEvents');
} }
reader.readAsDataURL(file); reader.readAsDataURL(file);
} }
@ -634,7 +634,7 @@ Calendar={
import:function(data){ import:function(data){
$.post(OC.filePath('calendar', 'ajax/import', 'dropimport.php'), {'data':data},function(result) { $.post(OC.filePath('calendar', 'ajax/import', 'dropimport.php'), {'data':data},function(result) {
if(result.status == 'success'){ if(result.status == 'success'){
$('#calendar_holder').fullCalendar('addEventSource', result.eventSource); $('#fullcalendar').fullCalendar('addEventSource', result.eventSource);
$('#notification').html(result.message); $('#notification').html(result.message);
$('#notification').slideDown(); $('#notification').slideDown();
window.setTimeout(function(){$('#notification').slideUp();}, 5000); window.setTimeout(function(){$('#notification').slideUp();}, 5000);
@ -647,7 +647,11 @@ Calendar={
}); });
} }
} }
} },
Settings:{
//
},
} }
$.fullCalendar.views.list = ListView; $.fullCalendar.views.list = ListView;
function ListView(element, calendar) { function ListView(element, calendar) {
@ -815,7 +819,7 @@ function ListView(element, calendar) {
} }
$(document).ready(function(){ $(document).ready(function(){
Calendar.UI.initScroll(); Calendar.UI.initScroll();
$('#calendar_holder').fullCalendar({ $('#fullcalendar').fullCalendar({
header: false, header: false,
firstDay: firstDay, firstDay: firstDay,
editable: true, editable: true,
@ -851,10 +855,10 @@ $(document).ready(function(){
} }
Calendar.UI.setViewActive(view.name); Calendar.UI.setViewActive(view.name);
if (view.name == 'agendaWeek') { if (view.name == 'agendaWeek') {
$('#calendar_holder').fullCalendar('option', 'aspectRatio', 0.1); $('#fullcalendar').fullCalendar('option', 'aspectRatio', 0.1);
} }
else { else {
$('#calendar_holder').fullCalendar('option', 'aspectRatio', 1.35); $('#fullcalendar').fullCalendar('option', 'aspectRatio', 1.35);
} }
}, },
columnFormat: { columnFormat: {
@ -888,7 +892,7 @@ $(document).ready(function(){
changeYear: true, changeYear: true,
showButtonPanel: true, showButtonPanel: true,
beforeShow: function(input, inst) { beforeShow: function(input, inst) {
var calendar_holder = $('#calendar_holder'); var calendar_holder = $('#fullcalendar');
var date = calendar_holder.fullCalendar('getDate'); var date = calendar_holder.fullCalendar('getDate');
inst.input.datepicker('setDate', date); inst.input.datepicker('setDate', date);
inst.input.val(calendar_holder.fullCalendar('getView').title); inst.input.val(calendar_holder.fullCalendar('getView').title);
@ -896,30 +900,36 @@ $(document).ready(function(){
}, },
onSelect: function(value, inst) { onSelect: function(value, inst) {
var date = inst.input.datepicker('getDate'); var date = inst.input.datepicker('getDate');
$('#calendar_holder').fullCalendar('gotoDate', date); $('#fullcalendar').fullCalendar('gotoDate', date);
} }
}); });
fillWindow($('#content')); fillWindow($('#content'));
OCCategories.changed = Calendar.UI.categoriesChanged; OCCategories.changed = Calendar.UI.categoriesChanged;
OCCategories.app = 'calendar'; OCCategories.app = 'calendar';
$('#oneweekview_radio').click(function(){ $('#oneweekview_radio').click(function(){
$('#calendar_holder').fullCalendar('changeView', 'agendaWeek'); $('#fullcalendar').fullCalendar('changeView', 'agendaWeek');
}); });
$('#onemonthview_radio').click(function(){ $('#onemonthview_radio').click(function(){
$('#calendar_holder').fullCalendar('changeView', 'month'); $('#fullcalendar').fullCalendar('changeView', 'month');
}); });
$('#listview_radio').click(function(){ $('#listview_radio').click(function(){
$('#calendar_holder').fullCalendar('changeView', 'list'); $('#fullcalendar').fullCalendar('changeView', 'list');
}); });
$('#today_input').click(function(){ $('#today_input').click(function(){
$('#calendar_holder').fullCalendar('today'); $('#fullcalendar').fullCalendar('today');
}); });
$('#datecontrol_left').click(function(){ $('#datecontrol_left').click(function(){
$('#calendar_holder').fullCalendar('prev'); $('#fullcalendar').fullCalendar('prev');
}); });
$('#datecontrol_right').click(function(){ $('#datecontrol_right').click(function(){
$('#calendar_holder').fullCalendar('next'); $('#fullcalendar').fullCalendar('next');
}); });
Calendar.UI.Share.init(); Calendar.UI.Share.init();
Calendar.UI.Drop.init(); Calendar.UI.Drop.init();
$('#choosecalendar .generalsettings').on('click keydown', function() {
OC.appSettings({appid:'calendar', loadJS:true, cache:false});
});
$('#choosecalendar .calendarsettings').on('click keydown', function() {
OC.appSettings({appid:'calendar', loadJS:true, cache:false, scriptName:'calendar.php'});
});
}); });

View File

@ -1,11 +1,7 @@
$(document).ready(function(){ $(document).ready(function(){
$('#timezone').change( function(){ $('#timezone').change( function(){
OC.msg.startSaving('#calendar .msg')
// Serialize the data
var post = $( '#timezone' ).serialize(); var post = $( '#timezone' ).serialize();
$.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){ $.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){return;});
//OC.msg.finishedSaving('#calendar .msg', data);
});
return false; return false;
}); });
$('#timezone').chosen(); $('#timezone').chosen();
@ -52,6 +48,7 @@ $(document).ready(function(){
}); });
}); });
calendarcachecheck(); calendarcachecheck();
}); });
function calendarcachecheck(){ function calendarcachecheck(){
$.getJSON(OC.filePath('calendar', 'ajax/cache', 'status.php'), function(jsondata, status) { $.getJSON(OC.filePath('calendar', 'ajax/cache', 'status.php'), function(jsondata, status) {

View File

@ -14,4 +14,4 @@ $tmpl->assign('calendars', OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(
OCP\Util::addscript('calendar','settings'); OCP\Util::addscript('calendar','settings');
return $tmpl->fetchPage(); $tmpl->printPage();

View File

@ -33,6 +33,7 @@
?> ?>
}); });
</script> </script>
<div id="notification" style="display:none;"></div>
<div id="controls"> <div id="controls">
<form id="view"> <form id="view">
<input type="button" value="<?php echo $l->t('Week');?>" id="oneweekview_radio"/> <input type="button" value="<?php echo $l->t('Week');?>" id="oneweekview_radio"/>
@ -41,8 +42,9 @@
<img id="loading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" /> <img id="loading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" />
</form> </form>
<form id="choosecalendar"> <form id="choosecalendar">
<input type="button" id="today_input" value="<?php echo $l->t("Today");?>"/> <!--<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();" /> <a class="settings calendarsettings" title="<?php echo $l->t('Settings'); ?>"><img class="svg" src="<?php echo OCP\Util::imagePath('calendar', 'icon.svg'); ?>" alt="<?php echo $l->t('Settings'); ?>" /></a>
<a class="settings generalsettings" title="<?php echo $l->t('Settings'); ?>"><img class="svg" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Settings'); ?>" /></a>
</form> </form>
<form id="datecontrol"> <form id="datecontrol">
<input type="button" value="&nbsp;&lt;&nbsp;" id="datecontrol_left"/> <input type="button" value="&nbsp;&lt;&nbsp;" id="datecontrol_left"/>
@ -50,12 +52,6 @@
<input type="button" value="&nbsp;&gt;&nbsp;" id="datecontrol_right"/> <input type="button" value="&nbsp;&gt;&nbsp;" id="datecontrol_right"/>
</form> </form>
</div> </div>
<div id="notification" style="display:none;"></div> <div id="fullcalendar"></div>
<div id="calendar_holder">
</div>
<!-- Dialogs -->
<div id="dialog_holder"></div> <div id="dialog_holder"></div>
<div id="parsingfail_dialog" title="Parsing Fail"> <div id="appsettings" class="popup topright hidden"></div>
<?php echo $l->t("There was a fail, while parsing the file."); ?>
</div>
<!-- End of Dialogs -->

View File

@ -1,51 +1,52 @@
<div id="choosecalendar_dialog" title="<?php echo $l->t("Choose active calendars"); ?>"> <form id="calendar">
<p><b><?php echo $l->t('Your calendars'); ?>:</b></p> <p><b><?php echo $l->t('Your calendars'); ?>:</b></p>
<table width="100%" style="border: 0;"> <table width="100%" style="border: 0;">
<?php <?php
$option_calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); $option_calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
for($i = 0; $i < count($option_calendars); $i++){ for($i = 0; $i < count($option_calendars); $i++){
echo "<tr>"; echo "<tr>";
$tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields'); $tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $option_calendars[$i]); $tmpl->assign('calendar', $option_calendars[$i]);
if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){ if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){
$shared = false; $shared = false;
}else{ }else{
$shared = true; $shared = true;
}
$tmpl->assign('shared', $shared);
$tmpl->printpage();
echo "</tr>";
} }
$tmpl->assign('shared', $shared); ?>
$tmpl->printpage(); <tr>
echo "</tr>"; <td colspan="6">
} <a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="<?php echo $l->t('New Calendar') ?>"></a>
?> </td>
<tr> </tr>
<td colspan="6"> <tr>
<a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="<?php echo $l->t('New Calendar') ?>"></a> <td colspan="6">
</td> <p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" onmouseover="$('#caldav_url').select();" title="<?php echo $l->t("CalDav Link"); ?>"><img id="caldav_url_close" style="height: 20px;vertical-align: middle;display: none;" src="<?php echo OCP\Util::imagePath('core', 'actions/delete.svg') ?>" alt="close" onclick="$('#caldav_url').hide();$('#caldav_url_close').hide();"/></p>
</tr> </td>
<tr> </tr>
<td colspan="6"> </table><br>
<p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" onmouseover="$('#caldav_url').select();" title="<?php echo $l->t("CalDav Link"); ?>"><img id="caldav_url_close" style="height: 20px;vertical-align: middle;display: none;" src="<?php echo OCP\Util::imagePath('core', 'actions/delete.svg') ?>" alt="close" onclick="$('#caldav_url').hide();$('#caldav_url_close').hide();"/></p> <p><b><?php echo $l->t('Shared calendars'); ?>: </b></p>
</td> <table width="100%" style="border: 0;">
</tr> <?php
</table><br> $share = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR);
<p><b><?php echo $l->t('Shared calendars'); ?>: </b></p> $count = count($share);
<table width="100%" style="border: 0;"> for($i = 0; $i < $count; $i++){
<?php $share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false);
$share = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR); echo '<tr>';
$count = count($share); $tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields.shared');
for($i = 0; $i < $count; $i++){ $tmpl->assign('share', $share[$i]);
$share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false); $tmpl->printpage();
echo '<tr>'; echo '</tr>';
$tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields.shared'); }
$tmpl->assign('share', $share[$i]); ?>
$tmpl->printpage(); </table>
echo '</tr>'; <?php
} if($count == 0){
?> echo '<p style="text-align:center;"><b>' . $l->t('No shared calendars') . '</b></p>';
</table> }
<?php ?>
if($count == 0){ </fieldset>
echo '<p style="text-align:center;"><b>' . $l->t('No shared calendars') . '</b></p>'; </form>
}
?>
</div>

View File

@ -7,11 +7,16 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
?> ?>
<form id="calendar"> <h2 id="title_general"><?php echo $l->t('General'); ?></h2>
<fieldset class="personalblock"> <div id="general">
<legend><?php echo $l->t('Calendar'); ?></legend> <table class="nostyle">
<table class="nostyle"> <tr>
<tr><td><label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label></td><td><select style="display: none;" id="timezone" name="timezone"> <td>
<label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label>
&nbsp;&nbsp;
</td>
<td>
<select style="display: none;" id="timezone" name="timezone">
<?php <?php
$continent = ''; $continent = '';
foreach($_['timezones'] as $timezone): foreach($_['timezones'] as $timezone):
@ -27,29 +32,58 @@
$city=strtr($ex[1], '_', ' '); $city=strtr($ex[1], '_', ' ');
$continent=$ex[0]; $continent=$ex[0];
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>'; echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
var_dump($_['timezone']);
endforeach;?> endforeach;?>
</select><input type="checkbox" name="timezonedetection" id="timezonedetection"><label for="timezonedetection"><?php echo $l->t('Check always for changes of the timezone'); ?></label></td></tr> </select>
</td>
<tr><td><label for="timeformat" class="bold"><?php echo $l->t('Timeformat');?></label></td><td> </tr>
<tr>
<td>
&nbsp;&nbsp;
</td>
<td>
<input type="checkbox" name="timezonedetection" id="timezonedetection">
&nbsp;
<label for="timezonedetection"><?php echo $l->t('Update timezone automatically'); ?></label>
</td>
</tr>
<tr>
<td>
<label for="timeformat" class="bold"><?php echo $l->t('Time format');?></label>
&nbsp;&nbsp;
</td>
<td>
<select style="display: none; width: 60px;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat"> <select style="display: none; width: 60px;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
<option value="24" id="24h"><?php echo $l->t("24h"); ?></option> <option value="24" id="24h"><?php echo $l->t("24h"); ?></option>
<option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option> <option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option>
</select> </select>
</td></tr> </td>
</tr>
<tr><td><label for="firstday" class="bold"><?php echo $l->t('First day of the week');?></label></td><td> <tr>
<td>
<label for="firstday" class="bold"><?php echo $l->t('Start week on');?></label>
&nbsp;&nbsp;
</td>
<td>
<select style="display: none;" id="firstday" title="<?php echo "First day"; ?>" name="firstday"> <select style="display: none;" id="firstday" title="<?php echo "First day"; ?>" name="firstday">
<option value="mo" id="mo"><?php echo $l->t("Monday"); ?></option> <option value="mo" id="mo"><?php echo $l->t("Monday"); ?></option>
<option value="su" id="su"><?php echo $l->t("Sunday"); ?></option> <option value="su" id="su"><?php echo $l->t("Sunday"); ?></option>
</select> </select>
</td></tr> </td>
</tr>
<tr><td><label for="" class="bold"><?php echo $l->t('Cache');?></label></td><td> <tr class="advancedsettings">
<input id="cleancalendarcache" type="button" class="button" value="<?php echo $l->t('Clear cache for repeating events');?>"> <td>
</td></tr> <label for="" class="bold"><?php echo $l->t('Cache');?></label>
&nbsp;&nbsp;
</table> </td>
<td>
<input id="cleancalendarcache" type="button" class="button" value="<?php echo $l->t('Clear cache for repeating events');?>">
</td>
</tr>
</table>
</div>
<h2 id="title_urls"><?php echo $l->t('URLs'); ?></h2>
<div id="urls">
<?php echo $l->t('Calendar CalDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>) <?php echo $l->t('Calendar CalDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
<dl> <dl>
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt> <dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>
@ -63,5 +97,5 @@
<?php } ?> <?php } ?>
</dd> </dd>
</dl> </dl>
</fieldset> </div>
</form> </div>