Bugzilla – Attachment 77175 Details for
Bug 21099
Floating toolbars reposition too late
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21099: Reposition floating toolbars earlier
Bug-21099-Reposition-floating-toolbars-earlier.patch (text/plain), 2.74 KB, created by
Pierre-Luc Lapointe
on 2018-07-20 18:04:15 UTC
(
hide
)
Description:
Bug 21099: Reposition floating toolbars earlier
Filename:
MIME Type:
Creator:
Pierre-Luc Lapointe
Created:
2018-07-20 18:04:15 UTC
Size:
2.74 KB
patch
obsolete
>From 94a277bc93744388c19e766535e37e892f2656fb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 20 Jul 2018 12:59:16 -0300 >Subject: [PATCH] Bug 21099: Reposition floating toolbars earlier > >To recreate: >- Go to the advanced search form >- scrolldown to position the toolbar on top of the window >- scrollup > >https://screenshots.firefox.com/NnkFg3iOXqLPxfkd/pro.kohadev.org > >The toolbar should have been repositioned earlier > >Test plan: >Edit a patron >- scrolldown >- scrollup >- unfold the form in the header (tab "Search patrons", link "[+]") >- scrolldown >- scrollup >Advanced search >scrolldown >scrollup > >You should notice the difference with and without this patch > >Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> >--- > .../intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js >index 36c99b0..74633e7 100644 >--- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js >+++ b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js >@@ -8,11 +8,17 @@ > var tbh = $(this); > var defaults = { > enabled: true, >- originalOffset: tbh.position().top >+ originalOffset: tbh.offset().top, >+ originalPosition: tbh.position().top, > }; > var originalOffset = typeof options.originalOffset === 'undefined' > ? defaults.originalOffset > : options.originalOffset; >+ >+ var originalPosition = typeof options.originalPosition === 'undefined' >+ ? defaults.originalPosition >+ : options.originalPosition; >+ > options = $.extend(defaults, options); > > if (tbh.css('position') !== 'absolute') { >@@ -34,14 +40,16 @@ > } > tbh.css({ > 'position': 'absolute', >- 'top': originalOffset >+ 'top': originalPosition, > }); > } > > if (options.enabled) { > $(window).scroll(function () { > var offsetTop = tbh.offset().top; >+ > var s = parseInt($(window).scrollTop(), 10); >+ > var fixMe = (s > offsetTop); > var repositionMe = (s < originalOffset); > if (fixMe) { >@@ -55,7 +63,7 @@ > if (repositionMe) { > tbh.css({ > 'position': 'absolute', >- 'top': originalOffset, >+ 'top': originalPosition, > 'z-index': '1' > }); > tbh.removeClass("floating"); >-- >2.7.4
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 21099
:
77164
|
77175
|
77388