mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 16:27:42 -02:30
AC-1271 fixed job page display. Now using window width and height rather than document. Also, if window height < 800px, use default page size of 5 rows and let containers auto-size themselves.
This commit is contained in:
@@ -241,10 +241,11 @@ function JobsListController ($scope, $compile, $routeParams, ClearScope, Breadcr
|
||||
|
||||
// Set the height of each container and calc max number of rows containers can hold
|
||||
function setHeight() {
|
||||
var docw = $(document).width(),
|
||||
var docw = $(window).width(),
|
||||
doch = $(window).height(),
|
||||
available_height,
|
||||
search_row, page_row, height, header, row_height;
|
||||
if (docw > 1240) {
|
||||
if (docw > 1240 && doch > 800) {
|
||||
// customize the container height and # of rows based on available viewport height
|
||||
available_height = $(window).height() - $('.main-menu').outerHeight() - $('#main_tabs').outerHeight() - $('#breadcrumbs').outerHeight() - $('.site-footer').outerHeight() - 25;
|
||||
$('.jobs-list-container').each(function() {
|
||||
@@ -259,7 +260,7 @@ function JobsListController ($scope, $compile, $routeParams, ClearScope, Breadcr
|
||||
max_rows = Math.floor(height / row_height);
|
||||
}
|
||||
else {
|
||||
// when width < 1240px put things back to their default state
|
||||
// when width < 1240px || height < 800px put things back to their default state
|
||||
$('.jobs-list-container').each(function() {
|
||||
$(this).css({ 'height': 'auto' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user