Fossil SCM
Merge the accordion section enhancement to trunk.
Commit
22d28547b7d0595c93f3e939fcbf39018a8b869176c2df684c0945a6e4980159
Parent
72026ed39dbe7f1…
10 files changed
+34
+25
+25
+1
+11
+11
-8
+1
+1
+1
+1
+34
| --- a/src/accordion.js | ||
| +++ b/src/accordion.js | ||
| @@ -0,0 +1,34 @@ | ||
| 1 | +/* Attach appropriate javascript to each ".accordion" button so that | |
| 2 | +** it expands an/ | |
| 3 | +** some browsers, especially for large elements, presumably due to omitting the | |
| 4 | +** space required by the vertical scrollbar that may become | |
| 5 | +"data:image/svg+xml,"+ | |
| 6 | +l growth.) | |
| 7 | +** | |
| 8 | +** Ano"+"/"+"ttach appropriate javascript to each ".accordioch appropriate javasc/* Attach approprich appropriate javascript/* Attach approch appropriate javascript to each ".accordion" button so that | |
| 9 | +**/* Attach appropriate jav/* Attach appch appropriate javascript/* Attach appropments" window to a smaller | |
| 10 | +** width, causing vertical growth.) | |
| 11 | +** | |
| 12 | +** Another problem is that `scrollHeight' used to calculate the expanded height | |
| 13 | +** while still in the contracted state may return values with small errors on | |
| 14 | +** some browsers, especially for large elements, presumably due to omitting the | |
| 15 | +** space required by the vertical scrollbar that may become necessary, causing | |
| 16 | +** additional horizontal shrinking and consequently more vertical growth than | |
| 17 | +** calculated. That's why se/* Attach appropriate javascript to each ".accordion" button so that | |
| 18 | +** it expands and contracts when clicked. | |
| 19 | +**ntracts when clicked. | |
| 20 | +** | |
| 21 | +** The uncompressed source code for the SV | |
| 22 | +** wiki page "branch/accordion-experiments" window to a smvar p = a[i].nextElementSibli/* Attach appropriate javascript to each ".accordion" button so that | |
| 23 | +** it expands and contracts when clicked. | |
| 24 | +**ntracts when clicked. | |
| 25 | +** | |
| 26 | +** The uncompressed source code for the SV | |
| 27 | +** wiki page "branch/accordion-experiments" window to a smaller | |
| 28 | +** width, causing vertical growth.) | |
| 29 | +** | |
| 30 | +** Ano"+"/"+"ttach appropriate javascript to each ".accordion" button so that | |
| 31 | +** it expands and contracts when clicked. | |
| 32 | +**ntracts when clicked. | |
| 33 | +** | |
| 34 | +** The uncompressed |
| --- a/src/accordion.js | |
| +++ b/src/accordion.js | |
| @@ -0,0 +1,34 @@ | |
| --- a/src/accordion.js | |
| +++ b/src/accordion.js | |
| @@ -0,0 +1,34 @@ | |
| 1 | /* Attach appropriate javascript to each ".accordion" button so that |
| 2 | ** it expands an/ |
| 3 | ** some browsers, especially for large elements, presumably due to omitting the |
| 4 | ** space required by the vertical scrollbar that may become |
| 5 | "data:image/svg+xml,"+ |
| 6 | l growth.) |
| 7 | ** |
| 8 | ** Ano"+"/"+"ttach appropriate javascript to each ".accordioch appropriate javasc/* Attach approprich appropriate javascript/* Attach approch appropriate javascript to each ".accordion" button so that |
| 9 | **/* Attach appropriate jav/* Attach appch appropriate javascript/* Attach appropments" window to a smaller |
| 10 | ** width, causing vertical growth.) |
| 11 | ** |
| 12 | ** Another problem is that `scrollHeight' used to calculate the expanded height |
| 13 | ** while still in the contracted state may return values with small errors on |
| 14 | ** some browsers, especially for large elements, presumably due to omitting the |
| 15 | ** space required by the vertical scrollbar that may become necessary, causing |
| 16 | ** additional horizontal shrinking and consequently more vertical growth than |
| 17 | ** calculated. That's why se/* Attach appropriate javascript to each ".accordion" button so that |
| 18 | ** it expands and contracts when clicked. |
| 19 | **ntracts when clicked. |
| 20 | ** |
| 21 | ** The uncompressed source code for the SV |
| 22 | ** wiki page "branch/accordion-experiments" window to a smvar p = a[i].nextElementSibli/* Attach appropriate javascript to each ".accordion" button so that |
| 23 | ** it expands and contracts when clicked. |
| 24 | **ntracts when clicked. |
| 25 | ** |
| 26 | ** The uncompressed source code for the SV |
| 27 | ** wiki page "branch/accordion-experiments" window to a smaller |
| 28 | ** width, causing vertical growth.) |
| 29 | ** |
| 30 | ** Ano"+"/"+"ttach appropriate javascript to each ".accordion" button so that |
| 31 | ** it expands and contracts when clicked. |
| 32 | **ntracts when clicked. |
| 33 | ** |
| 34 | ** The uncompressed |
+25
| --- src/default_css.txt | ||
| +++ src/default_css.txt | ||
| @@ -816,5 +816,30 @@ | ||
| 816 | 816 | margin-right: 0; |
| 817 | 817 | } |
| 818 | 818 | .nobr { |
| 819 | 819 | white-space: nowrap; |
| 820 | 820 | } |
| 821 | +.accordion { | |
| 822 | + cursor: pointer; | |
| 823 | +} | |
| 824 | +.accordion_btn { | |
| 825 | + display: inline-block; | |
| 826 | + width: 16px; | |
| 827 | + height: 16px; | |
| 828 | + margin-right: .5em; | |
| 829 | + vertical-align: middle; | |
| 830 | +} | |
| 831 | +// Note: the order of the next 3 entries should be | |
| 832 | +// maintained for the hierarchical cascade to work. | |
| 833 | +.accordion > .accordion_btn_plus { | |
| 834 | + display: none; | |
| 835 | +} | |
| 836 | +.accordion_closed > .accordion_btn_minus { | |
| 837 | + display: none; | |
| 838 | +} | |
| 839 | +.accordion_closed > .accordion_btn_plus { | |
| 840 | + display: inline-block; | |
| 841 | +} | |
| 842 | +.accordion_panel { | |
| 843 | + overflow: hidden; | |
| 844 | + transition: max-height 0.25s ease-out; | |
| 845 | +} | |
| 821 | 846 |
| --- src/default_css.txt | |
| +++ src/default_css.txt | |
| @@ -816,5 +816,30 @@ | |
| 816 | margin-right: 0; |
| 817 | } |
| 818 | .nobr { |
| 819 | white-space: nowrap; |
| 820 | } |
| 821 |
| --- src/default_css.txt | |
| +++ src/default_css.txt | |
| @@ -816,5 +816,30 @@ | |
| 816 | margin-right: 0; |
| 817 | } |
| 818 | .nobr { |
| 819 | white-space: nowrap; |
| 820 | } |
| 821 | .accordion { |
| 822 | cursor: pointer; |
| 823 | } |
| 824 | .accordion_btn { |
| 825 | display: inline-block; |
| 826 | width: 16px; |
| 827 | height: 16px; |
| 828 | margin-right: .5em; |
| 829 | vertical-align: middle; |
| 830 | } |
| 831 | // Note: the order of the next 3 entries should be |
| 832 | // maintained for the hierarchical cascade to work. |
| 833 | .accordion > .accordion_btn_plus { |
| 834 | display: none; |
| 835 | } |
| 836 | .accordion_closed > .accordion_btn_minus { |
| 837 | display: none; |
| 838 | } |
| 839 | .accordion_closed > .accordion_btn_plus { |
| 840 | display: inline-block; |
| 841 | } |
| 842 | .accordion_panel { |
| 843 | overflow: hidden; |
| 844 | transition: max-height 0.25s ease-out; |
| 845 | } |
| 846 |
+25
| --- src/default_css.txt | ||
| +++ src/default_css.txt | ||
| @@ -816,5 +816,30 @@ | ||
| 816 | 816 | margin-right: 0; |
| 817 | 817 | } |
| 818 | 818 | .nobr { |
| 819 | 819 | white-space: nowrap; |
| 820 | 820 | } |
| 821 | +.accordion { | |
| 822 | + cursor: pointer; | |
| 823 | +} | |
| 824 | +.accordion_btn { | |
| 825 | + display: inline-block; | |
| 826 | + width: 16px; | |
| 827 | + height: 16px; | |
| 828 | + margin-right: .5em; | |
| 829 | + vertical-align: middle; | |
| 830 | +} | |
| 831 | +// Note: the order of the next 3 entries should be | |
| 832 | +// maintained for the hierarchical cascade to work. | |
| 833 | +.accordion > .accordion_btn_plus { | |
| 834 | + display: none; | |
| 835 | +} | |
| 836 | +.accordion_closed > .accordion_btn_minus { | |
| 837 | + display: none; | |
| 838 | +} | |
| 839 | +.accordion_closed > .accordion_btn_plus { | |
| 840 | + display: inline-block; | |
| 841 | +} | |
| 842 | +.accordion_panel { | |
| 843 | + overflow: hidden; | |
| 844 | + transition: max-height 0.25s ease-out; | |
| 845 | +} | |
| 821 | 846 |
| --- src/default_css.txt | |
| +++ src/default_css.txt | |
| @@ -816,5 +816,30 @@ | |
| 816 | margin-right: 0; |
| 817 | } |
| 818 | .nobr { |
| 819 | white-space: nowrap; |
| 820 | } |
| 821 |
| --- src/default_css.txt | |
| +++ src/default_css.txt | |
| @@ -816,5 +816,30 @@ | |
| 816 | margin-right: 0; |
| 817 | } |
| 818 | .nobr { |
| 819 | white-space: nowrap; |
| 820 | } |
| 821 | .accordion { |
| 822 | cursor: pointer; |
| 823 | } |
| 824 | .accordion_btn { |
| 825 | display: inline-block; |
| 826 | width: 16px; |
| 827 | height: 16px; |
| 828 | margin-right: .5em; |
| 829 | vertical-align: middle; |
| 830 | } |
| 831 | // Note: the order of the next 3 entries should be |
| 832 | // maintained for the hierarchical cascade to work. |
| 833 | .accordion > .accordion_btn_plus { |
| 834 | display: none; |
| 835 | } |
| 836 | .accordion_closed > .accordion_btn_minus { |
| 837 | display: none; |
| 838 | } |
| 839 | .accordion_closed > .accordion_btn_plus { |
| 840 | display: inline-block; |
| 841 | } |
| 842 | .accordion_panel { |
| 843 | overflow: hidden; |
| 844 | transition: max-height 0.25s ease-out; |
| 845 | } |
| 846 |
+1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -211,10 +211,11 @@ | ||
| 211 | 211 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 212 | 212 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 213 | 213 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 214 | 214 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 215 | 215 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 216 | + $(SRCDIR)/accordion.js \ | |
| 216 | 217 | $(SRCDIR)/ci_edit.js \ |
| 217 | 218 | $(SRCDIR)/copybtn.js \ |
| 218 | 219 | $(SRCDIR)/diff.tcl \ |
| 219 | 220 | $(SRCDIR)/forum.js \ |
| 220 | 221 | $(SRCDIR)/graph.js \ |
| 221 | 222 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -211,10 +211,11 @@ | |
| 211 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 212 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 213 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 214 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 215 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 216 | $(SRCDIR)/ci_edit.js \ |
| 217 | $(SRCDIR)/copybtn.js \ |
| 218 | $(SRCDIR)/diff.tcl \ |
| 219 | $(SRCDIR)/forum.js \ |
| 220 | $(SRCDIR)/graph.js \ |
| 221 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -211,10 +211,11 @@ | |
| 211 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 212 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 213 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 214 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 215 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 216 | $(SRCDIR)/accordion.js \ |
| 217 | $(SRCDIR)/ci_edit.js \ |
| 218 | $(SRCDIR)/copybtn.js \ |
| 219 | $(SRCDIR)/diff.tcl \ |
| 220 | $(SRCDIR)/forum.js \ |
| 221 | $(SRCDIR)/graph.js \ |
| 222 |
+11
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -91,10 +91,11 @@ | ||
| 91 | 91 | */ |
| 92 | 92 | static int needHrefJs = 0; /* href.js */ |
| 93 | 93 | static int needSortJs = 0; /* sorttable.js */ |
| 94 | 94 | static int needGraphJs = 0; /* graph.js */ |
| 95 | 95 | static int needCopyBtnJs = 0; /* copybtn.js */ |
| 96 | +static int needAccordionJs = 0; /* accordion.js */ | |
| 96 | 97 | |
| 97 | 98 | /* |
| 98 | 99 | ** Extra JS added to the end of the file. |
| 99 | 100 | */ |
| 100 | 101 | static Blob blobOnLoad = BLOB_INITIALIZER; |
| @@ -680,10 +681,17 @@ | ||
| 680 | 681 | ** Indicate that the table-sorting javascript is needed. |
| 681 | 682 | */ |
| 682 | 683 | void style_table_sorter(void){ |
| 683 | 684 | needSortJs = 1; |
| 684 | 685 | } |
| 686 | + | |
| 687 | +/* | |
| 688 | +** Indicate that the accordion javascript is needed. | |
| 689 | +*/ | |
| 690 | +void style_accordion(void){ | |
| 691 | + needAccordionJs = 1; | |
| 692 | +} | |
| 685 | 693 | |
| 686 | 694 | /* |
| 687 | 695 | ** Indicate that the timeline graph javascript is needed. |
| 688 | 696 | */ |
| 689 | 697 | void style_graph_generator(void){ |
| @@ -750,10 +758,13 @@ | ||
| 750 | 758 | cgi_append_content(builtin_text("graph.js"),-1); |
| 751 | 759 | } |
| 752 | 760 | if( needCopyBtnJs ){ |
| 753 | 761 | cgi_append_content(builtin_text("copybtn.js"),-1); |
| 754 | 762 | } |
| 763 | + if( needAccordionJs ){ | |
| 764 | + cgi_append_content(builtin_text("accordion.js"),-1); | |
| 765 | + } | |
| 755 | 766 | for(i=0; i<nJsToLoad; i++){ |
| 756 | 767 | cgi_append_content(builtin_text(azJsToLoad[i]),-1); |
| 757 | 768 | } |
| 758 | 769 | if( blob_size(&blobOnLoad)>0 ){ |
| 759 | 770 | @ window.onload = function(){ |
| 760 | 771 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -91,10 +91,11 @@ | |
| 91 | */ |
| 92 | static int needHrefJs = 0; /* href.js */ |
| 93 | static int needSortJs = 0; /* sorttable.js */ |
| 94 | static int needGraphJs = 0; /* graph.js */ |
| 95 | static int needCopyBtnJs = 0; /* copybtn.js */ |
| 96 | |
| 97 | /* |
| 98 | ** Extra JS added to the end of the file. |
| 99 | */ |
| 100 | static Blob blobOnLoad = BLOB_INITIALIZER; |
| @@ -680,10 +681,17 @@ | |
| 680 | ** Indicate that the table-sorting javascript is needed. |
| 681 | */ |
| 682 | void style_table_sorter(void){ |
| 683 | needSortJs = 1; |
| 684 | } |
| 685 | |
| 686 | /* |
| 687 | ** Indicate that the timeline graph javascript is needed. |
| 688 | */ |
| 689 | void style_graph_generator(void){ |
| @@ -750,10 +758,13 @@ | |
| 750 | cgi_append_content(builtin_text("graph.js"),-1); |
| 751 | } |
| 752 | if( needCopyBtnJs ){ |
| 753 | cgi_append_content(builtin_text("copybtn.js"),-1); |
| 754 | } |
| 755 | for(i=0; i<nJsToLoad; i++){ |
| 756 | cgi_append_content(builtin_text(azJsToLoad[i]),-1); |
| 757 | } |
| 758 | if( blob_size(&blobOnLoad)>0 ){ |
| 759 | @ window.onload = function(){ |
| 760 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -91,10 +91,11 @@ | |
| 91 | */ |
| 92 | static int needHrefJs = 0; /* href.js */ |
| 93 | static int needSortJs = 0; /* sorttable.js */ |
| 94 | static int needGraphJs = 0; /* graph.js */ |
| 95 | static int needCopyBtnJs = 0; /* copybtn.js */ |
| 96 | static int needAccordionJs = 0; /* accordion.js */ |
| 97 | |
| 98 | /* |
| 99 | ** Extra JS added to the end of the file. |
| 100 | */ |
| 101 | static Blob blobOnLoad = BLOB_INITIALIZER; |
| @@ -680,10 +681,17 @@ | |
| 681 | ** Indicate that the table-sorting javascript is needed. |
| 682 | */ |
| 683 | void style_table_sorter(void){ |
| 684 | needSortJs = 1; |
| 685 | } |
| 686 | |
| 687 | /* |
| 688 | ** Indicate that the accordion javascript is needed. |
| 689 | */ |
| 690 | void style_accordion(void){ |
| 691 | needAccordionJs = 1; |
| 692 | } |
| 693 | |
| 694 | /* |
| 695 | ** Indicate that the timeline graph javascript is needed. |
| 696 | */ |
| 697 | void style_graph_generator(void){ |
| @@ -750,10 +758,13 @@ | |
| 758 | cgi_append_content(builtin_text("graph.js"),-1); |
| 759 | } |
| 760 | if( needCopyBtnJs ){ |
| 761 | cgi_append_content(builtin_text("copybtn.js"),-1); |
| 762 | } |
| 763 | if( needAccordionJs ){ |
| 764 | cgi_append_content(builtin_text("accordion.js"),-1); |
| 765 | } |
| 766 | for(i=0; i<nJsToLoad; i++){ |
| 767 | cgi_append_content(builtin_text(azJsToLoad[i]),-1); |
| 768 | } |
| 769 | if( blob_size(&blobOnLoad)>0 ){ |
| 770 | @ window.onload = function(){ |
| 771 |
+11
-8
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -1713,15 +1713,15 @@ | ||
| 1713 | 1713 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1714 | 1714 | const char *zName, /* Name of the object */ |
| 1715 | 1715 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1716 | 1716 | ){ |
| 1717 | 1717 | if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){ |
| 1718 | - @ <div class="section">About</div> | |
| 1718 | + @ <div class="section accordion">About</div> | |
| 1719 | 1719 | }else if( zPrefix[0]=='c' ){ /* checkin/... */ |
| 1720 | - @ <div class="section">About checkin %.20h(zName)</div> | |
| 1720 | + @ <div class="section accordion">About checkin %.20h(zName)</div> | |
| 1721 | 1721 | }else{ |
| 1722 | - @ <div class="section">About %s(zPrefix) %h(zName)</div> | |
| 1722 | + @ <div class="section accordion">About %s(zPrefix) %h(zName)</div> | |
| 1723 | 1723 | } |
| 1724 | 1724 | } |
| 1725 | 1725 | |
| 1726 | 1726 | /* |
| 1727 | 1727 | ** Add an "Wiki" button in a submenu that links to the read-wiki page. |
| @@ -1775,39 +1775,42 @@ | ||
| 1775 | 1775 | @ <div class="section">%h(blob_str(&title))</div> |
| 1776 | 1776 | }else{ |
| 1777 | 1777 | wiki_section_label(zPrefix, zName, mFlags); |
| 1778 | 1778 | } |
| 1779 | 1779 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1780 | + @ <div class="accordion_panel"> | |
| 1780 | 1781 | convert_href_and_output(&tail); |
| 1782 | + @ </div> | |
| 1781 | 1783 | blob_reset(&tail); |
| 1782 | 1784 | blob_reset(&title); |
| 1783 | 1785 | blob_reset(&markdown); |
| 1784 | 1786 | }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){ |
| 1785 | 1787 | wiki_section_label(zPrefix, zName, mFlags); |
| 1786 | 1788 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1787 | - @ <pre> | |
| 1789 | + @ <div class="accordion_panel"><pre> | |
| 1788 | 1790 | @ %h(pWiki->zWiki) |
| 1789 | - @ </pre> | |
| 1791 | + @ </pre></div> | |
| 1790 | 1792 | }else{ |
| 1791 | 1793 | Blob tail = BLOB_INITIALIZER; |
| 1792 | 1794 | Blob title = BLOB_INITIALIZER; |
| 1793 | 1795 | Blob wiki; |
| 1794 | 1796 | Blob *pBody; |
| 1795 | 1797 | blob_init(&wiki, pWiki->zWiki, -1); |
| 1796 | 1798 | if( wiki_find_title(&wiki, &title, &tail) ){ |
| 1797 | - @ <div class="section">%h(blob_str(&title))</div> | |
| 1799 | + @ <div class="section accordion">%h(blob_str(&title))</div> | |
| 1798 | 1800 | pBody = &tail; |
| 1799 | 1801 | }else{ |
| 1800 | 1802 | wiki_section_label(zPrefix, zName, mFlags); |
| 1801 | 1803 | pBody = &wiki; |
| 1802 | 1804 | } |
| 1803 | 1805 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1804 | - @ <div class="wiki"> | |
| 1806 | + @ <div class="accordion_panel"><div class="wiki"> | |
| 1805 | 1807 | wiki_convert(pBody, 0, WIKI_BUTTONS); |
| 1806 | - @ </div> | |
| 1808 | + @ </div></div> | |
| 1807 | 1809 | blob_reset(&tail); |
| 1808 | 1810 | blob_reset(&title); |
| 1809 | 1811 | blob_reset(&wiki); |
| 1810 | 1812 | } |
| 1811 | 1813 | manifest_destroy(pWiki); |
| 1814 | + style_accordion(); | |
| 1812 | 1815 | return 1; |
| 1813 | 1816 | } |
| 1814 | 1817 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1713,15 +1713,15 @@ | |
| 1713 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1714 | const char *zName, /* Name of the object */ |
| 1715 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1716 | ){ |
| 1717 | if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){ |
| 1718 | @ <div class="section">About</div> |
| 1719 | }else if( zPrefix[0]=='c' ){ /* checkin/... */ |
| 1720 | @ <div class="section">About checkin %.20h(zName)</div> |
| 1721 | }else{ |
| 1722 | @ <div class="section">About %s(zPrefix) %h(zName)</div> |
| 1723 | } |
| 1724 | } |
| 1725 | |
| 1726 | /* |
| 1727 | ** Add an "Wiki" button in a submenu that links to the read-wiki page. |
| @@ -1775,39 +1775,42 @@ | |
| 1775 | @ <div class="section">%h(blob_str(&title))</div> |
| 1776 | }else{ |
| 1777 | wiki_section_label(zPrefix, zName, mFlags); |
| 1778 | } |
| 1779 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1780 | convert_href_and_output(&tail); |
| 1781 | blob_reset(&tail); |
| 1782 | blob_reset(&title); |
| 1783 | blob_reset(&markdown); |
| 1784 | }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){ |
| 1785 | wiki_section_label(zPrefix, zName, mFlags); |
| 1786 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1787 | @ <pre> |
| 1788 | @ %h(pWiki->zWiki) |
| 1789 | @ </pre> |
| 1790 | }else{ |
| 1791 | Blob tail = BLOB_INITIALIZER; |
| 1792 | Blob title = BLOB_INITIALIZER; |
| 1793 | Blob wiki; |
| 1794 | Blob *pBody; |
| 1795 | blob_init(&wiki, pWiki->zWiki, -1); |
| 1796 | if( wiki_find_title(&wiki, &title, &tail) ){ |
| 1797 | @ <div class="section">%h(blob_str(&title))</div> |
| 1798 | pBody = &tail; |
| 1799 | }else{ |
| 1800 | wiki_section_label(zPrefix, zName, mFlags); |
| 1801 | pBody = &wiki; |
| 1802 | } |
| 1803 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1804 | @ <div class="wiki"> |
| 1805 | wiki_convert(pBody, 0, WIKI_BUTTONS); |
| 1806 | @ </div> |
| 1807 | blob_reset(&tail); |
| 1808 | blob_reset(&title); |
| 1809 | blob_reset(&wiki); |
| 1810 | } |
| 1811 | manifest_destroy(pWiki); |
| 1812 | return 1; |
| 1813 | } |
| 1814 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1713,15 +1713,15 @@ | |
| 1713 | const char *zPrefix, /* "branch", "tag", or "checkin" */ |
| 1714 | const char *zName, /* Name of the object */ |
| 1715 | unsigned int mFlags /* Zero or more WIKIASSOC_* flags */ |
| 1716 | ){ |
| 1717 | if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){ |
| 1718 | @ <div class="section accordion">About</div> |
| 1719 | }else if( zPrefix[0]=='c' ){ /* checkin/... */ |
| 1720 | @ <div class="section accordion">About checkin %.20h(zName)</div> |
| 1721 | }else{ |
| 1722 | @ <div class="section accordion">About %s(zPrefix) %h(zName)</div> |
| 1723 | } |
| 1724 | } |
| 1725 | |
| 1726 | /* |
| 1727 | ** Add an "Wiki" button in a submenu that links to the read-wiki page. |
| @@ -1775,39 +1775,42 @@ | |
| 1775 | @ <div class="section">%h(blob_str(&title))</div> |
| 1776 | }else{ |
| 1777 | wiki_section_label(zPrefix, zName, mFlags); |
| 1778 | } |
| 1779 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1780 | @ <div class="accordion_panel"> |
| 1781 | convert_href_and_output(&tail); |
| 1782 | @ </div> |
| 1783 | blob_reset(&tail); |
| 1784 | blob_reset(&title); |
| 1785 | blob_reset(&markdown); |
| 1786 | }else if( fossil_strcmp(pWiki->zMimetype, "text/plain")==0 ){ |
| 1787 | wiki_section_label(zPrefix, zName, mFlags); |
| 1788 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1789 | @ <div class="accordion_panel"><pre> |
| 1790 | @ %h(pWiki->zWiki) |
| 1791 | @ </pre></div> |
| 1792 | }else{ |
| 1793 | Blob tail = BLOB_INITIALIZER; |
| 1794 | Blob title = BLOB_INITIALIZER; |
| 1795 | Blob wiki; |
| 1796 | Blob *pBody; |
| 1797 | blob_init(&wiki, pWiki->zWiki, -1); |
| 1798 | if( wiki_find_title(&wiki, &title, &tail) ){ |
| 1799 | @ <div class="section accordion">%h(blob_str(&title))</div> |
| 1800 | pBody = &tail; |
| 1801 | }else{ |
| 1802 | wiki_section_label(zPrefix, zName, mFlags); |
| 1803 | pBody = &wiki; |
| 1804 | } |
| 1805 | wiki_submenu_to_read_wiki(zPrefix, zName, mFlags); |
| 1806 | @ <div class="accordion_panel"><div class="wiki"> |
| 1807 | wiki_convert(pBody, 0, WIKI_BUTTONS); |
| 1808 | @ </div></div> |
| 1809 | blob_reset(&tail); |
| 1810 | blob_reset(&title); |
| 1811 | blob_reset(&wiki); |
| 1812 | } |
| 1813 | manifest_destroy(pWiki); |
| 1814 | style_accordion(); |
| 1815 | return 1; |
| 1816 | } |
| 1817 |
+1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -633,10 +633,11 @@ | ||
| 633 | 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | + $(SRCDIR)/accordion.js \ | |
| 638 | 639 | $(SRCDIR)/ci_edit.js \ |
| 639 | 640 | $(SRCDIR)/copybtn.js \ |
| 640 | 641 | $(SRCDIR)/diff.tcl \ |
| 641 | 642 | $(SRCDIR)/forum.js \ |
| 642 | 643 | $(SRCDIR)/graph.js \ |
| 643 | 644 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -633,10 +633,11 @@ | |
| 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | $(SRCDIR)/ci_edit.js \ |
| 639 | $(SRCDIR)/copybtn.js \ |
| 640 | $(SRCDIR)/diff.tcl \ |
| 641 | $(SRCDIR)/forum.js \ |
| 642 | $(SRCDIR)/graph.js \ |
| 643 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -633,10 +633,11 @@ | |
| 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | $(SRCDIR)/accordion.js \ |
| 639 | $(SRCDIR)/ci_edit.js \ |
| 640 | $(SRCDIR)/copybtn.js \ |
| 641 | $(SRCDIR)/diff.tcl \ |
| 642 | $(SRCDIR)/forum.js \ |
| 643 | $(SRCDIR)/graph.js \ |
| 644 |
+1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -633,10 +633,11 @@ | ||
| 633 | 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | + $(SRCDIR)/accordion.js \ | |
| 638 | 639 | $(SRCDIR)/ci_edit.js \ |
| 639 | 640 | $(SRCDIR)/copybtn.js \ |
| 640 | 641 | $(SRCDIR)/diff.tcl \ |
| 641 | 642 | $(SRCDIR)/forum.js \ |
| 642 | 643 | $(SRCDIR)/graph.js \ |
| 643 | 644 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -633,10 +633,11 @@ | |
| 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | $(SRCDIR)/ci_edit.js \ |
| 639 | $(SRCDIR)/copybtn.js \ |
| 640 | $(SRCDIR)/diff.tcl \ |
| 641 | $(SRCDIR)/forum.js \ |
| 642 | $(SRCDIR)/graph.js \ |
| 643 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -633,10 +633,11 @@ | |
| 633 | $(SRCDIR)/../skins/rounded1/header.txt \ |
| 634 | $(SRCDIR)/../skins/xekri/css.txt \ |
| 635 | $(SRCDIR)/../skins/xekri/details.txt \ |
| 636 | $(SRCDIR)/../skins/xekri/footer.txt \ |
| 637 | $(SRCDIR)/../skins/xekri/header.txt \ |
| 638 | $(SRCDIR)/accordion.js \ |
| 639 | $(SRCDIR)/ci_edit.js \ |
| 640 | $(SRCDIR)/copybtn.js \ |
| 641 | $(SRCDIR)/diff.tcl \ |
| 642 | $(SRCDIR)/forum.js \ |
| 643 | $(SRCDIR)/graph.js \ |
| 644 |
+1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -540,10 +540,11 @@ | ||
| 540 | 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | + $(SRCDIR)\accordion.js \ | |
| 545 | 546 | $(SRCDIR)\ci_edit.js \ |
| 546 | 547 | $(SRCDIR)\copybtn.js \ |
| 547 | 548 | $(SRCDIR)\diff.tcl \ |
| 548 | 549 | $(SRCDIR)\forum.js \ |
| 549 | 550 | $(SRCDIR)\graph.js \ |
| 550 | 551 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -540,10 +540,11 @@ | |
| 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | $(SRCDIR)\ci_edit.js \ |
| 546 | $(SRCDIR)\copybtn.js \ |
| 547 | $(SRCDIR)\diff.tcl \ |
| 548 | $(SRCDIR)\forum.js \ |
| 549 | $(SRCDIR)\graph.js \ |
| 550 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -540,10 +540,11 @@ | |
| 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | $(SRCDIR)\accordion.js \ |
| 546 | $(SRCDIR)\ci_edit.js \ |
| 547 | $(SRCDIR)\copybtn.js \ |
| 548 | $(SRCDIR)\diff.tcl \ |
| 549 | $(SRCDIR)\forum.js \ |
| 550 | $(SRCDIR)\graph.js \ |
| 551 |
+1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -540,10 +540,11 @@ | ||
| 540 | 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | + $(SRCDIR)\accordion.js \ | |
| 545 | 546 | $(SRCDIR)\ci_edit.js \ |
| 546 | 547 | $(SRCDIR)\copybtn.js \ |
| 547 | 548 | $(SRCDIR)\diff.tcl \ |
| 548 | 549 | $(SRCDIR)\forum.js \ |
| 549 | 550 | $(SRCDIR)\graph.js \ |
| 550 | 551 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -540,10 +540,11 @@ | |
| 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | $(SRCDIR)\ci_edit.js \ |
| 546 | $(SRCDIR)\copybtn.js \ |
| 547 | $(SRCDIR)\diff.tcl \ |
| 548 | $(SRCDIR)\forum.js \ |
| 549 | $(SRCDIR)\graph.js \ |
| 550 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -540,10 +540,11 @@ | |
| 540 | $(SRCDIR)\..\skins\rounded1\header.txt \ |
| 541 | $(SRCDIR)\..\skins\xekri\css.txt \ |
| 542 | $(SRCDIR)\..\skins\xekri\details.txt \ |
| 543 | $(SRCDIR)\..\skins\xekri\footer.txt \ |
| 544 | $(SRCDIR)\..\skins\xekri\header.txt \ |
| 545 | $(SRCDIR)\accordion.js \ |
| 546 | $(SRCDIR)\ci_edit.js \ |
| 547 | $(SRCDIR)\copybtn.js \ |
| 548 | $(SRCDIR)\diff.tcl \ |
| 549 | $(SRCDIR)\forum.js \ |
| 550 | $(SRCDIR)\graph.js \ |
| 551 |