diff --git a/plugins/calendar/drivers/database/database_driver.php b/plugins/calendar/drivers/database/database_driver.php index d0e6b7b8..3b833abd 100644 --- a/plugins/calendar/drivers/database/database_driver.php +++ b/plugins/calendar/drivers/database/database_driver.php @@ -138,7 +138,7 @@ class database_driver extends calendar_driver 'color' => $prefs['color'], 'showalarms' => (bool)$this->rc->config->get('calendar_birthdays_alarm_type'), 'active' => !in_array($id, $hidden), - 'class_name' => 'birthdays', + 'group' => 'birthdays', 'readonly' => true, 'default' => false, 'children' => false, diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index ff8372b1..81263393 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -149,7 +149,8 @@ class kolab_driver extends calendar_driver 'owner' => $cal->get_owner(), 'virtual' => false, 'readonly' => true, - 'class_name' => 'user', + 'group' => 'other', + 'class' => 'user', ); } else if ($cal->virtual) { @@ -160,6 +161,8 @@ class kolab_driver extends calendar_driver 'editname' => $cal->get_foldername(), 'virtual' => true, 'readonly' => true, + 'group' => $cal->get_namespace(), + 'class' => 'folder', ); } else { @@ -171,7 +174,7 @@ class kolab_driver extends calendar_driver 'color' => $cal->get_color(), 'readonly' => $cal->readonly, 'showalarms' => $cal->alarms, - 'class_name' => $cal->get_namespace(), + 'group' => $cal->get_namespace(), 'default' => $cal->default, 'active' => $cal->is_active(), 'owner' => $cal->get_owner(), @@ -198,7 +201,7 @@ class kolab_driver extends calendar_driver 'color' => $prefs[$id]['color'], 'active' => $prefs[$id]['active'], 'showalarms' => (bool)$this->rc->config->get('calendar_birthdays_alarm_type'), - 'class_name' => 'birthdays', + 'group' => 'birthdays', 'readonly' => true, 'default' => false, 'children' => false, diff --git a/plugins/calendar/drivers/kolab/kolab_user_calendar.php b/plugins/calendar/drivers/kolab/kolab_user_calendar.php index a41e0654..4cf3dabc 100644 --- a/plugins/calendar/drivers/kolab/kolab_user_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_user_calendar.php @@ -56,6 +56,7 @@ class kolab_user_calendar extends kolab_calendar $this->id = kolab_storage::folder_id($this->userdata['kolabtargetfolder'], true); $this->imap_folder = $this->userdata['kolabtargetfolder']; $this->name = $this->storage->get_name(); + $this->parent = ''; // user calendars are top level // user-specific alarms settings win $prefs = $this->cal->rc->config->get('kolab_calendars', array()); @@ -94,7 +95,7 @@ class kolab_user_calendar extends kolab_calendar */ public function get_namespace() { - return 'user'; + return 'other user'; } diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index 4d411947..74ea5d74 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -229,7 +229,7 @@ class calendar_ui if ($attrib['activeonly'] && !$prop['active']) continue; - $html .= html::tag('li', array('id' => 'rcmlical' . $id), + $html .= html::tag('li', array('id' => 'rcmlical' . $id, 'class' => $prop['group']), $content = $this->calendar_list_item($id, $prop, $jsenv) ); } @@ -260,7 +260,7 @@ class calendar_ui if (strlen($content)) { $out .= html::tag('li', array( 'id' => 'rcmlical' . rcube_utils::html_identifier($id), - 'class' => $prop['virtual'] ? 'virtual' : '', + 'class' => $prop['group'] . ($prop['virtual'] ? ' virtual' : ''), ), $content); } @@ -287,23 +287,23 @@ class calendar_ui $jsenv[$id] = $prop; } - $class = 'calendar cal-' . asciiwords($id, true); + $classes = array('calendar', 'cal-' . asciiwords($id, true)); $title = $prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ? html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : ''; $is_collapsed = false; // TODO: determine this somehow? if ($prop['virtual']) - $class = 'folder virtual'; + $classes[] = 'virtual'; else if ($prop['readonly']) - $class .= ' readonly'; + $classes[] = 'readonly'; if ($prop['subscribed']) - $class .= ' subscribed'; - if ($prop['class_name']) - $class .= ' '.$prop['class_name']; + $classes[] = ' subscribed'; + if ($prop['class']) + $classes[] = $prop['class']; $content = ''; if (!$attrib['activeonly'] || $prop['active']) { - $content = html::div($class, + $content = html::div(join(' ', $classes), html::span(array('class' => 'calname', 'title' => $title), $prop['editname'] ? Q($prop['editname']) : $prop['listname']) . ($prop['virtual'] ? '' : html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active']), '') . diff --git a/plugins/calendar/localization/en_US.inc b/plugins/calendar/localization/en_US.inc index 67675bfe..b92f377c 100644 --- a/plugins/calendar/localization/en_US.inc +++ b/plugins/calendar/localization/en_US.inc @@ -86,8 +86,9 @@ $labels['nmonthsback'] = '$nr months back'; $labels['showurl'] = 'Show calendar URL'; $labels['showurldescription'] = 'Use the following address to access (read only) your calendar from other applications. You can copy and paste this into any calendar software that supports the iCal format.'; $labels['caldavurldescription'] = 'Copy this address to a CalDAV client application (e.g. Evolution or Mozilla Thunderbird) to fully synchronize this specific calendar with your computer or mobile device.'; +$labels['findcalendars'] = 'Find calendars...'; $labels['calsearchresults'] = 'Available Calendars'; -$labels['calendarsubscribe'] = 'Listed permanently'; +$labels['calendarsubscribe'] = 'List permanently'; // agenda view $labels['listrange'] = 'Range to display:'; diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css index cca70e63..5ef63f7d 100644 --- a/plugins/calendar/skins/larry/calendar.css +++ b/plugins/calendar/skins/larry/calendar.css @@ -293,7 +293,7 @@ pre { background-position: right -20px; } -#calendars .treelist div.user span.calname { +#calendars .treelist li.user > div > span.calname { background-position: right -38px; } /* diff --git a/plugins/calendar/skins/larry/templates/calendar.html b/plugins/calendar/skins/larry/templates/calendar.html index 0842cf03..7f9f0afd 100644 --- a/plugins/calendar/skins/larry/templates/calendar.html +++ b/plugins/calendar/skins/larry/templates/calendar.html @@ -25,7 +25,7 @@