diff --git a/plugins/tasklist/skins/larry/iehacks.css b/plugins/tasklist/skins/larry/iehacks.css new file mode 100644 index 00000000..9b51999f --- /dev/null +++ b/plugins/tasklist/skins/larry/iehacks.css @@ -0,0 +1,90 @@ +/** + * Roundcube Taklist plugin CSS hacks for IE < 9 + * + * Copyright (c) 2012, Kolab Systems AG + * + * The contents are subject to the Creative Commons Attribution-ShareAlike + * License. It is allowed to copy, distribute, transmit and to adapt the work + * by keeping credits to the original autors in the README file. + * See http://creativecommons.org/licenses/by-sa/3.0/ for details. + * + * $Id$ + */ + +#tasksview { + background: transparent; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff,endColorstr=#33ffffff); + zoom: 1; +} + +#tasksview .buttonbar { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dfdfdf', GradientType=0); +} + +html.ie #taskselector li .count:after { + bottom: -4px; +} + +#thelist .taskitem.dragging .taskhead { + filter: alpha(opacity=50); +} + +#thelist .taskhead.complete { + filter: alpha(opacity=60); +} + +#thelist .taskhead { + filter: progid:DXImageTransform.Microsoft.Shadow(color=#33666666,direction=180,strength=2); +} + +/*** Special hacks for IE7 only ***/ + +html.ie7 #taskselector li .count { + position: relative; + top: 0px; + left: 5px; +} + +html.ie7 #taskselector li.selected .count { + background: #d9ecf4; + color: #004458; +} + +html.ie7 #taskselector li.selected.overdue .count { + background: #ff3800; + color: #fff; +} + +html.ie7 #tagslist li, +html.ie7 #taskselector li { + float: left; +} + +html.ie7 .taskitem { + +} + +html.ie7 .taskhead .title { + position: relative; + top: -3px; +} + +html.ie7 .taskitem .childtoggle { + display: block; + /* workaround for text-indent which also offsets the background image */ + text-indent: 0; + font-size: 0; + line-height: 0; + text-align: right; + text-decoration: none; +} + +html.ie7 .taskhead .tags { + height: 18px; +} + +html.ie7 .taskhead .tags .tag { + display: inline-block; + padding-bottom: 2px; +} + diff --git a/plugins/tasklist/skins/larry/sprites.png b/plugins/tasklist/skins/larry/sprites.png index 8d82f774..5224f6f7 100644 Binary files a/plugins/tasklist/skins/larry/sprites.png and b/plugins/tasklist/skins/larry/sprites.png differ diff --git a/plugins/tasklist/skins/larry/tasklist.css b/plugins/tasklist/skins/larry/tasklist.css index dda3896a..747d367c 100644 --- a/plugins/tasklist/skins/larry/tasklist.css +++ b/plugins/tasklist/skins/larry/tasklist.css @@ -124,6 +124,7 @@ body.attachmentwin #topnav .topright { border-color: #003645; border-radius: 9px; text-shadow: none; + outline: none; } #taskselector li .count { @@ -373,6 +374,16 @@ body.attachmentwin #topnav .topright { font-size: 10px; color: #727272; cursor: pointer; + + width: 14px; + height: 14px; + background: url(sprites.png) -2px -80px no-repeat; + text-indent: -1000px; + overflow: hidden; +} + +.taskitem .childtoggle.collapsed { + background-position: -18px -81px; } .taskhead { @@ -478,6 +489,7 @@ body.attachmentwin #topnav .topright { outline: none; text-align: right; width: 6em; + font-size: 11px; } .taskhead .actions, @@ -556,7 +568,7 @@ ul.toolbarmenu li span.delete { font-size: 20px; color: #ccc; opacity: 0.92; - filter: alpha(opacity=92); + filter: alpha(opacity=90); text-shadow: 0px 1px 1px #333; } @@ -803,3 +815,26 @@ label.block { background: url(sprites.png) -2px -122px no-repeat; cursor: pointer; } + + +/** Special hacks for IE7 **/ +/** They need to be in this file to also affect the task-create dialog embedded in mail view **/ + +html.ie7 #taskedit-completeness-slider { + display: inline; +} + +html.ie7 .form-section span.tag-element, +html.ie7 .tagedit-list li.tagedit-listelement-old { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#edf6fa', endColorstr='#d6e9f3', GradientType=0); +} + +html.ie7 .tagedit-list li.tagedit-listelement span { + position: relative; + top: -3px; +} + +html.ie7 .tagedit-list li.tagedit-listelement-old a.tagedit-close { + left: 5px; +} + diff --git a/plugins/tasklist/skins/larry/templates/mainview.html b/plugins/tasklist/skins/larry/templates/mainview.html index fbc7d5c3..4b8b49af 100644 --- a/plugins/tasklist/skins/larry/templates/mainview.html +++ b/plugins/tasklist/skins/larry/templates/mainview.html @@ -3,6 +3,7 @@ <roundcube:object name="pagetitle" /> + diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js index 0b394944..aaa017d0 100644 --- a/plugins/tasklist/tasklist.js +++ b/plugins/tasklist/tasklist.js @@ -158,7 +158,7 @@ function rcube_tasklist_ui(settings) // clear form this.reset(); return false; - }); + }).find('input[type=text]').placeholder(rcmail.gettext('createnewtask','tasklist')); // click-handler on tags list $(rcmail.gui_objects.tagslist).click(function(e){ @@ -169,7 +169,7 @@ function rcube_tasklist_ui(settings) tag = item.data('value'); // reset selection on regular clicks - var index = tagsfilter.indexOf(tag); + var index = $.inArray(tag, tagsfilter); var shift = e.shiftKey || e.ctrlKey || e.metaKey; if (!shift) { @@ -193,6 +193,10 @@ function rcube_tasklist_ui(settings) list_tasks(); + // clear text selection in IE after shift+click + if (shift && document.selection) + document.selection.empty(); + e.preventDefault(); return false; }) @@ -254,7 +258,7 @@ function rcube_tasklist_ui(settings) } input.datepicker('destroy').remove(); link.html(dateText || rcmail.gettext('nodate','tasklist')); - }, + } }, extended_datepicker_settings) ) .datepicker('setDate', rec.date) @@ -320,7 +324,7 @@ function rcube_tasklist_ui(settings) $(input).datepicker('setDate', null).datepicker('hide'); }); }, 1); - }, + } }, datepicker_settings); } @@ -490,7 +494,7 @@ function rcube_tasklist_ui(settings) // find new tags var newtags = []; for (var i=0; i < taglist.length; i++) { - if (tags.indexOf(taglist[i]) < 0) + if ($.inArray(taglist[i], tags) < 0) newtags.push(taglist[i]); } tags = tags.concat(newtags); @@ -540,7 +544,7 @@ function rcube_tasklist_ui(settings) var id = rec.id, oldid = rec.tempid || id, - oldindex = listindex.indexOf(oldid), + oldindex = $.inArray(oldid, listindex), list = me.tasklists[rec.list]; if (oldindex >= 0) @@ -551,7 +555,7 @@ function rcube_tasklist_ui(settings) listdata[id] = rec; // register a forward-pointer to child tasks - if (rec.parent_id && listdata[rec.parent_id] && listdata[rec.parent_id].children && listdata[rec.parent_id].children.indexOf(id) >= 0) + if (rec.parent_id && listdata[rec.parent_id] && listdata[rec.parent_id].children && $.inArray(id, listdata[rec.parent_id].children) >= 0) listdata[rec.parent_id].children.push(id); if (list.active) @@ -676,7 +680,7 @@ function rcube_tasklist_ui(settings) // remove from list index var oldlist = listindex.join('%%%'); - var oldindex = listindex.indexOf(rec.id); + var oldindex = $.inArray(rec.id, listindex); if (oldindex >= 0) { slice = listindex.slice(0,oldindex); listindex = slice.concat(listindex.slice(oldindex+1)); @@ -704,7 +708,7 @@ function rcube_tasklist_ui(settings) } }); - index = listindex.indexOf(next_id); + index = $.inArray(next_id, listindex); if (next_li) { if (animated) insert_animated(li, null, next_li); @@ -1297,7 +1301,7 @@ function rcube_tasklist_ui(settings) if (match && tagsfilter.length) { match = rec.tags && rec.tags.length; for (var i=0; match && i < tagsfilter.length; i++) { - if (rec.tags.indexOf(tagsfilter[i]) < 0) + if ($.inArray(tagsfilter[i], rec.tags) < 0) match = false; } } diff --git a/plugins/tasklist/tasklist_ui.php b/plugins/tasklist/tasklist_ui.php index cd91c765..0a9f3f1f 100644 --- a/plugins/tasklist/tasklist_ui.php +++ b/plugins/tasklist/tasklist_ui.php @@ -181,7 +181,7 @@ class tasklist_ui { $attrib += array('action' => $this->rc->url('add'), 'method' => 'post', 'id' => 'quickaddform'); - $input = new html_inputfield(array('name' => 'text', 'id' => 'quickaddinput', 'placeholder' => $this->plugin->gettext('createnewtask'))); + $input = new html_inputfield(array('name' => 'text', 'id' => 'quickaddinput')); $button = html::tag('input', array('type' => 'submit', 'value' => '+', 'class' => 'button mainaction')); $this->rc->output->add_gui_object('quickaddform', $attrib['id']);