diff --git a/src/filemanager.html b/src/filemanager.html index cfbdad34c..ee1926066 100644 --- a/src/filemanager.html +++ b/src/filemanager.html @@ -350,10 +350,13 @@
- - + + - + + + + diff --git a/src/js/filemanager.js b/src/js/filemanager.js index 685f2a9be..4ccf1d83c 100644 --- a/src/js/filemanager.js +++ b/src/js/filemanager.js @@ -127,8 +127,11 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl function openPath(path) { path = sanitize(path); + // we always show the parent path, even if overlayed by a mediaviewer var parentPath = sanitize(path + '/..'); + $scope.busy = true; + // nothing changes here, mostly triggered when editor is closed if ($scope.cwd === path) { $scope.busy = false; @@ -140,7 +143,11 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl if (!entry) return Client.error('No such file or folder: ' + path); if (entry.isDirectory) { - $scope.changeDirectory(path); + $scope.cwd = path; + $scope.cwdParts = path.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: path.split('/').slice(0, i+1).join('/') }; }); + + // refresh will set busy to false once done + $scope.refresh(); } else if (entry.isFile) { var mimeType = Mimer().get(entry.fileName); var mimeGroup = mimeType.split('/')[0]; @@ -154,15 +161,15 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl } else { Client.filesGet($scope.id, $scope.type, path, 'open', function (error) { if (error) return Client.error(error); }); } - } - $scope.busy = false; + $scope.busy = false; + } return; } Client.filesGet($scope.id, $scope.type, parentPath, 'data', function (error, result) { - if (error) return Client.error(error); + if (error) return openPath(path); // try again // amend icons result.entries.forEach(function (e) { @@ -183,10 +190,9 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl }); $scope.entries = result.entries; - $scope.cwd = parentPath; - $scope.cwdParts = parentPath.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: path.split('/').slice(0, i+1).join('/') }; }); // call itself now that we know + $scope.cwd = parentPath; openPath(path); }); } @@ -363,7 +369,6 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl $scope.busy = true; Client.filesGet($scope.id, $scope.type, $scope.cwd, 'data', function (error, result) { - $scope.busy = false; if (error) return Client.error(error); // amend icons @@ -385,6 +390,8 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl }); $scope.entries = result.entries; + + $scope.busy = false; }); }; @@ -536,7 +543,7 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl }; $scope.goDirectoryUp = function () { - $scope.changeDirectory($scope.cwd + '/..'); + $scope.openPath($scope.cwd + '/..'); }; $scope.changeDirectory = function (path) { @@ -545,11 +552,6 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl if ($scope.cwd === path) return; location.hash = path; - - $scope.cwd = path; - $scope.cwdParts = path.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: path.split('/').slice(0, i+1).join('/') }; }); - - $scope.refresh(); }; $scope.uploadStatus = { diff --git a/src/theme.scss b/src/theme.scss index 7228dc070..189904047 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -1788,10 +1788,6 @@ tag-input { position: relative; height: 100%; - &.busy { - opacity: 0.5; - } - &.top-scroll-indicator { transition: box-shadow 200ms; box-shadow: inset 0 10px 10px -10px rgba(0,0,0,0.5);
{{ 'filemanager.list.empty' | tr }}

{{ 'filemanager.list.empty' | tr }}