aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--models/model.php11
-rw-r--r--views/default/event_calendar/css.php4
-rw-r--r--views/default/js/event_calendar/event_calendar.php5
3 files changed, 16 insertions, 4 deletions
diff --git a/models/model.php b/models/model.php
index 69961969c..e7f823d4c 100644
--- a/models/model.php
+++ b/models/model.php
@@ -1519,13 +1519,22 @@ function event_calendar_get_page_content_list($page_type,$container_guid,$start_
'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='') {
diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php
index c1dbf4633..9ef2ecfa1 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;
diff --git a/views/default/js/event_calendar/event_calendar.php b/views/default/js/event_calendar/event_calendar.php
index 65c4d2952..6150feb79 100644
--- a/views/default/js/event_calendar/event_calendar.php
+++ b/views/default/js/event_calendar/event_calendar.php
@@ -96,9 +96,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() {