Merge branch 'master' of https://github.com/hacdias/caddy-filemanager
commit
23ef6e4d1d
|
@ -98,8 +98,8 @@ var renameEvent = function(event) {
|
||||||
|
|
||||||
// Upload files
|
// Upload files
|
||||||
var handleFiles = function(files, base) {
|
var handleFiles = function(files, base) {
|
||||||
let button = document.getElementById("upload");
|
let button = document.getElementById("upload"),
|
||||||
let html = button.changeToLoading();
|
html = button.changeToLoading();
|
||||||
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
let request = new XMLHttpRequest();
|
let request = new XMLHttpRequest();
|
||||||
|
@ -135,8 +135,8 @@ var backEvent = function(event) {
|
||||||
|
|
||||||
// Toggles the view mode
|
// Toggles the view mode
|
||||||
var viewEvent = function(event) {
|
var viewEvent = function(event) {
|
||||||
let cookie = document.getCookie('view-list');
|
let cookie = document.getCookie('view-list'),
|
||||||
let listing = document.getElementById('listing');
|
listing = document.getElementById('listing');
|
||||||
|
|
||||||
if (cookie != 'true') {
|
if (cookie != 'true') {
|
||||||
document.cookie = 'view-list=true';
|
document.cookie = 'view-list=true';
|
||||||
|
@ -150,8 +150,8 @@ var viewEvent = function(event) {
|
||||||
|
|
||||||
// Handles the view mode change
|
// Handles the view mode change
|
||||||
var handleViewType = function(viewList) {
|
var handleViewType = function(viewList) {
|
||||||
let listing = document.getElementById('listing');
|
let listing = document.getElementById('listing'),
|
||||||
let button = document.getElementById('view');
|
button = document.getElementById('view');
|
||||||
|
|
||||||
if (viewList == "true") {
|
if (viewList == "true") {
|
||||||
listing.classList.add('list');
|
listing.classList.add('list');
|
||||||
|
@ -191,10 +191,10 @@ var newDirEvent = function(event) {
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
let button = document.getElementById('new');
|
let button = document.getElementById('new'),
|
||||||
let html = button.changeToLoading();
|
html = button.changeToLoading(),
|
||||||
let request = new XMLHttpRequest();
|
request = new XMLHttpRequest(),
|
||||||
let name = document.getElementById('newdir').value;
|
name = document.getElementById('newdir').value;
|
||||||
|
|
||||||
request.open((name.endsWith("/") ? "MKCOL" : "PUT"), toWebDavURL(window.location.pathname + name));
|
request.open((name.endsWith("/") ? "MKCOL" : "PUT"), toWebDavURL(window.location.pathname + name));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue