Fossil SCM

Minor style improvements. Dry-run mode is now OFF by default. Reordered checkboxes on the commit tab. Eliminated a couple more uses of the term 'stash' (for local edits), to avoid potential confusion with fossil's stash feature.

stephan 2020-05-17 06:40 fileedit-ajaxify
Commit 42f2cd77d5899d1a85566152997c3f5a59f887761c68f7f3e4df67f0cd9a5f32
+12 -11
--- src/fileedit.c
+++ src/fileedit.c
@@ -1876,11 +1876,11 @@
18761876
100,
18771877
"100%", 100, "125%", 125,
18781878
"150%", 150, "175%", 175,
18791879
"200%", 200, NULL);
18801880
CX("</div>");
1881
- CX("<div class='flex-container flex-column'>");
1881
+ CX("<div class='flex-container flex-column stretch'>");
18821882
CX("<textarea name='content' id='fileedit-content-editor' "
18831883
"class='fileedit' "
18841884
"rows='20' cols='80'>");
18851885
CX("</textarea>");
18861886
CX("</div>"/*textarea wrapper*/);
@@ -2005,11 +2005,12 @@
20052005
">");
20062006
{
20072007
/******* Commit flags/options *******/
20082008
CX("<div class='fileedit-options flex-container flex-row'>");
20092009
style_labeled_checkbox("cb-dry-run",
2010
- "dry_run", "Dry-run?", "1", 1,
2010
+ "dry_run", "Dry-run?", "1",
2011
+ 0,
20112012
"In dry-run mode, the Commit button performs"
20122013
"all work needed for committing changes but "
20132014
"then rolls back the transaction, and thus "
20142015
"does not really commit.");
20152016
style_labeled_checkbox("cb-allow-fork",
@@ -2040,10 +2041,17 @@
20402041
: (db_get_boolean("seen-delta-manifest",0)
20412042
|| cimi.flags & CIMINI_PREFER_DELTA),
20422043
"Will create a delta manifest, instead of "
20432044
"baseline, if conditions are favorable to "
20442045
"do so. This option is only a suggestion.");
2046
+ style_labeled_checkbox("cb-include-manifest",
2047
+ "include_manifest",
2048
+ "Response manifest?", "1",
2049
+ 0,
2050
+ "Include the manifest in the response? "
2051
+ "It's generally only useful for debug "
2052
+ "purposes.");
20452053
style_select_list_int("select-eol-style",
20462054
"eol", "EOL Style",
20472055
"EOL conversion policy, noting that "
20482056
"webpage-side processing may implicitly change "
20492057
"the line endings of the input.",
@@ -2052,17 +2060,10 @@
20522060
? 2 : 0),
20532061
"Inherit", 0,
20542062
"Unix", 1,
20552063
"Windows", 2,
20562064
NULL);
2057
- style_labeled_checkbox("cb-include-manifest",
2058
- "include_manifest",
2059
- "Response manifest?", "1",
2060
- 0,
2061
- "Include the manifest in the response? "
2062
- "It's generally only useful for debug "
2063
- "purposes.");
20642065
20652066
CX("</div>"/*checkboxes*/);
20662067
}
20672068
20682069
{ /******* Commit comment, button, and result manifest *******/
@@ -2143,12 +2144,12 @@
21432144
"and <code>checkin</code> URL arguments to this page.</li>");
21442145
CX("<li>The editor stores some number of local edits in one of "
21452146
"<code>window.fileStorage</code> or "
21462147
"<code>window.sessionStorage</code>, if able, but which storage "
21472148
"is unspecified and may differ across environments. When "
2148
- "committing or force-reloading a file, stashed edits to that "
2149
- "version are discarded.</li>");
2149
+ "committing or force-reloading a file, local edits to that "
2150
+ "file/checkin combination are discarded.</li>");
21502151
CX("</ul>");
21512152
}
21522153
CX("</div>"/*#fileedit-tab-help*/);
21532154
21542155
{
21552156
--- src/fileedit.c
+++ src/fileedit.c
@@ -1876,11 +1876,11 @@
1876 100,
1877 "100%", 100, "125%", 125,
1878 "150%", 150, "175%", 175,
1879 "200%", 200, NULL);
1880 CX("</div>");
1881 CX("<div class='flex-container flex-column'>");
1882 CX("<textarea name='content' id='fileedit-content-editor' "
1883 "class='fileedit' "
1884 "rows='20' cols='80'>");
1885 CX("</textarea>");
1886 CX("</div>"/*textarea wrapper*/);
@@ -2005,11 +2005,12 @@
2005 ">");
2006 {
2007 /******* Commit flags/options *******/
2008 CX("<div class='fileedit-options flex-container flex-row'>");
2009 style_labeled_checkbox("cb-dry-run",
2010 "dry_run", "Dry-run?", "1", 1,
 
2011 "In dry-run mode, the Commit button performs"
2012 "all work needed for committing changes but "
2013 "then rolls back the transaction, and thus "
2014 "does not really commit.");
2015 style_labeled_checkbox("cb-allow-fork",
@@ -2040,10 +2041,17 @@
2040 : (db_get_boolean("seen-delta-manifest",0)
2041 || cimi.flags & CIMINI_PREFER_DELTA),
2042 "Will create a delta manifest, instead of "
2043 "baseline, if conditions are favorable to "
2044 "do so. This option is only a suggestion.");
 
 
 
 
 
 
 
2045 style_select_list_int("select-eol-style",
2046 "eol", "EOL Style",
2047 "EOL conversion policy, noting that "
2048 "webpage-side processing may implicitly change "
2049 "the line endings of the input.",
@@ -2052,17 +2060,10 @@
2052 ? 2 : 0),
2053 "Inherit", 0,
2054 "Unix", 1,
2055 "Windows", 2,
2056 NULL);
2057 style_labeled_checkbox("cb-include-manifest",
2058 "include_manifest",
2059 "Response manifest?", "1",
2060 0,
2061 "Include the manifest in the response? "
2062 "It's generally only useful for debug "
2063 "purposes.");
2064
2065 CX("</div>"/*checkboxes*/);
2066 }
2067
2068 { /******* Commit comment, button, and result manifest *******/
@@ -2143,12 +2144,12 @@
2143 "and <code>checkin</code> URL arguments to this page.</li>");
2144 CX("<li>The editor stores some number of local edits in one of "
2145 "<code>window.fileStorage</code> or "
2146 "<code>window.sessionStorage</code>, if able, but which storage "
2147 "is unspecified and may differ across environments. When "
2148 "committing or force-reloading a file, stashed edits to that "
2149 "version are discarded.</li>");
2150 CX("</ul>");
2151 }
2152 CX("</div>"/*#fileedit-tab-help*/);
2153
2154 {
2155
--- src/fileedit.c
+++ src/fileedit.c
@@ -1876,11 +1876,11 @@
1876 100,
1877 "100%", 100, "125%", 125,
1878 "150%", 150, "175%", 175,
1879 "200%", 200, NULL);
1880 CX("</div>");
1881 CX("<div class='flex-container flex-column stretch'>");
1882 CX("<textarea name='content' id='fileedit-content-editor' "
1883 "class='fileedit' "
1884 "rows='20' cols='80'>");
1885 CX("</textarea>");
1886 CX("</div>"/*textarea wrapper*/);
@@ -2005,11 +2005,12 @@
2005 ">");
2006 {
2007 /******* Commit flags/options *******/
2008 CX("<div class='fileedit-options flex-container flex-row'>");
2009 style_labeled_checkbox("cb-dry-run",
2010 "dry_run", "Dry-run?", "1",
2011 0,
2012 "In dry-run mode, the Commit button performs"
2013 "all work needed for committing changes but "
2014 "then rolls back the transaction, and thus "
2015 "does not really commit.");
2016 style_labeled_checkbox("cb-allow-fork",
@@ -2040,10 +2041,17 @@
2041 : (db_get_boolean("seen-delta-manifest",0)
2042 || cimi.flags & CIMINI_PREFER_DELTA),
2043 "Will create a delta manifest, instead of "
2044 "baseline, if conditions are favorable to "
2045 "do so. This option is only a suggestion.");
2046 style_labeled_checkbox("cb-include-manifest",
2047 "include_manifest",
2048 "Response manifest?", "1",
2049 0,
2050 "Include the manifest in the response? "
2051 "It's generally only useful for debug "
2052 "purposes.");
2053 style_select_list_int("select-eol-style",
2054 "eol", "EOL Style",
2055 "EOL conversion policy, noting that "
2056 "webpage-side processing may implicitly change "
2057 "the line endings of the input.",
@@ -2052,17 +2060,10 @@
2060 ? 2 : 0),
2061 "Inherit", 0,
2062 "Unix", 1,
2063 "Windows", 2,
2064 NULL);
 
 
 
 
 
 
 
