mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 20:35:02 -02:30
fix line anchoring of expand and collapse all
This commit is contained in:
@@ -90,23 +90,14 @@ export default [ 'templateUrl', '$timeout', '$location', '$anchorScroll',
|
|||||||
var visItem,
|
var visItem,
|
||||||
parentItem;
|
parentItem;
|
||||||
|
|
||||||
var containerHeight = $container.height();
|
|
||||||
var containerTop = $container.position().top;
|
|
||||||
var containerNetHeight = containerHeight + containerTop;
|
|
||||||
|
|
||||||
// iterate through each line of standard out
|
// iterate through each line of standard out
|
||||||
$container.find('.JobResultsStdOut-aLineOfStdOut')
|
$container.find('.JobResultsStdOut-aLineOfStdOut:visible')
|
||||||
.each( function () {
|
.each( function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
var lineHeight = $this.height();
|
|
||||||
var lineTop = $this.position().top;
|
|
||||||
var lineNetHeight = lineHeight + lineTop;
|
|
||||||
|
|
||||||
// check to see if the line is the first visible
|
// check to see if the line is the first visible
|
||||||
// line in the viewport...
|
// line in the viewport...
|
||||||
if (lineNetHeight > containerTop &&
|
if ($this.position().top >= 0) {
|
||||||
lineTop < containerNetHeight) {
|
|
||||||
|
|
||||||
// ...if it is, return the line number
|
// ...if it is, return the line number
|
||||||
// for this line
|
// for this line
|
||||||
|
|||||||
Reference in New Issue
Block a user