Fossil SCM

Fixed a semantic collision in the fileedit 'column' CSS class, which means something different in the /dir page. This fixes mis-alignment of the commit button.

stephan 2020-05-10 19:51 fileedit-ajaxify
Commit d0a83a38f5676db9fb7e69a0751c84ac5ef62d446d2d8ef467d95b6a8049c472
2 files changed +8 -5 +10 -9
--- src/default_css.txt
+++ src/default_css.txt
@@ -994,10 +994,13 @@
994994
padding: 0;
995995
}
996996
#fileedit-comment {
997997
width: 100%;
998998
font-family: monospace;
999
+}
1000
+#fileedit-commit-button-wrapper {
1001
+ margin: 0.25em;
9991002
}
10001003
.tab-container > .tabs > .tab-panel > .fileedit-options {
10011004
margin-top: 0;
10021005
border: none;
10031006
border-radius: 0;
@@ -1020,35 +1023,35 @@
10201023
// Styles developed for /fileedit but which have wider
10211024
// applicability:
10221025
.flex-container {
10231026
display: flex;
10241027
}
1025
-.flex-container.row {
1028
+.flex-container.flex-row {
10261029
flex-direction: row;
10271030
flex-wrap: wrap;
10281031
justify-content: center;
10291032
align-items: center;
10301033
}
1031
-.fileedit-options.flex-container.row {
1034
+.fileedit-options.flex-container.flex-row {
10321035
align-items: first baseline;
10331036
}
10341037
.fileedit-options > div > * {
10351038
margin: 0.25em;
10361039
}
1037
-.flex-container.row.stretch {
1040
+.flex-container.flex-row.stretch {
10381041
flex-direction: row;
10391042
flex-wrap: wrap;
10401043
align-items: stretch;
10411044
margin: 0;
10421045
}
1043
-.flex-container.column {
1046
+.flex-container.flex-column {
10441047
flex-direction: column;
10451048
flex-wrap: wrap;
10461049
justify-content: center;
10471050
align-items: center;
10481051
}
1049
-.flex-container.column.stretch {
1052
+.flex-container.flex-column.stretch {
10501053
align-items: stretch;
10511054
margin: 0;
10521055
}
10531056
.flex-container.child-gap-small > * {
10541057
margin: 0.25em;
10551058
--- src/default_css.txt
+++ src/default_css.txt
@@ -994,10 +994,13 @@
994 padding: 0;
995 }
996 #fileedit-comment {
997 width: 100%;
998 font-family: monospace;
 
 
 
999 }
1000 .tab-container > .tabs > .tab-panel > .fileedit-options {
1001 margin-top: 0;
1002 border: none;
1003 border-radius: 0;
@@ -1020,35 +1023,35 @@
1020 // Styles developed for /fileedit but which have wider
1021 // applicability:
1022 .flex-container {
1023 display: flex;
1024 }
1025 .flex-container.row {
1026 flex-direction: row;
1027 flex-wrap: wrap;
1028 justify-content: center;
1029 align-items: center;
1030 }
1031 .fileedit-options.flex-container.row {
1032 align-items: first baseline;
1033 }
1034 .fileedit-options > div > * {
1035 margin: 0.25em;
1036 }
1037 .flex-container.row.stretch {
1038 flex-direction: row;
1039 flex-wrap: wrap;
1040 align-items: stretch;
1041 margin: 0;
1042 }
1043 .flex-container.column {
1044 flex-direction: column;
1045 flex-wrap: wrap;
1046 justify-content: center;
1047 align-items: center;
1048 }
1049 .flex-container.column.stretch {
1050 align-items: stretch;
1051 margin: 0;
1052 }
1053 .flex-container.child-gap-small > * {
1054 margin: 0.25em;
1055
--- src/default_css.txt
+++ src/default_css.txt
@@ -994,10 +994,13 @@
994 padding: 0;
995 }
996 #fileedit-comment {
997 width: 100%;
998 font-family: monospace;
999 }
1000 #fileedit-commit-button-wrapper {
1001 margin: 0.25em;
1002 }
1003 .tab-container > .tabs > .tab-panel > .fileedit-options {
1004 margin-top: 0;
1005 border: none;
1006 border-radius: 0;
@@ -1020,35 +1023,35 @@
1023 // Styles developed for /fileedit but which have wider
1024 // applicability:
1025 .flex-container {
1026 display: flex;
1027 }
1028 .flex-container.flex-row {
1029 flex-direction: row;
1030 flex-wrap: wrap;
1031 justify-content: center;
1032 align-items: center;
1033 }
1034 .fileedit-options.flex-container.flex-row {
1035 align-items: first baseline;
1036 }
1037 .fileedit-options > div > * {
1038 margin: 0.25em;
1039 }
1040 .flex-container.flex-row.stretch {
1041 flex-direction: row;
1042 flex-wrap: wrap;
1043 align-items: stretch;
1044 margin: 0;
1045 }
1046 .flex-container.flex-column {
1047 flex-direction: column;
1048 flex-wrap: wrap;
1049 justify-content: center;
1050 align-items: center;
1051 }
1052 .flex-container.flex-column.stretch {
1053 align-items: stretch;
1054 margin: 0;
1055 }
1056 .flex-container.child-gap-small > * {
1057 margin: 0.25em;
1058
+10 -9
--- src/fileedit.c
+++ src/fileedit.c
@@ -1607,11 +1607,11 @@
16071607
CX("<div id='fileedit-tab-content' "
16081608
"data-tab-parent='fileedit-tabs' "
16091609
"data-tab-label='File Content'"
16101610
">");
16111611
CX("<div class='fileedit-options "
1612
- "flex-container row child-gap-small'>");
1612
+ "flex-container flex-row child-gap-small'>");
16131613
if(1){
16141614
/* Discard/reload button. Leave this out until we have a
16151615
** nice way of offering confirmation, e.g. like the old
16161616
** jQuery.confirmer plugin which required a 2nd click of the
16171617
** button within X seconds to confirm. Right now it's simply
@@ -1629,11 +1629,11 @@
16291629
100,
16301630
"100%", 100, "125%", 125,
16311631
"150%", 150, "175%", 175,
16321632
"200%", 200, NULL);
16331633
CX("</div>");
1634
- CX("<div class='flex-container row'>");
1634
+ CX("<div class='flex-container flex-row'>");
16351635
CX("<textarea name='content' id='fileedit-content-editor' "
16361636
"class='fileedit' "
16371637
"rows='20' cols='80'>");
16381638
CX("Loading...");
16391639
CX("</textarea>");
@@ -1646,11 +1646,11 @@
16461646
CX("<div id='fileedit-tab-preview' "
16471647
"data-tab-parent='fileedit-tabs' "
16481648
"data-tab-label='Preview'"
16491649
">");
16501650
1651
- CX("<div class='fileedit-options flex-container row'>");
1651
+ CX("<div class='fileedit-options flex-container flex-row'>");
16521652
CX("<button id='btn-preview-refresh' "
16531653
"data-f-preview-from='fileedit-content-editor' "
16541654
/* ^^^ text source elem ID*/
16551655
"data-f-preview-via='_postPreview' "
16561656
/* ^^^ fossil.page[methodName](content, callback) */
@@ -1724,11 +1724,11 @@
17241724
CX("<div id='fileedit-tab-diff' "
17251725
"data-tab-parent='fileedit-tabs' "
17261726
"data-tab-label='Diff'"
17271727
">");
17281728
1729
- CX("<div class='fileedit-options flex-container row' "
1729
+ CX("<div class='fileedit-options flex-container flex-row' "
17301730
"id='fileedit-tab-diff-buttons'>"
17311731
"<button class='sbs'>Side-by-side</button>"
17321732
"<button class='unified'>Unified</button>"
17331733
"</div>");
17341734
CX("<div id='fileedit-tab-diff-wrapper'>"
@@ -1744,11 +1744,11 @@
17441744
"data-tab-label='Commit'"
17451745
">");
17461746
17471747
{
17481748
/******* Commit flags/options *******/
1749
- CX("<div class='fileedit-options flex-container row'>");
1749
+ CX("<div class='fileedit-options flex-container flex-row'>");
17501750
style_labeled_checkbox("cb-dry-run",
17511751
"dry_run", "Dry-run?", "1", 1,
17521752
"In dry-run mode, the Save button performs "
17531753
"all work needed for saving but then rolls "
17541754
"back the transaction, and thus does not "
@@ -1804,11 +1804,11 @@
18041804
CX("<input type='text' name='comment' "
18051805
"id='fileedit-comment'></input>");
18061806
CX("<textarea name='commentBig' class='hidden' "
18071807
"rows='5' id='fileedit-comment-big'></textarea>\n");
18081808
{ /* comment options... */
1809
- CX("<div class='flex-container column child-gap-small'>");
1809
+ CX("<div class='flex-container flex-column child-gap-small'>");
18101810
CX("<button id='comment-toggle' "
18111811
"title='Toggle between single- and multi-line comment mode, "
18121812
"noting that switching from multi- to single-line will cause "
18131813
"newlines to get stripped.'"
18141814
">Toggle single-/multi-line</button> ");
@@ -1819,11 +1819,11 @@
18191819
** https://fossil-scm.org/forum/forumpost/662da045a1
18201820
**
18211821
** If/when it's ever implemented, simply enable this block and
18221822
** adjust the container's layout accordingly (as of this
18231823
** writing, that means changing the CSS class from
1824
- ** 'flex-container column' to 'flex-container row').
1824
+ ** 'flex-container flex-column' to 'flex-container flex-row').
18251825
*/
18261826
style_select_list_str("comment-mimetype", "comment_mimetype",
18271827
"Comment style:",
18281828
"Specify how fossil will interpret the "
18291829
"comment string.",
@@ -1832,16 +1832,17 @@
18321832
"Markdown", "text/x-markdown",
18331833
"Plain text", "text/plain",
18341834
NULL);
18351835
CX("</div>\n");
18361836
}
1837
- CX("<div class='fileedit-hint flex-container row'>"
1837
+ CX("<div class='fileedit-hint flex-container flex-row'>"
18381838
"(Warning: switching from multi- to single-line mode will "
18391839
"strip out all newlines!)</div>");
18401840
}
18411841
CX("</div></fieldset>\n"/*commit comment options*/);
1842
- CX("<div class='flex-container column'>"
1842
+ CX("<div class='flex-container flex-column' "
1843
+ "id='fileedit-commit-button-wrapper'>"
18431844
"<button id='fileedit-btn-commit'>Commit</button>"
18441845
"</div>\n");
18451846
CX("<div id='fileedit-manifest'></div>\n"
18461847
/* Manifest gets rendered here after a commit. */);
18471848
}
18481849
--- src/fileedit.c
+++ src/fileedit.c
@@ -1607,11 +1607,11 @@
1607 CX("<div id='fileedit-tab-content' "
1608 "data-tab-parent='fileedit-tabs' "
1609 "data-tab-label='File Content'"
1610 ">");
1611 CX("<div class='fileedit-options "
1612 "flex-container row child-gap-small'>");
1613 if(1){
1614 /* Discard/reload button. Leave this out until we have a
1615 ** nice way of offering confirmation, e.g. like the old
1616 ** jQuery.confirmer plugin which required a 2nd click of the
1617 ** button within X seconds to confirm. Right now it's simply
@@ -1629,11 +1629,11 @@
1629 100,
1630 "100%", 100, "125%", 125,
1631 "150%", 150, "175%", 175,
1632 "200%", 200, NULL);
1633 CX("</div>");
1634 CX("<div class='flex-container row'>");
1635 CX("<textarea name='content' id='fileedit-content-editor' "
1636 "class='fileedit' "
1637 "rows='20' cols='80'>");
1638 CX("Loading...");
1639 CX("</textarea>");
@@ -1646,11 +1646,11 @@
1646 CX("<div id='fileedit-tab-preview' "
1647 "data-tab-parent='fileedit-tabs' "
1648 "data-tab-label='Preview'"
1649 ">");
1650
1651 CX("<div class='fileedit-options flex-container row'>");
1652 CX("<button id='btn-preview-refresh' "
1653 "data-f-preview-from='fileedit-content-editor' "
1654 /* ^^^ text source elem ID*/
1655 "data-f-preview-via='_postPreview' "
1656 /* ^^^ fossil.page[methodName](content, callback) */
@@ -1724,11 +1724,11 @@
1724 CX("<div id='fileedit-tab-diff' "
1725 "data-tab-parent='fileedit-tabs' "
1726 "data-tab-label='Diff'"
1727 ">");
1728
1729 CX("<div class='fileedit-options flex-container row' "
1730 "id='fileedit-tab-diff-buttons'>"
1731 "<button class='sbs'>Side-by-side</button>"
1732 "<button class='unified'>Unified</button>"
1733 "</div>");
1734 CX("<div id='fileedit-tab-diff-wrapper'>"
@@ -1744,11 +1744,11 @@
1744 "data-tab-label='Commit'"
1745 ">");
1746
1747 {
1748 /******* Commit flags/options *******/
1749 CX("<div class='fileedit-options flex-container row'>");
1750 style_labeled_checkbox("cb-dry-run",
1751 "dry_run", "Dry-run?", "1", 1,
1752 "In dry-run mode, the Save button performs "
1753 "all work needed for saving but then rolls "
1754 "back the transaction, and thus does not "
@@ -1804,11 +1804,11 @@
1804 CX("<input type='text' name='comment' "
1805 "id='fileedit-comment'></input>");
1806 CX("<textarea name='commentBig' class='hidden' "
1807 "rows='5' id='fileedit-comment-big'></textarea>\n");
1808 { /* comment options... */
1809 CX("<div class='flex-container column child-gap-small'>");
1810 CX("<button id='comment-toggle' "
1811 "title='Toggle between single- and multi-line comment mode, "
1812 "noting that switching from multi- to single-line will cause "
1813 "newlines to get stripped.'"
1814 ">Toggle single-/multi-line</button> ");
@@ -1819,11 +1819,11 @@
1819 ** https://fossil-scm.org/forum/forumpost/662da045a1
1820 **
1821 ** If/when it's ever implemented, simply enable this block and
1822 ** adjust the container's layout accordingly (as of this
1823 ** writing, that means changing the CSS class from
1824 ** 'flex-container column' to 'flex-container row').
1825 */
1826 style_select_list_str("comment-mimetype", "comment_mimetype",
1827 "Comment style:",
1828 "Specify how fossil will interpret the "
1829 "comment string.",
@@ -1832,16 +1832,17 @@
1832 "Markdown", "text/x-markdown",
1833 "Plain text", "text/plain",
1834 NULL);
1835 CX("</div>\n");
1836 }
1837 CX("<div class='fileedit-hint flex-container row'>"
1838 "(Warning: switching from multi- to single-line mode will "
1839 "strip out all newlines!)</div>");
1840 }
1841 CX("</div></fieldset>\n"/*commit comment options*/);
1842 CX("<div class='flex-container column'>"
 
1843 "<button id='fileedit-btn-commit'>Commit</button>"
1844 "</div>\n");
1845 CX("<div id='fileedit-manifest'></div>\n"
1846 /* Manifest gets rendered here after a commit. */);
1847 }
1848
--- src/fileedit.c
+++ src/fileedit.c
@@ -1607,11 +1607,11 @@
1607 CX("<div id='fileedit-tab-content' "
1608 "data-tab-parent='fileedit-tabs' "
1609 "data-tab-label='File Content'"
1610 ">");
1611 CX("<div class='fileedit-options "
1612 "flex-container flex-row child-gap-small'>");
1613 if(1){
1614 /* Discard/reload button. Leave this out until we have a
1615 ** nice way of offering confirmation, e.g. like the old
1616 ** jQuery.confirmer plugin which required a 2nd click of the
1617 ** button within X seconds to confirm. Right now it's simply
@@ -1629,11 +1629,11 @@
1629 100,
1630 "100%", 100, "125%", 125,
1631 "150%", 150, "175%", 175,
1632 "200%", 200, NULL);
1633 CX("</div>");
1634 CX("<div class='flex-container flex-row'>");
1635 CX("<textarea name='content' id='fileedit-content-editor' "
1636 "class='fileedit' "
1637 "rows='20' cols='80'>");
1638 CX("Loading...");
1639 CX("</textarea>");
@@ -1646,11 +1646,11 @@
1646 CX("<div id='fileedit-tab-preview' "
1647 "data-tab-parent='fileedit-tabs' "
1648 "data-tab-label='Preview'"
1649 ">");
1650
1651 CX("<div class='fileedit-options flex-container flex-row'>");
1652 CX("<button id='btn-preview-refresh' "
1653 "data-f-preview-from='fileedit-content-editor' "
1654 /* ^^^ text source elem ID*/
1655 "data-f-preview-via='_postPreview' "
1656 /* ^^^ fossil.page[methodName](content, callback) */
@@ -1724,11 +1724,11 @@
1724 CX("<div id='fileedit-tab-diff' "
1725 "data-tab-parent='fileedit-tabs' "
1726 "data-tab-label='Diff'"
1727 ">");
1728
1729 CX("<div class='fileedit-options flex-container flex-row' "
1730 "id='fileedit-tab-diff-buttons'>"
1731 "<button class='sbs'>Side-by-side</button>"
1732 "<button class='unified'>Unified</button>"
1733 "</div>");
1734 CX("<div id='fileedit-tab-diff-wrapper'>"
@@ -1744,11 +1744,11 @@
1744 "data-tab-label='Commit'"
1745 ">");
1746
1747 {
1748 /******* Commit flags/options *******/
1749 CX("<div class='fileedit-options flex-container flex-row'>");
1750 style_labeled_checkbox("cb-dry-run",
1751 "dry_run", "Dry-run?", "1", 1,
1752 "In dry-run mode, the Save button performs "
1753 "all work needed for saving but then rolls "
1754 "back the transaction, and thus does not "
@@ -1804,11 +1804,11 @@
1804 CX("<input type='text' name='comment' "
1805 "id='fileedit-comment'></input>");
1806 CX("<textarea name='commentBig' class='hidden' "
1807 "rows='5' id='fileedit-comment-big'></textarea>\n");
1808 { /* comment options... */
1809 CX("<div class='flex-container flex-column child-gap-small'>");
1810 CX("<button id='comment-toggle' "
1811 "title='Toggle between single- and multi-line comment mode, "
1812 "noting that switching from multi- to single-line will cause "
1813 "newlines to get stripped.'"
1814 ">Toggle single-/multi-line</button> ");
@@ -1819,11 +1819,11 @@
1819 ** https://fossil-scm.org/forum/forumpost/662da045a1
1820 **
1821 ** If/when it's ever implemented, simply enable this block and
1822 ** adjust the container's layout accordingly (as of this
1823 ** writing, that means changing the CSS class from
1824 ** 'flex-container flex-column' to 'flex-container flex-row').
1825 */
1826 style_select_list_str("comment-mimetype", "comment_mimetype",
1827 "Comment style:",
1828 "Specify how fossil will interpret the "
1829 "comment string.",
@@ -1832,16 +1832,17 @@
1832 "Markdown", "text/x-markdown",
1833 "Plain text", "text/plain",
1834 NULL);
1835 CX("</div>\n");
1836 }
1837 CX("<div class='fileedit-hint flex-container flex-row'>"
1838 "(Warning: switching from multi- to single-line mode will "
1839 "strip out all newlines!)</div>");
1840 }
1841 CX("</div></fieldset>\n"/*commit comment options*/);
1842 CX("<div class='flex-container flex-column' "
1843 "id='fileedit-commit-button-wrapper'>"
1844 "<button id='fileedit-btn-commit'>Commit</button>"
1845 "</div>\n");
1846 CX("<div id='fileedit-manifest'></div>\n"
1847 /* Manifest gets rendered here after a commit. */);
1848 }
1849

Keyboard Shortcuts

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