couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r735639 - /couchdb/trunk/share/www/script/jquery.suggest.js
Date Mon, 19 Jan 2009 09:36:35 GMT
Author: cmlenz
Date: Mon Jan 19 01:36:35 2009
New Revision: 735639

URL: http://svn.apache.org/viewvc?rev=735639&view=rev
Log:
Add on-select callback to Futon autocompletion plugin.

Modified:
    couchdb/trunk/share/www/script/jquery.suggest.js

Modified: couchdb/trunk/share/www/script/jquery.suggest.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.suggest.js?rev=735639&r1=735638&r2=735639&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.suggest.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.suggest.js [utf-8] Mon Jan 19 01:36:35 2009
@@ -102,6 +102,9 @@
       if (sel) {
         prevVal = sel.data("value");
         input.val(prevVal);
+        if (options.select) {
+          options.select.apply(elem, [prevVal]);
+        }
         dropdown.hide();
       }
       if (timer) clearTimeout(timer)
@@ -133,7 +136,8 @@
       callback: callback,
       delay: 100,
       dropdownClass: "suggest-dropdown",
-      minChars: 1
+      minChars: 1,
+      select: null
     }, options || {});
     return this.each(function() {
       suggest(this, options);



Mime
View raw message