export function and style fixes in calendar

This commit is contained in:
Georg Ehrke 2011-09-02 12:55:56 +02:00
parent 62cca8264f
commit 8cdd9ab81b
5 changed files with 65 additions and 14 deletions

View file

@ -17,7 +17,6 @@
* 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
*************************************************/
#calendar_holder{position: absolute; top: 80px; bottom: 0px; left: 160px; right: 0px;}
#view {margin-left: 10px; float: left; font-size: 12px;}
#datecontrol {text-align: center;}
@ -31,12 +30,13 @@
#editentry_dialog {display: none;}
#parsingfail_dialog{display: none;}
#view {margin-left: 10px; float: left; font-size: 12px;}
#onedayview, #oneweekview, #fourweeksview, #onemonthview, #listview {display: none;}
#onedayview table {margin: 0; padding: 0; width: 100%; border-spacing:1px; background: #EEEEEE;}
#oneweekview table {margin: 0; padding: 0; width: 100%; border-spacing:1px; background: #EEEEEE;}
#fourweeksview table {margin: 0; padding: 0; width: 100%; border-spacing:1px; background: #EEEEEE;}
#onemonthview table {margin: 0; padding: 0; width: 100%; border-spacing:1px; background: #EEEEEE;}
#view {margin-left: 10px; float: left; font-size: 12px; height: 100%;}
#calendar_holder {height: 100%; width: 100%;}
#onedayview, #oneweekview, #fourweeksview, #onemonthview, #listview {display: none; position: absolute;bottom: 0; right: 0; left: 160px; top: 80px;}
#onedayview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
#oneweekview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
#fourweeksview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
#onemonthview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
#fourweeksview_calw1, #fourweeksview_calw2, #fourweeksview_calw3, #fourweeksview_calw4{vertical-align: middle;text-align: center;width: 50px;}
#sysbox{display: none;}
@ -44,12 +44,12 @@
.actions {height: 33px; min-width: 800px;}
.controls {min-width: 800px;}
.center {text-align: center;}
.dateinfo {height: 15px; width: 100%; overflow: hidden; margin: 0; padding: 0; font-size: 12px;background: #F7F7F7;}
.dateinfo {height: 20px;width: 100%; overflow: hidden; margin-top: 0; padding: 0; font-size: 12px;background: #F7F7F7;}
.events {height: 80px; width: 100%; margin: 0; padding: 0;}
.calendar_row {height: 20px; text-align: center;background: #ffffff;}
.calendar_time {height: 20px; width: 50px; text-align:right;background: #ffffff;}
.fourweeksview_item {text-align: center; background: #ffffff;width: 14%;}
.onemonthview_item {text-align: center; height: 80px; margin: 0; padding: 0; vertical-align: top; background: #ffffff; width: 14%; height: 16%;}
.weekend{text-align: center;margin: 0; padding: 0;vertical-align: top;background: #F3F3F3; height: 80px;width: 100%; }
.fourweeksview_item {text-align: center; background: #ffffff;width: 14%;vertical-align: top;height: 25%;}
.onemonthview_item {text-align: center; margin: 0; padding: 0; vertical-align: top; background: #ffffff; width: 14%;}
.weekend{text-align: center;margin: 0; padding: 0;vertical-align: top;background: #F3F3F3; width: 100%; }
.weekend_thead, .weekend_row{height: 20px;text-align: center;text-align: center;background: #F3F3F3;}
.thisday{background: #FFFABC;text-align: center;}
.thisday{background: #FFFABC;text-align: center;margin: 0;padding: 0;vertical-align: top;height: 20px;}

37
apps/calendar/export.php Normal file
View file

@ -0,0 +1,37 @@
<?php
/*************************************************
* ownCloud - Calendar Plugin *
* *
* (c) Copyright 2011 Georg Ehrke *
* author: Georg Ehrke *
* email: ownclouddev at georgswebsite dot de *
* homepage: ownclouddev.georgswebsite.de *
* manual: ownclouddev.georgswebsite.de/manual *
* License: GNU AFFERO GENERAL PUBLIC LICENSE *
* *
* If you are not able to view the License, *
* <http://www.gnu.org/licenses/> *
* <http://ownclouddev.georgswebsite.de/license/> *
* please write to the Free Software Foundation. *
* Address: *
* 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
*************************************************/
require_once ("../../lib/base.php");
if(!OC_USER::isLoggedIn()) {
header("Location: " . OC_HELPER::linkTo("", "index.php"));
exit;
}
$cal = $_GET["calid"];
$calendar = OC_Calendar_Calendar::findCalendar($cal);
if($calendar["userid"] != OC_User::getUser()){
header("Location: " . OC_HELPER::linkTo("", "index.php"));
exit;
}
$calobjects = OC_Calendar_Calendar::allCalendarObjects($cal);
header("Content-Type: text/Calendar");
header("Content-Disposition: inline; filename=calendar.ics");
for($i = 0;$i <= count($calobjects); $i++){
echo $calobjects[$i]["calendardata"] . "\n";
}
?>

View file

@ -611,12 +611,26 @@ Calendar={
weekday++;
}
}
if(oc_cal_rows == 4){
for(var i = 1;i <= 6;i++){
$("#fourweeksview_week_" + i).height("25%");
}
$("td.thisday").height("25%");
}
if(oc_cal_rows == 5) {
$("#onemonthview_week_5").css('display', "table-row");
for(var i = 1;i <= 6;i++){
$("#fourweeksview_week_" + i).height("20%");
}
$("td.thisday").height("20%");
}
if(oc_cal_rows == 6) {
$("#onemonthview_week_5").css('display', "table-row");
$("#onemonthview_week_6").css('display', "table-row");
for(var i = 1;i <= 6;i++){
$("#fourweeksview_week_" + i).height("16%");
}
$("td.thisday").height("16%");
}
},
showEvents:function(){

View file

@ -374,7 +374,7 @@
<td id="oneweekview_tuesday_19" class="calendar_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_tuesday').title, '19');"></td>
<td id="oneweekview_wednesday_19" class="calendar_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_wednesday').title, '19');"></td>
<td id="oneweekview_thursday_19" class="calendar_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_thursday').title, '19');"></td>
<td id="oneweekview_friday_19" class="calendar_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_friday').title, '19');"</td>
<td id="oneweekview_friday_19" class="calendar_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_friday').title, '19');"></td>
<td id="oneweekview_saturday_19" class="weekend_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_saturday').title, '19');"></td>
<td id="oneweekview_sunday_19" class="weekend_row" onclick="oc_cal_newevent(document.getElementById('oneweekview_sunday').title, '19');"></td>
</tr>

View file

@ -1,4 +1,4 @@
<?php
echo "<td width=\"20px\"><input id=\"active_" . $_['calendar']["id"] . "\" type=\"checkbox\" onClick=\"oc_cal_calender_activation(this, " . $_['calendar']["id"] . ")\"" . ($_['calendar']["active"] ? ' checked="checked"' : '') . "></td>";
echo "<td><label for=\"active_" . $_['calendar']["id"] . "\">" . $_['calendar']["displayname"] . "</label></td>";
echo "<td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Download") . "\" class=\"action\"><img src=\"/owncloud/core/img/actions/download.svg\"></a></td><td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"oc_cal_editcalendar(this, " . $_['calendar']["id"] . ");\"><img src=\"/owncloud/core/img/actions/rename.svg\"></a></td>";
echo "<td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"export.php?calid=" . $_['calendar']["id"] . "\" title=\"" . $l->t("Download") . "\" class=\"action\"><img src=\"/owncloud/core/img/actions/download.svg\"></a></td><td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"oc_cal_editcalendar(this, " . $_['calendar']["id"] . ");\"><img src=\"/owncloud/core/img/actions/rename.svg\"></a></td>";