Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add autofocus to search entry boxes. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
c799881474dde5e3c490cc550176eee0 |
| User & Date: | drh 2015-02-04 13:32:33.669 |
Context
|
2015-02-04
| ||
| 15:47 | Update json configuration options and wiki with reality ... (check-in: 5098f747a9 user: jan.nijtmans tags: trunk) | |
| 13:32 | Add autofocus to search entry boxes. ... (check-in: c799881474 user: drh tags: trunk) | |
| 03:12 | Increase the default number of tokens present in snippets from an indexed search so that a typical snippet is about two lines of text instead of just one. ... (check-in: 188c62c2d5 user: drh tags: trunk) | |
Changes
Changes to src/search.c.
| ︙ | ︙ | |||
884 885 886 887 888 889 890 |
** is treated like SRCH_ALL for display purposes.
**
** The entry box is shown disabled if srchFlags is 0.
*/
void search_screen(unsigned srchFlags, const char *zAction){
const char *zType = 0;
const char *zClass = 0;
| | > | > > | | | | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 |
** is treated like SRCH_ALL for display purposes.
**
** The entry box is shown disabled if srchFlags is 0.
*/
void search_screen(unsigned srchFlags, const char *zAction){
const char *zType = 0;
const char *zClass = 0;
const char *zDisable1;
const char *zDisable2;
const char *zPattern;
switch( srchFlags ){
case SRCH_CKIN: zType = " Check-ins"; zClass = "Ckin"; break;
case SRCH_DOC: zType = " Docs"; zClass = "Doc"; break;
case SRCH_TKT: zType = " Tickets"; zClass = "Tkt"; break;
case SRCH_WIKI: zType = " Wiki"; zClass = "Wiki"; break;
}
srchFlags = search_restrict(srchFlags);
if( srchFlags==0 ){
zDisable1 = " disabled";
zDisable2 = " disabled";
zPattern = "";
}else{
zDisable1 = " autofocus";
zDisable2 = "";
zPattern = PD("s","");
}
@ <form method='GET' action='%s(zAction)'>
if( zClass ){
@ <div class='searchForm searchForm%s(zClass)'>
}else{
@ <div class='searchForm'>
}
@ <input type="text" name="s" size="40" value="%h(zPattern)"%s(zDisable1)>
@ <input type="submit" value="Search%s(zType)"%s(zDisable2)>
if( srchFlags==0 ){
@ <p class="generalError">Search is disabled</p>
}
@ </div></form>
while( fossil_isspace(zPattern[0]) ) zPattern++;
if( zPattern[0] ){
if( zClass ){
|
| ︙ | ︙ |
Changes to www/mkindex.tcl.
| ︙ | ︙ | |||
82 83 84 85 86 87 88 |
set out [open permutedindex.html w]
fconfigure $out -encoding utf-8 -translation lf
puts $out \
"<div class='fossil-doc' data-title='Index Of Fossil Documentation'>"
puts $out {
<center>
<form action='../../../docsrch' method='GET'>
| | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
set out [open permutedindex.html w]
fconfigure $out -encoding utf-8 -translation lf
puts $out \
"<div class='fossil-doc' data-title='Index Of Fossil Documentation'>"
puts $out {
<center>
<form action='../../../docsrch' method='GET'>
<input type="text" name="s" size="40" autofocus>
<input type="submit" value="Search Docs">
</form>
</center>
<h2>Primary Documents:</h2>
<ul>
<li> <a href='quickstart.wiki'>Quick-start Guide</a>
<li> <a href='faq.wiki'>FAQ</a>
|
| ︙ | ︙ |
Changes to www/permutedindex.html.
1 2 3 4 | <div class='fossil-doc' data-title='Index Of Fossil Documentation'> <center> <form action='../../../docsrch' method='GET'> | | | 1 2 3 4 5 6 7 8 9 10 11 12 | <div class='fossil-doc' data-title='Index Of Fossil Documentation'> <center> <form action='../../../docsrch' method='GET'> <input type="text" name="s" size="40" autofocus> <input type="submit" value="Search Docs"> </form> </center> <h2>Primary Documents:</h2> <ul> <li> <a href='quickstart.wiki'>Quick-start Guide</a> <li> <a href='faq.wiki'>FAQ</a> |
| ︙ | ︙ |