Art Cancro [Wed, 27 Dec 2023 18:53:52 +0000 (13:53 -0500)]
calendar_view.c (from webcit-classic) : clean up
Style and comments cleanup. Some of this code is going to get
copied over to WebCit-NG so we need to bring it up to our current
coding standards (K&R, 1TBF, with C99-style comments)
Art Cancro [Fri, 22 Dec 2023 16:10:14 +0000 (11:10 -0500)]
room_functions.c: get_msglist() now returns Array
Previously it returned a long* which contained a list of longs.
Assembling this required the same allocation logic used in our
array class, so now we're just using the array class.
Art Cancro [Mon, 18 Dec 2023 19:26:30 +0000 (14:26 -0500)]
When forwarding an email, pre-load its attachments.
This completes the effort to server-side-preload the attachments from
the original message. They appear as attachments in the forwarded copy
of the message in the composer, using the same API. A lot of effort
went into making the 'attach' and 'forward attachments' functions DRY
with respect to each other.
Art Cancro [Thu, 14 Dec 2023 16:30:52 +0000 (11:30 -0500)]
upload.c: completed the code to reload attachments.
Now we have an API call to load attachments from existing messages
instead of from the browser. This is the server side API. Still need
to integrate it into the client.
Art Cancro [Wed, 13 Dec 2023 03:15:17 +0000 (22:15 -0500)]
view_mail.js: more improvements to mail forwarding
* "Fwd:" instead of "Re:"
* The "--- forwarded message ---" po string is carried over from webcit-classic
* Make the editor aware that a message is being forwarded
* TODO: load attachments from the message being forwarded
Art Cancro [Wed, 29 Nov 2023 21:32:02 +0000 (11:32 -1000)]
Fixing the parameters sent to the mail composer.
Reply/ReplyAll/Forward need some things that are not strings
and the source arrays seem to still be in scope, so we go with
that. Need to tune this up some more. Some things are still
missing, such as the references and reply msgnum.
Art Cancro [Tue, 21 Nov 2023 00:00:13 +0000 (19:00 -0500)]
upload.js: when removing an attachment, delete the div
This is handled the usual way, when we get a successful response from
the HTTP DELETE method, it triggers the removal of the list element
showing the attachment.
Art Cancro [Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)]
Fixed the MIME boundary after the message text.
It had the trailing dashes in it, so it was getting interpreted as the end of the message.
Now that's corrected and the parsers of the world are happy.
Also, we eliminated the double-nesting thing, and everything is hunky dory now.
Art Cancro [Mon, 6 Nov 2023 21:56:55 +0000 (16:56 -0500)]
webcit-ng: fixed the way HTTP uploads are fed into the MIME Parser.
mime_parser() expects HEADERS+CONTENT but our h.request_body only contains CONTENT.
The fix: our transaction struct now has h.request_body_with_synth_headers that
begins with a synthetic Content-Type: header followed by a blank line and then the
request body. h.request_body is now just a pointer into that buffer, starting at
the position where the actual body begins.
This gives us the ability to supply the body with or without headers, without having
to make two copies of it.
Art Cancro [Fri, 3 Nov 2023 04:13:46 +0000 (19:13 -0900)]
json.c: encode JSON strings the correct way (RFC 7159 section 7).
The previous code used the JavaScript encoder from the stringbuf library, which
is *not* the same encoding. Now it doesn't make the browser's parser barf when
it encounters a control character.
Art Cancro [Fri, 3 Nov 2023 02:42:28 +0000 (17:42 -0900)]
War on old style continues.
I really ought to be writing some real code tonight. But I get into a file and I see
old style and I want to make it clean and shiny and it's easier than the kind of heavy
brain work I should be doing. When faced with a heavy think, I dawdle for a long time
before I really get started. I've done this since I was a child.
Art Cancro [Mon, 30 Oct 2023 18:05:20 +0000 (09:05 -0900)]
stringbuf.c: chipped away at style modernization
This is a big one with a lot of outdated style in it.
Folded lines which were >80 columns but <132 columns.
Add {} braces to single-line conditional blocks.
Replaced C89 comments with C99 comments.
Art Cancro [Mon, 16 Oct 2023 19:53:17 +0000 (19:53 +0000)]
loadtest: counter position is now derived from thread id, not socket number.
This is what I was actually trying to accomplish a couple of commits ago. I made
a race condition and that's why it was malfunctioning. This way is better and it
works. It also once shot a man in Reno just to watch him die.
Art Cancro [Tue, 26 Sep 2023 04:13:35 +0000 (00:13 -0400)]
view_mail.js: throbber and "Processing dropped files..." message appears
"Processing dropped files..." is not exactly the right message because
the upload message might have been clicked, but I don't want to throw
away the translations of that message.
Anyway, it's really cool, they appear in the list, and go away when the
uploads are complete.
Art Cancro [Tue, 26 Sep 2023 03:35:17 +0000 (23:35 -0400)]
Simplify the upload dialog.
Reduce the number of divs and make it more generic. Allow the upload dialog to
be attached to any parent div. Make the dialog appear automatically when a file
is dragged into the parent div.
Art Cancro [Tue, 26 Sep 2023 02:44:10 +0000 (22:44 -0400)]
view_mail.js: move upload dialog from ctdl_big_modal to ctdl-upload
Uploads now have their own div in their own separate modal.
This is, of course, because I am trying to loosely couple the uploader so
that it can be attached to other parts of the system when needed.
Also I realized that my div names are ctdl-not ctdl_consistent with each other.
Trying to fix that.