Been working a little more on this.
I have redone my patches in a little different way.
in select_row: function(id, mod_key, with_mouse)
change this.highlight_row(id, true)
to this.highlight_row(id, true,false,with_mouse);
That's so that my modified highlight_row can determine if a multiselect is being done with keyboard or mouse
highlight_row: function(id, multiple, norecur,with_mouse)
{
if (!this.rows[id])
return;
if (!multiple) {
if (this.selection.length > 1 || !this.in_selection(id)) {
this.clear_selection(null, true);
this.selection[0] = id;
$(this.rows[id].obj).addClass('selected').attr('aria-selected', 'true');
if (this.checkbox_selection)
{
//$('.selection > input', this.rows[id].obj).prop('checked', true);
}
}
}
else {
var n,pre, post, p = this.in_selection(id, true);
if (p === false) { // select row
this.selection.push(id);
$(this.rows[id].obj).addClass('selected').attr('aria-selected', 'true');
if (!norecur && !this.rows[id].expanded)
{
this.highlight_children(id, true);
}
//Multiselect mouse. Only the checked items should be highlighted
if (with_mouse)
{
for (n in this.rows)
{
if (!($('.selection > input', this.rows[n].obj).prop('checked')))
{
$(this.rows[n].obj).removeClass('selected').removeAttr('aria-selected');
}
}
}
else //Multiselect keyboard. Make sure all highlighted rows gets checked
{
for (n in this.selection)
{
$('.selection > input', this.rows[this.selection[n]].obj).prop('checked', true);
}
}
}
else { //handle the first row
if(p==0 && $('.selection > input', this.rows[id].obj).prop('checked')==true)
{
$(this.rows[id].obj).addClass('selected').attr('aria-selected', 'true');
}
else // unselect row
{
pre = this.selection.slice(0, p);
post = this.selection.slice(p+1, this.selection.length);
this.selection = pre.concat(post);
$(this.rows[id].obj).removeClass('selected').removeAttr('aria-selected');
if (this.checkbox_selection)
$('.selection > input', this.rows[id].obj).prop('checked', false);
if (!norecur && !this.rows[id].expanded)
this.highlight_children(id, false);
}
}
}
},
This makes checkboxes behave more like the other webmail clients.
I have also removed the function that makes the area around a checkbox act like it was a part of the checkbox.
If someone wants bigger checkboxes in the mail list i prefer a pure CSS fix for that. something like
div#messagelist-content.scroller .listing td.selection input[type=checkbox] {
transform: scale(1.5);
}
Remaining on the TODO-list.
A lot of testing.
Maybe make it a config option to use small or large checkboxes.
try to get RoundCube to load the message if there is only one message checked (and selected)
But it starts looking good in my eyes