diff options
author | adam <adam@> | 2021-02-15 12:01:05 +0200 |
---|---|---|
committer | adam <adam@> | 2021-02-15 12:01:05 +0200 |
commit | e99acb8fb9cb61c96fba7cd464f0dc2f0ac89004 (patch) | |
tree | 52eb1f43edf7c735227d3afbf45d32ff467ea6d0 | |
parent | 36d193908bc32a09a3253b3024be6520063361b5 (diff) | |
parent | 7d2589a55bad9880057b4321e044db539c9d132f (diff) | |
download | fileup-e99acb8fb9cb61c96fba7cd464f0dc2f0ac89004.tar.gz |
Merge https://github.com/alexvitkov/india
-rw-r--r-- | loggedin.js | 13 | ||||
-rw-r--r-- | loggedin.php | 2 | ||||
-rw-r--r-- | php/database.php | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/loggedin.js b/loggedin.js index 03a1011..2b1f2c0 100644 --- a/loggedin.js +++ b/loggedin.js @@ -5,9 +5,9 @@ var FORM_ASYNC = true; // A FileView is an entry inside the explorer window class FileView { - constructor(filename, visuals, mimetype, is_directory, write_permissions) { + constructor(filename, mimetype, is_directory, write_permissions) { this.filename = filename; - this.visuals = visuals; // The DOM object with the icon and the filenam text + this.visuals = null; // The DOM object with the icon and the filenam text this.mimetype = mimetype; this.is_directory = is_directory; this.write_permissions = write_permissions; @@ -22,6 +22,7 @@ class Window { this.pwd = pwd; // pwd = [ "Folder1", "Folder2" ] means the current directory of that window is /Folder1/Folder2 this.visuals = null; // The DOM object this.h2 = null; // The titlebar of the window + this.fileview = null; } } @@ -397,12 +398,16 @@ function opendir() { files = []; var json = JSON.parse(xhr.responseText); + console.log(json); if (!json) return; // Create the FileViews from the json response for (const f of json) { - var view = new FileView(f.name, null, f.mimetype, f.is_directory && f.is_directory != "0", true); + var view = new FileView(f.name, + f.mimetype, + f.is_directory && f.is_directory != "0", + f.can_edit && f.can_edit != "0"); files.push(view); } @@ -856,7 +861,7 @@ function make_window(pwd) { mk(h3, 'div', 'separator'); let replace_btn = mk(h3, 'button'); - replace_btn.innerText = "Save"; + replace_btn.innerText = "Save Changes"; replace_btn.onclick = () => { alert("No implemento"); } mk(h3, 'div', 'separator'); diff --git a/loggedin.php b/loggedin.php index 1cd34c8..47bdfeb 100644 --- a/loggedin.php +++ b/loggedin.php @@ -4,7 +4,7 @@ <form id="upload_form" style="display:none;" action="php/upload.php" method="post" enctype="multipart/form-data"> <input type="file" name="the_file" id="the_file"> <input type="hidden" name="filename" id="filename"> - <input type="hidden" name="override" id="override_input"> + <input type="hidden" name="overwrite" id="override_input"> <input type="hidden" name="parent_directory" id="upload_parent_directory"> </form> diff --git a/php/database.php b/php/database.php index 9d1f782..1be9059 100644 --- a/php/database.php +++ b/php/database.php @@ -128,7 +128,7 @@ require_once "node.php"; nodes.code as code, nodes.type as mimetype, node_access.can_view as can_view, - node_access.can_view as can_eddit + node_access.can_edit as can_edit from node_links inner join nodes on nodes.node_id=node_links.node_id |