Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Webportal]fix user-view datatable display bug #734

Merged
merged 3 commits into from
Jun 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions webportal/src/app/user/user-view/user-view.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,13 @@ const loadUsers = (limit, specifiedVc) => {
'autoWidth': false,
}).api();
}
resizeContentWrapper();
loading.hideLoading();
},
error: (xhr, textStatus, error) => {
const res = JSON.parse(xhr.responseText);
alert(res.message);
resizeContentWrapper();
loading.hideLoading();
},
});
Expand Down Expand Up @@ -254,7 +256,7 @@ window.updateUserAccount = updateUserAccount;
const resizeContentWrapper = () => {
$('#content-wrapper').css({'height': $(window).height() + 'px'});
if (table != null) {
$('.dataTables_scrollBody').css('height', (($(window).height() - 265)) + 'px');
$('.dataTables_scrollBody').css('height', (($(window).height() - 315)) + 'px');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Let’s remove this magic number in the future.

table.columns.adjust().draw();
}
};
Expand All @@ -265,7 +267,6 @@ $(document).ready(() => {
window.onresize = function(event) {
resizeContentWrapper();
};
resizeContentWrapper();
$('#sidebar-menu--cluster-view--user-management').addClass('active');
loadUsers();
$('#content-wrapper').css({'overflow': 'hidden'});
Expand Down