Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | 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. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | fileedit-ajaxify |
| Files: | files | file ages | folders |
| SHA3-256: |
d0a83a38f5676db9fb7e69a0751c84ac |
| User & Date: | stephan 2020-05-10 19:51:18.300 |
Context
|
2020-05-11
| ||
| 11:51 | /fileedit no longer requires URL arguments: it has a leaf checkin/file selection list on the first tab. ... (check-in: e184992161 user: stephan tags: fileedit-ajaxify) | |
|
2020-05-10
| ||
| 19:51 | 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. ... (check-in: d0a83a38f5 user: stephan tags: fileedit-ajaxify) | |
| 19:42 | Minor tooltip tweaks. ... (check-in: 0b1085d724 user: stephan tags: fileedit-ajaxify) | |
Changes
Changes to src/default_css.txt.
| ︙ | ︙ | |||
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 |
div.fileedit-tab-diff-wrapper {
margin: 0;
padding: 0;
}
#fileedit-comment {
width: 100%;
font-family: monospace;
}
.tab-container > .tabs > .tab-panel > .fileedit-options {
margin-top: 0;
border: none;
border-radius: 0;
border-bottom-width: 1px;
border-bottom-style: dotted;
| > > > | 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
div.fileedit-tab-diff-wrapper {
margin: 0;
padding: 0;
}
#fileedit-comment {
width: 100%;
font-family: monospace;
}
#fileedit-commit-button-wrapper {
margin: 0.25em;
}
.tab-container > .tabs > .tab-panel > .fileedit-options {
margin-top: 0;
border: none;
border-radius: 0;
border-bottom-width: 1px;
border-bottom-style: dotted;
|
| ︙ | ︙ | |||
1018 1019 1020 1021 1022 1023 1024 |
}
////////////////////////////////////////////////////////////////////
// Styles developed for /fileedit but which have wider
// applicability:
.flex-container {
display: flex;
}
| | | | | | | 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
}
////////////////////////////////////////////////////////////////////
// Styles developed for /fileedit but which have wider
// applicability:
.flex-container {
display: flex;
}
.flex-container.flex-row {
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.fileedit-options.flex-container.flex-row {
align-items: first baseline;
}
.fileedit-options > div > * {
margin: 0.25em;
}
.flex-container.flex-row.stretch {
flex-direction: row;
flex-wrap: wrap;
align-items: stretch;
margin: 0;
}
.flex-container.flex-column {
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.flex-container.flex-column.stretch {
align-items: stretch;
margin: 0;
}
.flex-container.child-gap-small > * {
margin: 0.25em;
}
.font-size-100 {
|
| ︙ | ︙ |
Changes to src/fileedit.c.
| ︙ | ︙ | |||
1605 1606 1607 1608 1609 1610 1611 |
/******* Content tab *******/
{
CX("<div id='fileedit-tab-content' "
"data-tab-parent='fileedit-tabs' "
"data-tab-label='File Content'"
">");
CX("<div class='fileedit-options "
| | | 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 |
/******* Content tab *******/
{
CX("<div id='fileedit-tab-content' "
"data-tab-parent='fileedit-tabs' "
"data-tab-label='File Content'"
">");
CX("<div class='fileedit-options "
"flex-container flex-row child-gap-small'>");
if(1){
/* Discard/reload button. Leave this out until we have a
** nice way of offering confirmation, e.g. like the old
** jQuery.confirmer plugin which required a 2nd click of the
** button within X seconds to confirm. Right now it's simply
** to easy to tap by accident. */
CX("<button class='fileedit-content-reload confirmer' "
|
| ︙ | ︙ | |||
1627 1628 1629 1630 1631 1632 1633 |
"editor_font_size", "Editor font size",
NULL/*tooltip*/,
100,
"100%", 100, "125%", 125,
"150%", 150, "175%", 175,
"200%", 200, NULL);
CX("</div>");
| | | | 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 |
"editor_font_size", "Editor font size",
NULL/*tooltip*/,
100,
"100%", 100, "125%", 125,
"150%", 150, "175%", 175,
"200%", 200, NULL);
CX("</div>");
CX("<div class='flex-container flex-row'>");
CX("<textarea name='content' id='fileedit-content-editor' "
"class='fileedit' "
"rows='20' cols='80'>");
CX("Loading...");
CX("</textarea>");
CX("</div>"/*textarea wrapper*/);
CX("</div>"/*#tab-file-content*/);
}
/****** Preview tab ******/
{
CX("<div id='fileedit-tab-preview' "
"data-tab-parent='fileedit-tabs' "
"data-tab-label='Preview'"
">");
CX("<div class='fileedit-options flex-container flex-row'>");
CX("<button id='btn-preview-refresh' "
"data-f-preview-from='fileedit-content-editor' "
/* ^^^ text source elem ID*/
"data-f-preview-via='_postPreview' "
/* ^^^ fossil.page[methodName](content, callback) */
"data-f-preview-to='fileedit-tab-preview-wrapper' "
/* ^^^ dest elem ID */
|
| ︙ | ︙ | |||
1722 1723 1724 1725 1726 1727 1728 |
/****** Diff tab ******/
{
CX("<div id='fileedit-tab-diff' "
"data-tab-parent='fileedit-tabs' "
"data-tab-label='Diff'"
">");
| | | | 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 |
/****** Diff tab ******/
{
CX("<div id='fileedit-tab-diff' "
"data-tab-parent='fileedit-tabs' "
"data-tab-label='Diff'"
">");
CX("<div class='fileedit-options flex-container flex-row' "
"id='fileedit-tab-diff-buttons'>"
"<button class='sbs'>Side-by-side</button>"
"<button class='unified'>Unified</button>"
"</div>");
CX("<div id='fileedit-tab-diff-wrapper'>"
"Diffs will be shown here."
"</div>");
CX("</div>"/*#fileedit-tab-diff*/);
}
/****** Commit ******/
CX("<div id='fileedit-tab-commit' "
"data-tab-parent='fileedit-tabs' "
"data-tab-select='1' "
"data-tab-label='Commit'"
">");
{
/******* Commit flags/options *******/
CX("<div class='fileedit-options flex-container flex-row'>");
style_labeled_checkbox("cb-dry-run",
"dry_run", "Dry-run?", "1", 1,
"In dry-run mode, the Save button performs "
"all work needed for saving but then rolls "
"back the transaction, and thus does not "
"really save.");
style_labeled_checkbox("cb-allow-fork",
|
| ︙ | ︙ | |||
1802 1803 1804 1805 1806 1807 1808 |
** mode. JS code sets up the ability to toggle between single-
** and multi-line modes. */
CX("<input type='text' name='comment' "
"id='fileedit-comment'></input>");
CX("<textarea name='commentBig' class='hidden' "
"rows='5' id='fileedit-comment-big'></textarea>\n");
{ /* comment options... */
| | | | | > | 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 |
** mode. JS code sets up the ability to toggle between single-
** and multi-line modes. */
CX("<input type='text' name='comment' "
"id='fileedit-comment'></input>");
CX("<textarea name='commentBig' class='hidden' "
"rows='5' id='fileedit-comment-big'></textarea>\n");
{ /* comment options... */
CX("<div class='flex-container flex-column child-gap-small'>");
CX("<button id='comment-toggle' "
"title='Toggle between single- and multi-line comment mode, "
"noting that switching from multi- to single-line will cause "
"newlines to get stripped.'"
">Toggle single-/multi-line</button> ");
if(0){
/* Manifests support an N-card (comment mime type) but it has
** yet to be honored where comments are rendered, so we don't
** currently offer it as an option here:
** https://fossil-scm.org/forum/forumpost/662da045a1
**
** If/when it's ever implemented, simply enable this block and
** adjust the container's layout accordingly (as of this
** writing, that means changing the CSS class from
** 'flex-container flex-column' to 'flex-container flex-row').
*/
style_select_list_str("comment-mimetype", "comment_mimetype",
"Comment style:",
"Specify how fossil will interpret the "
"comment string.",
NULL,
"Fossil", "text/x-fossil-wiki",
"Markdown", "text/x-markdown",
"Plain text", "text/plain",
NULL);
CX("</div>\n");
}
CX("<div class='fileedit-hint flex-container flex-row'>"
"(Warning: switching from multi- to single-line mode will "
"strip out all newlines!)</div>");
}
CX("</div></fieldset>\n"/*commit comment options*/);
CX("<div class='flex-container flex-column' "
"id='fileedit-commit-button-wrapper'>"
"<button id='fileedit-btn-commit'>Commit</button>"
"</div>\n");
CX("<div id='fileedit-manifest'></div>\n"
/* Manifest gets rendered here after a commit. */);
}
CX("</div>"/*#fileedit-tab-commit*/);
|
| ︙ | ︙ |