Bugzilla – Attachment 105774 Details for
Bug 25680
When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25680: When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view
Bug-25680-When-adding-a-new-patron-and-missing-to-.patch (text/plain), 1.83 KB, created by
Katrin Fischer
on 2020-06-11 19:35:19 UTC
(
hide
)
Description:
Bug 25680: When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-06-11 19:35:19 UTC
Size:
1.83 KB
patch
obsolete
>From 6ecaddff0cd11c0cf36eb51601621f30500ec6a8 Mon Sep 17 00:00:00 2001 >From: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> >Date: Mon, 8 Jun 2020 07:20:05 +0200 >Subject: [PATCH] Bug 25680: When adding a new patron and missing to fill a > field, on saving, the invalidFocus should show the focused field clearly in > view > > This patch will center the focused field at the golden section in the window. > > To test: > 1) Begin to add a new patron. > 2) Leave a required field empty, which is outside the screen view, and click Save. > 3) Notice that the field is at the bottom, behind the language bar if there is one. > 4) Apply patch > 5) Add a new patron. > 6) Leave the required field empty again and Save. > 7) Notice that the required field is now clearly shown in view. > 8) Sign off. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/js/members.js | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 1e102f1be7..88af688643 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -326,6 +326,17 @@ $(document).ready(function(){ > jQuery.validator.messages.phone); > > $("#entryform").validate({ >+ focusInvalid: false, >+ invalidHandler: function(form, validator) { >+ var errors = validator.numberOfInvalids(); >+ if(errors) { >+ window.scrollTo(0, 0); >+ validator.errorList[0].element.focus(); >+ if($(validator.errorList[0].element).offset().top > $(window).height()) { >+ window.scrollBy(0,$(window).height()/1.618); >+ } >+ } >+ }, > rules: { > email: { > email: true >-- >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 25680
:
105571
|
105574
|
105575
|
105576
|
105577
|
105619
| 105774