summaryrefslogtreecommitdiff
path: root/plugins/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/calendar')
-rw-r--r--plugins/calendar/calendar_ui.js5
-rw-r--r--plugins/calendar/lib/calendar_ui.php7
-rw-r--r--plugins/calendar/localization/en_US.inc2
-rw-r--r--plugins/calendar/skins/larry/calendar.css71
-rw-r--r--plugins/calendar/skins/larry/images/calendars.pngbin3664 -> 5798 bytes
-rw-r--r--plugins/calendar/skins/larry/templates/calendar.html2
6 files changed, 63 insertions, 24 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index ef40938..381e7e8 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -3411,6 +3411,11 @@ function rcube_calendar_ui(settings)
rcmail.http_post('calendar', { action:'subscribe', c:{ id:p.id, active:cal.active?1:0, permanent:cal.subscribed?1:0 } });
}
});
+ calendars_list.addEventListener('remove', function(p) {
+ if (me.calendars[p.id] && me.calendars[p.id].removable) {
+ me.calendar_remove(me.calendars[p.id]);
+ }
+ });
calendars_list.addEventListener('search-complete', function(data) {
if (data.length)
rcmail.display_message(rcmail.gettext('nrcalendarsfound','calendar').replace('$nr', data.length), 'voice');
diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php
index 2693642..f80cce1 100644
--- a/plugins/calendar/lib/calendar_ui.php
+++ b/plugins/calendar/lib/calendar_ui.php
@@ -310,8 +310,11 @@ class calendar_ui
html::span(array('class' => 'calname', 'id' => $label_id, 'title' => $title), $prop['editname'] ? Q($prop['editname']) : $prop['listname']) .
($prop['virtual'] ? '' :
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id), '') .
- html::a(array('href' => '#', 'class' => 'quickview', 'title' => $this->cal->gettext('quickview'), 'role' => 'button'), '') .
- (isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->cal->gettext('calendarsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '') .
+ html::span('actions',
+ ($prop['removable'] ? html::a(array('href' => '#', 'class' => 'remove', 'title' => $this->cal->gettext('removelist')), ' ') : '') .
+ html::a(array('href' => '#', 'class' => 'quickview', 'title' => $this->cal->gettext('quickview'), 'role' => 'button'), '') .
+ (isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->cal->gettext('calendarsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '')
+ ) .
html::span(array('class' => 'handle', 'style' => "background-color: #" . ($prop['color'] ?: 'f00')), ' ')
)
);
diff --git a/plugins/calendar/localization/en_US.inc b/plugins/calendar/localization/en_US.inc
index 6023366..76fbcee 100644
--- a/plugins/calendar/localization/en_US.inc
+++ b/plugins/calendar/localization/en_US.inc
@@ -51,7 +51,7 @@ $labels['new_event'] = 'New event';
$labels['edit_event'] = 'Edit event';
$labels['edit'] = 'Edit';
$labels['save'] = 'Save';
-$labels['remove'] = 'Remove';
+$labels['removelist'] = 'Remove from list';
$labels['cancel'] = 'Cancel';
$labels['select'] = 'Select';
$labels['print'] = 'Print';
diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css
index e33f01a..54e0141 100644
--- a/plugins/calendar/skins/larry/calendar.css
+++ b/plugins/calendar/skins/larry/calendar.css
@@ -218,7 +218,7 @@ pre {
position: absolute;
top: 7px;
left: 38px;
- right: 60px;
+ right: 45px;
cursor: default;
background: url(images/calendars.png) right 20px no-repeat;
overflow: hidden;
@@ -259,11 +259,36 @@ pre {
box-shadow: inset 0px 0 1px 1px rgba(0, 0, 0, 0.3);
}
+#calendars .treelist div span.actions {
+ display: inline-block;
+ position: absolute;
+ top: 2px;
+ right: 22px;
+ padding: 5px 20px 0 6px;
+ min-width: 40px;
+ height: 19px;
+ text-align: right;
+}
+
+#calendars .treelist div:hover span.actions {
+ top: 1px;
+ right: 21px;
+ border: 1px solid #c6c6c6;
+ border-radius: 4px;
+ background: #f7f7f7;
+ background: -moz-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f9f9f9), color-stop(100%,#e6e6e6));
+ background: -o-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
+ background: -ms-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
+ background: linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e6e6e6', GradientType=0);
+}
+
#calendars .treelist li a.subscribed {
display: inline-block;
position: absolute;
- top: 7px;
- right: 24px;
+ top: 5px;
+ right: 3px;
height: 16px;
width: 16px;
padding: 0;
@@ -273,14 +298,8 @@ pre {
cursor: pointer;
}
-#calendars .treelist div > a.quickview:focus,
-#calendars .treelist div > a.subscribed:focus {
- border-radius: 3px;
- outline: 2px solid rgba(30,150,192, 0.5);
-}
-
-#calendars .treelist div:hover > a.subscribed,
-#calendars .treelist div > a.subscribed:focus {
+#calendars .treelist div:hover a.subscribed,
+#calendars .treelist div a.subscribed:focus {
background-position: 0 -110px;
}
@@ -294,13 +313,19 @@ pre {
background-position: -16px -148px;
}
-#calendars .treelist li a.quickview {
+#calendars .treelist div a.remove:focus,
+#calendars .treelist div a.quickview:focus,
+#calendars .treelist div a.subscribed:focus {
+ border-radius: 3px;
+ outline: 2px solid rgba(30,150,192, 0.5);
+}
+
+#calendars .treelist div a.remove,
+#calendars .treelist div a.quickview {
display: inline-block;
- position: absolute;
- top: 6px;
- right: 42px;
width: 16px;
height: 16px;
+ margin-right: 4px;
padding: 0;
background: url(images/calendars.png) -100px 0 no-repeat;
overflow: hidden;
@@ -308,14 +333,20 @@ pre {
cursor: pointer;
}
-#calendars .treelist div > a.quickview:focus,
-#calendars .treelist li div:hover > a.quickview {
- background-position: 0 -128px;
+#calendars .treelist div a.quickview:focus,
+#calendars .treelist div:hover a.quickview {
+ background-position: 0 -148px;
+ background-color: transparent !important;
+}
+
+#calendars .treelist div a.remove:focus,
+#calendars .treelist div:hover a.remove {
+ background-position: -16px -168px;
background-color: transparent !important;
}
-#calendars .treelist li div.focusview > a.quickview {
- background-position: -18px -128px;
+#calendars .searchresults .treelist div a.remove {
+ display: none;
}
#calendars .treelist li input {
diff --git a/plugins/calendar/skins/larry/images/calendars.png b/plugins/calendar/skins/larry/images/calendars.png
index 88eba63..17e259a 100644
--- a/plugins/calendar/skins/larry/images/calendars.png
+++ b/plugins/calendar/skins/larry/images/calendars.png
Binary files differ
diff --git a/plugins/calendar/skins/larry/templates/calendar.html b/plugins/calendar/skins/larry/templates/calendar.html
index 1df1748..72e86c7 100644
--- a/plugins/calendar/skins/larry/templates/calendar.html
+++ b/plugins/calendar/skins/larry/templates/calendar.html
@@ -71,7 +71,7 @@
<li role="menuitem"><roundcube:button command="calendar-edit" label="calendar.edit" classAct="active" /></li>
<li role="menuitem"><roundcube:button command="calendar-delete" label="delete" classAct="active" /></li>
<roundcube:if condition="env:calendar_driver == 'kolab'" />
- <li role="menuitem"><roundcube:button command="calendar-remove" label="calendar.remove" classAct="active" /></li>
+ <li role="menuitem"><roundcube:button command="calendar-remove" label="calendar.removelist" classAct="active" /></li>
<roundcube:endif />
<li role="menuitem"><roundcube:button command="calendar-showurl" label="calendar.showurl" classAct="active" /></li>
<roundcube:if condition="env:calendar_driver == 'kolab'" />