[imp] Highlighting Clicked Rows

D. Patrick Caldwell tncbbthositg at gmail.com
Thu Jun 29 09:47:35 PDT 2006


Hello folks,

     I'm not certain this is the right place to talk about this, but I wanna
throw this out there.  I use horde imp to access mail on my server.  I got
tired of having to click the checkboxes to highlight rows so I wrote a
little bookmarklet that adds an onclick event to each row.  It seems that
this would be a reasonable feature to be added to the horde IMP
distrobution.  I, however, don't know how to go about making that
recommendation.  You can find the horde bookmarklet (works in firefox) at
http://scripts.pcdesigns.net.  Here's the code:

function()
{
  var myMessages = top.frames[1].document.forms['messages'];
  for (var i = 0; i < myMessages.elements.length; i++)
  {
    var myBox = myMessages.elements[i];
    if (myBox.name == 'indices[]')
    {
      myBox.parentNode.parentNode.onclick =
        new Function
        (
          "var myCheckbox = 'check" + myBox.value + "';"
          + "myCheckbox = top.frames
[1].document.getElementById(myCheckbox);"
          + "myCheckbox.checked =! myCheckbox.checked;"
          + "myCheckbox.onclick();"
        );

    }
  }
}

It wouldn't be implemented exactly like that in IMP.  In fact, it'd be much
easier and much more reliable on most browsers if we used a regex to get the
msgbox name from the row id (i wrote this a while ago so I forgot exactly
how the HTML comes out.

Any thoughts?

Thanks so much,
Patrick


More information about the imp mailing list