From: ioguix Date: Mon, 26 Jul 2010 08:51:46 +0000 (+0200) Subject: On insert page, open the auto-complete list when it gets the focus X-Git-Tag: REL_5-0-BETA-1~26 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=fa087c7c55b4f569b55e9f7e8873c0e980649663;p=phppgadmin.git On insert page, open the auto-complete list when it gets the focus --- 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(