From fa087c7c55b4f569b55e9f7e8873c0e980649663 Mon Sep 17 00:00:00 2001 From: ioguix Date: Mon, 26 Jul 2010 10:51:46 +0200 Subject: [PATCH] On insert page, open the auto-complete list when it gets the focus --- js/ac_insert_row.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/ac_insert_row.js b/js/ac_insert_row.js index ae062a3d..3517becb 100644 --- a/js/ac_insert_row.js +++ b/js/ac_insert_row.js @@ -192,7 +192,7 @@ jQuery(document).ready(function () { /* register some global value in the ppa namespace */ jQuery.ppa = { fklist: jQuery('#fklist'), - attrs: jQuery('input[id^=attr_]'), + attrs: jQuery('input[id^=attr_]'), // select fields with FK fkbg: jQuery('#fkbg'), i:0, // selected value indice o:0 // offset when navigating prev/next @@ -209,6 +209,12 @@ jQuery(document).ready(function () { if (e.keyCode == 13 && jQuery.ppa.fklist[0].style.display == 'block') return false; }); + + /* open the list when the field get the focus */ + jQuery.ppa.attrs + .focus(function (e) { + openlist(this); + }); /* enable/disable auto-complete according to the checkbox */ triggerAc( -- 2.39.5