Fossil SCM

Reworked how /wikiedit edit status is displayed, added history/attachment links to the new info bar, and remove attachment links from the Help tab.

stephan 2020-08-01 16:07 trunk
Commit fb77abd3b5b116b423870f3045aa464172d6900712e007094da54792f6009d0d
--- src/fossil.page.wikiedit.js
+++ src/fossil.page.wikiedit.js
@@ -591,11 +591,11 @@
591591
selectFontSizeWrap: E('#select-font-size'),
592592
// selectDiffWS: E('select[name=diff_ws]'),
593593
cbAutoPreview: E('#cb-preview-autoupdate > input[type=checkbox]'),
594594
previewTarget: E('#wikiedit-tab-preview-wrapper'),
595595
diffTarget: E('#wikiedit-tab-diff-wrapper'),
596
- attachmentWrapper: E("#wikiedit-attachments"),
596
+ editStatus: E('#wikiedit-edit-status'),
597597
tabContainer: E('#wikiedit-tabs'),
598598
tabs:{
599599
pageList: E('#wikiedit-tab-pages'),
600600
content: E('#wikiedit-tab-content'),
601601
preview: E('#wikiedit-tab-preview'),
@@ -603,10 +603,11 @@
603603
misc: E('#wikiedit-tab-misc')
604604
//commit: E('#wikiedit-tab-commit')
605605
}
606606
};
607607
P.tabs = new fossil.TabManager(D.clearElement(P.e.tabContainer));
608
+ P.tabs.e.container.insertBefore(P.e.editStatus, P.tabs.e.tabs);
608609
P.tabs.e.container.insertBefore(
609610
/* Move the status bar between the tab buttons and
610611
tab panels. Seems to be the best fit in terms of
611612
functionality and visibility. */
612613
E('#fossil-status-bar'), P.tabs.e.tabs
@@ -632,12 +633,10 @@
632633
the page size again. Weird. Maybe FF-specific. Note that
633634
this weirdness happens even though P.e.diffTarget's parent
634635
is hidden (and therefore P.e.diffTarget is also hidden).
635636
*/
636637
D.removeClass(P.e.diffTarget, 'hidden');
637
- }else if(theTab===P.e.tabs.misc){
638
- P.updateAttachmentView();
639638
}
640639
}
641640
);
642641
P.tabs.addEventListener(
643642
/* Set up auto-refresh of the preview tab... */
@@ -770,18 +769,18 @@
770769
P.e.selectMimetype.value = winfo.mimetype;
771770
P.tabs.switchToTab(P.e.tabs.content);
772771
P.wikiContent(winfo.content || '');
773772
WikiList.e.select.value = winfo.name;
774773
if(!winfo.version && winfo.type!=='sandbox'){
775
- F.error('You are editing a new, unsaved page:',winfo.name);
774
+ F.message('You are editing a new, unsaved page:',winfo.name);
776775
}
777776
P.updatePageTitle();
778777
},
779778
false
780779
);
781780
P.addEventListener('wiki-stash-updated', ()=>P.updateSaveButton())
782
- .updatePageTitle().updateAttachmentView().updateSaveButton();
781
+ .updatePageTitle().updateSaveButton();
783782
}/*F.onPageLoad()*/);
784783
785784
/**
786785
Returns true if fossil.page.winfo is set, indicating that a page
787786
has been loaded, else it reports an error and returns false.
@@ -791,32 +790,58 @@
791790
*/
792791
const affirmPageLoaded = function(quiet){
793792
if(!P.winfo && !quiet) F.error("No wiki page is loaded.");
794793
return !!P.winfo;
795794
};
795
+
796
+ /** Updates the in-tab title/edit status information */
797
+ P.updateEditStatus = function f(editFlag/*for use by updatePageTitle() only*/){
798
+ if(!f.eLinks){
799
+ f.eName = P.e.editStatus.querySelector('span.name');
800
+ f.eLinks = P.e.editStatus.querySelector('span.links');
801
+ }
802
+ const wi = this.winfo;
803
+ D.clearElement(f.eName, f.eLinks);
804
+ if(!wi){
805
+ D.append(f.eName, '(no page loaded)');
806
+ return;
807
+ }
808
+ var marker = editFlag || '';
809
+ if(0===arguments){
810
+ if(!wi.version && 'sandbox'!==wi.type) marker = P.config.editStateMarkers.isNew;
811
+ else if($stash.getWinfo(wi)) marker = P.config.editStateMarkers.isModified;
812
+ }
813
+ D.append(f.eName,marker,wi.name,);
814
+ if(wi.version){
815
+ D.append(
816
+ f.eLinks,
817
+ D.a(F.repoUrl('whistory',{name:wi.name}),'[history]'),
818
+ D.a(F.repoUrl('attachlist',{page:wi.name}),"[attachments]"),
819
+ D.a(F.repoUrl('attachadd',{page:wi.name,from: F.repoUrl('wikiedit',{name: wi.name})}), "[attach]")
820
+ );
821
+ }
822
+ };
796823
797824
/**
798825
Update the page title and header based on the state of
799826
this.winfo. A no-op if this.winfo is not set. Returns this.
800827
*/
801828
P.updatePageTitle = function f(){
802829
if(!f.titleElement){
803830
f.titleElement = document.head.querySelector('title');
804
- f.pageTitleHeader = document.querySelector('#wikiedit-page-name > span');
805831
}
806
- var title = [];
832
+ var title, marker = '';
807833
const wi = P.winfo;
808834
if(wi){
809
- if(!wi.version && 'sandbox'!==wi.type) title.push(P.config.editStateMarkers.isNew);
810
- else if($stash.getWinfo(wi)) title.push(P.config.editStateMarkers.isModified)
811
- title.push(wi.name);
835
+ if(!wi.version && 'sandbox'!==wi.type) marker = P.config.editStateMarkers.isNew;
836
+ else if($stash.getWinfo(wi)) marker = P.config.editStateMarkers.isModified;
837
+ title = wi.name;
812838
}else{
813
- title.push('(no page loaded)');
839
+ title = 'no page loaded';
814840
}
815
- title = title.join(' ');
816
- f.pageTitleHeader.innerText = title;
817
- f.titleElement.innerText = 'Wiki Editor:' + title;
841
+ f.titleElement.innerText = 'Wiki Editor: ' + marker + title;
842
+ this.updateEditStatus(marker);
818843
return this;
819844
};
820845
821846
/**
822847
Change the save button depending on whether we have stuff to save
@@ -830,44 +855,10 @@
830855
D.enable(this.e.btnSave).innerText = "Save changes";
831856
}
832857
return this;
833858
};
834859
835
- /** Updates attachment-related links and returns this. */
836
- P.updateAttachmentView = function(){
837
- const wrapper = P.e.attachmentWrapper;
838
- D.clearElement(wrapper);
839
- const ul = D.ul();
840
- D.append(wrapper, ul);
841
- if(!P.winfo){
842
- D.append(D.li(ul),
843
- "Load a page to get access to its attachment-related pages.");
844
- return this;
845
- }else if(!P.winfo.version){
846
- D.append(D.li(ul),
847
- "A new/unsaved page cannot have attachments. Save it first.");
848
- return this;
849
- }
850
- const wi = P.winfo;
851
- D.append(
852
- D.li(ul),
853
- D.a(F.repoUrl('attachadd',{
854
- page:wi.name,
855
- from: F.repoUrl('wikiedit',{
856
- name: wi.name
857
- })
858
- }), "Add attachments.")
859
- );
860
- D.append(
861
- D.li(ul),
862
- D.a(F.repoUrl('attachlist',{page:wi.name}),
863
- "List attachments"),
864
- " (if any)."
865
- );
866
- return this;
867
- };
868
-
869860
/**
870861
Getter (if called with no args) or setter (if passed an arg) for
871862
the current file content.
872863
873864
The setter form sets the content, dispatches a
874865
--- src/fossil.page.wikiedit.js
+++ src/fossil.page.wikiedit.js
@@ -591,11 +591,11 @@
591 selectFontSizeWrap: E('#select-font-size'),
592 // selectDiffWS: E('select[name=diff_ws]'),
593 cbAutoPreview: E('#cb-preview-autoupdate > input[type=checkbox]'),
594 previewTarget: E('#wikiedit-tab-preview-wrapper'),
595 diffTarget: E('#wikiedit-tab-diff-wrapper'),
596 attachmentWrapper: E("#wikiedit-attachments"),
597 tabContainer: E('#wikiedit-tabs'),
598 tabs:{
599 pageList: E('#wikiedit-tab-pages'),
600 content: E('#wikiedit-tab-content'),
601 preview: E('#wikiedit-tab-preview'),
@@ -603,10 +603,11 @@
603 misc: E('#wikiedit-tab-misc')
604 //commit: E('#wikiedit-tab-commit')
605 }
606 };
607 P.tabs = new fossil.TabManager(D.clearElement(P.e.tabContainer));
 
608 P.tabs.e.container.insertBefore(
609 /* Move the status bar between the tab buttons and
610 tab panels. Seems to be the best fit in terms of
611 functionality and visibility. */
612 E('#fossil-status-bar'), P.tabs.e.tabs
@@ -632,12 +633,10 @@
632 the page size again. Weird. Maybe FF-specific. Note that
633 this weirdness happens even though P.e.diffTarget's parent
634 is hidden (and therefore P.e.diffTarget is also hidden).
635 */
636 D.removeClass(P.e.diffTarget, 'hidden');
637 }else if(theTab===P.e.tabs.misc){
638 P.updateAttachmentView();
639 }
640 }
641 );
642 P.tabs.addEventListener(
643 /* Set up auto-refresh of the preview tab... */
@@ -770,18 +769,18 @@
770 P.e.selectMimetype.value = winfo.mimetype;
771 P.tabs.switchToTab(P.e.tabs.content);
772 P.wikiContent(winfo.content || '');
773 WikiList.e.select.value = winfo.name;
774 if(!winfo.version && winfo.type!=='sandbox'){
775 F.error('You are editing a new, unsaved page:',winfo.name);
776 }
777 P.updatePageTitle();
778 },
779 false
780 );
781 P.addEventListener('wiki-stash-updated', ()=>P.updateSaveButton())
782 .updatePageTitle().updateAttachmentView().updateSaveButton();
783 }/*F.onPageLoad()*/);
784
785 /**
786 Returns true if fossil.page.winfo is set, indicating that a page
787 has been loaded, else it reports an error and returns false.
@@ -791,32 +790,58 @@
791 */
792 const affirmPageLoaded = function(quiet){
793 if(!P.winfo && !quiet) F.error("No wiki page is loaded.");
794 return !!P.winfo;
795 };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
796
797 /**
798 Update the page title and header based on the state of
799 this.winfo. A no-op if this.winfo is not set. Returns this.
800 */
801 P.updatePageTitle = function f(){
802 if(!f.titleElement){
803 f.titleElement = document.head.querySelector('title');
804 f.pageTitleHeader = document.querySelector('#wikiedit-page-name > span');
805 }
806 var title = [];
807 const wi = P.winfo;
808 if(wi){
809 if(!wi.version && 'sandbox'!==wi.type) title.push(P.config.editStateMarkers.isNew);
810 else if($stash.getWinfo(wi)) title.push(P.config.editStateMarkers.isModified)
811 title.push(wi.name);
812 }else{
813 title.push('(no page loaded)');
814 }
815 title = title.join(' ');
816 f.pageTitleHeader.innerText = title;
817 f.titleElement.innerText = 'Wiki Editor:' + title;
818 return this;
819 };
820
821 /**
822 Change the save button depending on whether we have stuff to save
@@ -830,44 +855,10 @@
830 D.enable(this.e.btnSave).innerText = "Save changes";
831 }
832 return this;
833 };
834
835 /** Updates attachment-related links and returns this. */
836 P.updateAttachmentView = function(){
837 const wrapper = P.e.attachmentWrapper;
838 D.clearElement(wrapper);
839 const ul = D.ul();
840 D.append(wrapper, ul);
841 if(!P.winfo){
842 D.append(D.li(ul),
843 "Load a page to get access to its attachment-related pages.");
844 return this;
845 }else if(!P.winfo.version){
846 D.append(D.li(ul),
847 "A new/unsaved page cannot have attachments. Save it first.");
848 return this;
849 }
850 const wi = P.winfo;
851 D.append(
852 D.li(ul),
853 D.a(F.repoUrl('attachadd',{
854 page:wi.name,
855 from: F.repoUrl('wikiedit',{
856 name: wi.name
857 })
858 }), "Add attachments.")
859 );
860 D.append(
861 D.li(ul),
862 D.a(F.repoUrl('attachlist',{page:wi.name}),
863 "List attachments"),
864 " (if any)."
865 );
866 return this;
867 };
868
869 /**
870 Getter (if called with no args) or setter (if passed an arg) for
871 the current file content.
872
873 The setter form sets the content, dispatches a
874
--- src/fossil.page.wikiedit.js
+++ src/fossil.page.wikiedit.js
@@ -591,11 +591,11 @@
591 selectFontSizeWrap: E('#select-font-size'),
592 // selectDiffWS: E('select[name=diff_ws]'),
593 cbAutoPreview: E('#cb-preview-autoupdate > input[type=checkbox]'),
594 previewTarget: E('#wikiedit-tab-preview-wrapper'),
595 diffTarget: E('#wikiedit-tab-diff-wrapper'),
596 editStatus: E('#wikiedit-edit-status'),
597 tabContainer: E('#wikiedit-tabs'),
598 tabs:{
599 pageList: E('#wikiedit-tab-pages'),
600 content: E('#wikiedit-tab-content'),
601 preview: E('#wikiedit-tab-preview'),
@@ -603,10 +603,11 @@
603 misc: E('#wikiedit-tab-misc')
604 //commit: E('#wikiedit-tab-commit')
605 }
606 };
607 P.tabs = new fossil.TabManager(D.clearElement(P.e.tabContainer));
608 P.tabs.e.container.insertBefore(P.e.editStatus, P.tabs.e.tabs);
609 P.tabs.e.container.insertBefore(
610 /* Move the status bar between the tab buttons and
611 tab panels. Seems to be the best fit in terms of
612 functionality and visibility. */
613 E('#fossil-status-bar'), P.tabs.e.tabs
@@ -632,12 +633,10 @@
633 the page size again. Weird. Maybe FF-specific. Note that
634 this weirdness happens even though P.e.diffTarget's parent
635 is hidden (and therefore P.e.diffTarget is also hidden).
636 */
637 D.removeClass(P.e.diffTarget, 'hidden');
 
 
638 }
639 }
640 );
641 P.tabs.addEventListener(
642 /* Set up auto-refresh of the preview tab... */
@@ -770,18 +769,18 @@
769 P.e.selectMimetype.value = winfo.mimetype;
770 P.tabs.switchToTab(P.e.tabs.content);
771 P.wikiContent(winfo.content || '');
772 WikiList.e.select.value = winfo.name;
773 if(!winfo.version && winfo.type!=='sandbox'){
774 F.message('You are editing a new, unsaved page:',winfo.name);
775 }
776 P.updatePageTitle();
777 },
778 false
779 );
780 P.addEventListener('wiki-stash-updated', ()=>P.updateSaveButton())
781 .updatePageTitle().updateSaveButton();
782 }/*F.onPageLoad()*/);
783
784 /**
785 Returns true if fossil.page.winfo is set, indicating that a page
786 has been loaded, else it reports an error and returns false.
@@ -791,32 +790,58 @@
790 */
791 const affirmPageLoaded = function(quiet){
792 if(!P.winfo && !quiet) F.error("No wiki page is loaded.");
793 return !!P.winfo;
794 };
795
796 /** Updates the in-tab title/edit status information */
797 P.updateEditStatus = function f(editFlag/*for use by updatePageTitle() only*/){
798 if(!f.eLinks){
799 f.eName = P.e.editStatus.querySelector('span.name');
800 f.eLinks = P.e.editStatus.querySelector('span.links');
801 }
802 const wi = this.winfo;
803 D.clearElement(f.eName, f.eLinks);
804 if(!wi){
805 D.append(f.eName, '(no page loaded)');
806 return;
807 }
808 var marker = editFlag || '';
809 if(0===arguments){
810 if(!wi.version && 'sandbox'!==wi.type) marker = P.config.editStateMarkers.isNew;
811 else if($stash.getWinfo(wi)) marker = P.config.editStateMarkers.isModified;
812 }
813 D.append(f.eName,marker,wi.name,);
814 if(wi.version){
815 D.append(
816 f.eLinks,
817 D.a(F.repoUrl('whistory',{name:wi.name}),'[history]'),
818 D.a(F.repoUrl('attachlist',{page:wi.name}),"[attachments]"),
819 D.a(F.repoUrl('attachadd',{page:wi.name,from: F.repoUrl('wikiedit',{name: wi.name})}), "[attach]")
820 );
821 }
822 };
823
824 /**
825 Update the page title and header based on the state of
826 this.winfo. A no-op if this.winfo is not set. Returns this.
827 */
828 P.updatePageTitle = function f(){
829 if(!f.titleElement){
830 f.titleElement = document.head.querySelector('title');
 
831 }
832 var title, marker = '';
833 const wi = P.winfo;
834 if(wi){
835 if(!wi.version && 'sandbox'!==wi.type) marker = P.config.editStateMarkers.isNew;
836 else if($stash.getWinfo(wi)) marker = P.config.editStateMarkers.isModified;
837 title = wi.name;
838 }else{
839 title = 'no page loaded';
840 }
841 f.titleElement.innerText = 'Wiki Editor: ' + marker + title;
842 this.updateEditStatus(marker);
 
843 return this;
844 };
845
846 /**
847 Change the save button depending on whether we have stuff to save
@@ -830,44 +855,10 @@
855 D.enable(this.e.btnSave).innerText = "Save changes";
856 }
857 return this;
858 };
859
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
860 /**
861 Getter (if called with no args) or setter (if passed an arg) for
862 the current file content.
863
864 The setter form sets the content, dispatches a
865
--- src/style.wikiedit.css
+++ src/style.wikiedit.css
@@ -117,8 +117,25 @@
117117
(max. 1 per tab) to where the save button gets
118118
relocated as we switch between tabs. */
119119
display: none;
120120
}
121121
122
-body.wikiedit #wikiedit-page-name > span {
122
+body.wikiedit #wikiedit-edit-status {
123
+ border-radius: 0.25em 0.25em 0 0;
124
+ margin: 0;
125
+ padding: 0;
126
+ width: 100%;
127
+ cursor: initial;
128
+ display: flex;
129
+ flex-direction: row;
130
+ flex-wrap: wrap;
131
+ justify-content: space-between;
123132
font-family: monospace;
133
+ font-size: 1.2em;
134
+}
135
+
136
+body.wikiedit #wikiedit-edit-status > span {
137
+ display: block;
138
+}
139
+body.wikiedit #wikiedit-edit-status > span.links > a {
140
+ margin: 0 0.25em;
124141
}
125142
--- src/style.wikiedit.css
+++ src/style.wikiedit.css
@@ -117,8 +117,25 @@
117 (max. 1 per tab) to where the save button gets
118 relocated as we switch between tabs. */
119 display: none;
120 }
121
122 body.wikiedit #wikiedit-page-name > span {
 
 
 
 
 
 
 
 
 
