From e047775b0a4d03a05afc34d0260d48a5e574046e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 30 Nov 2016 18:36:01 +0100 Subject: [locations] Also make sure the opened location is in view --- modules-available/locations/templates/locations.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules-available/locations/templates/locations.html') diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index 06365cb6..c2dc610e 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -134,7 +134,7 @@ function slxOpenLocation(e, lid) { if (existing.is(slxLastLocation)) { slxLastLocation = false; } else { - existing.show(); + existing.show()[0].scrollIntoView(); $(e).closest('tr').addClass('active slx-bold'); slxLastLocation = existing; } @@ -146,6 +146,7 @@ function slxOpenLocation(e, lid) { $(e).closest('tr').addClass('active slx-bold').after(tr); td.load('?do=Locations&action=showlocation&locationid=' + lid, function() { slxAttachCidr(); + $('#location-details-' + lid)[0].scrollIntoView(); }); slxLastLocation = tr; } -- cgit v1.2.3-55-g7522