From 0afcde954ad3f20d2e1e0f349898c41b39630c00 Mon Sep 17 00:00:00 2001 From: fabioswartz Date: Fri, 30 Dec 2016 11:45:38 +0000 Subject: [PATCH] Cleaning listing.js Former-commit-id: ba9b025b87a2a94c6dbf2b3ff7119841d6184e9d --- _embed/public/js/listing.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/_embed/public/js/listing.js b/_embed/public/js/listing.js index f8338b00..b24dc83e 100644 --- a/_embed/public/js/listing.js +++ b/_embed/public/js/listing.js @@ -100,8 +100,8 @@ var renameEvent = function(event) { // Upload files var handleFiles = function(files, base) { - let button = document.getElementById("upload"); - let html = button.changeToLoading(); + let button = document.getElementById("upload"), + html = button.changeToLoading(); for (let i = 0; i < files.length; i++) { let request = new XMLHttpRequest(); @@ -137,8 +137,8 @@ var backEvent = function(event) { // Toggles the view mode var viewEvent = function(event) { - let cookie = document.getCookie('view-list'); - let listing = document.getElementById('listing'); + let cookie = document.getCookie('view-list'), + listing = document.getElementById('listing'); if (cookie != 'true') { document.cookie = 'view-list=true'; @@ -152,8 +152,8 @@ var viewEvent = function(event) { // Handles the view mode change var handleViewType = function(viewList) { - let listing = document.getElementById('listing'); - let button = document.getElementById('view'); + let listing = document.getElementById('listing'), + button = document.getElementById('view'); if (viewList == "true") { listing.classList.add('list'); @@ -193,10 +193,10 @@ var newDirEvent = function(event) { if (event.keyCode == 13) { event.preventDefault(); - let button = document.getElementById('new'); - let html = button.changeToLoading(); - let request = new XMLHttpRequest(); - let name = document.getElementById('newdir').value; + let button = document.getElementById('new'), + html = button.changeToLoading(), + request = new XMLHttpRequest(), + name = document.getElementById('newdir').value; request.open((name.endsWith("/") ? "MKCOL" : "PUT"), toWebDavURL(window.location.pathname + name)); @@ -283,7 +283,7 @@ document.addEventListener('DOMContentLoaded', event => { } }); - + if (user.AllowEdit) { // Enables rename button @@ -426,4 +426,4 @@ function selectItem(event) { document.sendCostumEvent("changed-selected"); return false; -} \ No newline at end of file +}