aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-03-07 00:58:34 +0000
committerpatdenice <patdenice@piwigo.org>2011-03-07 00:58:34 +0000
commitac0ba26afc1fe5f7daf1d7f967301470b461772c (patch)
tree5da280ad6cbbae4af8498e4e6d2da517c7d1383f /themes/default/js/ui/jquery.ui.autocomplete.js
parentd94968f60a8e818fa1c1b18fdc8b83d7affa9b6e (diff)
Update jQuery UI to 1.8.10.
Improve jquery ui management in template class. git-svn-id: http://piwigo.org/svn/trunk@9559 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--themes/default/js/ui/jquery.ui.autocomplete.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/themes/default/js/ui/jquery.ui.autocomplete.js b/themes/default/js/ui/jquery.ui.autocomplete.js
index 576feee66..718bfe5b9 100644
--- a/themes/default/js/ui/jquery.ui.autocomplete.js
+++ b/themes/default/js/ui/jquery.ui.autocomplete.js
@@ -1,5 +1,5 @@
/*
- * jQuery UI Autocomplete 1.8.9
+ * jQuery UI Autocomplete 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -14,6 +14,9 @@
*/
(function( $, undefined ) {
+// used to prevent race conditions with remote data sources
+var requestIndex = 0;
+
$.widget( "ui.autocomplete", {
options: {
appendTo: "body",
@@ -256,17 +259,16 @@ $.widget( "ui.autocomplete", {
url: url,
data: request,
dataType: "json",
- success: function( data, status, xhr ) {
- if ( xhr === self.xhr ) {
+ autocompleteRequest: ++requestIndex,
+ success: function( data, status ) {
+ if ( this.autocompleteRequest === requestIndex ) {
response( data );
}
- self.xhr = null;
},
- error: function( xhr ) {
- if ( xhr === self.xhr ) {
+ error: function() {
+ if ( this.autocompleteRequest === requestIndex ) {
response( [] );
}
- self.xhr = null;
}
});
};