123 font-family: monospace;
 
 
 
 
 
 
 
 
124 }
125
--- src/style.wikiedit.css
+++ src/style.wikiedit.css
@@ -117,8 +117,25 @@
117 (max. 1 per tab) to where the save button gets
118 relocated as we switch between tabs. */
119 display: none;
120 }
121
122 body.wikiedit #wikiedit-edit-status {
123 border-radius: 0.25em 0.25em 0 0;
124 margin: 0;
125 padding: 0;
126 width: 100%;
127 cursor: initial;
128 display: flex;
129 flex-direction: row;
130 flex-wrap: wrap;
131 justify-content: space-between;
132 font-family: monospace;
133 font-size: 1.2em;
134 }
135
136 body.wikiedit #wikiedit-edit-status > span {
137 display: block;
138 }
139 body.wikiedit #wikiedit-edit-status > span.links > a {
140 margin: 0 0.25em;
141 }
142
+8 -8
--- src/wiki.c
+++ src/wiki.c
@@ -1106,11 +1106,14 @@
11061106
CX("<div id='fossil-status-bar' "
11071107
"title='Status message area. Double-click to clear them.'>"
11081108
"Status messages will go here.</div>\n"
11091109
/* will be moved into the tab container via JS */);
11101110
1111
- CX("<div id='wikiedit-page-name'>Editing: <span>(no file loaded)</span></div>");
1111
+ CX("<div id='wikiedit-edit-status''>"
1112
+ "<span class='name'></span>"
1113
+ "<span class='links'></span>"
1114
+ "</div>");
11121115
11131116
/* Main tab container... */
11141117
CX("<div id='wikiedit-tabs' class='tab-container'>Loading...</div>");
11151118
/* The .hidden class on the following tab elements is to help lessen
11161119
the FOUC effect of the tabs before JS re-assembles them. */
@@ -1216,29 +1219,26 @@
12161219
12171220
/****** The obligatory "Misc" tab ******/
12181221
{
12191222
CX("<div id='wikiedit-tab-misc' "
12201223
"data-tab-parent='wikiedit-tabs' "
1221
- "data-tab-label='Help, Attachments, etc.' "
1224
+ "data-tab-label='Help' "
12221225
"class='hidden'"
12231226
">");
1224
- CX("<h3>Wiki formatting rules</h3>");
1227
+ CX("<h2>Wiki formatting rules</h2>");
12251228
CX("<ul>");
12261229
CX("<li><a href='%R/wiki_rules'>Fossil wiki format</a></li>");
12271230
CX("<li><a href='%R/md_rules'>Markdown format</a></li>");
12281231
CX("<li>Plain-text pages use no special formatting.</li>");
12291232
CX("</ul>");
1230
- CX("<hr><h3>Attachments</h3>");
1231
- CX("<div id='wikiedit-attachments'></div>"
1232
- /* Filled out by JS */);
1233
- CX("<hr><h3>The \"Sandbox\" Page</h3>");
1233
+ CX("<h2>The \"Sandbox\" Page</h2>");
12341234
CX("<p>The page named \"Sandbox\" is not a real wiki page. "
12351235
"It provides a place where users may test out wiki syntax "
12361236
"without having to actually save anything, nor pollute "
12371237
"the repo with endless test runs. Any attempt to save the "
12381238
"sandbox page will fail.</p>");
1239
- CX("<hr><h3>Wiki Name Rules</h3>");
1239
+ CX("<h2>Wiki Name Rules</h2>");
12401240
well_formed_wiki_name_rules();
12411241
CX("</div>"/*#wikiedit-tab-save*/);
12421242
}
12431243
12441244
builtin_request_js("sbsdiff.js");
12451245
--- src/wiki.c
+++ src/wiki.c
@@ -1106,11 +1106,14 @@
1106 CX("<div id='fossil-status-bar' "
1107 "title='Status message area. Double-click to clear them.'>"
1108 "Status messages will go here.</div>\n"
1109 /* will be moved into the tab container via JS */);
1110
1111 CX("<div id='wikiedit-page-name'>Editing: <span>(no file loaded)</span></div>");
 
 
 
