aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.txt4
-rw-r--r--activate.php4
-rw-r--r--languages/ca.php143
-rw-r--r--languages/en.php13
-rw-r--r--languages/es.php107
-rw-r--r--languages/fr.php1
-rw-r--r--models/model.php38
-rw-r--r--start.php5
-rw-r--r--views/default/css/elements/forms/datepicker_multi.php39
-rw-r--r--views/default/event_calendar/css.php41
-rw-r--r--views/default/event_calendar/datetime_edit.php13
-rw-r--r--views/default/event_calendar/filter_menu.php4
-rw-r--r--views/default/event_calendar/full_calendar_view.php81
-rw-r--r--views/default/event_calendar/repeat_form_element.php49
-rw-r--r--views/default/event_calendar/share_section.php6
-rw-r--r--views/default/forms/event_calendar/edit.php50
-rw-r--r--views/default/js/event_calendar/event_calendar.php23
-rw-r--r--views/default/river/object/event_calendar/create.php23
-rw-r--r--views/default/river/object/event_calendar/update.php19
19 files changed, 478 insertions, 185 deletions
diff --git a/README.txt b/README.txt
index 440f1707e..fbfd172b0 100644
--- a/README.txt
+++ b/README.txt
@@ -1,3 +1,7 @@
+THIS VERSION IS DEPRECATED. USE THE VERSION IN
+
+https://github.com/kevinjardine/Elgg-Event-Calendar/tree/full
+
/**
* Manage and display events
*
diff --git a/activate.php b/activate.php
new file mode 100644
index 000000000..3be14d287
--- /dev/null
+++ b/activate.php
@@ -0,0 +1,4 @@
+<?php
+
+elgg_set_plugin_setting('listing_format', 'full', 'event_calendar');
+elgg_set_plugin_setting('fewer_fields', 'yes', 'event_calendar'); \ No newline at end of file
diff --git a/languages/ca.php b/languages/ca.php
new file mode 100644
index 000000000..4881d7458
--- /dev/null
+++ b/languages/ca.php
@@ -0,0 +1,143 @@
+<?php
+$language = array (
+ 'item:object:event_calendar' => 'Calendari',
+ 'tag_names:event_tags' => 'Etiquetes',
+ 'event_calendar:optional' => 'Opcional.',
+ 'event_calendar:required' => 'Requerit.',
+ 'event_calendar:new_event' => 'Nou esdeveniment',
+ 'event_calendar:no_such_event_edit_error' => 'Error: no hi ha cap esdeveniment o no tens permissos per editar-lo.',
+ 'event_calendar:add_event_title' => 'Afegeix esdeveniment',
+ 'event_calendar:manage_event_title' => 'Edita esdeveniment',
+ 'event_calendar:manage_event_description' => 'Introdueix detalls del teu esdeveniment a sota. El títol, lloc on serà i data d\'inici són requerits. Pots fer clic a les icones del calendari per indicar les dates d\'inici i final.',
+ 'event_calendar:title_label' => 'Títol',
+ 'event_calendar:title_description' => 'D\'una a quatre paraules',
+ 'event_calendar:brief_description_label' => 'Descripció',
+ 'event_calendar:brief_description_description' => 'Una frase curta.',
+ 'event_calendar:venue_label' => 'On',
+ 'event_calendar:venue_description' => 'On serà aquest esdeveniment?',
+ 'event_calendar:start_date_label' => 'Data d\'inici',
+ 'event_calendar:start_date_description' => 'Quan començarà?',
+ 'event_calendar:end_date_label' => 'Data de finalització',
+ 'event_calendar:end_date_description' => 'Quan finalitzarà aquest esdeveniment? La data d\'inici serà utilitzada com a data de finalització si no en poses cap.',
+ 'event_calendar:start_time_label' => 'Hora d\'inici',
+ 'event_calendar:start_time_description' => 'A quina hora començarà aquest esdeveniment?',
+ 'event_calendar:end_time_label' => 'Hora de finalització',
+ 'event_calendar:end_time_description' => 'A quina hora finalitzarà aquest esdeveniment?',
+ 'event_calendar:fees_label' => 'Costos',
+ 'event_calendar:fees_description' => 'El cost d\'aquest esdeveniment, si és que en té.',
+ 'event_calendar:contact_label' => 'Contacte',
+ 'event_calendar:contact_description' => 'La persona de contacte per a més informació, preferiblement amb un número de telèfon o una adreça d\'email',
+ 'event_calendar:organiser_label' => 'Organitzadora',
+ 'event_calendar:organiser_description' => 'La persona o organització responsable d\'aquest esdeveniment.',
+ 'event_calendar:event_tags_label' => 'Etiquetes',
+ 'event_calendar:event_tags_description' => 'Una llista separada amb comes de les etiquetes més destacables per a aquest esdeveniment.',
+ 'event_calendar:long_description_label' => 'Descripció llarga',
+ 'event_calendar:long_description_description' => 'Pot ser un paràgraf o més com a requerit.',
+ 'event_calendar:manage_event_response' => 'El teu esdeveniment s\'ha desat correctament.',
+ 'event_calendar:add_event_response' => 'El teu esdeveniment s\'ha afegit correctament.',
+ 'event_calendar:show_events_title' => 'Calendari',
+ 'event_calendar:day_label' => 'Dia',
+ 'event_calendar:week_label' => 'Setmana',
+ 'event_calendar:month_label' => 'Mes',
+ 'event_calendar:group' => 'Calendari del grup',
+ 'event_calendar:new' => 'Afegir esdeveniment',
+ 'event_calendar:submit' => 'Desa i continua',
+ 'event_calendar:cancel' => 'Cancel·la',
+ 'event_calendar:widget_title' => 'Calendari',
+ 'event_calendar:widget:description' => 'Mostra els teus esdeveniments.',
+ 'event_calendar:num_display' => 'Número d\'esdeveniments per mostrar',
+ 'event_calendar:groupprofile' => 'Propers esdeveniments',
+ 'event_calendar:view_calendar' => 'vista del calendari',
+ 'event_calendar:when_label' => 'Quan',
+ 'event_calendar:site_wide_link' => 'Veure tots els esdeveniments',
+ 'event_calendar:view_link' => 'Veure aquest esdeveniment',
+ 'event_calendar:edit_link' => 'Edita aquest esdeveniment',
+ 'event_calendar:delete_link' => 'Esborra aquest esdeveniment',
+ 'event_calendar:delete_response' => 'Aquest esdeveniment ha estat esborrat.',
+ 'event_calendar:error_delete' => 'Aquest esdeveniment no existeix o no tens permisos per esborrar-lo.',
+ 'event_calendar:delete_cancel_response' => 'Esborrat de l\'esdeveniment cancel·lat.',
+ 'event_calendar:add_to_my_calendar' => 'Afegeix al meu calendari',
+ 'event_calendar:remove_from_my_calendar' => 'Treure del meu calendari',
+ 'event_calendar:add_to_my_calendar_response' => 'Aquest esdeveniment ha estat afegit al teu calendari personal',
+ 'event_calendar:add_to_the_calendar' => 'Afegeix al calendari',
+ 'event_calendar:remove_from_the_calendar' => 'Elimina',
+ 'event_calendar:add_to_the_calendar_menu_text' => 'Afegir al meu',
+ 'event_calendar:remove_from_the_calendar_menu_text' => 'Elimina del meu',
+ 'event_calendar:remove_from_the_calendar_button' => 'Elimina del calendari',
+ 'event_calendar:added_to_the_calendar' => 'Afegit al calendari',
+ 'event_calendar:removed_from_the_calendar' => 'Calendari eliminat',
+ 'event_calendar:personal_event_calendars_link' => 'A %s calendaris',
+ 'event_calendar:personal_event_calendars_link_one' => 'A un calendari',
+ 'event_calendar:users_for_event_breadcrumb' => 'Calendaris personals',
+ 'event_calendar:settings:group_profile_display_option:left' => 'columna esquerra',
+ 'event_calendar:settings:group_profile_display_option:right' => 'columna dreta',
+ 'event_calendar:settings:group_profile_display_option:none' => 'cap',
+ 'event_calendar:settings:agenda_view:title' => 'Utilitza la vista d\'agenda',
+ 'event_calendar:settings:yes' => 'sí',
+ 'event_calendar:settings:no' => 'no',
+ 'event_calendar:region_label' => 'Regió',
+ 'event_calendar:type_label' => 'Tipus',
+ 'event_calendar:all' => 'Tots',
+ 'event_calendar:no_events_found' => 'No s\'han trobat esdeveniments.',
+ 'event_calendar:mine' => 'Meus',
+ 'event_calendar:agenda:column:time' => 'Temps',
+ 'event_calendar:agenda:column:session' => 'Sessió',
+ 'event_calendar:agenda:column:venue' => 'Localització',
+ 'event_calendar:settings:agenda' => 'agenda',
+ 'event_calendar:settings:month' => 'per mes',
+ 'event_calendar:settings:full' => 'vista completa',
+ 'event_calendar:paged:column:date' => 'Data',
+ 'event_calendar:paged:column:time' => 'Hora',
+ 'event_calendar:paged:column:event' => 'Esdeveniment',
+ 'event_calendar:paged:column:venue' => 'Localització',
+ 'event_calendar:paged:column:calendar' => 'Calendari',
+ 'event_calendar:open' => 'Obrir',
+ 'event_calendar:add_user_label' => 'Afegir habitants',
+ 'event_calendar:show_all' => 'Tots',
+ 'event_calendar:show_mine' => 'El meu calendari',
+ 'event_calendar:show_friends' => 'Calendari de les amigues',
+ 'event_calendar:listing_title:all' => 'Tots',
+ 'event_calendar:listing_title:mine' => 'El meu calendari',
+ 'event_calendar:listing_title:friends' => 'Calendari de les amigues',
+ 'event_calendar:personal_manage:open' => 'obert',
+ 'event_calendar:personal_manage:closed' => 'tancat',
+ 'event_calendar:personal_manage:private' => 'privat',
+ 'event_calendar:from_label' => 'De:',
+ 'event_calendar:to_label' => 'A:',
+ 'event_calendar:settings:timeformat:title' => 'Format d\'hora',
+ 'event_calendar:time_format:12hour' => '12 hores (am/pm)',
+ 'event_calendar:time_format:24hour' => '24 hores',
+ 'event_calendar:all_day_label' => 'Event de tot el dia',
+ 'event_calendar:repeat_interval_label' => 'Repeteix cada',
+ 'event_calendar:repeat_weeks' => 'setmana(es)',
+ 'event_calendar:on_these_days' => 'en aquests dies',
+ 'event_calendar:day_abbrev:monday' => 'DL',
+ 'event_calendar:day_abbrev:tuesday' => 'DM',
+ 'event_calendar:day_abbrev:wednesday' => 'DC',
+ 'event_calendar:day_abbrev:thursday' => 'DJ',
+ 'event_calendar:day_abbrev:friday' => 'DV',
+ 'event_calendar:day_abbrev:saturday' => 'DS',
+ 'event_calendar:day_abbrev:sunday' => 'DG',
+ 'event_calendar:dow:full:monday' => 'Dilluns',
+ 'event_calendar:dow:full:tuesday' => 'Dimarts',
+ 'event_calendar:dow:full:wednesday' => 'Dimecres',
+ 'event_calendar:dow:full:thursday' => 'Dijous',
+ 'event_calendar:dow:full:friday' => 'Divendres',
+ 'event_calendar:dow:full:saturday' => 'Dissabte',
+ 'event_calendar:dow:full:sunday' => 'Diumenge',
+ 'event_calendar:schedule_type:fixed' => 'Posa data i hora',
+ 'event_calendar:interval:minute' => 'minut(s)',
+ 'event_calendar:interval:hour' => 'hora(es)',
+ 'event_calendar:interval:day' => 'dia(es)',
+ 'event_calendar:site_calendar' => 'Calendari del lloc',
+ 'event_calendar:calendar_label' => 'Calendari',
+ 'event_calendar:calendar_description' => 'Calendari per aquest esdeveniment.',
+ 'event_calendar:basic:header' => 'Informació bàsica',
+ 'event_calendar:schedule:header' => 'Horari',
+ 'event_calendar:permissions:header' => 'Permisos',
+ 'event_calendar:read_access' => 'Accés de lectura',
+ 'event_calendar:add_event' => 'Afegeix event',
+ 'event_calendar:poll_suffix' => '(enquesta)',
+ 'event_calendar:add' => 'Afegeix',
+);
+add_translation("ca", $language);
diff --git a/languages/en.php b/languages/en.php
index 3b6f7f249..b8fb918cc 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -2,7 +2,7 @@
$english = array(
- 'item:object:event_calendar' => "Event calendar",
+ 'item:object:event_calendar' => "Calendar",
'tag_names:event_tags' => "Tags",
'event_calendar:optional' => "Optional.",
'event_calendar:required' => "Required.",
@@ -17,7 +17,7 @@
'event_calendar:title_description' => "One to four words",
'event_calendar:brief_description_label' => "Description",
'event_calendar:brief_description_description' => "A short phrase.",
- 'event_calendar:venue_label' => "Venue",
+ 'event_calendar:venue_label' => "Where",
'event_calendar:venue_description' => "Where will this event be held?",
'event_calendar:start_date_label' => "Start date",
'event_calendar:start_date_description' => "When will this event start?",
@@ -44,7 +44,7 @@
'event_calendar:manage_event_error' => "Error: There was an error in saving your event. "
."Please make sure that you have provided the required fields.",
'event_calendar:error_nosuchevent' => "Error: there is no such event.",
- 'event_calendar:show_events_title' => "Event calendar",
+ 'event_calendar:show_events_title' => "Calendar",
'event_calendar:day_label' => "Day",
'event_calendar:week_label' => "Week",
'event_calendar:month_label' => "Month",
@@ -52,7 +52,7 @@
'event_calendar:new' => "Add event",
'event_calendar:submit' => "Save and Continue",
'event_calendar:cancel' => "Cancel",
- 'event_calendar:widget_title' => "Event calendar",
+ 'event_calendar:widget_title' => "Calendar",
'event_calendar:widget:description' => "Displays your events.",
'event_calendar:num_display' => "Number of events to display",
'event_calendar:groupprofile' => "Upcoming events",
@@ -121,7 +121,7 @@
'event_calendar:region_filter_by_label' => "Filter by region: ",
'event_calendar:settings:first_date:title' => "First allowable date (in YYYY-MM-DD format)",
'event_calendar:settings:last_date:title' => "Last allowable date (in YYYY-MM-DD format)",
- 'event_calendar:enable_event_calendar' => "Enable group event calendar",
+ 'event_calendar:enable_event_calendar' => "Enable group calendar",
'event_calendar:no_events_found' => "No events found.",
'event_calendar:mine' => "Mine",
'event_calendar:feature' => "Feature",
@@ -291,6 +291,7 @@ You can manage calendar requests for this event here:
'event_calendar:calendar_label' => "Calendar",
'event_calendar:calendar_description' => "Calendar for this event.",
'event_calendar:are_you_sure' => "Are you sure about this change?",
+ 'event_calendar:basic:header' => "Basic info",
'event_calendar:schedule:header' => "Schedule",
'event_calendar:permissions:header' => "Permissions",
'event_calendar:read_access' => "Read access",
@@ -357,5 +358,3 @@ You can visit the event page here:
);
add_translation("en",$english);
-
-?> \ No newline at end of file
diff --git a/languages/es.php b/languages/es.php
index 1eefff2a3..2282591d3 100644
--- a/languages/es.php
+++ b/languages/es.php
@@ -1,6 +1,100 @@
<?php
$language = array (
- 'item:object:event_calendar' => 'Calendario de eventos',
+ 'tag_names:event_tags' => 'Etiqueta',
+ 'event_calendar:optional' => 'Opcional.',
+ 'event_calendar:required' => 'Requerido.',
+ 'event_calendar:add_to_my_calendar_error' => 'No se puede añadir ese evento a tu calendario personal. (Quizás tu calendario ya esté lleno o ¿intentas agendar dos eventos a la vez en tu calendario personal?)',
+ 'event_calendar:add_to_the_calendar' => 'Añadir al calendario',
+ 'event_calendar:remove_from_the_calendar' => 'Remover',
+ 'event_calendar:add_to_the_calendar_menu_text' => 'Añadir a mi calendario',
+ 'event_calendar:remove_from_the_calendar_menu_text' => 'Remover de mi calendario',
+ 'event_calendar:remove_from_the_calendar_button' => 'Remover del calendario',
+ 'event_calendar:added_to_the_calendar' => 'Añadir al calendario',
+ 'event_calendar:removed_from_the_calendar' => 'Remover calendario',
+ 'event_calendar:add_to_the_calendar_response' => 'Evento añadido al calendario personal',
+ 'event_calendar:add_to_the_calendar_error' => 'No se puede añadir ese evento a tu calendario personal. (Quizás tu calendario ya esté lleno o ¿intentas agendar dos eventos a la vez en tu calendario personal?)',
+ 'event_calendar:remove_from_the_calendar_response' => 'Evento borrado del calendario.',
+ 'event_calendar:users_for_event_menu_title' => 'Habitantes que apuntan ese evento en su calendario personal',
+ 'event_calendar:personal_event_calendars_link_one' => 'En 1 calendario',
+ 'event_calendar:users_for_event_breadcrumb' => 'Calendario personal',
+ 'event_calendar:settings:agenda' => 'Agenda',
+ 'event_calendar:settings:full' => 'Vista completa',
+ 'event_calendar:settings:spots_display:title' => 'Añade un campo para cada evento para que puedas limitar el numero de personas que pueden añadir el evento a su propio calendario',
+ 'event_calendar:settings:no_collisions:title' => 'Colisión detectada: evita que se añadan dos eventos a la vez en el calendario',
+ 'event_calendar:settings:collision_length:title' => 'Cuanto tiempo (en segundos) un evento puede ser considerado como activo si no se establece una fecha o hora para su fin (usado para la detección de colisiones). Por defecto: 3600 segundos = 1 hora.',
+ 'event_calendar:spots_description' => '¿A cuantas habitantes se aceptarán que añadan ese evento a sus calendarios personales?',
+ 'event_calendar:open' => 'Abierto',
+ 'event_calendar:add_user_label' => 'Añadir habitantes',
+ 'event_calendar:add_users_notify:subject' => 'Un nuevo evento se ha añadido a tu calendario personal',
+ 'event_calendar:add_users_notify:body' => '%s,
+
+Se ha añadido un evento de "%s" a tu calendario personal.',
+ 'event_calendar:settings:personal_manage:title' => 'Permisos del calendario',
+ 'event_calendar:request_event_response' => 'Tu petición para añadir ese evento ha sido enviada,',
+ 'event_calendar:request_event_error' => 'Error: Tu petición para añadir el evento al calendario no se ha enviado.',
+ 'event_calendar:request_subject' => 'Haz recebido una invitación de calendario',
+ 'event_calendar:review_requests_request_none' => 'No hay peticiones a revisar para ese evento.',
+ 'event_calendar:request:remove:check' => '¿Estas seguro que quieres rechazar esa petición?',
+ 'event_calendar:requestkilled' => 'La petición ha sido rechazada.',
+ 'event_calendar:request_approved' => 'La petición ha sido aceptada.',
+ 'event_calendar:make_request_title' => 'Enviar petición a ese evento',
+ 'event_calendar:review_requests:reject' => 'Rechazar',
+ 'event_calendar:review_requests:reject:title' => 'Rechazar la petición',
+ 'event_calendar:review_requests:accept' => 'Aceptar',
+ 'event_calendar:review_requests:accept:title' => 'Aceptar la petición',
+ 'event_calendar:review_requests:error:approve' => 'Error: la petición no se ha aprobado.',
+ 'event_calendar:review_requests:error:reject' => 'Error: No se ha podido rechazar la petición.',
+ 'event_calendar:settings:hide_access:title' => 'Ocultar acceso al calendario',
+ 'event_calendar:settings:hide_end:title' => 'Ocultar campos de fecha y hora',
+ 'event_calendar:settings:more_required:title' => 'Hacer visible todos los campos excepto si se requiere una larga descripción.',
+ 'event_calendar:add_to_group:remove_group_title' => 'Remover ese evento del grupo',
+ 'event_calendar:add_to_group:remove_group_button' => 'Remover del grupo',
+ 'event_calendar:remove_from_group:success' => 'Evento removido del calendario del grupo',
+ 'event_calendar:add_to_group:add_group_title' => 'Añadir ese evento al grupo',
+ 'event_calendar:add_to_group:add_group_button' => 'Adicionar al grupo',
+ 'event_calendar:add_to_group:success' => 'Evento añadido al calendario del grupo',
+ 'event_calendar:settings:add_to_group_calendar:title' => 'Aceptar que el grupo de operadores añadan cualquier evento existente al calendario del grupo',
+ 'event_calendar:group_breadcrumb' => 'Calendario del grupo',
+ 'event_calendar:generic_error_title' => 'Error',
+ 'event_calendar:add' => 'Añadir',
+ 'event_calendar:owner:permissions_error' => 'No ienes permisos para visualizar esa pagina.',
+ 'event_calendar:feature_not_activated' => 'Esa funcionalidad no esta activada',
+ 'event_calendar:show_all' => 'Muestra todo',
+ 'event_calendar:show_mine' => 'Mi calendario',
+ 'event_calendar:show_friends' => 'Calendario de mis amigas',
+ 'event_calendar:from_label' => 'Desde:',
+ 'event_calendar:to_label' => 'Hasta:',
+ 'event_calendar:time_format:12hour' => '12 horas (am/pm)',
+ 'event_calendar:time_format:24hour' => '24 horas',
+ 'event_calendar:all_day_label' => 'El evento dura todo el día',
+ 'event_calendar:repeat_interval_label' => 'Repite cada',
+ 'event_calendar:day_abbrev:monday' => 'L',
+ 'event_calendar:day_abbrev:tuesday' => 'M',
+ 'event_calendar:day_abbrev:wednesday' => 'M',
+ 'event_calendar:day_abbrev:thursday' => 'J',
+ 'event_calendar:day_abbrev:friday' => 'V',
+ 'event_calendar:day_abbrev:saturday' => 'S',
+ 'event_calendar:day_abbrev:sunday' => 'D',
+ 'event_calendar:dow:full:monday' => 'Lunes',
+ 'event_calendar:dow:full:tuesday' => 'Martes',
+ 'event_calendar:dow:full:wednesday' => 'Miércoles',
+ 'event_calendar:dow:full:thursday' => 'Jueves',
+ 'event_calendar:dow:full:friday' => 'Viernes',
+ 'event_calendar:dow:full:saturday' => 'Sabado',
+ 'event_calendar:dow:full:sunday' => 'Domingo',
+ 'event_calendar:schedule_type:fixed' => 'Selecciona dia/hora',
+ 'event_calendar:interval:minute' => 'minuto(s)',
+ 'event_calendar:interval:hour' => 'hora(s)',
+ 'event_calendar:interval:day' => 'día(s)',
+ 'event_calendar:site_calendar' => 'Calendario del sitio',
+ 'event_calendar:calendar_label' => 'Calendario',
+ 'event_calendar:basic:header' => 'Información básica',
+ 'event_calendar:schedule:header' => 'Fecha',
+ 'event_calendar:permissions:header' => 'Permisos',
+ 'event_calendar:read_access' => 'Acceso de lectura',
+ 'event_calendar:add_event' => 'Añadir evento',
+ 'event_calendar:schedule_event' => 'Evento agendado',
+ 'item:object:event_calendar' => 'Calendario',
'event_calendar:new_event' => 'Nuevo evento',
'event_calendar:no_such_event_edit_error' => 'Error: No existe tal evento o usted no tiene autorización para editarlo.',
'event_calendar:add_event_title' => 'Agregar evento',
@@ -10,7 +104,7 @@ $language = array (
'event_calendar:title_description' => 'Una a cuatro palabras',
'event_calendar:brief_description_label' => 'Descripción breve',
'event_calendar:brief_description_description' => 'Una frase corta.',
- 'event_calendar:venue_label' => 'Sede',
+ 'event_calendar:venue_label' => 'Lugar',
'event_calendar:venue_description' => '¿Dónde se llevará a cabo este evento?',
'event_calendar:start_date_label' => 'Fecha de inicio',
'event_calendar:start_date_description' => '¿Cuándo comenzará este evento?',
@@ -34,7 +128,7 @@ $language = array (
'event_calendar:add_event_response' => 'Su evento ha sido agregado.',
'event_calendar:manage_event_error' => 'Error: Hubo un error al guardar su evento. Por favor asegúrese que todos los campos requeridos hayan sido proporcionados.',
'event_calendar:error_nosuchevent' => 'Error: no existe tal evento.',
- 'event_calendar:show_events_title' => 'Calendario del evento',
+ 'event_calendar:show_events_title' => 'Calendario',
'event_calendar:day_label' => 'Día',
'event_calendar:week_label' => 'Semana',
'event_calendar:month_label' => 'Mes',
@@ -42,7 +136,7 @@ $language = array (
'event_calendar:new' => 'Agregar evento',
'event_calendar:submit' => 'Enviar',
'event_calendar:cancel' => 'Cancelar',
- 'event_calendar:widget_title' => 'Calendario del evento',
+ 'event_calendar:widget_title' => 'Calendario',
'event_calendar:widget:description' => 'Exponer sus eventos.',
'event_calendar:num_display' => 'Número de eventos expuestos',
'event_calendar:groupprofile' => 'Eventos venideros',
@@ -52,8 +146,6 @@ $language = array (
'event_calendar:view_link' => 'Ver este evento',
'event_calendar:edit_link' => 'Editar este evento',
'event_calendar:delete_link' => 'Eliminar este evento',
- 'event_calendar:delete_confirm_title' => 'Confirmar eliminación de este evento',
- 'event_calendar:delete_confirm_description' => '¿Está seguro que desea eliminar este evento ("%s")? Esta acción es irreversible.',
'event_calendar:delete_response' => 'Este evento ha sido eliminado.',
'event_calendar:error_delete' => 'Este evento no existe o usted no tiene el derecho de eliminarlo.',
'event_calendar:delete_cancel_response' => 'Eliminación del evento cancelada.',
@@ -74,7 +166,7 @@ $language = array (
'event_calendar:settings:venue_view:title' => 'Mostrar sede en vista rápida (listados de eventos)',
'event_calendar:settings:yes' => 'sí',
'event_calendar:settings:no' => 'no',
- 'event_calendar:settings:site_calendar:title' => 'Sitio del calendario',
+ 'event_calendar:settings:site_calendar:title' => 'Calendario del sitio',
'event_calendar:settings:site_calendar:admin' => 'sí, solamente si administradores pueden anunciar eventos',
'event_calendar:settings:site_calendar:loggedin' => 'sí, cualquier usuario registrado puede anunciar un evento',
'event_calendar:settings:group_calendar:title' => 'Calendarios de grupo',
@@ -121,4 +213,3 @@ $language = array (
'event_calendar:river:the_event' => 'un evento titulado',
);
add_translation("es", $language);
-?> \ No newline at end of file
diff --git a/languages/fr.php b/languages/fr.php
index 876a53ecb..6e2624691 100644
--- a/languages/fr.php
+++ b/languages/fr.php
@@ -122,4 +122,3 @@ $language = array (
'event_calendar:river:the_event' => 'un événement intitulé',
);
add_translation("fr", $language);
-?> \ No newline at end of file
diff --git a/models/model.php b/models/model.php
index 6646442e8..09e8b2092 100644
--- a/models/model.php
+++ b/models/model.php
@@ -106,11 +106,11 @@ function event_calendar_set_event_from_form($event_guid,$group_guid) {
//$event->munged_start_date_string = $start_date_text." ".date_default_timezone_get();*/
// TODO: is the timezone bit necessary?
- $event->start_date = strtotime($start_date_text." ".date_default_timezone_get());
+ $event->start_date = strtotime($start_date_text." GMT");
$end_date_text = trim(get_input('end_date',''));
//$event->original_end_date = get_input('end_date');
if ($end_date_text) {
- $event->end_date = strtotime($end_date_text." ".date_default_timezone_get());
+ $event->end_date = strtotime($end_date_text." GMT");
//$event->munged_end_date_string = $end_date_text." ".date_default_timezone_get();
} else {
$event->end_date = '';
@@ -1506,7 +1506,7 @@ function event_calendar_get_page_content_list($page_type,$container_guid,$start_
$params = event_calendar_generate_listing_params($page_type,$container_guid,$start_date,$display_mode,$filter,$region);
- $url = full_url();
+ $url = current_page_url();
if (substr_count($url, '?')) {
$url .= "&view=ical";
} else {
@@ -1517,24 +1517,32 @@ function event_calendar_get_page_content_list($page_type,$container_guid,$start_
$menu_options = array(
'name' => 'ical',
'id' => 'event-calendar-ical-link',
- 'text' => '<img src="'.elgg_get_site_url().'mod/event_calendar/images/ics.png" />',
+ 'text' => elgg_view_icon('calendar'),
'href' => $url,
'title' => elgg_echo('feed:ical'),
'priority' => 800,
+ 'rel' => 'popup',
);
$menu_item = ElggMenuItem::factory($menu_options);
elgg_register_menu_item('extras', $menu_item);
$body = elgg_view_layout("content", $params);
+ $body .= elgg_view_module('popup', elgg_echo('feed:ical'), elgg_echo('event_calendar:ical_popup_message') . elgg_view('output/url', array(
+ 'href' => $url,
+ 'text' => elgg_echo('export'),
+ 'class' => 'elgg-button elgg-button-action',
+ )), array(
+ 'id' => 'event-calendar-ical',
+ 'class' => 'event-calendar-ical hidden',
+ ));
- return elgg_view_page($title,$body);
+ return elgg_view_page($title, $body);
}
function event_calendar_get_page_content_edit($page_type,$guid,$start_date='') {
elgg_load_js('elgg.event_calendar');
$vars = array();
$vars['id'] = 'event-calendar-edit';
- $vars['name'] = 'event_calendar_edit';
// just in case a feature adds an image upload
$vars['enctype'] = 'multipart/form-data';
@@ -1651,7 +1659,7 @@ function event_calendar_prepare_edit_form_vars($event = NULL, $page_type = '', $
if ($page_type == 'schedule') {
$values['schedule_type'] = 'poll';
} else {
- $values['schedule_type'] = 'fixed';
+ $values['schedule_type'] = 'all_day';
}
if ($event) {
@@ -1836,7 +1844,7 @@ function event_calendar_generate_listing_params($page_type,$container_guid,$orig
);
$content = elgg_view('event_calendar/show_events', $vars);
- if ($page_type == 'owner') {
+ if ($page_type == 'group') {
$filter_override = '';
} else {
$filter_override = elgg_view('event_calendar/filter_menu',$vars);
@@ -2114,6 +2122,18 @@ function event_calendar_modify_full_calendar($event_guid,$day_delta,$minute_delt
$event->end_time += $minute_delta;
}
}
+ $dow = array('monday','tuesday','wednesday','thursday','friday','saturday','sunday');
+ $week_repeats = array();
+ $weekday_delta = (($day_delta % 7) + 7) % 7; // Imagine delta is -12: ((-12 % 7) + 7 % 7) = +2 (thursdays are saturdays)
+ foreach ($dow as $i => $w) {
+ $v = 'event-calendar-repeating-'.$w.'-value';
+ $new_day = $dow[($i+$weekday_delta)%7];
+ $week_repeats[$new_day] = $event->$v;
+ }
+ foreach ($week_repeats as $w => $value) {
+ $v = 'event-calendar-repeating-'.$w.'-value';
+ $event->$v = $value;
+ }
return TRUE;
}
}
@@ -2165,7 +2185,7 @@ function event_calendar_get_page_content_fullcalendar_events($start_date,$end_da
} else {
$event_item['id'] = $event->guid;
$event_item['is_event_poll'] = FALSE;
- $event_item['url'] = elgg_get_site_url().'event_calendar/view_light_box/'.$event->guid;
+ $event_item['url'] = elgg_get_site_url().'event_calendar/view/'.$event->guid;
}
$event_array[] = $event_item;
diff --git a/start.php b/start.php
index ad635c598..5590544b8 100644
--- a/start.php
+++ b/start.php
@@ -28,6 +28,8 @@ function event_calendar_init() {
// Register granular notification for this type
register_notification_object('object', 'event_calendar', elgg_echo('event_calendar:new_event'));
+ elgg_extend_view('css/elements/forms', 'css/elements/forms/datepicker_multi');
+
// Set up site menu
$site_calendar = elgg_get_plugin_setting('site_calendar', 'event_calendar');
if (!$site_calendar || $site_calendar != 'no') {
@@ -184,9 +186,6 @@ function event_calendar_page_handler($page) {
case 'view':
echo event_calendar_get_page_content_view($page[1]);
break;
- case 'view_light_box':
- echo event_calendar_get_page_content_view($page[1],TRUE);
- break;
case 'display_users':
echo event_calendar_get_page_content_display_users($page[1]);
break;
diff --git a/views/default/css/elements/forms/datepicker_multi.php b/views/default/css/elements/forms/datepicker_multi.php
new file mode 100644
index 000000000..4a18bdad1
--- /dev/null
+++ b/views/default/css/elements/forms/datepicker_multi.php
@@ -0,0 +1,39 @@
+<?php
+
+?>
+
+.ui-datepicker.ui-datepicker-multi {
+ width: auto;
+}
+.ui-datepicker-multi .ui-datepicker-group {
+ float: left;
+}
+.ui-datepicker-multi .ui-datepicker-group table {
+ margin-bottom: 0.4em;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 0;
+ width: 95%;
+}
+.ui-datepicker-multi-2 .ui-datepicker-group {
+ width: 50%;
+}
+.ui-datepicker-multi-3 .ui-datepicker-group {
+ width: 33.3%;
+}
+.ui-datepicker-multi-4 .ui-datepicker-group {
+ width: 25%;
+}
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header {
+ border-left-width-ltr-source: physical;
+ border-left-width-rtl-source: physical;
+ border-left-width-value: 0;
+}
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
+ border-left-width-ltr-source: physical;
+ border-left-width-rtl-source: physical;
+ border-left-width-value: 0;
+}
+.ui-datepicker-multi .ui-datepicker-buttonpane {
+ clear: left;
+}
diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php
index c1dbf4633..00cfd6cbb 100644
--- a/views/default/event_calendar/css.php
+++ b/views/default/event_calendar/css.php
@@ -38,6 +38,10 @@ ul#calendarmenu li a:hover, ul#calendarmenu li.sys_selected a{
background: <?php echo $highlight_colour; ?>;
}
+.event-calendar-ical {
+ width: 200px;
+}
+
td.ui-datepicker-unselectable {
background-color: #FFFFFF !important;
color: #888888 !important;
@@ -171,39 +175,12 @@ li.event-calendar-filter-menu-show-only {
margin-right: 10px;
}
-.event-calendar-medium-text {
- width: 500px !important;
-}
-
-.event-calendar-edit-form-block label {
- float: left;
- width: 90px;
- margin-top: 5px;
-}
-
-.event-calendar-long-text {
- width: 500px !important;
-}
-
-.event-calendar-edit-form-other-block .mceLayout {
- width: 500px !important;
-}
-
-.event-calendar-edit-form {
- background-color: #FFFFFF;
-}
-
-.event-calendar-edit-form-block {
- width: 90%;
- background-color: #DDDDDD;
- border-width:1px;
- border-style:solid;
- border-color:#bfbfbf;
- padding: 5px;
- margin-bottom: 10px;
- clear: both;
+fieldset > legend {
+ font-weight: bold;
+ font-size: 1.2em;
+ line-height: 1.1em;
+ padding-bottom: 5px;
}
-
.event-calendar-repeating-wrapper {
padding: 0;
margin-top: 5px;
diff --git a/views/default/event_calendar/datetime_edit.php b/views/default/event_calendar/datetime_edit.php
index 64af30f53..2e0830167 100644
--- a/views/default/event_calendar/datetime_edit.php
+++ b/views/default/event_calendar/datetime_edit.php
@@ -8,20 +8,17 @@ if ($event_calendar_times != 'no') {
if ($event_calendar_hide_end != 'yes') {
$body .= '<p><label>'.elgg_echo('event_calendar:from_label').'</label>';
}
- $body .= elgg_view("event_calendar/input/date_local",array(
- //'timestamp'=>TRUE,
- 'autocomplete'=>'off',
+ $body .= elgg_view("input/date", array(
'class'=>'event-calendar-compressed-date',
'name' => 'start_date',
- 'value'=>$vars['start_date']));
+ 'value'=>$vars['start_date'],
+ ));
$body .= '<span id="event-calendar-start-time-wrapper">';
$body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$vars['start_time']));
$body .= '</span>';
if ($event_calendar_hide_end != 'yes') {
$body .= '</p><p id="event-calendar-to-time-wrapper"><label>'.elgg_echo('event_calendar:to_label').'</label>';
- $body .= elgg_view("event_calendar/input/date_local",array(
- //'timestamp'=>TRUE,
- 'autocomplete'=>'off',
+ $body .= elgg_view("input/date", array(
'class'=>'event-calendar-compressed-date',
'name' => 'end_date',
'value'=>$vars['end_date'],
@@ -30,7 +27,7 @@ if ($event_calendar_times != 'no') {
$body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$vars['end_time']));
$body .= '</span>';
}
- $body .= '</p></span>';
+ $body .= '</p>';
} else {
$body .= '<p><label>'.elgg_echo("event_calendar:start_date_label").'<br />';
diff --git a/views/default/event_calendar/filter_menu.php b/views/default/event_calendar/filter_menu.php
index 926a29d0d..1364902a8 100644
--- a/views/default/event_calendar/filter_menu.php
+++ b/views/default/event_calendar/filter_menu.php
@@ -30,9 +30,6 @@ if (elgg_is_logged_in()) {
'selected' => ($filter_context == 'friends'),
'priority' => 400,
);
- $text_bit = '<li class="event-calendar-filter-menu-show-only">'.elgg_echo('event_calendar:show_only').'</li>';
-} else {
- $text_bit = '';
}
$tab_rendered = array();
@@ -66,7 +63,6 @@ $menu = <<<__MENU
<ul class="elgg-menu elgg-menu-filter elgg-menu-hz elgg-menu-filter-default">
{$tab_rendered['open']}
{$tab_rendered['all']}
- $text_bit
{$tab_rendered['mine']}
{$tab_rendered['friend']}
</ul>
diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php
index 3e0c583ce..1a58321b5 100644
--- a/views/default/event_calendar/full_calendar_view.php
+++ b/views/default/event_calendar/full_calendar_view.php
@@ -1,7 +1,7 @@
<?php
elgg_load_js('elgg.full_calendar');
-elgg_load_js('lightbox');
-elgg_load_css('lightbox');
+
+$timeformat = elgg_get_plugin_setting('timeformat', 'event_calendar') == 24 ? 'H(:mm)' : 'h(:mm)t';
// TODO: is there an easy way to avoid embedding JS?
?>
@@ -11,13 +11,8 @@ var goToDateFlag = 0;
handleEventClick = function(event) {
if (event.url) {
- if (event.is_event_poll) {
- window.location.href = event.url;
- } else {
- //window.location.href = event.url;
- $.fancybox({'href':event.url});
- }
- return false;
+ window.location.href = event.url;
+ event.preventDefault();
}
};
@@ -149,25 +144,57 @@ handleViewDisplay = function(view) {
//$(".fc-widget-content[data-date='20120105']")
}
-$(document).ready(function() {
- $('#calendar').fullCalendar({
- header: {
- left: 'prev,next today',
- center: 'title',
- right: 'month,agendaWeek,agendaDay'
- },
- month: <?php echo date('n',strtotime($vars['start_date']))-1; ?>,
- ignoreTimezone: true,
- editable: true,
- slotMinutes: 15,
- eventRender: handleEventRender,
- eventDrop: handleEventDrop,
- eventClick: handleEventClick,
- dayClick: handleDayClick,
- events: handleGetEvents,
- viewDisplay: handleViewDisplay,
+fullcalendarInit = function() {
+
+ var loadFullCalendar = function() {
+ var locale = $.datepicker.regional[elgg.get_language()];
+ if (!locale) {
+ locale = $.datepicker.regional[''];
+ }
+ $('#calendar').fullCalendar({
+ header: {
+ left: 'prev,next today',
+ center: 'title',
+ right: 'month,agendaWeek,agendaDay'
+ },
+ month: <?php echo date('n',strtotime($vars['start_date']))-1; ?>,
+ ignoreTimezone: true,
+ editable: true,
+ slotMinutes: 15,
+ eventRender: handleEventRender,
+ eventDrop: handleEventDrop,
+ eventClick: handleEventClick,
+ dayClick: handleDayClick,
+ events: handleGetEvents,
+ viewDisplay: handleViewDisplay,
+
+ isRTL: locale.isRTL,
+ firstDay: locale.firstDay,
+ monthNames: locale.monthNames,
+ monthNamesShort: locale.monthNamesShort,
+ dayNames: locale.dayNames,
+ dayNamesShort: locale.dayNamesShort,
+ buttonText: {
+ today: locale.currentText,
+ month: elgg.echo('event_calendar:month_label'),
+ week: elgg.echo('event_calendar:week_label'),
+ day: elgg.echo('event_calendar:day_label')
+ },
+ timeFormat: "<?php echo $timeformat; ?>",
+ });
+ }
+
+ elgg.get({
+ url: elgg.config.wwwroot + 'vendors/jquery/i18n/jquery.ui.datepicker-'+ elgg.get_language() +'.js',
+ dataType: "script",
+ cache: true,
+ success: loadFullCalendar,
+ error: loadFullCalendar, // english language is already loaded.
});
-});
+}
+
+elgg.register_hook_handler('init', 'system', fullcalendarInit);
+
</script>
<div id='calendar'></div>
<input type="hidden" id="event-calendar-selected-date" />
diff --git a/views/default/event_calendar/repeat_form_element.php b/views/default/event_calendar/repeat_form_element.php
index 45fdabfa1..5de858caf 100644
--- a/views/default/event_calendar/repeat_form_element.php
+++ b/views/default/event_calendar/repeat_form_element.php
@@ -1,6 +1,8 @@
<?php
$event = $vars['event'];
$fd = $vars['form_data'];
+$days = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday');
+
if ($fd['repeats'] == 'yes') {
echo elgg_view('input/checkbox',array('name'=>'repeats','value'=>'yes','checked'=>'checked'));
} else {
@@ -10,34 +12,21 @@ echo elgg_echo('event_calendar:repeat_interval_label').' ';
echo elgg_view('input/dropdown',array('name'=>'repeat_interval','value'=>$fd['repeat_interval'],'options_values'=>array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8')));
echo ' '.elgg_echo('event_calendar:repeat_weeks');
echo ' '.elgg_echo('event_calendar:on_these_days');
-?>
-<div class="event-calendar-repeating-wrapper">
-<a id="event-calendar-repeating-monday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:monday'); ?>
+
+echo '<div class="event-calendar-repeating-wrapper">';
+
+foreach($days as $day) {
+ $label = elgg_echo("event_calendar:day_abbrev:$day");
+ echo <<<HTML
+<a id="event-calendar-repeating-$day" href="javascript:void(0);" class="event-calendar-repeating-unselected">
+ $label
</a>
-<a id="event-calendar-repeating-tuesday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:tuesday'); ?>
-</a>
-<a id="event-calendar-repeating-wednesday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:wednesday'); ?>
-</a>
-<a id="event-calendar-repeating-thursday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:thursday'); ?>
-</a>
-<a id="event-calendar-repeating-friday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:friday'); ?>
-</a>
-<a id="event-calendar-repeating-saturday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:saturday'); ?>
-</a>
-<a id="event-calendar-repeating-sunday" href="javascript:void(0);" class="event-calendar-repeating-unselected">
- <?php echo elgg_echo('event_calendar:day_abbrev:sunday'); ?>
-</a>
-</div>
-<input type="hidden" name="event-calendar-repeating-monday-value" value="<?php echo $fd['event-calendar-repeating-monday-value']; ?>">
-<input type="hidden" name="event-calendar-repeating-tuesday-value" value="<?php echo $fd['event-calendar-repeating-tuesday-value']; ?>">
-<input type="hidden" name="event-calendar-repeating-wednesday-value" value="<?php echo $fd['event-calendar-repeating-wednesday-value']; ?>">
-<input type="hidden" name="event-calendar-repeating-thursday-value" value="<?php echo $fd['event-calendar-repeating-thursday-value']; ?>">
-<input type="hidden" name="event-calendar-repeating-friday-value" value="<?php echo $fd['event-calendar-repeating-friday-value']; ?>">
-<input type="hidden" name="event-calendar-repeating-saturday-value" value="<?php echo $fd['event-calendar-repeating-saturday-value']; ?>">
-<input type="hidden" name="event-calendar-repeating-sunday-value" value="<?php echo $fd['event-calendar-repeating-sunday-value']; ?>">
+HTML;
+
+}
+
+echo '</div>';
+
+foreach($days as $day) {
+ echo elgg_view('input/hidden', array('name' => "event-calendar-repeating-$day-value", 'value' => $fd["event-calendar-repeating-$day-value"]));
+} \ No newline at end of file
diff --git a/views/default/event_calendar/share_section.php b/views/default/event_calendar/share_section.php
index 134f07656..c4f6cf45f 100644
--- a/views/default/event_calendar/share_section.php
+++ b/views/default/event_calendar/share_section.php
@@ -1,8 +1,8 @@
<?php
$fd = $vars['form_data'];
$event_calendar_hide_access = elgg_get_plugin_setting('hide_access', 'event_calendar');
-$body = '<div class="event-calendar-edit-form-block event-calendar-edit-form-share-block">';
-$body .= '<h2>'.elgg_echo('event_calendar:permissions:header').'</h2>';
+$body = '<fieldset>';
+$body .= '<legend>'.elgg_echo('event_calendar:permissions:header').'</legend>';
if($event_calendar_hide_access == 'yes') {
$event_calendar_default_access = elgg_get_plugin_setting('default_access', 'event_calendar');
if($event_calendar_default_access) {
@@ -21,6 +21,6 @@ if (elgg_plugin_exists('entity_admins')) {
$body .= elgg_echo('event_calendar:share_ownership:description');
$body .= elgg_view('input/entity_admins_dropdown',array('entity'=>$vars['event']));
}
-$body .= '</div>';
+$body .= '</fieldset>';
echo $body;
diff --git a/views/default/forms/event_calendar/edit.php b/views/default/forms/event_calendar/edit.php
index c2210c5f8..747dae0f0 100644
--- a/views/default/forms/event_calendar/edit.php
+++ b/views/default/forms/event_calendar/edit.php
@@ -70,30 +70,38 @@ $all_day = $fd['all_day'];
$schedule_type = $fd['schedule_type'];
$long_description = $fd['long_description'];
-$body = '<div class="event-calendar-edit-form">';
+$body = '<div>';
$body .= elgg_view('input/hidden',array('name'=>'event_action', 'value'=>$event_action));
$body .= elgg_view('input/hidden',array('name'=>'event_guid', 'value'=>$event_guid));
-$body .= '<div class="event-calendar-edit-form-block event-calendar-edit-form-top-block">';
+$body .= '<fieldset>';
+$body .= '<legend>' . elgg_echo('event_calendar:basic:header') . '</legend>';
$body .= '<p><label>'.elgg_echo("event_calendar:title_label").'</label>';
-$body .= elgg_view("input/text",array('name' => 'title','class'=>'event-calendar-medium-text','value'=>$title));
+$body .= elgg_view("input/text",array('name' => 'title', 'value' => $title));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['title'].elgg_echo('event_calendar:title_description').'</p>';
$body .= '<p><label>'.elgg_echo("event_calendar:venue_label").'</label>';
-$body .= elgg_view("input/text",array('name' => 'venue','class'=>'event-calendar-medium-text','value'=>$venue));
+$body .= elgg_view("input/text",array('name' => 'venue', 'value' => $venue));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['venue'].elgg_echo('event_calendar:venue_description').'</p>';
-$body .= '<p><label>'.elgg_echo("event_calendar:brief_description_label").'</label>';
-$body .= elgg_view("input/text",array('name' => 'description','class'=>'event-calendar-medium-text','value'=>$brief_description));
-$body .= '</p>';
-$body .= '<p class="event-calendar-description">'.$prefix['brief_description'].elgg_echo('event_calendar:brief_description_description').'</p>';
+if ($event_calendar_fewer_fields != 'yes') {
+ $body .= '<p><label>'.elgg_echo("event_calendar:brief_description_label").'</label>';
+ $body .= elgg_view("input/text",array('name' => 'description', 'value' => $brief_description));
+ $body .= '</p>';
+ $body .= '<p class="event-calendar-description">'.$prefix['brief_description'].elgg_echo('event_calendar:brief_description_description').'</p>';
+
+} else {
+ $body .= '<label>'.elgg_echo("event_calendar:long_description_label").'</label>';
+ $body .= elgg_view("input/longtext",array('name' => 'long_description', 'value' => $long_description));
+ $body .= '<p class="event-calendar-description">'.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'</p>';
+}
$body .= '<p><label>'.elgg_echo("event_calendar:event_tags_label").'</label>';
-$body .= elgg_view("input/tags",array('name' => 'tags','class'=>'event-calendar-medium-text','value'=>$event_tags));
+$body .= elgg_view("input/tags",array('name' => 'tags', 'value' => $event_tags));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'</p>';
@@ -117,11 +125,11 @@ if($event_calendar_bbb_server_url) {
$body .= '</p>';
}
-$body .= '</div>';
+$body .= '</fieldset>';
-$body .= '<div class="event-calendar-edit-form-block event-calendar-edit-form-schedule-block">';
-$body .= '<h2>'.elgg_echo('event_calendar:schedule:header').'</h2>';
-$body .= elgg_view('input/radio',array('id'=>'event-calendar-edit-schedule-type','name'=>'schedule_type','value'=>$schedule_type,'options'=>$schedule_options));
+$body .= '<fieldset>';
+$body .= '<legend>'.elgg_echo('event_calendar:schedule:header').'</legend>';
+$body .= elgg_view('input/radio',array('name'=>'schedule_type','value'=>$schedule_type,'options'=>$schedule_options));
$vars['prefix'] = $prefix;
@@ -129,20 +137,20 @@ $body .= elgg_view('event_calendar/schedule_section',$vars);
if ($event_calendar_spots_display == 'yes') {
$body .= '<p><label>'.elgg_echo("event_calendar:spots_label").'<br />';
- $body .= elgg_view("input/text",array('name' => 'spots','class'=>'event-calendar-medium-text','value'=>$spots));
+ $body .= elgg_view("input/text",array('name' => 'spots', 'value' => $spots));
$body .= '</label></p>';
$body .= '<p class="event-calendar-description">'.$prefix['spots'].elgg_echo('event_calendar:spots_description').'</p>';
}
$body .= '<div class="event-calendar-edit-bottom"></div>';
-$body .= '</div>';
+$body .= '</fieldset>';
$body .= elgg_view('event_calendar/personal_manage_section',$vars);
$body .= elgg_view('event_calendar/share_section',$vars);
if ($event_calendar_region_display == 'yes' || $event_calendar_type_display == 'yes' || $event_calendar_fewer_fields != 'yes') {
- $body .= '<div class="event-calendar-edit-form-block event-calendar-edit-form-other-block">';
+ $body .= '<fieldset>';
if ($event_calendar_region_display == 'yes') {
$region_list = trim(elgg_get_plugin_setting('region_list', 'event_calendar'));
@@ -195,27 +203,27 @@ if ($event_calendar_region_display == 'yes' || $event_calendar_type_display == '
if ($event_calendar_fewer_fields != 'yes') {
$body .= '<p><label>'.elgg_echo("event_calendar:fees_label").'</label>';
- $body .= elgg_view("input/text",array('name' => 'fees','class'=>'event-calendar-medium-text','value'=>$fees));
+ $body .= elgg_view("input/text",array('name' => 'fees', 'value' => $fees));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['fees'].elgg_echo('event_calendar:fees_description').'</p>';
$body .= '<p><label>'.elgg_echo("event_calendar:contact_label").'</label>';
- $body .= elgg_view("input/text",array('name' => 'contact','class'=>'event-calendar-medium-text','value'=>$contact));
+ $body .= elgg_view("input/text",array('name' => 'contact', 'value' => $contact));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['contact'].elgg_echo('event_calendar:contact_description').'</p>';
$body .= '<p><label>'.elgg_echo("event_calendar:organiser_label").'</label>';
- $body .= elgg_view("input/text",array('name' => 'organiser','class'=>'event-calendar-medium-text','value'=>$organiser));
+ $body .= elgg_view("input/text",array('name' => 'organiser', 'value' => $organiser));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['organiser'].elgg_echo('event_calendar:organiser_description').'</p>';
$body .= '<p><label>'.elgg_echo("event_calendar:long_description_label").'</label>';
- $body .= elgg_view("input/longtext",array('name' => 'long_description','class'=>'event-calendar-long-text','value'=>$long_description));
+ $body .= elgg_view("input/longtext",array('name' => 'long_description', 'value' => $long_description));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'</p>';
}
- $body .= '</div>';
+ $body .= '</fieldset>';
}
$body .= elgg_view('input/submit', array('name'=>'submit','value'=>elgg_echo('event_calendar:submit')));
diff --git a/views/default/js/event_calendar/event_calendar.php b/views/default/js/event_calendar/event_calendar.php
index 65c4d2952..efa1dc1dd 100644
--- a/views/default/js/event_calendar/event_calendar.php
+++ b/views/default/js/event_calendar/event_calendar.php
@@ -10,7 +10,7 @@ elgg.event_calendar.init = function () {
$('.event-calendar-repeating-unselected').live('click',elgg.event_calendar.handleRepeatingSelect);
$('.event-calendar-repeating-selected').live('click',elgg.event_calendar.handleRepeatingUnselect);
$('#event-calendar-edit').submit(elgg.event_calendar.handleEditFormSubmit);
- $('#event-calendar-edit-schedule-type').click(elgg.event_calendar.handleScheduleType);
+ $('input.elgg-input-radio[name="schedule_type"]').click(elgg.event_calendar.handleScheduleType);
elgg.event_calendar.handleScheduleType();
var all_day_field = $('[name="all_day"][type="checkbox"]');
@@ -21,10 +21,16 @@ elgg.event_calendar.init = function () {
$('#event-calendar-end-time-wrapper').attr('disabled','disabled');
}
all_day_field.change(elgg.event_calendar.handleAllDayField);
+
+ $('.elgg-input-date[name="start_date"], .elgg-input-date[name="end_date"]').datepicker({
+ dateFormat: 'yy-mm-dd',
+ numberOfMonths: 3,
+ onSelect: elgg.event_calendar.handleDateRangeSelect,
+ });
}
elgg.event_calendar.handleScheduleType = function(e) {
- var st = $('#event-calendar-edit-schedule-type:checked').val();
+ var st = $('input.elgg-input-radio[name="schedule_type"]:checked').val();
if (st == 'poll') {
$(".event-calendar-edit-date-wrapper").hide();
$(".event-calendar-edit-reminder-wrapper").hide();
@@ -61,6 +67,14 @@ elgg.event_calendar.handleAllDayField = function(e) {
}
}
+elgg.event_calendar.handleDateRangeSelect = function(selectedDate) {
+ if (this.name == 'start_date') {
+ $('.elgg-input-date[name="end_date"]').datepicker("option", "minDate", selectedDate);
+ } else {
+ $('.elgg-input-date[name="start_date"]').datepicker("option", "maxDate", selectedDate);
+ }
+}
+
elgg.event_calendar.handleEditFormSubmit = function(e) {
if ($.trim($('[name="title"]').val()) == '') {
alert(elgg.echo('event_calendar:edit_form:error:missing_title'));
@@ -96,9 +110,8 @@ elgg.event_calendar.handleRegionChange = function(e) {
}
elgg.event_calendar.handleIcalPopup = function(e) {
- var message = elgg.echo('event_calendar:ical_popup_message')+"\n"+this.href;
- alert(message);
- return false;
+ this.href = '#event-calendar-ical';
+ e.preventDefault();
}
elgg.event_calendar.handlePagedPersonalCalendarToggle = function() {
diff --git a/views/default/river/object/event_calendar/create.php b/views/default/river/object/event_calendar/create.php
index e74a8f891..515389411 100644
--- a/views/default/river/object/event_calendar/create.php
+++ b/views/default/river/object/event_calendar/create.php
@@ -1,22 +1,13 @@
<?php
-
- /*$performed_by = get_entity($vars['item']->subject_guid);
- $object = get_entity($vars['item']->object_guid);
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("event_calendar:river:created"),$url) . " ";
- $string .= elgg_echo("event_calendar:river:create")." <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";*/
-
/**
- * Event calendar river view.
+ * Event river view.
*/
+elgg_load_library('elgg:event_calendar');
+
$object = $vars['item']->getObjectEntity();
-$excerpt = strip_tags($object->description);
-$vars['excerpt'] = elgg_get_excerpt($excerpt);
-echo elgg_view('page/components/image_block', array(
- 'image' => '<img src="'.$vars['url'] . 'mod/event_calendar/images/event_icon.gif" />',
- 'body' => elgg_view('river/elements/body', $vars),
- 'class' => 'elgg-river-item',
-)); \ No newline at end of file
+echo elgg_view('river/elements/layout', array(
+ 'item' => $vars['item'],
+ 'message' => event_calendar_get_formatted_time($object),
+));
diff --git a/views/default/river/object/event_calendar/update.php b/views/default/river/object/event_calendar/update.php
index f4526cd2a..515389411 100644
--- a/views/default/river/object/event_calendar/update.php
+++ b/views/default/river/object/event_calendar/update.php
@@ -1,16 +1,13 @@
<?php
+/**
+ * Event river view.
+ */
+
+elgg_load_library('elgg:event_calendar');
- /*$performed_by = get_entity($vars['item']->subject_guid);
- $object = get_entity($vars['item']->object_guid);
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("event_calendar:river:updated"),$url) . " ";
- $string .= elgg_echo("event_calendar:river:the_event")." <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";*/
-
$object = $vars['item']->getObjectEntity();
-echo elgg_view('page/components/image_block', array(
- 'image' => '<img src="'.$vars['url'] . 'mod/event_calendar/images/event_icon.gif" />',
- 'body' => elgg_view('river/elements/body', $vars),
- 'class' => 'elgg-river-item',
+echo elgg_view('river/elements/layout', array(
+ 'item' => $vars['item'],
+ 'message' => event_calendar_get_formatted_time($object),
));