Change Plesk 9.3 Horde IMP mail list rows to be selectable
Posted by davidnewcomb on 06 Apr 2010 in Techie
The current version of Plesk 9.3 uses Horde 3.1.7/Imp 4.1.6 which is a little on the old side, but I’m pretty sure this change hasn’t made its way into the new version either.
One of the features of the current mailbox page is that when you select the checkbox it highlights the row. This is very nice, but from a user’s point of view the whole row should be a selectable object. Why should the user have to click the tiny area of the checkbox when the row spans the whole page.
So the problem is how can I make clicking on the row check or uncheck the checkbox.
The solution requires you to update the horde/imp sources so you must have access to them. It is also in an area of Plesk that will be overwritten by future Plesk updates.
First we must move the selectRow onClick operation from the checkbox to the row.
Go to :
/usr/share/psa-horde/imp/templates/mailbox
Edit: mailbox.html
Change table row element to:
<tr id="row<tag:messages.uid>" class="<tag :messages.bg>" onclick="selectRow(<tag :messages.uid>);">
and remove the onClick from the checkbox element changing it to:
<tag:overflow_begin><input id="check<tag:messages.uid />" type="checkbox" class="checkbox" name="indices[]" value="<tag :messages.uid><if :search_mbox><tag :idx_separator><tag :messages.mbox></tag></tag></if>" /><if :messages.status><tag :messages.uid>"><tag :messages.status></tag></tag></if><tag:overflow_end>
Next edit javascript.inc
and search for “function selectRow".
Change the if statement to:
if (rowOb.className.indexOf('selectedRow') != -1) {
rowOb.className = rowColors[rowId];
rowOb = document.getElementById('check' + rowId);
rowOb.checked = false;
} else {
rowColors[rowId] = rowOb.className;
rowOb.className = 'selectedRow';
rowOb = document.getElementById('check' + rowId);
rowOb.checked = true;
}
All done!No feedback yet
Form is loading...