diff options
author | Simon Rettberg | 2016-11-30 18:36:01 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-11-30 18:36:01 +0100 |
commit | e047775b0a4d03a05afc34d0260d48a5e574046e (patch) | |
tree | e59c8d4ad884fae1b0af39f180cc96b9bf2f0bca /modules-available/locations | |
parent | [locations] Don't scroll to top when opening location (diff) | |
download | slx-admin-e047775b0a4d03a05afc34d0260d48a5e574046e.tar.gz slx-admin-e047775b0a4d03a05afc34d0260d48a5e574046e.tar.xz slx-admin-e047775b0a4d03a05afc34d0260d48a5e574046e.zip |
[locations] Also make sure the opened location is in view
Diffstat (limited to 'modules-available/locations')
-rw-r--r-- | modules-available/locations/templates/locations.html | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |