Просмотр исходного кода

Merge pull request #35052 from nextcloud/fix-sidebar-not-hidden-when-changing-section-in-files-app

Fix sidebar not automatically hidden in Files app
Simon L 1 год назад
Родитель
Сommit
3314735cec
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      apps/files/js/app.js
  2. 1 1
      apps/files/js/gotoplugin.js

+ 2 - 2
apps/files/js/app.js

@@ -321,7 +321,7 @@
 					dir: e.dir ? e.dir : '/'
 				};
 				this._changeUrl(params.view, params.dir);
-				OC.Apps.hideAppSidebar($('.detailsView'));
+				OCA.Files.Sidebar.close();
 				this.navigation.getActiveContainer().trigger(new $.Event('urlChanged', params));
 				window._nc_event_bus.emit('files:navigation:changed')
 			}
@@ -352,7 +352,7 @@
 		_onChangeViewerMode: function(e) {
 			var state = !!e.viewerModeEnabled;
 			if (e.viewerModeEnabled) {
-				OC.Apps.hideAppSidebar($('.detailsView'));
+				OCA.Files.Sidebar.close();
 			}
 			$('#app-navigation').toggleClass('hidden', state);
 			$('.app-files').toggleClass('viewer-mode no-sidebar', state);

+ 1 - 1
apps/files/js/gotoplugin.js

@@ -45,7 +45,7 @@
 				type: OCA.Files.FileActions.TYPE_DROPDOWN,
 				actionHandler: function (fileName, context) {
 					var fileModel = context.fileInfoModel;
-					OC.Apps.hideAppSidebar($('.detailsView'));
+					OCA.Files.Sidebar.close();
 					OCA.Files.App.setActiveView('files', { silent: true });
 					OCA.Files.App.fileList.changeDirectory(fileModel.get('path'), true, true).then(function() {
 						OCA.Files.App.fileList.scrollTo(fileModel.get('name'));