1112
1113 /* Main tab container... */
1114 CX("<div id='wikiedit-tabs' class='tab-container'>Loading...</div>");
1115 /* The .hidden class on the following tab elements is to help lessen
1116 the FOUC effect of the tabs before JS re-assembles them. */
@@ -1216,29 +1219,26 @@
1216
1217 /****** The obligatory "Misc" tab ******/
1218 {
1219 CX("<div id='wikiedit-tab-misc' "
1220 "data-tab-parent='wikiedit-tabs' "
1221 "data-tab-label='Help, Attachments, etc.' "
1222 "class='hidden'"
1223 ">");
1224 CX("<h3>Wiki formatting rules</h3>");
1225 CX("<ul>");
1226 CX("<li><a href='%R/wiki_rules'>Fossil wiki format</a></li>");
1227 CX("<li><a href='%R/md_rules'>Markdown format</a></li>");
1228 CX("<li>Plain-text pages use no special formatting.</li>");
1229 CX("</ul>");
1230 CX("<hr><h3>Attachments</h3>");
1231 CX("<div id='wikiedit-attachments'></div>"
1232 /* Filled out by JS */);
1233 CX("<hr><h3>The \"Sandbox\" Page</h3>");
1234 CX("<p>The page named \"Sandbox\" is not a real wiki page. "
1235 "It provides a place where users may test out wiki syntax "
1236 "without having to actually save anything, nor pollute "
1237 "the repo with endless test runs. Any attempt to save the "
1238 "sandbox page will fail.</p>");
1239 CX("<hr><h3>Wiki Name Rules</h3>");
1240 well_formed_wiki_name_rules();
1241 CX("</div>"/*#wikiedit-tab-save*/);
1242 }
1243
1244 builtin_request_js("sbsdiff.js");
1245
--- src/wiki.c
+++ src/wiki.c
@@ -1106,11 +1106,14 @@
1106 CX("<div id='fossil-status-bar' "
1107 "title='Status message area. Double-click to clear them.'>"
1108 "Status messages will go here.</div>\n"
1109 /* will be moved into the tab container via JS */);
1110
1111 CX("<div id='wikiedit-edit-status''>"
1112 "<span class='name'></span>"
1113 "<span class='links'></span>"
1114 "</div>");
1115
1116 /* Main tab container... */
1117 CX("<div id='wikiedit-tabs' class='tab-container'>Loading...</div>");
1118 /* The .hidden class on the following tab elements is to help lessen
1119 the FOUC effect of the tabs before JS re-assembles them. */
@@ -1216,29 +1219,26 @@
1219
1220 /****** The obligatory "Misc" tab ******/
1221 {
1222 CX("<div id='wikiedit-tab-misc' "
1223 "data-tab-parent='wikiedit-tabs' "
1224 "data-tab-label='Help' "
1225 "class='hidden'"
1226 ">");
1227 CX("<h2>Wiki formatting rules</h2>");
1228 CX("<ul>");
1229 CX("<li><a href='%R/wiki_rules'>Fossil wiki format</a></li>");
1230 CX("<li><a href='%R/md_rules'>Markdown format</a></li>");
1231 CX("<li>Plain-text pages use no special formatting.</li>");
1232 CX("</ul>");
1233 CX("<h2>The \"Sandbox\" Page</h2>");
 
 
 
1234 CX("<p>The page named \"Sandbox\" is not a real wiki page. "
1235 "It provides a place where users may test out wiki syntax "
1236 "without having to actually save anything, nor pollute "
1237 "the repo with endless test runs. Any attempt to save the "
1238 "sandbox page will fail.</p>");
1239 CX("<h2>Wiki Name Rules</h2>");
1240 well_formed_wiki_name_rules();
1241 CX("</div>"/*#wikiedit-tab-save*/);
1242 }
1243
1244 builtin_request_js("sbsdiff.js");
1245

Keyboard Shortcuts

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