From ea0e97d046efac2bcb2952bdb7e8c45df3d7fd75 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Tue, 19 May 2020 09:07:40 +0200 Subject: [PATCH] Hide sidebar on modal close --- app/assets/javascripts/my_modules/repositories.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/my_modules/repositories.js b/app/assets/javascripts/my_modules/repositories.js index 79d84bac7..b5ff6d56a 100644 --- a/app/assets/javascripts/my_modules/repositories.js +++ b/app/assets/javascripts/my_modules/repositories.js @@ -412,6 +412,12 @@ var MyModuleRepositories = (function() { }); e.stopPropagation(); }); + + FULL_VIEW_MODAL.on('hidden.bs.modal', function() { + FULL_VIEW_MODAL.find('.repository-versions-sidebar').empty(); + FULL_VIEW_MODAL.find('.modal-content').removeClass('show-sidebar'); + FULL_VIEW_MODAL.find('#showVersionsSidebar').removeClass('active'); + }); } function initRepositoryFullView() {