]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - frontend/js/app.js
Add button to navigate back
[perso/Immae/Projets/Nodejs/Surfer.git] / frontend / js / app.js
index 1500457e0a3993c402a18860ac47a7ce2d69acbc..57b831eeca698423a3e25bafcde72900fdf0d87c 100644 (file)
@@ -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