Fix Datatable header adjustments on repositories index

This commit is contained in:
Urban Rotnik 2020-07-07 09:48:59 +02:00
parent 79ef4ece28
commit d16a2ed9c9
3 changed files with 10 additions and 3 deletions

View file

@ -306,7 +306,7 @@ var MyModuleRepositories = (function() {
renderSimpleTable(repositoryTemplate);
});
$('.navbar-secondary').on('sideBar::shown sideBar::hidden', function() {
$('#wrapper').on('sideBar::shown sideBar::hidden', function() {
if (SIMPLE_TABLE) {
SIMPLE_TABLE.columns.adjust();
}

View file

@ -156,6 +156,13 @@
});
});
$('#wrapper').on('sideBar::hidden sideBar::shown', function() {
if (REPOSITORIES_TABLE) {
REPOSITORIES_TABLE.columns.adjust();
}
});
$('.create-new-repository').initializeModal('#create-repo-modal');
initRepositoriesDataTable('#repositoriesList', $('.repositories-index').hasClass('archived'));
initRepositoryViewSwitcher();

View file

@ -35,8 +35,8 @@
sideBarEvent = 'sideBar::shown'
}
$('.navbar-secondary').one("transitionend",function(event) {
$('.navbar-secondary').trigger(sideBarEvent);
$('#wrapper').one("transitionend", function() {
$('#wrapper').trigger(sideBarEvent);
})
}