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

Jifty commits jifty-commit at lists.jifty.org
Sat Apr 19 06:00:04 EDT 2008


Author: gugod
Date: Sat Apr 19 05:59:59 2008
New Revision: 5329

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

Log:
use "contenType" property instead of beforeSend callback. This fixes
the autocompletor bug in IE. The real problem was, the request wasn't
completely sane on IE.


Modified: jifty/trunk/share/web/static/js/jifty_interface.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty_interface.js	(original)
+++ jifty/trunk/share/web/static/js/jifty_interface.js	Sat Apr 19 05:59:59 2008
@@ -15,10 +15,12 @@
         var request = Jifty.current_autocompleter_object.buildRequest();
 	jQuery.ajax(
 	    {
-		type: 'post',
-		data: JSON.stringify(request),
-		success: function(xml)
-		{
+		'type': 'post',
+		'url': subject.autoCFG.source,
+                'contentType': 'text/x-json',
+		'data': JSON.stringify(request),
+                'dataType': 'xml',
+		'success': function(xml, textStatus) {
 		    subject.autoCFG.lastSuggestion = jQuery('li',xml);
 		    size = subject.autoCFG.lastSuggestion.size();
 		    if (size > 0) {
@@ -57,11 +59,7 @@
 		    } else {
 			jQuery.iAuto.clear();
 		    }
-		},
-                beforeSend: function(xhr) {
-                    xhr.setRequestHeader('Content-Type', 'text/x-json');
-                },
-		url : subject.autoCFG.source
+		}
 	    }
 	);
     }


More information about the Jifty-commit mailing list