aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-10-28 13:25:54 +0000
committerpatdenice <patdenice@piwigo.org>2011-10-28 13:25:54 +0000
commit2a5be28bc5a0fe4748279bebe23d1be6416fe015 (patch)
tree19dc0a131baa6ad1b8fb1c96e64c153013785d81 /themes/default/js/ui/jquery.ui.autocomplete.js
parent3ea95e0ebcce5ecd80ac4e95879dae72e9360988 (diff)
feature:2487
Update jQuery to 1.6.4 and jQuery UI to 1.8.16 git-svn-id: http://piwigo.org/svn/trunk@12525 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui/jquery.ui.autocomplete.js')
-rw-r--r--themes/default/js/ui/jquery.ui.autocomplete.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/themes/default/js/ui/jquery.ui.autocomplete.js b/themes/default/js/ui/jquery.ui.autocomplete.js
index 718bfe5b9..edf79767f 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.10
+ * jQuery UI Autocomplete 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -20,6 +20,7 @@ var requestIndex = 0;
$.widget( "ui.autocomplete", {
options: {
appendTo: "body",
+ autoFocus: false,
delay: 300,
minLength: 1,
position: {
@@ -47,7 +48,7 @@ $.widget( "ui.autocomplete", {
"aria-haspopup": "true"
})
.bind( "keydown.autocomplete", function( event ) {
- if ( self.options.disabled || self.element.attr( "readonly" ) ) {
+ if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) {
return;
}
@@ -365,6 +366,10 @@ $.widget( "ui.autocomplete", {
ul.position( $.extend({
of: this.element
}, this.options.position ));
+
+ if ( this.options.autoFocus ) {
+ this.menu.next( new $.Event("mouseover") );
+ }
},
_resizeMenu: function() {
@@ -485,12 +490,12 @@ $.widget("ui.menu", {
this.deactivate();
if (this.hasScroll()) {
var offset = item.offset().top - this.element.offset().top,
- scroll = this.element.attr("scrollTop"),
+ scroll = this.element.scrollTop(),
elementHeight = this.element.height();
if (offset < 0) {
- this.element.attr("scrollTop", scroll + offset);
+ this.element.scrollTop( scroll + offset);
} else if (offset >= elementHeight) {
- this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
+ this.element.scrollTop( scroll + offset - elementHeight + item.height());
}
}
this.active = item.eq(0)
@@ -596,7 +601,7 @@ $.widget("ui.menu", {
},
hasScroll: function() {
- return this.element.height() < this.element.attr("scrollHeight");
+ return this.element.height() < this.element[ $.fn.prop ? "prop" : "attr" ]("scrollHeight");
},
select: function( event ) {