Bugzilla – Attachment 146279 Details for
Bug 31413
Set focus for cursor to Selector when adding a new audio alert
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31413: Set focus for cursor to Selector when adding a new audio alert
Bug-31413-Set-focus-for-cursor-to-Selector-when-ad.patch (text/plain), 1.51 KB, created by
Lucas Gass
on 2023-02-06 15:36:16 UTC
(
hide
)
Description:
Bug 31413: Set focus for cursor to Selector when adding a new audio alert
Filename:
MIME Type:
Creator:
Lucas Gass
Created:
2023-02-06 15:36:16 UTC
Size:
1.51 KB
patch
obsolete
>From 40d5688453956519621609c68da53ba2c2d59f82 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 6 Feb 2023 13:10:30 +0000 >Subject: [PATCH] Bug 31413: Set focus for cursor to Selector when adding a new > audio alert > >This patch adds a step to the process of displaying the new audio alert >form so that focus will be set to the first field when the form has >finished appearing. The typical "focus" class only works on elements >which are present in the initial DOM when the page is displayed. > >To test, apply the patch and go to Administration -> Audio alerts. > >Click the "New alert" button. When the form appears cursor focus should >be on the "Selector" field. > >Also test the edit process: When editing an existing alert there should >not be automatic cursor focus. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js b/koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js >index 0fa22dc4306..7c27fd45e65 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js >@@ -25,7 +25,9 @@ $( document ).ready(function() { > > $("#newalert").on("click",function(e){ > e.preventDefault(); >- $("#new-alert-form").show(); >+ $("#new-alert-form").show( 0, function(){ >+ $("#selector").focus(); >+ }); > $("#toolbar, #delete-alert-form").hide(); > }); > >-- >2.30.2
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 31413
:
146266
|
146279
|
147355