mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -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
|
// Set the height of each container and calc max number of rows containers can hold
|
||||||
function setHeight() {
|
function setHeight() {
|
||||||
var docw = $(document).width(),
|
var docw = $(window).width(),
|
||||||
|
doch = $(window).height(),
|
||||||
available_height,
|
available_height,
|
||||||
search_row, page_row, height, header, row_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
|
// 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;
|
available_height = $(window).height() - $('.main-menu').outerHeight() - $('#main_tabs').outerHeight() - $('#breadcrumbs').outerHeight() - $('.site-footer').outerHeight() - 25;
|
||||||
$('.jobs-list-container').each(function() {
|
$('.jobs-list-container').each(function() {
|
||||||
@@ -259,7 +260,7 @@ function JobsListController ($scope, $compile, $routeParams, ClearScope, Breadcr
|
|||||||
max_rows = Math.floor(height / row_height);
|
max_rows = Math.floor(height / row_height);
|
||||||
}
|
}
|
||||||
else {
|
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() {
|
$('.jobs-list-container').each(function() {
|
||||||
$(this).css({ 'height': 'auto' });
|
$(this).css({ 'height': 'auto' });
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user