Bugzilla – Attachment 11862 Details for
Bug 8215
Add Course Reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8215 - Add Course Reserves - Followup - Prevent submitting form on 'enter'
-Bug-8215---Add-Course-Reserves---Followup---Preve.patch (text/plain), 2.45 KB, created by
Kyle M Hall (khall)
on 2012-08-28 12:22:17 UTC
(
hide
)
Description:
Bug 8215 - Add Course Reserves - Followup - Prevent submitting form on 'enter'
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-08-28 12:22:17 UTC
Size:
2.45 KB
patch
obsolete
>From bca00bf51453cfe86bf8d604d4e078641a9b7789 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 28 Aug 2012 08:19:52 -0400 >Subject: [PATCH] Bug 8215 - Add Course Reserves - Followup - Prevent submitting form on 'enter' >Content-Type: text/plain; charset="utf-8" > >When using the instructor search, hitting enter will attempt to submit the form. >This is unwanted behavior. Fixed by adding some jquery, such that any form field >with the class "noEnterSubmit" will but trigger a form submission. This class >can be used on any form in the librarian interface to prevent a field from triggering >a form submission via the enter key. >--- > .../prog/en/includes/doc-head-close.inc | 9 +++++++++ > .../prog/en/modules/course_reserves/course.tt | 2 +- > 2 files changed, 10 insertions(+), 1 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index 32eae21..22a8854 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -67,3 +67,12 @@ var NO_LOCAL_JACKET = _("No cover image available"); > //]]> > </script> > [% END %] >+ >+<script type="text/javascript" language="javascript"> >+$(document).ready(function() { >+ $('.noEnterSubmit').keypress(function(e){ >+ if ( e.which == 13 ) return false; >+ //if ( e.which == 13 ) e.preventDefault(); >+ }); >+}); >+</script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >index bc2fd1b..00dcfd2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >@@ -183,7 +183,7 @@ function RemoveInstructor( cardnumber ) { > > <fieldset> > <label for="find_instructor">Instructor Search:</label> >- <input autocomplete="off" id="find_instructor" type="text" style="width:150px" /> >+ <input autocomplete="off" id="find_instructor" type="text" style="width:150px" class="noEnterSubmit"/> > <div id="find_instructor_container"></div> > </fieldset> > <li> >-- >1.7.2.5
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 8215
:
9990
|
10181
|
10224
|
11131
|
11612
|
11657
|
11677
|
11678
|
11679
|
11680
|
11681
|
11682
|
11683
|
11860
|
11861
|
11862
|
11865
|
11875
|
11881
|
11882
|
11980
|
12039
|
12120
|
12128
|
12188
|
12189
|
12192
|
12246
|
12361
|
12400
|
12413
|
12414
|
12593
|
12627
|
13496
|
13497
|
13498
|
13499
|
15195
|
15196
|
15197
|
15198
|
15199
|
16228
|
16229
|
16251
|
16252
|
16532
|
16533
|
16534
|
16536
|
16537
|
16545
|
16567
|
16568
|
16587
|
16588
|
16599
|
16621
|
16623
|
16634
|
17333
|
17334
|
17335
|
17336
|
17337
|
17377
|
17378
|
17379
|
17894
|
17895
|
17896
|
17897
|
17898
|
17899
|
18274
|
18275
|
18276
|
18277
|
18278
|
18279
|
18282
|
18283
|
18284
|
18285
|
18286
|
18287
|
18288
|
18289
|
18290
|
18291
|
18292
|
18293
|
21885
|
23264