summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-19 07:05:00 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-19 07:05:00 +0000
commitb5f63ed63b358d71d6634f2b6ac793d128e64bd9 (patch)
treeff2c948a4e7bc2e00a6773ce193b7807281e1b54 /roundcubemail/program
parent3291cd0275768e182cd6b87007a9309bc2069deb (diff)
- Add possibility to change autocomplete action name
git-svn-id: https://svn.roundcube.net/trunk@4936 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/app.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index f670bb0bc..92a47fdcf 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -2904,9 +2904,9 @@ function rcube_webmail()
this.auto_save_start();
};
- this.init_address_input_events = function(obj)
+ this.init_address_input_events = function(obj, action)
{
- obj[bw.ie || bw.safari || bw.chrome ? 'keydown' : 'keypress'](function(e){ return ref.ksearch_keydown(e, this); })
+ obj[bw.ie || bw.safari || bw.chrome ? 'keydown' : 'keypress'](function(e) { return ref.ksearch_keydown(e, this, action); })
.attr('autocomplete', 'off');
};
@@ -3441,14 +3441,14 @@ function rcube_webmail()
/*********************************************************/
// handler for keyboard events on address-fields
- this.ksearch_keydown = function(e, obj)
+ this.ksearch_keydown = function(e, obj, action)
{
if (this.ksearch_timer)
clearTimeout(this.ksearch_timer);
- var highlight;
- var key = rcube_event.get_keycode(e);
- var mod = rcube_event.get_modifier(e);
+ var highlight,
+ key = rcube_event.get_keycode(e),
+ mod = rcube_event.get_modifier(e);
switch (key) {
case 38: // key up
@@ -3472,7 +3472,7 @@ function rcube_webmail()
break;
case 13: // enter
- if (this.ksearch_selected===null || !this.ksearch_input || !this.ksearch_value)
+ if (this.ksearch_selected === null || !this.ksearch_input || !this.ksearch_value)
break;
// insert selected address and hide ksearch pane
@@ -3492,7 +3492,7 @@ function rcube_webmail()
}
// start timer
- this.ksearch_timer = window.setTimeout(function(){ ref.ksearch_get_results(); }, 200);
+ this.ksearch_timer = window.setTimeout(function(){ ref.ksearch_get_results(action); }, 200);
this.ksearch_input = obj;
return true;
@@ -3560,7 +3560,7 @@ function rcube_webmail()
};
// address search processor
- this.ksearch_get_results = function()
+ this.ksearch_get_results = function(action)
{
var inp_value = this.ksearch_input ? this.ksearch_input.value : null;
@@ -3606,7 +3606,7 @@ function rcube_webmail()
return;
var lock = this.display_message(this.get_label('searching'), 'loading');
- this.http_post('mail/autocomplete', '_search='+urlencode(q), lock);
+ this.http_post(action ? action : 'mail/autocomplete', '_search='+urlencode(q), lock);
};
this.ksearch_query_results = function(results, search)