]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix opening folders from different file lists 14886/head
authorJulius Härtl <jus@bitgrid.net>
Wed, 27 Mar 2019 16:44:54 +0000 (17:44 +0100)
committerJulius Härtl <jus@bitgrid.net>
Wed, 27 Mar 2019 16:44:54 +0000 (17:44 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/fileactions.js

index a844fba40a3f11704ff343f8900133193672958d..bb91842fa8123216c4721354c49d0a07915188f5 100644 (file)
                                icon: '',
                                actionHandler: function (filename, context) {
                                        var dir = context.$file.attr('data-path') || context.fileList.getCurrentDirectory();
-                                       context.fileList.changeDirectory(OC.joinPaths(dir, filename), true, false, parseInt(context.$file.attr('data-id'), 10));
+                                       if (OCA.Files.App.getActiveView() !== 'files') {
+                                               OCA.Files.App.setActiveView('files');
+                                               OCA.Files.App.fileList.changeDirectory(OC.joinPaths(dir, filename), true, true);
+                                       } else {
+                                               context.fileList.changeDirectory(OC.joinPaths(dir, filename), true, false, parseInt(context.$file.attr('data-id'), 10));
+                                       }
                                },
                                displayName: t('files', 'Open')
                        });