From bf68cd8ba439da871fd466702aef75f7a1174e5e Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Tue, 23 Aug 2011 18:02:36 +0200 Subject: [PATCH] better multiple language support, first integration of new calendar class --- apps/calendar/ajax/choosecalendar.php | 27 +++++++++++++++++++ apps/calendar/caldav.php | 2 +- apps/calendar/css/style.css | 2 +- apps/calendar/index.php | 4 --- apps/calendar/js/calendar.js | 8 ++++++ apps/calendar/js/calendar_init.js | 1 + apps/calendar/l10n/de.php | 10 +++++++ apps/calendar/templates/calendar.php | 2 +- .../templates/part.choosecalendar.php | 26 ++++++++++++++++++ apps/calendar/templates/part.newevent.php | 26 +++++++++--------- 10 files changed, 89 insertions(+), 19 deletions(-) create mode 100644 apps/calendar/ajax/choosecalendar.php create mode 100644 apps/calendar/templates/part.choosecalendar.php diff --git a/apps/calendar/ajax/choosecalendar.php b/apps/calendar/ajax/choosecalendar.php new file mode 100644 index 00000000000..03765dabe9d --- /dev/null +++ b/apps/calendar/ajax/choosecalendar.php @@ -0,0 +1,27 @@ + * + * * + * please write to the Free Software Foundation. * + * Address: * + * 59 Temple Place, Suite 330, Boston, * + * MA 02111-1307 USA * + *************************************************/ +require_once('../../../lib/base.php'); +$l10n = new OC_L10N('calendar'); +if(!OC_USER::isLoggedIn()) { + die(""); +} +$output = new OC_TEMPLATE("calendar", "part.choosecalendar"); +$output -> printpage(); +?> \ No newline at end of file diff --git a/apps/calendar/caldav.php b/apps/calendar/caldav.php index da56919a528..49fc9633365 100644 --- a/apps/calendar/caldav.php +++ b/apps/calendar/caldav.php @@ -1,6 +1,6 @@ printPage(); diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 067d5f53081..a52d0deeb12 100755 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -873,4 +873,12 @@ function oc_cal_newevent(date, time){ }else{ alert(t("calendar", "You can't open more than one dialog per site!")); } +} +function oc_cal_choosecalendar(){ + if(oc_cal_opendialog == 0){ + $("#dialog_holder").load(oc_webroot + "/apps/calendar/ajax/choosecalendar.php"); + oc_cal_opendialog = 1; + }else{ + alert(t("calendar", "You can't open more than one dialog per site!")); + } } \ No newline at end of file diff --git a/apps/calendar/js/calendar_init.js b/apps/calendar/js/calendar_init.js index e8f52313297..3b5d37161c7 100755 --- a/apps/calendar/js/calendar_init.js +++ b/apps/calendar/js/calendar_init.js @@ -50,6 +50,7 @@ var oc_cal_listview_numofevents = 0; var oc_cal_listview_count = 0; var oc_cal_opendialog = 0; var oc_cal_datemonthyear = String(oc_cal_dayofmonth) + String(oc_cal_month) + String(oc_cal_year); +var oc_cal_calendars = new Array(); //event vars var oc_cal_events = new Array(2011); oc_cal_events[2011] = new Array(0,1,2,3,4,5,6,7,8,9,10,11); diff --git a/apps/calendar/l10n/de.php b/apps/calendar/l10n/de.php index 82d9f86073a..325a323d57a 100644 --- a/apps/calendar/l10n/de.php +++ b/apps/calendar/l10n/de.php @@ -63,6 +63,16 @@ "Calendars" => "Kalender", "Time" => "Uhrzeit", "All day" => "Ganztägig", +"Does not repeat" => "Keine Wiederholung", +"Daily" => "Täglich", +"Weekly" => "Wöchentlich", +"Every Weekday" => "jeden Wochentag", +"Bi-Weekly" => "jede 2. Woche", +"Monthly" => "Monatlich", +"Yearly" => "Jährlich", +"Description of the Event" => "Beschreibung des Termins", +"" => "", +"" => "", "" => "" ); ?> \ No newline at end of file diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php index 0cfbea29e55..b9b11f8a274 100755 --- a/apps/calendar/templates/calendar.php +++ b/apps/calendar/templates/calendar.php @@ -28,7 +28,7 @@
- +
diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php new file mode 100644 index 00000000000..487ee7645d7 --- /dev/null +++ b/apps/calendar/templates/part.choosecalendar.php @@ -0,0 +1,26 @@ +
"> +"; +} +?> +


+"> +
+ diff --git a/apps/calendar/templates/part.newevent.php b/apps/calendar/templates/part.newevent.php index 823a2445c8f..bc19042f10c 100644 --- a/apps/calendar/templates/part.newevent.php +++ b/apps/calendar/templates/part.newevent.php @@ -25,10 +25,12 @@     t("Calendar");?>: @@ -86,13 +88,13 @@ t("Repeat");?>: @@ -107,7 +109,7 @@ - +
t("Description");?>: