summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-07-27 13:44:52 +0200
committerGitHub <noreply@github.com>2022-07-27 13:44:52 +0200
commitfc276ba42f2c4a27e6ee33b6ec3ed427b4f01f75 (patch)
tree0d3747645340d670849dd92848a4878a4dfd58e9 /apps/files/js
parentdd6713ff104ec14b0fe75411c1ce78e2f530f77e (diff)
parent8be9b04981c4f0bdf0a2b8d424f55c797ad90a32 (diff)
downloadnextcloud-server-fc276ba42f2c4a27e6ee33b6ec3ed427b4f01f75.tar.gz
nextcloud-server-fc276ba42f2c4a27e6ee33b6ec3ed427b4f01f75.zip
Merge pull request #33373 from nextcloud/techdebt/noid/remove-legacy-dir
Remove legacy #dir element in files list
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 534ce0148be..4fbf1ac4a25 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -231,6 +231,7 @@
* @param options.dragOptions drag options, disabled by default
* @param options.folderDropOptions folder drop options, disabled by default
* @param options.scrollTo name of file to scroll to after the first load
+ * @param [options.dir='/'] current directory
* @param {OC.Files.Client} [options.filesClient] files API client
* @param {OC.Backbone.Model} [options.filesConfig] files app configuration
* @private
@@ -414,6 +415,10 @@
});
}
+ if (!_.isUndefined(options.dir)) {
+ this._setCurrentDir(options.dir || '/', false);
+ }
+
if(options.openFile) {
// Wait for some initialisation process to be over before triggering the default action.
_.defer(() => {
@@ -2049,7 +2054,7 @@
* @return current directory
*/
getCurrentDirectory: function(){
- return this._currentDirectory || this.$el.find('#dir').val() || '/';
+ return this._currentDirectory || '/';
},
/**
* Returns the directory permissions
@@ -2131,9 +2136,6 @@
}
this._currentDirectory = targetDir;
- // legacy stuff
- this.$el.find('#dir').val(targetDir);
-
if (changeUrl !== false) {
var params = {
dir: targetDir,