Ensure breadcrumbs and hash are correctly updated on folder navigation
This commit is contained in:
@@ -390,7 +390,6 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
});
|
||||
|
||||
$scope.entries = result.entries;
|
||||
$scope.cwdParts = $scope.cwd.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: $scope.cwd.split('/').slice(0, i+1).join('/') }; });
|
||||
|
||||
$scope.busy = false;
|
||||
});
|
||||
@@ -544,7 +543,7 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
};
|
||||
|
||||
$scope.goDirectoryUp = function () {
|
||||
openPath($scope.cwd + '/..');
|
||||
location.hash = sanitize($scope.cwd + '/..');
|
||||
};
|
||||
|
||||
$scope.changeDirectory = function (path) {
|
||||
@@ -1015,7 +1014,10 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
// now mark the Client to be ready
|
||||
Client.setReady();
|
||||
|
||||
openPath(window.location.hash.slice(1));
|
||||
var hashPath = window.location.hash.slice(1);
|
||||
$scope.cwdParts = hashPath.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: hashPath.split('/').slice(0, i+1).join('/') }; });
|
||||
|
||||
openPath(hashPath);
|
||||
|
||||
$scope.initialized = true;
|
||||
});
|
||||
@@ -1043,7 +1045,10 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
$scope.mediaViewer.close();
|
||||
$scope.textEditor.close();
|
||||
|
||||
openPath(window.location.hash.slice(1));
|
||||
var hashPath = window.location.hash.slice(1);
|
||||
$scope.cwdParts = hashPath.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: hashPath.split('/').slice(0, i+1).join('/') }; });
|
||||
|
||||
openPath(hashPath);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user