Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Minor help text, style, and layout tweaks. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | fileedit-ajaxify |
| Files: | files | file ages | folders |
| SHA3-256: |
28b2261b75d5372ec1c8dc46e01e0617 |
| User & Date: | stephan 2020-05-14 03:55:38.646 |
Context
|
2020-05-14
| ||
| 04:13 | Added a parameter to encode_json_string_literal() to allow it to return its output string length, saving a strlen() call in vxprintf() %j. ... (check-in: 57edd18144 user: stephan tags: fileedit-ajaxify) | |
| 03:55 | Minor help text, style, and layout tweaks. ... (check-in: 28b2261b75 user: stephan tags: fileedit-ajaxify) | |
| 03:39 | The filename/version block on the first fileedit tab is now generated completely dynamically, rather than being filled out with '???' with broken links before a file is loaded. ... (check-in: 371b162ff3 user: stephan tags: fileedit-ajaxify) | |
Changes
Changes to src/default_css.txt.
| ︙ | ︙ | |||
953 954 955 956 957 958 959 |
}
body.fileedit fieldset {
margin: 0.5em 0 0.5em 0;
padding: 0.25em 0;
border-radius: 0.5em;
border-color: inherit;
border-width: 1px;
| | > > | 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
}
body.fileedit fieldset {
margin: 0.5em 0 0.5em 0;
padding: 0.25em 0;
border-radius: 0.5em;
border-color: inherit;
border-width: 1px;
font-size: 90%;
overflow: auto;
}
body.fileedit fieldset > legend {
margin: 0 0 0 1em;
padding: 0 0.5em 0 0.5em;
}
body.fileedit fieldset > div {
margin: 0 0.25em 0 0.25em;
padding: 0;
overflow: auto;
}
body.fileedit fieldset > div > .input-with-label {
margin: 0.25em 0.5em;
}
body.fileedit fieldset > div > button {
margin: 0.25em 0.5em;
}
|
| ︙ | ︙ |
Changes to src/fileedit.c.
| ︙ | ︙ | |||
2013 2014 2015 2016 2017 2018 2019 |
"data-tab-parent='fileedit-tabs' "
"data-tab-label='Help'"
">");
{
CX("<h1>Help & Tips</h1>");
CX("<ul>");
CX("<li><strong>Only files matching the <code>fileedit-glob</code> "
| | | | | 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 |
"data-tab-parent='fileedit-tabs' "
"data-tab-label='Help'"
">");
{
CX("<h1>Help & Tips</h1>");
CX("<ul>");
CX("<li><strong>Only files matching the <code>fileedit-glob</code> "
"repository setting</strong> can be edited online. That setting "
"must be a comma- or newline-delimited list of glob patterns "
"for files which may be edited online.</li>");
CX("<li><strong>Clicking any links</strong> on this page will "
"leave the page, <strong>losing any edits</strong>.</li>");
CX("<li>Committing edits creates a new commit record with a single "
"modified file.</li>");
CX("<li>\"Delta manifests\" (see the checkbox on the Commit tab) "
"make for smaller commit records, especially in repositories "
"with many files.</li>");
CX("<li>The file selector allows, for usability's sake, only files "
"in leaf checkins to be selected, but files may be edited via "
"non-leaf checkins by passing them as the <code>filename</code> "
"and <code>checkin</code> URL arguments to this page.</li>");
|
| ︙ | ︙ |
Changes to src/fossil.page.fileedit.js.
| ︙ | ︙ | |||
52 53 54 55 56 57 58 |
),"Loading leaves...");
D.disable(this.e.btnLoadFile, this.e.selectFiles, this.e.selectCi);
const self = this;
F.fetch('fileedit',{
urlParams:'ajax=filelist&leaves',
responseType: 'json',
onload: function(list){
| | > | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
),"Loading leaves...");
D.disable(this.e.btnLoadFile, this.e.selectFiles, this.e.selectCi);
const self = this;
F.fetch('fileedit',{
urlParams:'ajax=filelist&leaves',
responseType: 'json',
onload: function(list){
D.append(D.clearElement(self.e.ciListLabel),
"Open leaves (newest first):");
self.cache.checkins = list;
D.clearElement(D.enable(self.e.selectCi));
let loadThisOne;
list.forEach(function(o,n){
if(!n) loadThisOne = o;
D.option(self.e.selectCi, o.checkin,
o.timestamp+' ['+o.branch+']: '
|
| ︙ | ︙ | |||
85 86 87 88 89 90 91 |
return this;
}
const onload = (response)=>{
D.clearElement(selFiles, this.e.btnLoadFile);
D.append(
D.clearElement(this.e.fileListLabel),
"Editable files for ",
| > > | | | > > | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
return this;
}
const onload = (response)=>{
D.clearElement(selFiles, this.e.btnLoadFile);
D.append(
D.clearElement(this.e.fileListLabel),
"Editable files for ",
D.append(
D.code(),
D.a(F.repoUrl('timeline',{
c: ciUuid
}), F.hashDigits(ciUuid)),
),
":"
);
this.cache.files[response.checkin] = response;
response.editableFiles.forEach(function(fn,n){
D.option(selFiles, fn);
});
if(selFiles.options.length){
D.enable(selFiles, this.e.btnLoadFile);
|
| ︙ | ︙ | |||
472 473 474 475 476 477 478 |
);
const purlArgs = F.encodeUrlArgs({
filename: this.finfo.filename,
checkin: rUrl
},false,true);
const purl = F.repoUrl('fileedit',purlArgs);
D.append(
| < | < | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
);
const purlArgs = F.encodeUrlArgs({
filename: this.finfo.filename,
checkin: rUrl
},false,true);
const purl = F.repoUrl('fileedit',purlArgs);
D.append(
eTgt,"[",D.a(purl,"Editor permalink"),"]"
);
return this;
};
/**
loadFile() loads (file,checkinVersion) and updates the relevant
UI elements to reflect the loaded state. If passed no arguments
|
| ︙ | ︙ |