Add breadcrumb to filemanager
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user