Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Ehrke <georg.stefan.germany@googlemail.com>2011-09-02 14:55:56 +0400
committerGeorg Ehrke <georg.stefan.germany@googlemail.com>2011-09-02 14:55:56 +0400
commit8cdd9ab81bd595dbc534e38289b46e1a0fb874c5 (patch)
treeb0f3090f45f115832f834cdb022ad1abf7586c3a /apps/calendar
parent62cca8264ff8396788c8feedc911e45af11e10b7 (diff)
export function and style fixes in calendar
Diffstat (limited to 'apps/calendar')
-rwxr-xr-xapps/calendar/css/style.css24
-rw-r--r--apps/calendar/export.php37
-rwxr-xr-xapps/calendar/js/calendar.js14
-rwxr-xr-xapps/calendar/templates/calendar.php2
-rwxr-xr-xapps/calendar/templates/part.choosecalendar.rowfields.php2
5 files changed, 65 insertions, 14 deletions
diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css
index afb530bcff0..c414b00eb9c 100755
--- a/apps/calendar/css/style.css
+++ b/apps/calendar/css/style.css
@@ -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;}
diff --git a/apps/calendar/export.php b/apps/calendar/export.php
new file mode 100644
index 00000000000..3ed7ba0445e
--- /dev/null
+++ b/apps/calendar/export.php
@@ -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";
+}
+?> \ No newline at end of file
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index 01e678e9627..f9633ae04db 100755
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -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(){
diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php
index 32da13f8c33..ca6ba16f47a 100755
--- a/apps/calendar/templates/calendar.php
+++ b/apps/calendar/templates/calendar.php
@@ -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>
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index ebe1ca0b137..52edda4e251 100755
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -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>";