Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add a separate /docsrch webpage to handle just document search. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
15f0dbd953cf65e2d1817c0e65694de6 |
| User & Date: | drh 2015-02-02 04:13:08.840 |
Context
|
2015-02-02
| ||
| 04:32 | Fix incorrect URLs on the new submenu elements for ticket and wiki pages. ... (check-in: 5ab34b0c0f user: drh tags: trunk) | |
| 04:13 | Add a separate /docsrch webpage to handle just document search. ... (check-in: 15f0dbd953 user: drh tags: trunk) | |
| 04:05 | Change the permuted index from wiki to embedded HTML and add a search form. ... (check-in: 63c2c73246 user: drh tags: trunk) | |
Changes
Changes to src/doc.c.
| ︙ | ︙ | |||
773 774 775 776 777 778 779 |
if( blob_size(&bgimg)==0 ){
blob_init(&bgimg, (char*)aBackground, sizeof(aBackground));
}
cgi_set_content_type(zMime);
cgi_set_content(&bgimg);
g.isConst = 1;
}
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 |
if( blob_size(&bgimg)==0 ){
blob_init(&bgimg, (char*)aBackground, sizeof(aBackground));
}
cgi_set_content_type(zMime);
cgi_set_content(&bgimg);
g.isConst = 1;
}
/*
** WEBPAGE: /docsrch
**
** Search for documents that match a user-supplied pattern.
*/
void doc_search_page(void){
const char *zPattern = PD("s","");
unsigned srchFlags = 0;
const char *zDisable;
login_check_credentials();
srchFlags = search_restrict(SRCH_DOC);
if( srchFlags==0 ){
zDisable = " disabled";
zPattern = "";
}else{
zDisable = "";
zPattern = PD("s","");
}
style_header("Document Search");
@ <form method="GET" action="docsrch"><center>
@ <input type="text" name="s" size="40" value="%h(zPattern)"%s(zDisable)>
@ <input type="submit" value="Search Docs"%s(zDisable)>
if( srchFlags==0 ){
@ <p class="generalError">Document search is disabled</p>
}
@ </center></form>
while( fossil_isspace(zPattern[0]) ) zPattern++;
if( zPattern[0] ){
if( search_run_and_output(zPattern, srchFlags)==0 ){
@ <p><i>No matches for: "%h(zPattern)"</i></p>
}
}
style_footer();
}
|
Changes to www/mkindex.tcl.
| ︙ | ︙ | |||
81 82 83 84 85 86 87 |
set permindex [lsort -dict -index 0 $permindex]
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>
| | < | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
set permindex [lsort -dict -index 0 $permindex]
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">
<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 | <div class='fossil-doc' data-title='Index Of Fossil Documentation'> <center> | | < | 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"> <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> |
| ︙ | ︙ |