diff --git a/app/assets/javascripts/my_modules/repositories.js b/app/assets/javascripts/my_modules/repositories.js index fe8ffe658..ff64a2995 100644 --- a/app/assets/javascripts/my_modules/repositories.js +++ b/app/assets/javascripts/my_modules/repositories.js @@ -290,6 +290,12 @@ var MyModuleRepositories = (function() { repositoryContainer.html(repositoryTemplate); renderSimpleTable(repositoryTemplate); }); + + $('.navbar-secondary').on('sideBar::shown sideBar::hidden', function() { + if (SIMPLE_TABLE) { + SIMPLE_TABLE.columns.adjust(); + } + }); } function initVersionsStatusCheck() { diff --git a/app/assets/javascripts/sidebar_toggle.js.erb b/app/assets/javascripts/sidebar_toggle.js.erb index 104c19882..0b4ef6b83 100644 --- a/app/assets/javascripts/sidebar_toggle.js.erb +++ b/app/assets/javascripts/sidebar_toggle.js.erb @@ -26,11 +26,18 @@ function toggle() { var btn = $('#sidebar-arrow'); + var sideBarEvent; if (btn.is('[data-shown]')) { hide(); + sideBarEvent = 'sideBar::hidden' } else { show(); + sideBarEvent = 'sideBar::shown' } + + $('.navbar-secondary').one("transitionend",function(event) { + $('.navbar-secondary').trigger(sideBarEvent); + }) } function isShown() {