From 8e32cfbf1587198e755ce7e1a887f269169c05da Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Sat, 20 Aug 2011 15:19:43 +0200 Subject: [PATCH] bug/style fixes, multiple language support, german language pack --- apps/calendar/ajax/changeview.php | 7 +- apps/calendar/ajax/getcal.php | 5 +- apps/calendar/appinfo/app.php | 4 +- apps/calendar/css/style.css | 6 +- apps/calendar/js/calendar.js | 4 +- apps/calendar/js/calendar_dialog.js | 38 ------- apps/calendar/js/calendar_init.js | 4 - apps/calendar/known bugs | 1 + apps/calendar/l10n/de.php | 68 +++++++++++ apps/calendar/l10n/xgettextfiles | 7 ++ apps/calendar/templates/calendar.php | 124 ++++++++++++--------- apps/calendar/templates/part.editevent.php | 9 ++ apps/calendar/templates/part.newevent.php | 9 +- 13 files changed, 171 insertions(+), 115 deletions(-) delete mode 100755 apps/calendar/js/calendar_dialog.js create mode 100644 apps/calendar/known bugs create mode 100644 apps/calendar/l10n/de.php create mode 100644 apps/calendar/l10n/xgettextfiles diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php index a3fc8afbb7..d3a00bf172 100755 --- a/apps/calendar/ajax/changeview.php +++ b/apps/calendar/ajax/changeview.php @@ -19,13 +19,8 @@ *************************************************/ require_once ("../../../lib/base.php"); if(!OC_USER::isLoggedIn()) { - die("0"); + die(""); } $currentview = $_GET["v"]; OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", $currentview); -if(OC_Preferences::getValue(OC_USER::getUser(), "calendar", "currentview") == $currentview){ - die("1"); -}else{ - die("0"); -} ?> \ No newline at end of file diff --git a/apps/calendar/ajax/getcal.php b/apps/calendar/ajax/getcal.php index 9d28caeb3d..06ebebc83a 100755 --- a/apps/calendar/ajax/getcal.php +++ b/apps/calendar/ajax/getcal.php @@ -19,9 +19,6 @@ *************************************************/ require_once ("../../lib/base.php"); if(!OC_USER::isLoggedIn()) { - header("Location: " . OC_HELPER::linkTo("", "index.php")); - exit ; + die(""); } -require_once ("../lib/calendar.php"); -$calendar = new OC_Calendar_Calendar; ?> \ No newline at end of file diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php index 8cf92baf30..e989266d40 100644 --- a/apps/calendar/appinfo/app.php +++ b/apps/calendar/appinfo/app.php @@ -1,5 +1,5 @@ 10, 'href' => OC_Helper::linkTo( 'calendar', 'index.php' ), 'icon' => OC_Helper::imagePath( 'calendar', 'icon.png' ), - 'name' => 'Calendar' )); + 'name' => $l->t('Calendar'))); diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css index 0d59586a39..a4bae17888 100755 --- a/apps/calendar/css/style.css +++ b/apps/calendar/css/style.css @@ -45,11 +45,11 @@ .controls {min-width: 800px;} .center {text-align: center;} .dateinfo {height: 15px; width: 100%; overflow: hidden; margin: 0; padding: 0; font-size: 12px;background: #F7F7F7;} -.events {height: 65px; width: 100%; margin: 0; padding: 0;} +.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;height: 100px; vertical-align: top; background: #ffffff; width: 14%; height: 16%;} -.weekend{text-align: center;margin: 0; padding: 0; vertical-align: top;background: #F3F3F3;} +.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%; } .weekend_thead, .weekend_row{height: 20px;text-align: center;text-align: center;background: #F3F3F3;} .thisday{background: #FFFABC;text-align: center;} \ No newline at end of file diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 535035ba5b..067d5f5308 100755 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -493,7 +493,7 @@ function oc_cal_load_cal(loadview) { document.getElementById('onedayview_today').title = generate_title; } if(loadview == "oneweek") { - document.getElementById("datecontrol_date").value = "CW: " + oc_cal_calw(); + document.getElementById("datecontrol_date").value = cw_label + ": " + oc_cal_calw(); var dates = oc_cal_generate_dates("oneweek"); var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"); var weekday = 1; @@ -569,7 +569,7 @@ function oc_cal_load_cal(loadview) { document.getElementById("fourweeksview_calw2").innerHTML = calw2; document.getElementById("fourweeksview_calw3").innerHTML = calw3; document.getElementById("fourweeksview_calw4").innerHTML = calw4; - document.getElementById("datecontrol_date").value = "CWs: " + oc_cal_calw() + " - " + calwplusfour; + document.getElementById("datecontrol_date").value = cws_label + ": " + oc_cal_calw() + " - " + calwplusfour; } if(loadview == "onemonth") { document.getElementById("datecontrol_date").value = oc_cal_monthlong[oc_cal_month] + oc_cal_space + oc_cal_year; diff --git a/apps/calendar/js/calendar_dialog.js b/apps/calendar/js/calendar_dialog.js deleted file mode 100755 index 5995a37899..0000000000 --- a/apps/calendar/js/calendar_dialog.js +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************* - * 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, * - * * - * * - * please write to the Free Software Foundation. * - * Address: * - * 59 Temple Place, Suite 330, Boston, * - * MA 02111-1307 USA * - ************************************************** - * list of all fx * - * choosecalendar_dialog - calendar chooser * - * newevent_dialog - create event dialog * - * editevent_dialog - edit event dialog * - * choosecalendar_dialog_submit - submit * - * newevent_dialog_submit - submit * - * editevent_dialog_submit - submit * - *************************************************/ -function oc_cal_choosecalendar_dialog_submit() { - -} - -function oc_cal_newevent_dialog_submit() { - -} - -function oc_cal_editevent_dialog_submit() { - -} \ No newline at end of file diff --git a/apps/calendar/js/calendar_init.js b/apps/calendar/js/calendar_init.js index c2f13dbfcf..e8f5231329 100755 --- a/apps/calendar/js/calendar_init.js +++ b/apps/calendar/js/calendar_init.js @@ -34,10 +34,6 @@ var oc_cal_dayofweek = oc_cal_date.getDay(); var oc_cal_month = oc_cal_date.getMonth(); var oc_cal_dayofmonth = oc_cal_date.getDate(); var oc_cal_year = oc_cal_date.getFullYear(); -var oc_cal_daylong = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); -var oc_cal_dayshort = new Array("Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat."); -var oc_cal_monthlong = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); -var oc_cal_monthshort = new Array("Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."); var oc_cal_space = " "; var oc_cal_normal_cal = new Array("31","28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31"); var oc_cal_leap_cal = new Array("31","29", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31"); diff --git a/apps/calendar/known bugs b/apps/calendar/known bugs new file mode 100644 index 0000000000..e944720666 --- /dev/null +++ b/apps/calendar/known bugs @@ -0,0 +1 @@ +can't load new event form on allday event, when this is the first new event dialog on this site - will be fixed in next version - js/php fail \ No newline at end of file diff --git a/apps/calendar/l10n/de.php b/apps/calendar/l10n/de.php new file mode 100644 index 0000000000..82d9f86073 --- /dev/null +++ b/apps/calendar/l10n/de.php @@ -0,0 +1,68 @@ + "Kalender", +"Location" => "Ort", +"Category" => "Kategorie", +"Create a new event" => "Neuen Termin erstellen", +"Title of the Event" => "Titel des Termins", +"Location of the Event" => "Ort des Termins", +"All Day Event" => "Ganztägig", +"From" => "Von", +"To" => "Bis", +"Repeat" => "Wiederhol.", +"Attendees" => "Teilnehmer", +"Description" => "Beschreibung", +"Submit" => "Speichern", +"Reset" => "Zurücksetzen", +"Title" => "Titel", +"Sunday" => "Sonntag", +"Monday" => "Montag", +"Tuesday" => "Dienstag", +"Wednesday" => "Mittwoch", +"Thursday" => "Donnerstag", +"Friday" => "Freitag", +"Saturday" => "Samstag", +"CW" => "KW", +"CWs" => "KW", +"Sun." => "So.", +"Mon." => "Mo.", +"Tue." => "Di.", +"Wed." => "Mi.", +"Thu." => "Do.", +"Fri." => "Fr.", +"Sat." => "Sa.", +"January" => "Januar", +"February" => "Februar", +"March" => "März", +"April" => "April", +"May" => "Mai", +"June" => "Juni", +"July" => "Juli", +"August" => "August", +"September" => "September", +"October" => "Oktober", +"November" => "November", +"December" => "Dezember", +"Jan." => "Jan.", +"Feb." => "Feb.", +"Mar." => "März", +"Apr." => "Apr.", +"May" => "Mai", +"Jun." => "Juni", +"Jul." => "Juli", +"Aug." => "Aug.", +"Sep." => "Sep.", +"Oct." => "Okt.", +"Nov." => "Nov.", +"Dec." => "Dez.", +"Day" => "Tag", +"Week" => "Woche", +"Weeks" => "Wochen", +"Month" => "Monat", +"Listview" => "Liste", +"Today" => "Heute", +"Calendars" => "Kalender", +"Time" => "Uhrzeit", +"All day" => "Ganztägig", +"" => "" +); +?> \ No newline at end of file diff --git a/apps/calendar/l10n/xgettextfiles b/apps/calendar/l10n/xgettextfiles new file mode 100644 index 0000000000..37f68b8206 --- /dev/null +++ b/apps/calendar/l10n/xgettextfiles @@ -0,0 +1,7 @@ +../appinfo/app.php +../templates/calendar.php +../templates/part.editevent.php +../templates/part.eventinfo.php +../templates/part.newevent.php +../js/calendar.js +../js/calendar_init.js \ No newline at end of file diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php index 3178b6c85a..0cfbea29e5 100755 --- a/apps/calendar/templates/calendar.php +++ b/apps/calendar/templates/calendar.php @@ -1,3 +1,18 @@ +
@@ -12,11 +27,8 @@
- - + +
@@ -33,13 +45,13 @@ - + - + @@ -145,7 +157,7 @@
Timet("Time");?>
All dayt("All day");?>
- + @@ -157,7 +169,7 @@ - + @@ -413,14 +425,14 @@
Timet("Time");?>
All dayt("All day");?>
- - - - - - - - + + + + + + + + @@ -456,16 +468,16 @@
- - @@ -501,16 +513,16 @@
- - @@ -546,16 +558,16 @@
- - @@ -591,16 +603,16 @@
- - @@ -611,13 +623,13 @@
CWMondayTuesdayWednesdayThursdayFridaySaturdaySunday t("CW");?> t("Monday");?> t("Tuesday");?> t("Wednesday");?> t("Thursday");?> t("Friday");?> t("Saturday");?> t("Sunday");?>
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
- - - - - - - + + + + + + + @@ -655,13 +667,13 @@ @@ -699,13 +711,13 @@ @@ -743,13 +755,13 @@ @@ -787,13 +799,13 @@ @@ -831,13 +843,13 @@ @@ -875,13 +887,13 @@ @@ -919,5 +931,13 @@ document.getElementById(oc_cal_currentview + "_radio").style.color = "#0098E4"; oc_cal_update_view(view, task); } + document.getElementById("onedayview_radio").value = onedayview_radio; + document.getElementById("oneweekview_radio").value = oneweekview_radio; + document.getElementById("fourweeksview_radio").value = fourweeksview_radio; + document.getElementById("onemonthview_radio").value = onemonthview_radio; + document.getElementById("listview_radio").value = listview_radio; + document.getElementById("today_input").value = today_button_value; + document.getElementById("choosecalendar_input").value = choosecalendar_value; + document.getElementById("download_input").src = oc_webroot + "/core/img/actions/download.svg"; diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php index ae46cb4ffd..179903170d 100644 --- a/apps/calendar/templates/part.editevent.php +++ b/apps/calendar/templates/part.editevent.php @@ -95,7 +95,12 @@
MondayTuesdayWednesdayThursdayFridaySaturdaySunday t("Monday");?> t("Tuesday");?> t("Wednesday");?> t("Thursday");?> t("Friday");?> t("Saturday");?> t("Sunday");?>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+<<<<<<< HEAD + "> + "> +======= +>>>>>>> b3f6eb22249408e927c8c83e66d60d2aba52ccaf
+======= + +>>>>>>> b3f6eb22249408e927c8c83e66d60d2aba52ccaf diff --git a/apps/calendar/templates/part.newevent.php b/apps/calendar/templates/part.newevent.php index 3327ec91df..3f8e8ff653 100644 --- a/apps/calendar/templates/part.newevent.php +++ b/apps/calendar/templates/part.newevent.php @@ -3,13 +3,13 @@ t("Title");?>: - + " maxlength="100" /> t("Location");?>: - + " maxlength="100" /> @@ -111,7 +111,8 @@ - + "> + ">
+ \ No newline at end of file