Fossil SCM

Added a 'Save and Close' button to wikiedit. Cleaned up the styling and wrapping of the status/links menu bars in fileedit and wikiedit. Minor style tweaks to get input field borders to appear in the default skin on Chromium.

stephan 2020-08-10 17:38 trunk
Commit 3814c9ff58e2f4ae69e4c3f4016cef1fadff17cec5d50ffb37b9642e30ed0358
+1 -2
--- src/fileedit.c
+++ src/fileedit.c
@@ -1708,12 +1708,11 @@
17081708
"150%", 150, "175%", 175,
17091709
"200%", 200, NULL);
17101710
CX("</div>");
17111711
CX("<div class='flex-container flex-column stretch'>");
17121712
CX("<textarea name='content' id='fileedit-content-editor' "
1713
- "class='fileedit' "
1714
- "rows='20' cols='80'>");
1713
+ "class='fileedit' rows='25'>");
17151714
CX("</textarea>");
17161715
CX("</div>"/*textarea wrapper*/);
17171716
CX("</div>"/*#tab-file-content*/);
17181717
}
17191718
17201719
--- src/fileedit.c
+++ src/fileedit.c
@@ -1708,12 +1708,11 @@
1708 "150%", 150, "175%", 175,
1709 "200%", 200, NULL);
1710 CX("</div>");
1711 CX("<div class='flex-container flex-column stretch'>");
1712 CX("<textarea name='content' id='fileedit-content-editor' "
1713 "class='fileedit' "
1714 "rows='20' cols='80'>");
1715 CX("</textarea>");
1716 CX("</div>"/*textarea wrapper*/);
1717 CX("</div>"/*#tab-file-content*/);
1718 }
1719
1720
--- src/fileedit.c
+++ src/fileedit.c
@@ -1708,12 +1708,11 @@
1708 "150%", 150, "175%", 175,
1709 "200%", 200, NULL);
1710 CX("</div>");
1711 CX("<div class='flex-container flex-column stretch'>");
1712 CX("<textarea name='content' id='fileedit-content-editor' "
1713 "class='fileedit' rows='25'>");
 
