* mandoc: Remove redundant value= attributes from option elements, and use
@ 2018-05-29 20:33 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-05-29 20:33 UTC (permalink / raw)
To: source
Log Message:
-----------
Remove redundant value= attributes from option elements,
and use type=search rather than type=text for the input element
because it tends to better support autocompletion.
Both suggested by John Gardner <gardnerjohng at gmail dot com>.
Modified Files:
--------------
mandoc:
cgi.c
Revision Data
-------------
Index: cgi.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/cgi.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -Lcgi.c -Lcgi.c -u -p -r1.157 -r1.158
--- cgi.c
+++ cgi.c
@@ -400,7 +400,7 @@ resp_searchform(const struct req *req, e
/* Write query input box. */
- printf(" <input type=\"text\" name=\"query\" value=\"");
+ printf(" <input type=\"search\" name=\"query\" value=\"");
if (req->q.query != NULL)
html_print(req->q.query);
printf( "\" size=\"40\"");
@@ -436,7 +436,7 @@ resp_searchform(const struct req *req, e
printf(" selected=\"selected\"");
puts(">All Architectures</option>");
for (i = 0; i < arch_MAX; i++) {
- printf(" <option value=\"%s\"", arch_names[i]);
+ printf(" <option");
if (NULL != req->q.arch &&
0 == strcmp(arch_names[i], req->q.arch))
printf(" selected=\"selected\"");
@@ -449,12 +449,10 @@ resp_searchform(const struct req *req, e
if (req->psz > 1) {
puts(" <select name=\"manpath\">");
for (i = 0; i < (int)req->psz; i++) {
- printf(" <option ");
+ printf(" <option");
if (strcmp(req->q.manpath, req->p[i]) == 0)
- printf("selected=\"selected\" ");
- printf("value=\"");
- html_print(req->p[i]);
- printf("\">");
+ printf(" selected=\"selected\"");
+ printf(">");
html_print(req->p[i]);
puts("</option>");
}
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-29 20:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 20:33 mandoc: Remove redundant value= attributes from option elements, and use schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).