diff options
| author | 2022-11-13 15:06:54 +0100 | |
|---|---|---|
| committer | 2022-11-13 15:06:54 +0100 | |
| commit | eef7bc8fde98ca6ed83c09f5fb37de7d26e2e835 (patch) | |
| tree | 0fdcfb6fa7072b6a6e173b91716d740317f6376e | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-eef7bc8fde98ca6ed83c09f5fb37de7d26e2e835.tar.gz snac2-eef7bc8fde98ca6ed83c09f5fb37de7d26e2e835.tar.xz snac2-eef7bc8fde98ca6ed83c09f5fb37de7d26e2e835.zip | |
Use details/summary HTML tags instead of JS for the 'Reply' button.
| -rw-r--r-- | html.c | 16 |
1 files changed, 7 insertions, 9 deletions
| @@ -393,13 +393,7 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) | |||
| 393 | "<input type=\"hidden\" name=\"id\" value=\"%s\">\n" | 393 | "<input type=\"hidden\" name=\"id\" value=\"%s\">\n" |
| 394 | "<input type=\"hidden\" name=\"actor\" value=\"%s\">\n" | 394 | "<input type=\"hidden\" name=\"actor\" value=\"%s\">\n" |
| 395 | "<input type=\"hidden\" name=\"redir\" value=\"%d_entry\">\n" | 395 | "<input type=\"hidden\" name=\"redir\" value=\"%d_entry\">\n" |
| 396 | "<input type=\"button\" name=\"action\" " | 396 | "\n", |
| 397 | "value=\"%s\" onclick=\"" | ||
| 398 | "x = document.getElementById('%s_reply'); " | ||
| 399 | "if (x.style.display == 'block') " | ||
| 400 | " x.style.display = 'none'; else " | ||
| 401 | " x.style.display = 'block';" | ||
| 402 | "\">\n", | ||
| 403 | 397 | ||
| 404 | snac->actor, id, actor, num, | 398 | snac->actor, id, actor, num, |
| 405 | L("Reply"), | 399 | L("Reply"), |
| @@ -447,7 +441,8 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) | |||
| 447 | xs *ct = build_mentions(snac, msg); | 441 | xs *ct = build_mentions(snac, msg); |
| 448 | 442 | ||
| 449 | xs *s1 = xs_fmt( | 443 | xs *s1 = xs_fmt( |
| 450 | "<p><div class=\"snac-note\" style=\"display: none\" id=\"%s_reply\">\n" | 444 | "<p><details><summary>%s</summary>\n" |
| 445 | "<div class=\"snac-note\" id=\"%s_reply\">\n" | ||
| 451 | "<form method=\"post\" action=\"%s/admin/note\" " | 446 | "<form method=\"post\" action=\"%s/admin/note\" " |
| 452 | "enctype=\"multipart/form-data\" id=\"%s_reply_form\">\n" | 447 | "enctype=\"multipart/form-data\" id=\"%s_reply_form\">\n" |
| 453 | "<textarea class=\"snac-textarea\" name=\"content\" " | 448 | "<textarea class=\"snac-textarea\" name=\"content\" " |
| @@ -455,8 +450,11 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) | |||
| 455 | "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n" | 450 | "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n" |
| 456 | "<p><input type=\"file\" name=\"attach\">\n" | 451 | "<p><input type=\"file\" name=\"attach\">\n" |
| 457 | "<p><input type=\"submit\" class=\"button\" value=\"%s\">\n" | 452 | "<p><input type=\"submit\" class=\"button\" value=\"%s\">\n" |
| 458 | "</form><p></div>\n", | 453 | "</form><p></div>\n" |
| 454 | "</details><p>" | ||
| 455 | "\n", | ||
| 459 | 456 | ||
| 457 | L("Reply"), | ||
| 460 | md5, | 458 | md5, |
| 461 | snac->actor, md5, | 459 | snac->actor, md5, |
| 462 | ct, | 460 | ct, |