summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-06-09 20:45:15 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-06-09 20:45:15 -0400
commit000133a094170aecd312d4680106106ab6b65dfd (patch)
tree8956bfdeca9b049a303b73a070c2995f36db1228
parent07e2161a6e182313b6f39aa0515cd5c6cd2e2099 (diff)
downloadaskbot-000133a094170aecd312d4680106106ab6b65dfd.tar.gz
askbot-000133a094170aecd312d4680106106ab6b65dfd.tar.bz2
askbot-000133a094170aecd312d4680106106ab6b65dfd.zip
added a utility function to the autocompleter
-rw-r--r--askbot/media/js/utils.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/askbot/media/js/utils.js b/askbot/media/js/utils.js
index ec3af964..2f835dad 100644
--- a/askbot/media/js/utils.js
+++ b/askbot/media/js/utils.js
@@ -3263,6 +3263,17 @@ AutoCompleter.prototype.displayValue = function(value, data) {
}
};
+AutoCompleter.prototype.clear = function() {
+ this._element.val('');
+ this._results.hide();
+ this.lastKeyPressed_ = null;
+ this.lastProcessedValue_ = null;
+ if (this._keyTimeout_) {
+ clearTimeout(this._keyTimeout);
+ }
+ this._active = false;
+};
+
AutoCompleter.prototype.finish = function() {
if (this.keyTimeout_) {
clearTimeout(this.keyTimeout_);