summaryrefslogtreecommitdiff
path: root/plugins/tasklist
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tasklist')
-rw-r--r--plugins/tasklist/localization/en_US.inc2
-rw-r--r--plugins/tasklist/skins/larry/sprites.pngbin6500 -> 5169 bytes
-rw-r--r--plugins/tasklist/skins/larry/tasklist.css66
-rw-r--r--plugins/tasklist/tasklist.js5
-rw-r--r--plugins/tasklist/tasklist_ui.php9
5 files changed, 58 insertions, 24 deletions
diff --git a/plugins/tasklist/localization/en_US.inc b/plugins/tasklist/localization/en_US.inc
index 288bd71..7275995 100644
--- a/plugins/tasklist/localization/en_US.inc
+++ b/plugins/tasklist/localization/en_US.inc
@@ -19,7 +19,7 @@ $labels['findlists'] = 'Find tasklists...';
$labels['searchterms'] = 'Search terms';
$labels['notasklistsfound'] = 'No tasklists found';
$labels['nrtasklistsfound'] = '$nr tasklists found';
-$labels['removelist'] = 'Remove';
+$labels['removelist'] = 'Remove from list';
$labels['newtask'] = 'New Task';
$labels['createtask'] = 'Create Task <Enter>';
diff --git a/plugins/tasklist/skins/larry/sprites.png b/plugins/tasklist/skins/larry/sprites.png
index fecbd58..36b48f5 100644
--- a/plugins/tasklist/skins/larry/sprites.png
+++ b/plugins/tasklist/skins/larry/sprites.png
Binary files differ
diff --git a/plugins/tasklist/skins/larry/tasklist.css b/plugins/tasklist/skins/larry/tasklist.css
index 246fea6..2b88c95 100644
--- a/plugins/tasklist/skins/larry/tasklist.css
+++ b/plugins/tasklist/skins/larry/tasklist.css
@@ -302,36 +302,54 @@ body.tasklist.attachmentwin #mainscreen {
background: url(sprites.png) right 20px no-repeat;
}
-#tasklistsbox .treelist li a.quickview {
+#tasklistsbox .treelist div span.actions {
display: inline-block;
position: absolute;
- top: 6px;
- right: 24px;
+ top: 2px;
+ right: 2px;
+ padding: 5px 20px 0 6px;
+ min-width: 40px;
+ height: 19px;
+ text-align: right;
+}
+
+#tasklistsbox .treelist div:hover span.actions {
+ top: 1px;
+ right: 1px;
+ 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);
+}
+
+#tasklistsbox .treelist div a.remove,
+#tasklistsbox .treelist div a.quickview,
+#tasklistsbox .treelist div a.subscribed {
+ display: inline-block;
width: 16px;
height: 16px;
padding: 0;
+ margin-right: 4px;
background: url(sprites.png) -200px 0 no-repeat;
overflow: hidden;
text-indent: -5000px;
cursor: pointer;
}
-#tasklistsbox .treelist li a.subscribed {
- display: inline-block;
+#tasklistsbox .treelist div a.subscribed {
position: absolute;
- top: 6px;
- right: 5px;
- height: 16px;
- width: 16px;
- padding: 0;
- background: url(sprites.png) -100px 0 no-repeat;
- overflow: hidden;
- text-indent: -5000px;
- cursor: pointer;
+ top: 5px;
+ right: 4px;
+ margin: 0;
}
-#tasklistsbox .treelist div > a.subscribed:focus,
-#tasklistsbox .treelist div:hover > a.subscribed {
+#tasklistsbox .treelist div a.subscribed:focus,
+#tasklistsbox .treelist div:hover a.subscribed {
background-position: -2px -215px;
}
@@ -339,20 +357,28 @@ body.tasklist.attachmentwin #mainscreen {
background-position: -20px -215px;
}
-#tasklistsbox .treelist div > a.quickview:focus,
-#tasklistsbox .treelist li div:hover > a.quickview {
+#tasklistsbox .treelist div a.quickview:focus,
+#tasklistsbox .treelist div:hover a.quickview {
background-position: -20px -101px;
background-color: transparent !important;
}
-#tasklistsbox .treelist li div.focusview > a.quickview {
+#tasklistsbox .treelist div a.remove:focus,
+#tasklistsbox .treelist div:hover a.remove {
+ background-position: -2px -371px;
+ background-color: transparent !important;
+}
+
+#tasklistsbox .treelist div.focusview a.quickview {
background-position: -2px -101px;
}
-#tasklistsbox .searchresults .treelist li a.quickview {
+#tasklistsbox .searchresults .treelist div a.remove,
+#tasklistsbox .searchresults .treelist div a.quickview {
display: none;
}
+#tasklistsbox .treelist div a.remove:focus,
#tasklistsbox .treelist div a.quickview:focus,
#tasklistsbox .treelist div a.subscribed:focus {
border-radius: 3px;
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 7743b84..218b8db 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -166,6 +166,11 @@ function rcube_tasklist_ui(settings)
rcmail.http_post('tasklist', { action:'subscribe', l:{ id:p.id, active:list.active?1:0, permanent:list.subscribed?1:0 } });
}
});
+ tasklists_widget.addEventListener('remove', function(p) {
+ if (me.tasklists[p.id] && me.tasklists[p.id].removable) {
+ list_remove(p.id);
+ }
+ });
tasklists_widget.addEventListener('insert-item', function(p) {
var list = p.data;
if (list && list.id && !list.virtual) {
diff --git a/plugins/tasklist/tasklist_ui.php b/plugins/tasklist/tasklist_ui.php
index 8d4170a..b7bb4d4 100644
--- a/plugins/tasklist/tasklist_ui.php
+++ b/plugins/tasklist/tasklist_ui.php
@@ -248,9 +248,12 @@ class tasklist_ui
return html::div(join(' ', $classes),
html::span(array('class' => 'listname', 'title' => $title, 'id' => $label_id), $prop['listname'] ?: $prop['name']) .
($prop['virtual'] ? '' :
- html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id)) .
- html::a(array('href' => '#', 'class' => 'quickview', 'title' => $this->plugin->gettext('focusview'), 'role' => 'checkbox', 'aria-checked' => 'false'), ' ') .
- (isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->plugin->gettext('tasklistsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '')
+ html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id)) .
+ html::span('actions',
+ ($prop['removable'] ? html::a(array('href' => '#', 'class' => 'remove', 'title' => $this->plugin->gettext('removelist')), ' ') : '') .
+ html::a(array('href' => '#', 'class' => 'quickview', 'title' => $this->plugin->gettext('focusview'), 'role' => 'checkbox', 'aria-checked' => 'false'), ' ') .
+ (isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->plugin->gettext('tasklistsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '')
+ )
)
);
}