summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-01-03 16:35:55 +0100
committerYorhel <git@yorhel.nl>2009-01-03 16:35:55 +0100
commitada9fe2f219442d9c6e8b1afda9c9607505c0c64 (patch)
treeb0915dbd7aa1e65ae5f6545df39315b4feb0b948 /static
parent91bf69be9f5e7ed0e5784aefbfcb6f1c3fc29c4f (diff)
Search dropdown calls the return function automatically on select
...in less technical terms: producers/vns are automatically added when selecting them from the dropdown search, rather than having to press the return key a second time.
Diffstat (limited to 'static')
-rw-r--r--static/f/forms.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/static/f/forms.js b/static/f/forms.js
index cd65058d..e25a880c 100644
--- a/static/f/forms.js
+++ b/static/f/forms.js
@@ -126,7 +126,7 @@ function dsKeyDown(ev) {
if(obj.selectedId != 0)
obj.value = obj.serFunc(x('ds_box_'+obj.selectedId).itemData);
- else if(obj.returnFunc)
+ if(obj.returnFunc)
obj.returnFunc();
if(x('ds_box'))
x('ds_box').style.top = '-500px';
@@ -234,6 +234,8 @@ function dsResults(hr, obj) {
};
tr.onclick = function() {
obj.value = obj.serFunc(this.itemData);
+ if(obj.returnFunc)
+ obj.returnFunc();
if(x('ds_box'))
x('ds_box').style.top = '-500px';
obj.selectedId = 0;