diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-10-23 20:21:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 20:21:35 +0200 |
commit | f4efa550c3b5443392d80ba2e5c0178a4a608e1e (patch) | |
tree | cc74350ebb8a6e40bed2e5dcf6f268786a89c954 /apps | |
parent | c3919b844be8fdfcbc83d140caa7c338eda20caf (diff) | |
parent | 3fbb6e70344116ef3b11c1f8114e8613f3172539 (diff) | |
download | nextcloud-server-f4efa550c3b5443392d80ba2e5c0178a4a608e1e.tar.gz nextcloud-server-f4efa550c3b5443392d80ba2e5c0178a4a608e1e.zip |
Merge pull request #11996 from nextcloud/stable13-11967-fix-opening-a-section-again-in-the-files-app
[stable13] Fix opening a section again in the Files app
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/favoritesfilelist.js | 6 | ||||
-rw-r--r-- | apps/files/js/favoritesplugin.js | 7 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 4 | ||||
-rw-r--r-- | apps/files/js/recentplugin.js | 7 | ||||
-rw-r--r-- | apps/files_sharing/js/app.js | 18 | ||||
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 6 | ||||
-rw-r--r-- | apps/files_trashbin/js/app.js | 6 | ||||
-rw-r--r-- | apps/systemtags/js/app.js | 7 |
8 files changed, 42 insertions, 19 deletions
diff --git a/apps/files/js/favoritesfilelist.js b/apps/files/js/favoritesfilelist.js index 8c9c125d0a1..44adf5d7b5b 100644 --- a/apps/files/js/favoritesfilelist.js +++ b/apps/files/js/favoritesfilelist.js @@ -94,12 +94,6 @@ $(document).ready(function() { return OCA.Files.FileList.prototype.reloadCallback.call(this, status, result); }, - - _onUrlChanged: function (e) { - if (e && _.isString(e.dir)) { - this.changeDirectory(e.dir, false, true); - } - } }); OCA.Files.FavoritesFileList = FavoritesFileList; diff --git a/apps/files/js/favoritesplugin.js b/apps/files/js/favoritesplugin.js index 454a505c7bd..58a61013995 100644 --- a/apps/files/js/favoritesplugin.js +++ b/apps/files/js/favoritesplugin.js @@ -67,7 +67,12 @@ return new OCA.Files.FavoritesFileList( $el, { fileActions: fileActions, - scrollContainer: $('#app-content') + scrollContainer: $('#app-content'), + // The file list is created when a "show" event is handled, + // so it should be marked as "shown" like it would have been + // done if handling the event with the file list already + // created. + shown: true } ); }, diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 8b311e57d1b..0686968b98a 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -221,6 +221,10 @@ return; } + if (options.shown) { + this.shown = options.shown; + } + if (options.config) { this._filesConfig = options.config; } else if (!_.isUndefined(OCA.Files) && !_.isUndefined(OCA.Files.App)) { diff --git a/apps/files/js/recentplugin.js b/apps/files/js/recentplugin.js index fcd427b18a2..5551aec9d38 100644 --- a/apps/files/js/recentplugin.js +++ b/apps/files/js/recentplugin.js @@ -67,7 +67,12 @@ return new OCA.Files.RecentFileList( $el, { fileActions: fileActions, - scrollContainer: $('#app-content') + scrollContainer: $('#app-content'), + // The file list is created when a "show" event is handled, + // so it should be marked as "shown" like it would have been + // done if handling the event with the file list already + // created. + shown: true } ); }, diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index e6c9159eda4..15c5bcb3077 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -34,7 +34,11 @@ OCA.Sharing.App = { scrollContainer: $('#app-content'), sharedWithUser: true, fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); @@ -57,7 +61,11 @@ OCA.Sharing.App = { scrollContainer: $('#app-content'), sharedWithUser: false, fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); @@ -80,7 +88,11 @@ OCA.Sharing.App = { scrollContainer: $('#app-content'), linksOnly: true, fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index bd33035aa9c..2c4a32c6979 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -393,12 +393,6 @@ // Sort by expected sort comparator return files.sort(this._sortComparator); }, - - _onUrlChanged: function(e) { - if (e && _.isString(e.dir)) { - this.changeDirectory(e.dir, false, true); - } - } }); /** diff --git a/apps/files_trashbin/js/app.js b/apps/files_trashbin/js/app.js index fd3d5db32ff..c37de63097c 100644 --- a/apps/files_trashbin/js/app.js +++ b/apps/files_trashbin/js/app.js @@ -30,7 +30,11 @@ OCA.Trashbin.App = { fileActions: this._createFileActions(), detailsViewEnabled: false, scrollTo: urlParams.scrollto, - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); }, diff --git a/apps/systemtags/js/app.js b/apps/systemtags/js/app.js index e027c0be123..ff0ac159ba8 100644 --- a/apps/systemtags/js/app.js +++ b/apps/systemtags/js/app.js @@ -29,7 +29,12 @@ id: 'systemtags', scrollContainer: $('#app-content'), fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, + // so it should be marked as "shown" like it would have been + // done if handling the event with the file list already + // created. + shown: true } ); |