Commit 8ece3667c50f2a0059d329245a2341ec62ed71aa
1 parent
1e4a8963
Merged in...
KTS-3194 "Advanced Search: pressing enter when cursor is in a text field should run the search" Fixed. Only added catching of enter for the input fields. Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.4-Release-Branch@9465 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
30 additions
and
1 deletions
templates/ktcore/search2/adv_query_builder.smarty
| ... | ... | @@ -583,6 +583,35 @@ function addField(groupid, display, exprname, type) |
| 583 | 583 | el.dom.innerHTML = html; |
| 584 | 584 | el.appendTo('criteria_fields' + groupid); |
| 585 | 585 | |
| 586 | + var el = $('field' + groupid + '_' + fid + 'start'); | |
| 587 | + | |
| 588 | + if (el != null) | |
| 589 | + { | |
| 590 | + var map = new Ext.KeyMap(el, | |
| 591 | + { | |
| 592 | + stopEvent: true, | |
| 593 | + key: Ext.EventObject.ENTER, | |
| 594 | + fn: function() { | |
| 595 | + butSearchClick(); | |
| 596 | + } | |
| 597 | + }); | |
| 598 | + } | |
| 599 | + | |
| 600 | + var el = $('field' + groupid + '_' + fid + 'end'); | |
| 601 | + | |
| 602 | + if (el != null) | |
| 603 | + { | |
| 604 | + var map = new Ext.KeyMap(el, | |
| 605 | + { | |
| 606 | + stopEvent: true, | |
| 607 | + key: Ext.EventObject.ENTER, | |
| 608 | + fn: function() { | |
| 609 | + butSearchClick(); | |
| 610 | + } | |
| 611 | + }); | |
| 612 | + } | |
| 613 | + | |
| 614 | + | |
| 586 | 615 | if (rec.init != null) |
| 587 | 616 | { |
| 588 | 617 | rec.init(groupid, fid); |
| ... | ... | @@ -795,7 +824,7 @@ function butSearchClick() |
| 795 | 824 | <br> |
| 796 | 825 | |
| 797 | 826 | <div id="criteria0"> |
| 798 | - <form id="form0"> | |
| 827 | + <form id="form0" onsubmit="return false;"> | |
| 799 | 828 | |
| 800 | 829 | <table width="100%"> |
| 801 | 830 | <tr> | ... | ... |