[Jifty-commit] r5323 - jifty/trunk/share/web/static/js

Jifty commits jifty-commit at lists.jifty.org
Thu Apr 17 08:51:51 EDT 2008


Author: clkao
Date: Thu Apr 17 08:51:51 2008
New Revision: 5323

Modified:
   jifty/trunk/share/web/static/js/jifty.js

Log:
attach the autocompleteHelper to the autocomplete div we have,
to retain heirarchy for existing css rules to work.


Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Thu Apr 17 08:51:51 2008
@@ -1440,12 +1440,17 @@
         this.action = Jifty.Form.Element.getAction(this.field);
         this.url    = '/__jifty/autocomplete.xml';
 
+        var sel = '#'+this.field.id+'-autocomplete';
+        var autocomplete_div = jQuery(sel.replace(/:/g, '\\\\\\:'));
         var self = this;
-        jQuery(this.field).bind("focus", function(event) {
+        jQuery(this.field).focus(function(event) {
             self.changed  = true;
             self.hasFocus = true;
             Jifty.current_autocompleter_object = self;
-        });
+            autocomplete_div.append(jQuery('#autocompleteHelper'))
+            .show();
+        })
+        .blur(function() { autocomplete_div.hide() });
         
         jQuery(this.field).Autocomplete({
             source: this.url,


More information about the Jifty-commit mailing list