mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 07:06:36 +01:00
support for multiple folder levels
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,3 @@
|
||||
<!--This is the plain html source of the hex encoded Editor-Page embedded in SPIFFSEditor.cpp -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@@ -626,9 +625,9 @@
|
||||
leaf.onclick = function (e) {
|
||||
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||
if (name == "..") {
|
||||
httpGet(treeRoot, "/");
|
||||
httpGet(treeRoot, path === "/" ? "/" : path.substring(0, path.lastIndexOf('/')) || "/");
|
||||
} else {
|
||||
httpGet(treeRoot, "/" + name);
|
||||
httpGet(treeRoot, path + (path != "/" ? "/" : "") + name);
|
||||
}
|
||||
};
|
||||
leaf.oncontextmenu = function (e) {
|
||||
@@ -654,9 +653,6 @@
|
||||
sortByKey(items, 'name');
|
||||
var list = ce("ul");
|
||||
parent.appendChild(list);
|
||||
if (path != "/") {
|
||||
list.appendChild(createDirLeaf("/", "..", 0));
|
||||
}
|
||||
var ll = items.length;
|
||||
for (var i = 0; i < ll; i++) {
|
||||
if (items[i].type === "file") {
|
||||
@@ -666,7 +662,9 @@
|
||||
list.insertBefore(createDirLeaf(path, items[i].name, items[i].size), list.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
if (path != "/") {
|
||||
list.insertBefore(createDirLeaf(path, "..", 0), list.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
function isTextFile(path) {
|
||||
@@ -863,7 +861,7 @@
|
||||
editor.loadUrl(vars.file);
|
||||
};
|
||||
</script>
|
||||
<script id='ace' src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js" type="text/javascript"
|
||||
<script id='ace' src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.37.2/ace.js" type="text/javascript"
|
||||
charset="utf-8"></script>
|
||||
<script>
|
||||
if (typeof ace.edit == "undefined") {
|
||||
|
||||
Reference in New Issue
Block a user