On Jun 9, 2004, at 13:39, David Hajek wrote:
Hi,
is there some easy way to change the position of "Send" button when creating
new message? I find that users has to scroll down the page, because the send
button is very on the bottom.
I look quickly into the sqwebmail HTML files and could not find it - seems
like it is hardcoded?
Thanks.
Regards, David
If you're willing to recompile... Yes.
(Well... Assuming you define "easy" the way I do, that is.)
In the newmsg.html source you find:
<form method="post" name="msg" action="[#p#]">
[#P#][#W#]</form>
Which (if you look around in sqwebmail.c) leads you to this:
else if (strcmp(kw, "W") == 0)
{
newmsg_init(sqwebmail_folder, cgi("pos"));
}
...and then the end is in sight in my courier-0.45.4.20040419 source, around lines 683-694 of 'newmsg.c', inside the newmsg_init function:
printf("<tr><td colspan=\"2\"> </td><td>");
printf("<input type=\"submit\" name=\"previewmsg\" value=\"%s\" />",
previewlab);
printf("<input type=\"submit\" name=\"sendmsg\" value=\"%s\" />",
sendlab);
printf("<input type=\"submit\" name=\"savedraft\" value=\"%s\" />",
savedraft);
#ifdef ISPELL
printf("<input type=\"submit\" name=\"startspellchk\" value=\"%s\" />",
checkspelling);
#endif
printf("</td></tr>\n");
Take all of that and put it higher up in the output stream (probably a *COPY* of it is a good idea, so users who are already used to scrolling aren't confused by it disappearing from the end after your change!) ... say around lines 591-595, between the HR tag and the message content:
printf("<tr><td colspan=\"3\"><hr width=\"100%%\" /></td></tr>"); [-- HERE-PERHAPS --] printf("<tr><th valign=\"top\" align=\"right\">" "<p class=\"new-message-header\">" "<span class=\"new-message-header-message\">" "%s</span></p></th><td width=\"6\"> </td>", messagelab);
printf("<td><textarea name=\"message\" cols=\"%d\" rows=\"15\" wrap=\"soft\">",
MYLINESIZE);
... or below the content, but right before the attachments button -- where it might still be far enough down the page that you don't need a second copy of the buttons, and could just move the code. I.e. Right around lines 630-633 -- but again that's in my slightly older 0.45.4-20040419 build of Courier:
if (draftmessage) free(draftmessage);
printf("</td></tr>\n");
[-- HERE-MAYBE --]
printf("<tr><td><p> </p></td><td> </td><td><input type=\"submit\" name=\"doattachments\" value=\"");
Anyway... I have *NOT* tried compiling such a change, but I think those are both clean places to insert (or move) the submit buttons in the code. -- But keep a copy of 'newmsg.c' in case I'm wrong, or in case you screw up the copy-n-paste or something like that. =)
HTH!
-jab
smime.p7s
Description: S/MIME cryptographic signature
