aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.effects.blind.js2
-rw-r--r--ui/jquery.effects.bounce.js2
-rw-r--r--ui/jquery.effects.clip.js2
-rw-r--r--ui/jquery.effects.core.js35
-rw-r--r--ui/jquery.effects.drop.js2
-rw-r--r--ui/jquery.effects.explode.js2
-rw-r--r--ui/jquery.effects.fade.js2
-rw-r--r--ui/jquery.effects.fold.js2
-rw-r--r--ui/jquery.effects.highlight.js2
-rw-r--r--ui/jquery.effects.pulsate.js2
-rw-r--r--ui/jquery.effects.scale.js6
-rw-r--r--ui/jquery.effects.shake.js2
-rw-r--r--ui/jquery.effects.slide.js2
-rw-r--r--ui/jquery.effects.transfer.js2
-rw-r--r--ui/jquery.ui.accordion.js5
-rw-r--r--ui/jquery.ui.autocomplete.js5
-rw-r--r--ui/jquery.ui.button.js12
-rw-r--r--ui/jquery.ui.datepicker.js8
-rw-r--r--ui/jquery.ui.draggable.js2
-rw-r--r--ui/jquery.ui.droppable.js4
20 files changed, 73 insertions, 28 deletions
diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js
index 0c865d59f..6b7250789 100644
--- a/ui/jquery.effects.blind.js
+++ b/ui/jquery.effects.blind.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.blind = function( o ) {
+$.effects.effect.blind = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js
index d5b43492e..8da0feb76 100644
--- a/ui/jquery.effects.bounce.js
+++ b/ui/jquery.effects.bounce.js
@@ -14,7 +14,7 @@
var rshowhide = /show|hide/;
-$.effects.bounce = function(o) {
+$.effects.effect.bounce = function(o) {
return this.queue(function() {
diff --git a/ui/jquery.effects.clip.js b/ui/jquery.effects.clip.js
index 8cf91da57..14b358dfa 100644
--- a/ui/jquery.effects.clip.js
+++ b/ui/jquery.effects.clip.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.clip = function( o ) {
+$.effects.effect.clip = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index 0d326954a..573cb2554 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -9,7 +9,11 @@
*/
;jQuery.effects || (function($, undefined) {
-$.effects = {};
+var backCompat = $.uiBackCompat !== false;
+
+$.effects = {
+ effect: {}
+};
/******************************************************************************/
/****************************** COLOR ANIMATIONS ******************************/
@@ -493,7 +497,11 @@ function standardSpeed( speed ) {
}
// invalid strings - treat as "normal" speed
- if ( typeof speed === "string" && !$.effects[ speed ] ) {
+ if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
+ // TODO: remove in 2.0 (#7115)
+ if ( backCompat && $.effects[ speed ] ) {
+ return false;
+ }
return true;
}
@@ -504,9 +512,12 @@ $.fn.extend({
effect: function( effect, options, speed, callback ) {
var args = _normalizeArguments.apply( this, arguments ),
mode = args.mode,
- effectMethod = $.effects[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
+ effectMethod = $.effects.effect[ args.effect ],
+
+ // DEPRECATED: remove in 2.0 (#7115)
+ oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
+
+ if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
// delegate to the original method (e.g., .show()) if possible
if ( mode ) {
return this[ mode ]( args.duration, args.complete );
@@ -518,7 +529,19 @@ $.fn.extend({
});
}
}
- return effectMethod.call( this, args );
+
+ // TODO: remove this check in 2.0, effectMethod will always be true
+ if ( effectMethod ) {
+ return effectMethod.call( this, args );
+ } else {
+ // DEPRECATED: remove in 2.0 (#7115)
+ return oldEffectMethod.call(this, {
+ options: args,
+ duration: args.duration,
+ callback: args.complete,
+ mode: args.mode
+ });
+ }
},
_show: $.fn.show,
diff --git a/ui/jquery.effects.drop.js b/ui/jquery.effects.drop.js
index b88a8c428..24fb89db0 100644
--- a/ui/jquery.effects.drop.js
+++ b/ui/jquery.effects.drop.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.drop = function( o ) {
+$.effects.effect.drop = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js
index fa2707b5e..f5217ecb5 100644
--- a/ui/jquery.effects.explode.js
+++ b/ui/jquery.effects.explode.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.explode = function( o ) {
+$.effects.effect.explode = function( o ) {
return this.queue( function( next ) {
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js
index 825c84e78..5fa0319c0 100644
--- a/ui/jquery.effects.fade.js
+++ b/ui/jquery.effects.fade.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.fade = function( o ) {
+$.effects.effect.fade = function( o ) {
return this.queue( function() {
var el = $( this ),
mode = $.effects.setMode( el, o.mode || 'hide' );
diff --git a/ui/jquery.effects.fold.js b/ui/jquery.effects.fold.js
index 19e97c40f..29da090cb 100644
--- a/ui/jquery.effects.fold.js
+++ b/ui/jquery.effects.fold.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.fold = function( o ) {
+$.effects.effect.fold = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js
index b2ffb15e8..cd4f0705a 100644
--- a/ui/jquery.effects.highlight.js
+++ b/ui/jquery.effects.highlight.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.highlight = function( o ) {
+$.effects.effect.highlight = function( o ) {
return this.queue( function() {
var elem = $( this ),
props = [ 'backgroundImage', 'backgroundColor', 'opacity' ],
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index c5f67b12b..b168b6ef5 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.pulsate = function( o ) {
+$.effects.effect.pulsate = function( o ) {
return this.queue( function() {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || 'show' ),
diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js
index fcc0708b9..8f25ca9a8 100644
--- a/ui/jquery.effects.scale.js
+++ b/ui/jquery.effects.scale.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.puff = function( o ) {
+$.effects.effect.puff = function( o ) {
return this.queue( function() {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || 'hide' ),
@@ -40,7 +40,7 @@ $.effects.puff = function( o ) {
});
};
-$.effects.scale = function( o ) {
+$.effects.effect.scale = function( o ) {
return this.queue( function() {
@@ -92,7 +92,7 @@ $.effects.scale = function( o ) {
};
-$.effects.size = function( o ) {
+$.effects.effect.size = function( o ) {
return this.queue( function() {
// Create element
diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js
index 5e8875abe..a1ba1577c 100644
--- a/ui/jquery.effects.shake.js
+++ b/ui/jquery.effects.shake.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.shake = function( o ) {
+$.effects.effect.shake = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js
index eeba117cf..6b0296754 100644
--- a/ui/jquery.effects.slide.js
+++ b/ui/jquery.effects.slide.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.slide = function( o ) {
+$.effects.effect.slide = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.transfer.js b/ui/jquery.effects.transfer.js
index 79b1577d9..17d23c5fa 100644
--- a/ui/jquery.effects.transfer.js
+++ b/ui/jquery.effects.transfer.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.transfer = function( o ) {
+$.effects.effect.transfer = function( o ) {
return this.queue( function() {
var elem = $( this ),
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 34327be27..7f67814b4 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -75,6 +75,7 @@ $.widget( "ui.accordion", {
.not( self.active )
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.next()
@@ -87,6 +88,7 @@ $.widget( "ui.accordion", {
self.active
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
});
}
@@ -129,6 +131,7 @@ $.widget( "ui.accordion", {
.removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
.removeAttr( "role" )
.removeAttr( "aria-expanded" )
+ .removeAttr( "aria-selected" )
.removeAttr( "tabIndex" )
.find( "a" )
.removeAttr( "tabIndex" )
@@ -387,12 +390,14 @@ $.widget( "ui.accordion", {
toHide.prev()
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.blur();
toShow.prev()
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
})
.focus();
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index c83f042c0..a9e4b4119 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -22,6 +22,7 @@ $.widget( "ui.autocomplete", {
defaultElement: "<input>",
options: {
appendTo: "body",
+ autoFocus: true,
delay: 300,
minLength: 1,
position: {
@@ -362,6 +363,10 @@ $.widget( "ui.autocomplete", {
this.menu.blur();
this.menu.refresh();
+ if ( this.options.autoFocus ) {
+ this.menu.next( new $.Event("mouseover") );
+ }
+
// size and position menu
ul.show();
this._resizeMenu();
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 134dae3d3..9cf8974b2 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -201,8 +201,16 @@ $.widget( "ui.button", {
if ( this.type === "checkbox" || this.type === "radio" ) {
// we don't search against the document in case the element
// is disconnected from the DOM
- this.buttonElement = this.element.parents().last()
- .find( "label[for=" + this.element.attr("id") + "]" );
+ var ancestor = this.element.parents().last(),
+ labelSelector = "label[for=" + this.element.attr("id") + "]";
+ this.buttonElement = ancestor.find( labelSelector );
+ if ( !this.buttonElement.length ) {
+ ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
+ this.buttonElement = ancestor.filter( labelSelector );
+ if ( !this.buttonElement.length ) {
+ this.buttonElement = ancestor.find( labelSelector );
+ }
+ }
this.element.addClass( "ui-helper-hidden-accessible" );
var checked = this.element.is( ":checked" );
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 8dd9bf3dc..670955f64 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -656,7 +656,9 @@ $.extend(Datepicker.prototype, {
}
};
inst.dpDiv.zIndex($(input).zIndex()+1);
- if ($.effects && $.effects[showAnim])
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
@@ -781,7 +783,9 @@ $.extend(Datepicker.prototype, {
$.datepicker._tidyDialog(inst);
this._curInst = null;
};
- if ($.effects && $.effects[showAnim])
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 304240130..ff1ad1363 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -477,7 +477,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
instance: sortable,
shouldRevert: sortable.options.revert
});
- sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
+ sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
sortable._trigger("activate", event, uiSortable);
}
});
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index decdc1712..b8a93cd46 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -212,11 +212,11 @@ $.ui.ddmanager = {
for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
m[i].offset = m[i].element.offset();
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
- if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
-
}
},