Fossil SCM

Disable rendering of the comment mime type selection list, as it's not honored/implemented where comments are rendered.

stephan 2020-05-09 13:56 fileedit-ajaxify
Commit 875b60bccdd93957da06b6168b9b0f01dbcf6b6dd969c8a1b98c301229b68dba
1 file changed +24 -12
+24 -12
--- src/fileedit.c
+++ src/fileedit.c
@@ -1797,32 +1797,44 @@
17971797
CX("<input type='text' name='comment' "
17981798
"id='fileedit-comment'></input>");
17991799
CX("<textarea name='commentBig' class='hidden' "
18001800
"rows='5' id='fileedit-comment-big'></textarea>\n");
18011801
{ /* comment options... */
1802
- CX("<div class='fileedit-options flex-container row'>");
1802
+ CX("<div class='fileedit-options flex-container column'>");
18031803
CX("<button id='comment-toggle' "
18041804
"title='Toggle between single- and multi-line comment mode, "
18051805
"noting that switching from multi- to single-line will cause "
18061806
"newlines to get stripped.'"
18071807
">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
+ }
18181830
CX("<div class='fileedit-hint flex-container row'>"
18191831
"(Warning: switching from multi- to single-line mode will "
18201832
"strip out all newlines!)</div>");
18211833
}
18221834
CX("</div></fieldset>\n"/*commit comment options*/);
1823
- CX("<div class='flex-container row'>"
1835
+ CX("<div class='flex-container column'>"
18241836
"<button id='fileedit-btn-commit'>Commit</button>"
18251837
"</div>\n");
18261838
CX("<div id='fileedit-manifest'></div>\n"
18271839
/* Manifest gets rendered here after a commit. */);
18281840
}
18291841
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button