diff --git a/src/filemanager.html b/src/filemanager.html index 8aecb0d2d..ba317e857 100644 --- a/src/filemanager.html +++ b/src/filemanager.html @@ -129,22 +129,28 @@

-
-
-

FileManager for {{ app.fqdn }}

- -
-
+
+
+

{{ app.fqdn }}

+
- - Path: {{ cwd }} - - - +
+ + +
+
+ + +
+
+ + + +

@@ -160,20 +166,13 @@ - - - Up - - - - - + {{ entry.fileName }} - {{ entry.size | prettyDiskSize }} + {{ entry.size | prettyDiskSize }} {{ entry.uid | prettyOwner }} diff --git a/src/js/filemanager.js b/src/js/filemanager.js index 5cee86561..520b2ec09 100644 --- a/src/js/filemanager.js +++ b/src/js/filemanager.js @@ -22,6 +22,7 @@ app.controller('FileManagerController', ['$scope', 'Client', function ($scope, C $scope.initialized = false; $scope.client = Client; $scope.cwd = '/'; + $scope.cwdParts = []; $scope.appId = search.appId; $scope.app = null; $scope.entries = []; @@ -73,12 +74,17 @@ app.controller('FileManagerController', ['$scope', 'Client', function ($scope, C setDirectory($scope.cwd + '/..'); }; + $scope.changeDirectory = function (path) { + setDirectory(path); + }; + function setDirectory(path) { path = sanitize(path); if ($scope.cwd === path) return; $scope.cwd = path; + $scope.cwdParts = path.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: p, path: path.split('/').slice(0, i+2).join('/') }; }); $scope.refresh(); }