+ mouse over tag of task with Ctrl (Cmd) pressed will shade the tasks with selected tag

This commit is contained in:
Max Pozdeev 2010-08-18 22:45:29 +04:00
parent 4073c51250
commit da768d6cf4
2 changed files with 6 additions and 3 deletions

View file

@ -302,10 +302,13 @@ var mytinytodo = window.mytinytodo = _mtt = {
$('#tasklist .tag').live('mouseover mouseout', function(event){
var cl = 'tag-id-' + $(this).attr('tagid');
if(event.type == 'mouseover') _mtt.timers.previewtag = setTimeout( function(){$('#tasklist li:not(.'+cl+')').addClass('not-preview-tag');}, 500);
var sel = (event.metaKey || event.ctrlKey) ? 'li.'+cl : 'li:not(.'+cl+')';
if(event.type == 'mouseover') {
_mtt.timers.previewtag = setTimeout( function(){$('#tasklist '+sel).addClass('not-in-tagpreview');}, 700);
}
else {
clearTimeout(_mtt.timers.previewtag);
$('#tasklist li:not(.'+cl+')').removeClass('not-preview-tag');
$('#tasklist li').removeClass('not-in-tagpreview');
}
});

View file

@ -169,7 +169,7 @@ li.task-completed .task-title a { color:#777777; }
#tasklist li.task-completed .duedate { color:#777777; border-color:#777777; }
li.task-completed { opacity:0.8; }
li.task-completed .task-toggle { opacity:0.8; }
li.not-preview-tag { opacity:0.1; }
li.not-in-tagpreview { opacity:0.1; }
a.taskactionbtn { display:block; float:right; height:15px; width:15px; text-decoration:none; background:url(images/icons.gif) 0 0 no-repeat; }
li:hover a.taskactionbtn, a.taskactionbtn.mtt-menu-button-active { background-position:-16px 0; }