Bugzilla – Attachment 61362 Details for
Bug 18066
Hea - Version 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18066: Fix map positioning in admin/usage_statistics.pl
Bug-18066-Fix-map-positioning-in-adminusagestatist.patch (text/plain), 2.41 KB, created by
Julian Maurice
on 2017-03-21 11:11:50 UTC
(
hide
)
Description:
Bug 18066: Fix map positioning in admin/usage_statistics.pl
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-03-21 11:11:50 UTC
Size:
2.41 KB
patch
obsolete
>From 862128b24cd773a0dde3336e9816ddf49fbadf6c Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 21 Mar 2017 12:01:45 +0100 >Subject: [PATCH] Bug 18066: Fix map positioning in admin/usage_statistics.pl > >--- > .../prog/en/modules/admin/usage_statistics.tt | 45 ++++++++++++---------- > 1 file changed, 24 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt >index 06fcac22ea..634517659a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt >@@ -10,28 +10,31 @@ > > <script type="text/javascript"> > //<![CDATA[ >- var originalOffset; >- $(window).scroll(function () { >- var tbh = $("#mapid"); >- var offsetTop = tbh.offset().top; >- var s = parseInt($(window).scrollTop(), 10); >- var fixMe = (s > offsetTop); >- if ( !originalOffset ) originalOffset = tbh.position().top; >- var repositionMe = (s < originalOffset); >- if (fixMe) { >- tbh.css({ >- 'position': 'fixed', >- 'top': '0', >- 'margin-left': '40%' >- }); >- } >- if (repositionMe) { >- tbh.css({ >- 'position': 'absolute', >- 'top': originalOffset, >- 'margin-left': '40%' >- }); >+ $(document).ready(function() { >+ function positionMap() { >+ var tbh = $("#mapid"); >+ var mapContainer = tbh.parent(); >+ mapContainer.css('position', 'relative'); >+ tbh.css('position', 'absolute'); >+ tbh.css('right', 0); >+ >+ var offsetTop = mapContainer.offset().top; >+ var s = parseInt($(window).scrollTop(), 10); >+ tbh.css('top', '').css('bottom', ''); >+ if (s > offsetTop) { >+ var mapContainerOffsetBottom = offsetTop + mapContainer.innerHeight(); >+ if (s + tbh.outerHeight(true) > mapContainerOffsetBottom) { >+ tbh.css('bottom', 0); >+ } else { >+ tbh.css('top', s - offsetTop); >+ } >+ } else { >+ tbh.css('top', 0); >+ } > } >+ >+ $(window).scroll(positionMap); >+ positionMap(); > }); > //]]> > </script> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18066
:
59975
|
59976
|
60729
|
60730
|
60734
|
60742
|
60743
|
60744
|
60745
|
60746
|
61355
|
61356
|
61358
|
61361
|
61362
|
61392
|
61393
|
61394
|
61395
|
61396
|
61397
|
61398
|
61427
|
61428
|
61429
|
61430
|
61431
|
61432
|
61433
|
61582
|
62646