1714 CX("</textarea>");
1715 CX("</div>"/*textarea wrapper*/);
1716 CX("</div>"/*#tab-file-content*/);
1717 }
1718
1719
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -974,11 +974,11 @@
974974
//var marker = getEditMarker(wi, false);
975975
D.append(f.eName/*,marker*/,D.a(F.repoUrl('finfo',{name:file, m:rUrl}), file));
976976
977977
D.append(
978978
f.eLinks,
979
- D.append(D.span(), "mimetype "+(fi.mimetype||'???')),
979
+ D.append(D.span(), fi.mimetype||'?mimetype?'),
980980
D.a(F.repoUrl('info/'+rUrl), rHuman),
981981
D.a(F.repoUrl('timeline',{m:rUrl}), "timeline"),
982982
D.a(F.repoUrl('annotate',{filename:file, checkin:rUrl}),'annotate'),
983983
D.a(F.repoUrl('blame',{filename:file, checkin:rUrl}),'blame')
984984
);
985985
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -974,11 +974,11 @@
974 //var marker = getEditMarker(wi, false);
975 D.append(f.eName/*,marker*/,D.a(F.repoUrl('finfo',{name:file, m:rUrl}), file));
976
977 D.append(
978 f.eLinks,
979 D.append(D.span(), "mimetype "+(fi.mimetype||'???')),
980 D.a(F.repoUrl('info/'+rUrl), rHuman),
981 D.a(F.repoUrl('timeline',{m:rUrl}), "timeline"),
982 D.a(F.repoUrl('annotate',{filename:file, checkin:rUrl}),'annotate'),
983 D.a(F.repoUrl('blame',{filename:file, checkin:rUrl}),'blame')
984 );
985
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -974,11 +974,11 @@
974 //var marker = getEditMarker(wi, false);
975 D.append(f.eName/*,marker*/,D.a(F.repoUrl('finfo',{name:file, m:rUrl}), file));
976
977 D.append(
978 f.eLinks,
979 D.append(D.span(), fi.mimetype||'?mimetype?'),
980 D.a(F.repoUrl('info/'+rUrl), rHuman),
981 D.a(F.repoUrl('timeline',{m:rUrl}), "timeline"),
982 D.a(F.repoUrl('annotate',{filename:file, checkin:rUrl}),'annotate'),
983 D.a(F.repoUrl('blame',{filename:file, checkin:rUrl}),'blame')
984 );
985
--- src/fossil.page.wikiedit.js
+++ src/fossil.page.wikiedit.js
@@ -828,10 +828,13 @@
828828
P.base.originalHref = P.base.tag.href;
829829
P.e = { /* various DOM elements we work with... */
830830
taEditor: E('#wikiedit-content-editor'),
831831
btnReload: E("#wikiedit-tab-content button.wikiedit-content-reload"),
832832
btnSave: E("button.wikiedit-save"),
833
+ btnSaveClose: D.attr(E("button.wikiedit-save-close"),
834
+ 'title',
835
+ 'Save changes and return to the wiki reader.'),
833836
selectMimetype: E('select[name=mimetype]'),
834837
selectFontSizeWrap: E('#select-font-size'),
835838
// selectDiffWS: E('select[name=diff_ws]'),
836839
cbAutoPreview: E('#cb-preview-autoupdate > input[type=checkbox]'),
837840
previewTarget: E('#wikiedit-tab-preview-wrapper'),
@@ -861,10 +864,11 @@
861864
const theTab = ev.detail, btnSlot = theTab.querySelector('.save-button-slot');
862865
if(btnSlot){
863866
/* Several places make sense for a save button, so we'll
864867
move that button around to those tabs where it makes sense. */
865868
btnSlot.parentNode.insertBefore( P.e.btnSave, btnSlot );
869
+ btnSlot.parentNode.insertBefore( P.e.btnSaveClose, btnSlot );
866870
P.updateSaveButton();
867871
}
868872
if(theTab===P.e.tabs.preview){
869873
P.baseHrefForWiki();
870874
if(P.previewNeedsUpdate && P.e.cbAutoPreview.checked) P.preview();
@@ -908,18 +912,24 @@
908912
"click",(e)=>P.diff(false), false
909913
);
910914
if(0) P.e.btnCommit.addEventListener(
911915
"click",(e)=>P.commit(), false
912916
);
913
- const doSave = function(e){
917
+ const doSave = function(alsoClose){
914918
const w = P.winfo;
915919
if(!w){
916920
F.error("No page loaded.");
917921
return;
918922
}
919923
setTimeout(
920
- ()=>P.save(), 0
924
+ function(){
925
+ if(alsoClose){
926
+ P.save(()=>window.location.href=F.repoUrl('wiki',{name: w.name}));
927
+ }else{
928
+ P.save();
929
+ }
930
+ }, 0
921931
/* timeout is a workaround to allow save() to update the
922932
button's text (per forum feedback). The idea is to force
923933
the call of save() to happen *after* the confirmer
924934
callback returns so that we can change the button label
925935
without the confirmer setting it back to its
@@ -964,15 +974,21 @@
964974
P.e.btnReload.addEventListener('click', doReload, false);
965975
}
966976
if(P.config.useConfirmerButtons.save){
967977
F.confirmer(P.e.btnSave, {
968978
confirmText: "Really save changes?",
969
- onconfirm: doSave,
979
+ onconfirm: ()=>doSave(),
980
+ ticks: F.config.confirmerButtonTicks
981
+ });
982
+ F.confirmer(P.e.btnSaveClose, {
983
+ confirmText: "Really save changes?",
984
+ onconfirm: ()=>doSave(true),
970985
ticks: F.config.confirmerButtonTicks
971986
});
972987
}else{
973
- P.e.btnSave.addEventListener('click', doSave, false);
988
+ P.e.btnSave.addEventListener('click', ()=>doSave(), false);
989
+ P.e.btnSaveClose.addEventListener('click', ()=>doSave(true), false);
974990
}
975991
976992
P.e.taEditor.addEventListener(
977993
'change', ()=>P.stashContentChange(), false
978994
);
@@ -1088,11 +1104,12 @@
10881104
D.append(
10891105
f.eLinks,
10901106
D.a(F.repoUrl('wiki',{name:wi.name}),"viewer"),
10911107
D.a(F.repoUrl('whistory',{name:wi.name}),'history'),
10921108
D.a(F.repoUrl('attachlist',{page:wi.name}),"attachments"),
1093
- D.a(F.repoUrl('attachadd',{page:wi.name,from: F.repoUrl('wikiedit',{name: wi.name})}), "attach")
1109
+ D.a(F.repoUrl('attachadd',{page:wi.name,from: F.repoUrl('wikiedit',{name: wi.name})}), "attach"),
1110
+ D.a(F.repoUrl('wikiedit',{name:wi.name}),"editor permalink")
10941111
);
10951112
}
10961113
};
10971114
10981115
/**
@@ -1116,12 +1133,14 @@
11161133
*/
11171134
P.updateSaveButton = function(){
11181135
if(!this.winfo || !this.getStashedWinfo(this.winfo)){
11191136
D.disable(this.e.btnSave).innerText =
11201137
"No changes to save";
1138
+ D.disable(this.e.btnSaveClose);
11211139
}else{
1122
- D.enable(this.e.btnSave).innerText = "Save changes";
1140
+ D.enable(this.e.btnSave).innerText = "Save";
1141
+ D.enable(this.e.btnSaveClose);
11231142
}
11241143
return this;
11251144
};
11261145
11271146
/**
@@ -1357,24 +1376,27 @@
13571376
return this;
13581377
};
13591378
13601379
/**
13611380
Saves the current wiki page and re-populates the editor
1362
- with the saved state.
1381
+ with the saved state. If passed an argument, it is
1382
+ expected to be a function, which is called only if
1383
+ saving succeeds, after all other post-save processing.
13631384
*/
1364
- P.save = function callee(){
1385
+ P.save = function callee(onSuccessCallback){
13651386
if(!affirmPageLoaded()) return this;
13661387
const content = this.wikiContent();
1367
- if(!callee.onload){
1368
- const self = this;
1369
- callee.onload = function(w){
1370
- const oldWinfo = self.winfo;
1371
- self.unstashContent(oldWinfo);
1372
- self.dispatchEvent('wiki-page-loaded', w);
1373
- F.message("Saved page: ["+w.name+"].");
1374
- }
1375
- }
1388
+ const self = this;
1389
+ callee.onload = function(w){
1390
+ const oldWinfo = self.winfo;
1391
+ self.unstashContent(oldWinfo);
1392
+ self.dispatchEvent('wiki-page-loaded', w)/* will reset save buttons */;
1393
+ F.message("Saved page: ["+w.name+"].");
1394
+ if('function'===typeof onSuccessCallback){
1395
+ onSuccessCallback();
1396
+ }
1397
+ };
13761398
const fd = new FormData(), w = P.winfo;
13771399
fd.append('page',w.name);
13781400
fd.append('mimetype', w.mimetype);
13791401
fd.append('isnew', w.version ? 0 : 1);
13801402
fd.append('content', P.wikiContent());
@@ -1382,11 +1404,11 @@
13821404
"Saving page..."
13831405
).fetch('wikiajax/save',{
13841406
payload: fd,
13851407
responseType: 'json',
13861408
beforesend: function(){
1387
- D.disable(P.e.btnSave);
1409
+ D.disable(P.e.btnSave, P.e.btnSaveClose);
13881410
P.e.btnSave.innerText = "Saving...";
13891411
F.fetch.beforesend();
13901412
},
13911413
onload: callee.onload
13921414
});
13931415
--- src/fossil.page.wikiedit.js
+++ src/fossil.page.wikiedit.js
@@ -828,10 +828,13 @@
828 P.base.originalHref = P.base.tag.href;
829 P.e = { /* various DOM elements we work with... */
830 taEditor: E('#wikiedit-content-editor'),
831 btnReload: E("#wikiedit-tab-content button.wikiedit-content-reload"),
832 btnSave: E("button.wikiedit-save"),
 
 
 
833 selectMimetype: E('select[name=mimetype]'),
834 selectFontSizeWrap: E('#select-font-size'),
835 // selectDiffWS: E('select[name=diff_ws]'),
836 cbAutoPreview: E('#cb-preview-autoupdate > input[type=checkbox]'),
837 previewTarget: E('#wikiedit-tab-preview-wrapper'),
@@ -861,10 +864,11 @@
861 const theTab = ev.detail, btnSlot = theTab.querySelector('.save-button-slot');
862 if(btnSlot){
863 /* Several places make sense for a save button, so we'll
864 move that button around to those tabs where it makes sense. */
865 btnSlot.parentNode.insertBefore( P.e.btnSave, btnSlot );
 
866 P.updateSaveButton();
867 }
868 if(theTab===P.e.tabs.preview){
869 P.baseHrefForWiki();
870 if(P.previewNeedsUpdate && P.e.cbAutoPreview.checked) P.preview();
@@ -908,18 +912,24 @@
908 "click",(e)=>P.diff(false), false
909 );
910 if(0) P.e.btnCommit.addEventListener(
911 "click",(e)=>P.commit(), false
912 );
913 const doSave = function(e){
914 const w = P.winfo;
915 if(!w){
916 F.error("No page loaded.");
917 return;
918 }
919 setTimeout(
920 ()=>P.save(), 0
 
 
 
 
 
 
921 /* timeout is a workaround to allow save() to update the
922 button's text (per forum feedback). The idea is to force
923 the call of save() to happen *after* the confirmer
924 callback returns so that we can change the button label
925 without the confirmer setting it back to its
@@ -964,15 +974,21 @@
964 P.e.btnReload.addEventListener('click', doReload, false);
965 }
966 if(P.config.useConfirmerButtons.save){
967 F.confirmer(P.e.btnSave, {
968 confirmText: "Really save changes?",
969 onconfirm: doSave,
 
 
 
 
 
970 ticks: F.config.confirmerButtonTicks
971 });
972 }else{
973 P.e.btnSave.addEventListener('click', doSave, false);
 
974 }
975
976 P.e.taEditor.addEventListener(
977 'change', ()=>P.stashContentChange(), false
978 );
@@ -1088,11 +1104,12 @@
1088 D.append(
1089 f.eLinks,
1090 D.a(F.repoUrl('wiki',{name:wi.name}),"viewer"),
1091 D.a(F.repoUrl('whistory',{name:wi.name}),'history'),
1092 D.a(F.repoUrl('attachlist',{page:wi.name}),"attachments"),
1093 D.a(F.repoUrl('attachadd',{page:wi.name,from: F.repoUrl('wikiedit',{name: wi.name})}), "attach")
 
1094 );
1095 }
1096 };
1097
1098 /**
@@ -1116,12 +1133,14 @@
1116 */
1117 P.updateSaveButton = function(){
1118 if(!this.winfo || !this.getStashedWinfo(this.winfo)){
1119 D.disable(this.e.btnSave).innerText =
1120 "No changes to save";
 
1121 }else{
1122 D.enable(this.e.btnSave).innerText = "Save changes";
 
1123 }
1124 return this;
1125 };
1126
1127 /**
@@ -1357,24 +1376,27 @@
1357 return this;
1358 };
1359
1360 /**
1361 Saves the current wiki page and re-populates the editor
1362 with the saved state.
 
 
1363 */
1364 P.save = function callee(){
1365 if(!affirmPageLoaded()) return this;
1366 const content = this.wikiContent();
1367 if(!callee.onload){
1368 const self = this;
1369 callee.onload = function(w){
1370 const oldWinfo = self.winfo;
1371 self.unstashContent(oldWinfo);
1372 self.dispatchEvent('wiki-page-loaded', w);
1373 F.message("Saved page: ["+w.name+"].");
1374 }
1375 }
 
1376 const fd = new FormData(), w = P.winfo;
1377 fd.append('page',w.name);
1378 fd.append('mimetype', w.mimetype);
1379 fd.append('isnew', w.version ? 0 : 1);
1380 fd.append('content', P.wikiContent());
@@ -1382,11 +1404,11 @@
1382 "Saving page..."
1383 ).fetch('wikiajax/save',{
1384 payload: fd,
1385 responseType: 'json',
1386 beforesend: function(){
1387 D.disable(P.e.btnSave);
1388 P.e.btnSave.innerText = "Saving...";
1389 F.fetch.beforesend();
1390 },
1391 onload: callee.onload
1392 });
1393
--- src/fossil.page.wikiedit.js
+++ src/fossil.page.wikiedit.js
@@ -828,10 +828,13 @@
828 P.base.originalHref = P.base.tag.href;
829 P.e = { /* various DOM elements we work with... */
830 taEditor: E('#wikiedit-content-editor'),
831 btnReload: E("#wikiedit-tab-content button.wikiedit-content-reload"),
832 btnSave: E("button.wikiedit-save"),
833 btnSaveClose: D.attr(E("button.wikiedit-save-close"),
834 'title',
835 'Save changes and return to the wiki reader.'),
836 selectMimetype: E('select[name=mimetype]'),
837 selectFontSizeWrap: E('#select-font-size'),
838 // selectDiffWS: E('select[name=diff_ws]'),
839 cbAutoPreview: E('#cb-preview-autoupdate > input[type=checkbox]'),
840 previewTarget: E('#wikiedit-tab-preview-wrapper'),
@@ -861,10 +864,11 @@
864 const theTab = ev.detail, btnSlot = theTab.querySelector('.save-button-slot');
865 if(btnSlot){
866 /* Several places make sense for a save button, so we'll
867 move that button around to those tabs where it makes sense. */
868 btnSlot.parentNode.insertBefore( P.e.btnSave, btnSlot );
869 btnSlot.parentNode.insertBefore( P.e.btnSaveClose, btnSlot );
870 P.updateSaveButton();
871 }
872 if(theTab===P.e.tabs.preview){
873 P.baseHrefForWiki();
874 if(P.previewNeedsUpdate && P.e.cbAutoPreview.checked) P.preview();
@@ -908,18 +912,24 @@
912 "click",(e)=>P.diff(false), false
913 );
914 if(0) P.e.btnCommit.addEventListener(
915 "click",(e)=>P.commit(), false
916 );
917 const doSave = function(alsoClose){
918 const w = P.winfo;
919 if(!w){
920 F.error("No page loaded.");
921 return;
922 }
923 setTimeout(
924 function(){
925 if(alsoClose){
926 P.save(()=>window.location.href=F.repoUrl('wiki',{name: w.name}));
927 }else{
928 P.save();
929 }
930 }, 0
931 /* timeout is a workaround to allow save() to update the
932 button's text (per forum feedback). The idea is to force
933 the call of save() to happen *after* the confirmer
934 callback returns so that we can change the button label
935 without the confirmer setting it back to its
@@ -964,15 +974,21 @@
974 P.e.btnReload.addEventListener('click', doReload, false);
975 }
976 if(P.config.useConfirmerButtons.save){
977 F.confirmer(P.e.btnSave, {
978 confirmText: "Really save changes?",
979 onconfirm: ()=>doSave(),
980 ticks: F.config.confirmerButtonTicks
981 });
982 F.confirmer(P.e.btnSaveClose, {
983 confirmText: "Really save changes?",
984 onconfirm: ()=>doSave(true),
985 ticks: F.config.confirmerButtonTicks
986 });
987 }else{
988 P.e.btnSave.addEventListener('click', ()=>doSave(), false);
989 P.e.btnSaveClose.addEventListener('click', ()=>doSave(true), false);
990 }
991
992 P.e.taEditor.addEventListener(
993 'change', ()=>P.stashContentChange(), false
994 );
@@ -1088,11 +1104,12 @@
1104 D.append(
1105 f.eLinks,
1106 D.a(F.repoUrl('wiki',{name:wi.name}),"viewer"),
1107 D.a(F.repoUrl('whistory',{name:wi.name}),'history'),
1108 D.a(F.repoUrl('attachlist',{page:wi.name}),"attachments"),
1109 D.a(F.repoUrl('attachadd',{page:wi.name,from: F.repoUrl('wikiedit',{name: wi.name})}), "attach"),
1110 D.a(F.repoUrl('wikiedit',{name:wi.name}),"editor permalink")
1111 );
1112 }
1113 };
1114
1115 /**
@@ -1116,12 +1133,14 @@
1133 */
1134 P.updateSaveButton = function(){
1135 if(!this.winfo || !this.getStashedWinfo(this.winfo)){
1136 D.disable(this.e.btnSave).innerText =
1137 "No changes to save";
1138 D.disable(this.e.btnSaveClose);
1139 }else{
1140 D.enable(this.e.btnSave).innerText = "Save";
1141 D.enable(this.e.btnSaveClose);
1142 }
1143 return this;
1144 };
1145
1146 /**
@@ -1357,24 +1376,27 @@
1376 return this;
1377 };
1378
1379 /**
1380 Saves the current wiki page and re-populates the editor
1381 with the saved state. If passed an argument, it is
1382 expected to be a function, which is called only if
1383 saving succeeds, after all other post-save processing.
1384 */
1385 P.save = function callee(onSuccessCallback){
1386 if(!affirmPageLoaded()) return this;
1387 const content = this.wikiContent();
1388 const self = this;
1389 callee.onload = function(w){
1390 const oldWinfo = self.winfo;
1391 self.unstashContent(oldWinfo);
1392 self.dispatchEvent('wiki-page-loaded', w)/* will reset save buttons */;
1393 F.message("Saved page: ["+w.name+"].");
1394 if('function'===typeof onSuccessCallback){
1395 onSuccessCallback();
1396 }
1397 };
1398 const fd = new FormData(), w = P.winfo;
1399 fd.append('page',w.name);
1400 fd.append('mimetype', w.mimetype);
1401 fd.append('isnew', w.version ? 0 : 1);
1402 fd.append('content', P.wikiContent());
@@ -1382,11 +1404,11 @@
1404 "Saving page..."
1405 ).fetch('wikiajax/save',{
1406 payload: fd,
1407 responseType: 'json',
1408 beforesend: function(){
1409 D.disable(P.e.btnSave, P.e.btnSaveClose);
1410 P.e.btnSave.innerText = "Saving...";
1411 F.fetch.beforesend();
1412 },
1413 onload: callee.onload
1414 });
1415
--- src/style.fileedit.css
+++ src/style.fileedit.css
@@ -15,13 +15,14 @@
1515
height: initial/*undo damage from some skins*/;
1616
max-width: initial /* default.css pins it at 95% */;
1717
}
1818
body.fileedit textarea:focus,
1919
body.fileedit input:focus{
20
- /* The sudden appearance of a border (as in the Ardoise skin)
21
- shifts the layout in unsightly ways */
22
- border: initial;
20
+ /* Depending on the skin, it might be useful to add one or both of
21
+ the following... */
22
+ /*border-width: 1px;*/
23
+ /*border: initial; */
2324
}
2425
body.fileedit fieldset {
2526
margin: 0.5em 0 0.5em 0;
2627
padding: 0.25em 0;
2728
border-radius: 0.5em;
@@ -198,14 +199,19 @@
198199
display: flex;
199200
flex-direction: row;
200201
flex-wrap: wrap;
201202
justify-content: space-between;
202203
font-family: monospace;
203
- font-size: 1.2em;
204204
}
205
-body.fileedit #fileedit-edit-status > span {
205
+body.fileedit #fileedit-edit-status > span.name > a {
206206
display: block;
207
+ word-break: break-word /* needed for long paths */;
208
+}
209
+body.fileedit #fileedit-edit-status > span.links {
210
+ display: flex;
211
+ flex-wrap: wrap;
212
+ flex-direction: row;
207213
}
208214
body.fileedit #fileedit-file-selector span.is-new,
209215
body.fileedit #fileedit-file-selector span.is-modified {
210216
font-family: monospace;
211217
}
212218
--- src/style.fileedit.css
+++ src/style.fileedit.css
@@ -15,13 +15,14 @@
15 height: initial/*undo damage from some skins*/;
16 max-width: initial /* default.css pins it at 95% */;
17 }
18 body.fileedit textarea:focus,
19 body.fileedit input:focus{
20 /* The sudden appearance of a border (as in the Ardoise skin)
21 shifts the layout in unsightly ways */
22 border: initial;
 
23 }
24 body.fileedit fieldset {
25 margin: 0.5em 0 0.5em 0;
26 padding: 0.25em 0;
27 border-radius: 0.5em;
@@ -198,14 +199,19 @@
198 display: flex;
199 flex-direction: row;
200 flex-wrap: wrap;
201 justify-content: space-between;
202 font-family: monospace;
203 font-size: 1.2em;
204 }
205 body.fileedit #fileedit-edit-status > span {
206 display: block;
 
 
 
 
 
 
207 }
208 body.fileedit #fileedit-file-selector span.is-new,
209 body.fileedit #fileedit-file-selector span.is-modified {
210 font-family: monospace;
211 }
212
--- src/style.fileedit.css
+++ src/style.fileedit.css
@@ -15,13 +15,14 @@
15 height: initial/*undo damage from some skins*/;
16 max-width: initial /* default.css pins it at 95% */;
17 }
18 body.fileedit textarea:focus,
19 body.fileedit input:focus{
20 /* Depending on the skin, it might be useful to add one or both of
21 the following... */
22 /*border-width: 1px;*/
23 /*border: initial; */
24 }
25 body.fileedit fieldset {
26 margin: 0.5em 0 0.5em 0;
27 padding: 0.25em 0;
28 border-radius: 0.5em;
@@ -198,14 +199,19 @@
199 display: flex;
200 flex-direction: row;
201 flex-wrap: wrap;
202 justify-content: space-between;
203 font-family: monospace;
 
204 }
205 body.fileedit #fileedit-edit-status > span.name > a {
206 display: block;
207 word-break: break-word /* needed for long paths */;
208 }
209 body.fileedit #fileedit-edit-status > span.links {
210 display: flex;
211 flex-wrap: wrap;
212 flex-direction: row;
213 }
214 body.fileedit #fileedit-file-selector span.is-new,
215 body.fileedit #fileedit-file-selector span.is-modified {
216 font-family: monospace;
217 }
218
--- src/style.wikiedit.css
+++ src/style.wikiedit.css
@@ -6,14 +6,14 @@
66
body.wikiedit textarea:focus,
77
body.wikiedit input,
88
body.wikiedit input:focus,
99
body.wikiedit select,
1010
body.wikiedit select:focus{
11
- /* The sudden appearance of a border (as in the Ardoise skin)
12
- shifts the layout in unsightly ways */
13
- border: initial;
14
- border-width: 1px;
11
+ /* Depending on the skin, it might be useful to add one or both of
12
+ the following... */
13
+ /*border-width: 1px;*/
14
+ /*border: initial; */
1515
}
1616
body.wikiedit div.wikiedit-preview {
1717
margin: 0;
1818
padding: 0;
1919
}
@@ -139,15 +139,19 @@
139139
display: flex;
140140
flex-direction: row;
141141
flex-wrap: wrap;
142142
justify-content: space-between;
143143
font-family: monospace;
144
- font-size: 1.2em;
145144
}
146
-
147
-body.wikiedit #wikiedit-edit-status > span {
145
+body.wikiedit #wikiedit-edit-status > span.name {
148146
display: block;
147
+ word-break: break-word /* needed for long names, e.g. checkin/... */;
148
+}
149
+body.wikiedit #wikiedit-edit-status > span.links {
150
+ display: flex;
151
+ flex-wrap: wrap;
152
+ flex-direction: row;
149153
}
150154
body.wikiedit .WikiList span.is-new,
151155
body.wikiedit .WikiList span.is-modified,
152156
body.wikiedit .WikiList span.is-deleted {
153157
font-family: monospace;
154158
--- src/style.wikiedit.css
+++ src/style.wikiedit.css
@@ -6,14 +6,14 @@
6 body.wikiedit textarea:focus,
7 body.wikiedit input,
8 body.wikiedit input:focus,
9 body.wikiedit select,
10 body.wikiedit select:focus{
11 /* The sudden appearance of a border (as in the Ardoise skin)
12 shifts the layout in unsightly ways */
13 border: initial;
14 border-width: 1px;
15 }
16 body.wikiedit div.wikiedit-preview {
17 margin: 0;
18 padding: 0;
19 }
@@ -139,15 +139,19 @@
139 display: flex;
140 flex-direction: row;
141 flex-wrap: wrap;
142 justify-content: space-between;
143 font-family: monospace;
144 font-size: 1.2em;
145 }
146
147 body.wikiedit #wikiedit-edit-status > span {
148 display: block;
 
 
 
 
 
 
149 }
150 body.wikiedit .WikiList span.is-new,
151 body.wikiedit .WikiList span.is-modified,
152 body.wikiedit .WikiList span.is-deleted {
153 font-family: monospace;
154
--- src/style.wikiedit.css
+++ src/style.wikiedit.css
@@ -6,14 +6,14 @@
6 body.wikiedit textarea:focus,
7 body.wikiedit input,
8 body.wikiedit input:focus,
9 body.wikiedit select,
10 body.wikiedit select:focus{
11 /* Depending on the skin, it might be useful to add one or both of
12 the following... */
13 /*border-width: 1px;*/
14 /*border: initial; */
15 }
16 body.wikiedit div.wikiedit-preview {
17 margin: 0;
18 padding: 0;
19 }
@@ -139,15 +139,19 @@
139 display: flex;
140 flex-direction: row;
141 flex-wrap: wrap;
142 justify-content: space-between;
143 font-family: monospace;
 
144 }
145 body.wikiedit #wikiedit-edit-status > span.name {
 
146 display: block;
147 word-break: break-word /* needed for long names, e.g. checkin/... */;
148 }
149 body.wikiedit #wikiedit-edit-status > span.links {
150 display: flex;
151 flex-wrap: wrap;
152 flex-direction: row;
153 }
154 body.wikiedit .WikiList span.is-new,
155 body.wikiedit .WikiList span.is-modified,
156 body.wikiedit .WikiList span.is-deleted {
157 font-family: monospace;
158
+3 -2
--- src/wiki.c
+++ src/wiki.c
@@ -1176,16 +1176,17 @@
11761176
"edits, it requires confirmation (a second click) within "
11771177
"a few seconds or it will not reload.'"
11781178
">Discard &amp; Reload</button>");
11791179
CX("<button class='wikiedit-save' disabled='disabled'>"
11801180
"Save</button>"/*will get moved around dynamically*/);
1181
+ CX("<button class='wikiedit-save-close' disabled='disabled'>"
1182
+ "Save &amp; Close</button>"/*will get moved around dynamically*/);
11811183
CX("<span class='save-button-slot'></span>");
11821184
CX("</div>");
11831185
CX("<div class='flex-container flex-column stretch'>");
11841186
CX("<textarea name='content' id='wikiedit-content-editor' "
1185
- "class='wikiedit' "
1186
- "rows='25' cols='80'>");
1187
+ "class='wikiedit' rows='25'>");
11871188
CX("</textarea>");
11881189
CX("</div>"/*textarea wrapper*/);
11891190
CX("</div>"/*#tab-file-content*/);
11901191
}
11911192
/****** Preview tab ******/
11921193
--- src/wiki.c
+++ src/wiki.c
@@ -1176,16 +1176,17 @@
1176 "edits, it requires confirmation (a second click) within "
1177 "a few seconds or it will not reload.'"
1178 ">Discard &amp; Reload</button>");
1179 CX("<button class='wikiedit-save' disabled='disabled'>"
1180 "Save</button>"/*will get moved around dynamically*/);
 
 
1181 CX("<span class='save-button-slot'></span>");
1182 CX("</div>");
1183 CX("<div class='flex-container flex-column stretch'>");
1184 CX("<textarea name='content' id='wikiedit-content-editor' "
1185 "class='wikiedit' "
1186 "rows='25' cols='80'>");
1187 CX("</textarea>");
1188 CX("</div>"/*textarea wrapper*/);
1189 CX("</div>"/*#tab-file-content*/);
1190 }
1191 /****** Preview tab ******/
1192
--- src/wiki.c
+++ src/wiki.c
@@ -1176,16 +1176,17 @@
1176 "edits, it requires confirmation (a second click) within "
1177 "a few seconds or it will not reload.'"
1178 ">Discard &amp; Reload</button>");
1179 CX("<button class='wikiedit-save' disabled='disabled'>"
1180 "Save</button>"/*will get moved around dynamically*/);
1181 CX("<button class='wikiedit-save-close' disabled='disabled'>"
1182 "Save &amp; Close</button>"/*will get moved around dynamically*/);
1183 CX("<span class='save-button-slot'></span>");
1184 CX("</div>");
1185 CX("<div class='flex-container flex-column stretch'>");
1186 CX("<textarea name='content' id='wikiedit-content-editor' "
1187 "class='wikiedit' rows='25'>");
 
1188 CX("</textarea>");
1189 CX("</div>"/*textarea wrapper*/);
1190 CX("</div>"/*#tab-file-content*/);
1191 }
1192 /****** Preview tab ******/
1193

Keyboard Shortcuts

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