2065
2066 CX("</div>"/*checkboxes*/);
2067 }
2068
2069 { /******* Commit comment, button, and result manifest *******/
@@ -2143,12 +2144,12 @@
2144 "and <code>checkin</code> URL arguments to this page.</li>");
2145 CX("<li>The editor stores some number of local edits in one of "
2146 "<code>window.fileStorage</code> or "
2147 "<code>window.sessionStorage</code>, if able, but which storage "
2148 "is unspecified and may differ across environments. When "
2149 "committing or force-reloading a file, local edits to that "
2150 "file/checkin combination are discarded.</li>");
2151 CX("</ul>");
2152 }
2153 CX("</div>"/*#fileedit-tab-help*/);
2154
2155 {
2156
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -991,11 +991,11 @@
991991
onload(this.contentFromStash()||'',{
992992
'x-fileedit-file-perm': stashFinfo.isExe ? 'x' : undefined,
993993
'content-type': stashFinfo.mimetype,
994994
'x-fileedit-checkin-branch': stashFinfo.branch
995995
});
996
- F.message("Fetched from the local-edit stash:",
996
+ F.message("Fetched from the local-edit storage:",
997997
F.hashDigits(stashFinfo.checkin),
998998
stashFinfo.filename);
999999
return this;
10001000
}
10011001
F.message(
10021002
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -991,11 +991,11 @@
991 onload(this.contentFromStash()||'',{
992 'x-fileedit-file-perm': stashFinfo.isExe ? 'x' : undefined,
993 'content-type': stashFinfo.mimetype,
994 'x-fileedit-checkin-branch': stashFinfo.branch
995 });
996 F.message("Fetched from the local-edit stash:",
997 F.hashDigits(stashFinfo.checkin),
998 stashFinfo.filename);
999 return this;
1000 }
1001 F.message(
1002
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -991,11 +991,11 @@
991 onload(this.contentFromStash()||'',{
992 'x-fileedit-file-perm': stashFinfo.isExe ? 'x' : undefined,
993 'content-type': stashFinfo.mimetype,
994 'x-fileedit-checkin-branch': stashFinfo.branch
995 });
996 F.message("Fetched from the local-edit storage:",
997 F.hashDigits(stashFinfo.checkin),
998 stashFinfo.filename);
999 return this;
1000 }
1001 F.message(
1002
--- src/style.fileedit.css
+++ src/style.fileedit.css
@@ -5,14 +5,12 @@
55
body.fileedit .warning {
66
padding: 0.25em;
77
}
88
body.fileedit textarea {
99
font-family: monospace;
10
- width: calc(100% - 0.5em)
11
- /*width 100% can cause a scrollbar to appear on the parent*/;
1210
flex: 10 1 auto;
13
- height: initial;
11
+ height: initial/*undo damage from some skins*/;
1412
}
1513
body.fileedit textarea:focus,
1614
body.fileedit input:focus{
1715
/* The sudden appearance of a border (as in the Ardoise skin)
1816
shifts the layout in unsightly ways */
@@ -66,10 +64,13 @@
6664
body.fileedit #fileedit-tabs {
6765
margin: 1em 0 0 0;
6866
}
6967
body.fileedit #fileedit-tab-preview-wrapper {
7068
overflow: auto;
69
+}
70
+body.fileedit #fileedit-tab-fileselect > h1 {
71
+ margin: 0;
7172
}
7273
body.fileedit .fileedit-options.commit-message > div {
7374
display: flex;
7475
flex-direction: column;
7576
align-items: stretch;
7677
--- src/style.fileedit.css
+++ src/style.fileedit.css
@@ -5,14 +5,12 @@
5 body.fileedit .warning {
6 padding: 0.25em;
7 }
8 body.fileedit textarea {
9 font-family: monospace;
10 width: calc(100% - 0.5em)
11 /*width 100% can cause a scrollbar to appear on the parent*/;
12 flex: 10 1 auto;
13 height: initial;
14 }
15 body.fileedit textarea:focus,
16 body.fileedit input:focus{
17 /* The sudden appearance of a border (as in the Ardoise skin)
18 shifts the layout in unsightly ways */
@@ -66,10 +64,13 @@
66 body.fileedit #fileedit-tabs {
67 margin: 1em 0 0 0;
68 }
69 body.fileedit #fileedit-tab-preview-wrapper {
70 overflow: auto;
 
 
 
71 }
72 body.fileedit .fileedit-options.commit-message > div {
73 display: flex;
74 flex-direction: column;
75 align-items: stretch;
76
--- src/style.fileedit.css
+++ src/style.fileedit.css
@@ -5,14 +5,12 @@
5 body.fileedit .warning {
6 padding: 0.25em;
7 }
8 body.fileedit textarea {
9 font-family: monospace;
 
 
10 flex: 10 1 auto;
11 height: initial/*undo damage from some skins*/;
12 }
13 body.fileedit textarea:focus,
14 body.fileedit input:focus{
15 /* The sudden appearance of a border (as in the Ardoise skin)
16 shifts the layout in unsightly ways */
@@ -66,10 +64,13 @@
64 body.fileedit #fileedit-tabs {
65 margin: 1em 0 0 0;
66 }
67 body.fileedit #fileedit-tab-preview-wrapper {
68 overflow: auto;
69 }
70 body.fileedit #fileedit-tab-fileselect > h1 {
71 margin: 0;
72 }
73 body.fileedit .fileedit-options.commit-message > div {
74 display: flex;
75 flex-direction: column;
76 align-items: stretch;
77

Keyboard Shortcuts

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