From: Johannes Zellner Date: Thu, 17 May 2018 13:05:51 +0000 (+0200) Subject: Add button to navigate back X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git;a=commitdiff_plain;h=f8693af1f69c91e93ff1b48614df92a84da78e8d Add button to navigate back --- diff --git a/frontend/index.html b/frontend/index.html index f7c5ab1..19fc217 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -40,6 +40,9 @@
Surfer
+
+ +
Path / diff --git a/frontend/js/app.js b/frontend/js/app.js index 1500457..57b831e 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -124,10 +124,6 @@ function open(row, event, column) { window.open(encode(path)); } -function up() { - window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/')); -} - function uploadFiles(files) { if (!files || !files.length) return; @@ -328,7 +324,9 @@ var app = new Vue({ return filesize(cellValue); }, loadDirectory: loadDirectory, - up: up, + onUp: function () { + window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/')); + }, open: open, drop: drop, dragOver: dragOver