Some tweaks to make tasklist work in IE<9

This commit is contained in:
Thomas Bruederli 2012-10-18 12:23:17 +02:00
parent 81fdc1642a
commit e059785d00
6 changed files with 142 additions and 12 deletions

View file

@ -0,0 +1,90 @@
/**
* Roundcube Taklist plugin CSS hacks for IE < 9
*
* Copyright (c) 2012, Kolab Systems AG <contact@kolabsys.com>
*
* 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;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -124,6 +124,7 @@ body.attachmentwin #topnav .topright {
border-color: #003645; border-color: #003645;
border-radius: 9px; border-radius: 9px;
text-shadow: none; text-shadow: none;
outline: none;
} }
#taskselector li .count { #taskselector li .count {
@ -373,6 +374,16 @@ body.attachmentwin #topnav .topright {
font-size: 10px; font-size: 10px;
color: #727272; color: #727272;
cursor: pointer; 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 { .taskhead {
@ -478,6 +489,7 @@ body.attachmentwin #topnav .topright {
outline: none; outline: none;
text-align: right; text-align: right;
width: 6em; width: 6em;
font-size: 11px;
} }
.taskhead .actions, .taskhead .actions,
@ -556,7 +568,7 @@ ul.toolbarmenu li span.delete {
font-size: 20px; font-size: 20px;
color: #ccc; color: #ccc;
opacity: 0.92; opacity: 0.92;
filter: alpha(opacity=92); filter: alpha(opacity=90);
text-shadow: 0px 1px 1px #333; text-shadow: 0px 1px 1px #333;
} }
@ -803,3 +815,26 @@ label.block {
background: url(sprites.png) -2px -122px no-repeat; background: url(sprites.png) -2px -122px no-repeat;
cursor: pointer; 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;
}

View file

@ -3,6 +3,7 @@
<head> <head>
<title><roundcube:object name="pagetitle" /></title> <title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" /> <roundcube:include file="/includes/links.html" />
<!--[if lte IE 8]><link rel="stylesheet" type="text/css" href="./plugins/tasklist/skins/larry/iehacks.css" /><![endif]-->
</head> </head>
<body class="tasklistview noscroll"> <body class="tasklistview noscroll">

View file

@ -158,7 +158,7 @@ function rcube_tasklist_ui(settings)
// clear form // clear form
this.reset(); this.reset();
return false; return false;
}); }).find('input[type=text]').placeholder(rcmail.gettext('createnewtask','tasklist'));
// click-handler on tags list // click-handler on tags list
$(rcmail.gui_objects.tagslist).click(function(e){ $(rcmail.gui_objects.tagslist).click(function(e){
@ -169,7 +169,7 @@ function rcube_tasklist_ui(settings)
tag = item.data('value'); tag = item.data('value');
// reset selection on regular clicks // reset selection on regular clicks
var index = tagsfilter.indexOf(tag); var index = $.inArray(tag, tagsfilter);
var shift = e.shiftKey || e.ctrlKey || e.metaKey; var shift = e.shiftKey || e.ctrlKey || e.metaKey;
if (!shift) { if (!shift) {
@ -193,6 +193,10 @@ function rcube_tasklist_ui(settings)
list_tasks(); list_tasks();
// clear text selection in IE after shift+click
if (shift && document.selection)
document.selection.empty();
e.preventDefault(); e.preventDefault();
return false; return false;
}) })
@ -254,7 +258,7 @@ function rcube_tasklist_ui(settings)
} }
input.datepicker('destroy').remove(); input.datepicker('destroy').remove();
link.html(dateText || rcmail.gettext('nodate','tasklist')); link.html(dateText || rcmail.gettext('nodate','tasklist'));
}, }
}, extended_datepicker_settings) }, extended_datepicker_settings)
) )
.datepicker('setDate', rec.date) .datepicker('setDate', rec.date)
@ -320,7 +324,7 @@ function rcube_tasklist_ui(settings)
$(input).datepicker('setDate', null).datepicker('hide'); $(input).datepicker('setDate', null).datepicker('hide');
}); });
}, 1); }, 1);
}, }
}, datepicker_settings); }, datepicker_settings);
} }
@ -490,7 +494,7 @@ function rcube_tasklist_ui(settings)
// find new tags // find new tags
var newtags = []; var newtags = [];
for (var i=0; i < taglist.length; i++) { for (var i=0; i < taglist.length; i++) {
if (tags.indexOf(taglist[i]) < 0) if ($.inArray(taglist[i], tags) < 0)
newtags.push(taglist[i]); newtags.push(taglist[i]);
} }
tags = tags.concat(newtags); tags = tags.concat(newtags);
@ -540,7 +544,7 @@ function rcube_tasklist_ui(settings)
var id = rec.id, var id = rec.id,
oldid = rec.tempid || id, oldid = rec.tempid || id,
oldindex = listindex.indexOf(oldid), oldindex = $.inArray(oldid, listindex),
list = me.tasklists[rec.list]; list = me.tasklists[rec.list];
if (oldindex >= 0) if (oldindex >= 0)
@ -551,7 +555,7 @@ function rcube_tasklist_ui(settings)
listdata[id] = rec; listdata[id] = rec;
// register a forward-pointer to child tasks // 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); listdata[rec.parent_id].children.push(id);
if (list.active) if (list.active)
@ -676,7 +680,7 @@ function rcube_tasklist_ui(settings)
// remove from list index // remove from list index
var oldlist = listindex.join('%%%'); var oldlist = listindex.join('%%%');
var oldindex = listindex.indexOf(rec.id); var oldindex = $.inArray(rec.id, listindex);
if (oldindex >= 0) { if (oldindex >= 0) {
slice = listindex.slice(0,oldindex); slice = listindex.slice(0,oldindex);
listindex = slice.concat(listindex.slice(oldindex+1)); 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 (next_li) {
if (animated) insert_animated(li, null, next_li); if (animated) insert_animated(li, null, next_li);
@ -1297,7 +1301,7 @@ function rcube_tasklist_ui(settings)
if (match && tagsfilter.length) { if (match && tagsfilter.length) {
match = rec.tags && rec.tags.length; match = rec.tags && rec.tags.length;
for (var i=0; match && i < tagsfilter.length; i++) { 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; match = false;
} }
} }

View file

@ -181,7 +181,7 @@ class tasklist_ui
{ {
$attrib += array('action' => $this->rc->url('add'), 'method' => 'post', 'id' => 'quickaddform'); $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')); $button = html::tag('input', array('type' => 'submit', 'value' => '+', 'class' => 'button mainaction'));
$this->rc->output->add_gui_object('quickaddform', $attrib['id']); $this->rc->output->add_gui_object('quickaddform', $attrib['id']);