Fossil SCM
Disable rendering of the comment mime type selection list, as it's not honored/implemented where comments are rendered.
Commit
875b60bccdd93957da06b6168b9b0f01dbcf6b6dd969c8a1b98c301229b68dba
Parent
a4314603f726bed…
1 file changed
+24
-12
+24
-12
| --- src/fileedit.c | ||
| +++ src/fileedit.c | ||
| @@ -1797,32 +1797,44 @@ | ||
| 1797 | 1797 | CX("<input type='text' name='comment' " |
| 1798 | 1798 | "id='fileedit-comment'></input>"); |
| 1799 | 1799 | CX("<textarea name='commentBig' class='hidden' " |
| 1800 | 1800 | "rows='5' id='fileedit-comment-big'></textarea>\n"); |
| 1801 | 1801 | { /* comment options... */ |
| 1802 | - CX("<div class='fileedit-options flex-container row'>"); | |
| 1802 | + CX("<div class='fileedit-options flex-container column'>"); | |
| 1803 | 1803 | CX("<button id='comment-toggle' " |
| 1804 | 1804 | "title='Toggle between single- and multi-line comment mode, " |
| 1805 | 1805 | "noting that switching from multi- to single-line will cause " |
| 1806 | 1806 | "newlines to get stripped.'" |
| 1807 | 1807 | ">toggle single-/multi-line</button> "); |
| 1808 | - style_select_list_str("comment-mimetype", "comment_mimetype", | |
| 1809 | - "Comment style:", | |
| 1810 | - "Specify how fossil will interpret the " | |
| 1811 | - "comment string.", | |
| 1812 | - NULL, | |
| 1813 | - "Fossil", "text/x-fossil-wiki", | |
| 1814 | - "Markdown", "text/x-markdown", | |
| 1815 | - "Plain text", "text/plain", | |
| 1816 | - NULL); | |
| 1817 | - CX("</div>\n"); | |
| 1808 | + if(0){ | |
| 1809 | + /* Manifests support an N-card (comment mime type) but it has | |
| 1810 | + ** yet to be honored where comments are rendered, so we don't | |
| 1811 | + ** currently offer it as an option here: | |
| 1812 | + ** https://fossil-scm.org/forum/forumpost/662da045a1 | |
| 1813 | + ** | |
| 1814 | + ** If/when it's ever implemented, simply enable this block and | |
| 1815 | + ** adjust the container's layout accordingly (as of this | |
| 1816 | + ** writing, that means changing the CSS class from | |
| 1817 | + ** 'flex-container column' to 'flex-container row'). | |
| 1818 | + */ | |
| 1819 | + style_select_list_str("comment-mimetype", "comment_mimetype", | |
| 1820 | + "Comment style:", | |
| 1821 | + "Specify how fossil will interpret the " | |
| 1822 | + "comment string.", | |
| 1823 | + NULL, | |
| 1824 | + "Fossil", "text/x-fossil-wiki", | |
| 1825 | + "Markdown", "text/x-markdown", | |
| 1826 | + "Plain text", "text/plain", | |
| 1827 | + NULL); | |
| 1828 | + CX("</div>\n"); | |
| 1829 | + } | |
| 1818 | 1830 | CX("<div class='fileedit-hint flex-container row'>" |
| 1819 | 1831 | "(Warning: switching from multi- to single-line mode will " |
| 1820 | 1832 | "strip out all newlines!)</div>"); |
| 1821 | 1833 | } |
| 1822 | 1834 | CX("</div></fieldset>\n"/*commit comment options*/); |
| 1823 | - CX("<div class='flex-container row'>" | |
| 1835 | + CX("<div class='flex-container column'>" | |
| 1824 | 1836 | "<button id='fileedit-btn-commit'>Commit</button>" |
| 1825 | 1837 | "</div>\n"); |
| 1826 | 1838 | CX("<div id='fileedit-manifest'></div>\n" |
| 1827 | 1839 | /* Manifest gets rendered here after a commit. */); |
| 1828 | 1840 | } |
| 1829 | 1841 |
| --- src/fileedit.c | |
| +++ src/fileedit.c | |
| @@ -1797,32 +1797,44 @@ | |
| 1797 | CX("<input type='text' name='comment' " |
| 1798 | "id='fileedit-comment'></input>"); |
| 1799 | CX("<textarea name='commentBig' class='hidden' " |
| 1800 | "rows='5' id='fileedit-comment-big'></textarea>\n"); |
| 1801 | { /* comment options... */ |
| 1802 | CX("<div class='fileedit-options flex-container row'>"); |
| 1803 | CX("<button id='comment-toggle' " |
| 1804 | "title='Toggle between single- and multi-line comment mode, " |
| 1805 | "noting that switching from multi- to single-line will cause " |
| 1806 | "newlines to get stripped.'" |
| 1807 | ">toggle single-/multi-line</button> "); |
| 1808 | style_select_list_str("comment-mimetype", "comment_mimetype", |
| 1809 | "Comment style:", |
| 1810 | "Specify how fossil will interpret the " |
| 1811 | "comment string.", |
| 1812 | NULL, |
| 1813 | "Fossil", "text/x-fossil-wiki", |
| 1814 | "Markdown", "text/x-markdown", |
| 1815 | "Plain text", "text/plain", |
| 1816 | NULL); |
| 1817 | CX("</div>\n"); |
| 1818 | CX("<div class='fileedit-hint flex-container row'>" |
| 1819 | "(Warning: switching from multi- to single-line mode will " |
| 1820 | "strip out all newlines!)</div>"); |
| 1821 | } |
| 1822 | CX("</div></fieldset>\n"/*commit comment options*/); |
| 1823 | CX("<div class='flex-container row'>" |
| 1824 | "<button id='fileedit-btn-commit'>Commit</button>" |
| 1825 | "</div>\n"); |
| 1826 | CX("<div id='fileedit-manifest'></div>\n" |
| 1827 | /* Manifest gets rendered here after a commit. */); |
| 1828 | } |
| 1829 |
| --- src/fileedit.c | |
| +++ src/fileedit.c | |
| @@ -1797,32 +1797,44 @@ | |
| 1797 | CX("<input type='text' name='comment' " |
| 1798 | "id='fileedit-comment'></input>"); |
| 1799 | CX("<textarea name='commentBig' class='hidden' " |
| 1800 | "rows='5' id='fileedit-comment-big'></textarea>\n"); |
| 1801 | { /* comment options... */ |
| 1802 | CX("<div class='fileedit-options flex-container column'>"); |
| 1803 | CX("<button id='comment-toggle' " |
| 1804 | "title='Toggle between single- and multi-line comment mode, " |
| 1805 | "noting that switching from multi- to single-line will cause " |
| 1806 | "newlines to get stripped.'" |
| 1807 | ">toggle single-/multi-line</button> "); |
| 1808 | if(0){ |
| 1809 | /* Manifests support an N-card (comment mime type) but it has |
| 1810 | ** yet to be honored where comments are rendered, so we don't |
| 1811 | ** currently offer it as an option here: |
| 1812 | ** https://fossil-scm.org/forum/forumpost/662da045a1 |
| 1813 | ** |
| 1814 | ** If/when it's ever implemented, simply enable this block and |
| 1815 | ** adjust the container's layout accordingly (as of this |
| 1816 | ** writing, that means changing the CSS class from |
| 1817 | ** 'flex-container column' to 'flex-container row'). |
| 1818 | */ |
| 1819 | style_select_list_str("comment-mimetype", "comment_mimetype", |
| 1820 | "Comment style:", |
| 1821 | "Specify how fossil will interpret the " |
| 1822 | "comment string.", |
| 1823 | NULL, |
| 1824 | "Fossil", "text/x-fossil-wiki", |
| 1825 | "Markdown", "text/x-markdown", |
| 1826 | "Plain text", "text/plain", |
| 1827 | NULL); |
| 1828 | CX("</div>\n"); |
| 1829 | } |
| 1830 | CX("<div class='fileedit-hint flex-container row'>" |
| 1831 | "(Warning: switching from multi- to single-line mode will " |
| 1832 | "strip out all newlines!)</div>"); |
| 1833 | } |
| 1834 | CX("</div></fieldset>\n"/*commit comment options*/); |
| 1835 | CX("<div class='flex-container column'>" |
| 1836 | "<button id='fileedit-btn-commit'>Commit</button>" |
| 1837 | "</div>\n"); |
| 1838 | CX("<div id='fileedit-manifest'></div>\n" |
| 1839 | /* Manifest gets rendered here after a commit. */); |
| 1840 | } |
| 1841 |