aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.core.js11
-rw-r--r--ui/jquery.ui.draggable.js2
-rw-r--r--ui/jquery.ui.droppable.js2
-rw-r--r--ui/jquery.ui.effect.js2
-rw-r--r--ui/jquery.ui.menu.js2
-rw-r--r--ui/jquery.ui.selectable.js2
-rw-r--r--ui/jquery.ui.slider.js2
-rw-r--r--ui/jquery.ui.sortable.js2
-rw-r--r--ui/jquery.ui.tooltip.js4
9 files changed, 19 insertions, 10 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index 4ad4f8a09..694cb1bef 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -152,7 +152,7 @@ function focusable( element, isTabIndexNotNaN ) {
function visible( element ) {
return $.expr.filters.visible( element ) &&
- !$( element ).parents().andSelf().filter(function() {
+ !$( element ).parents().addBack().filter(function() {
return $.css( this, "visibility" ) === "hidden";
}).length;
}
@@ -227,6 +227,15 @@ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
});
}
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.fn.removeData = (function( removeData ) {
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index b982ac6be..63a9b9114 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -280,7 +280,7 @@ $.widget("ui.draggable", $.ui.mouse, {
var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
$(this.options.handle, this.element)
.find("*")
- .andSelf()
+ .addBack()
.each(function() {
if(this === event.target) {
handle = true;
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index e2da0b9f6..a6959fd0f 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -235,7 +235,7 @@ $.ui.ddmanager = {
var i, j,
m = $.ui.ddmanager.droppables[t.options.scope] || [],
type = event ? event.type : null, // workaround for #2317
- list = (t.currentItem || t.element).find(":data(ui-droppable)").andSelf();
+ list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
droppablesLoop: for (i = 0; i < m.length; i++) {
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js
index d8d32e932..83d78a9b4 100644
--- a/ui/jquery.ui.effect.js
+++ b/ui/jquery.ui.effect.js
@@ -761,7 +761,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
var animated = $( this ),
baseClass = animated.attr( "class" ) || "",
applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).andSelf() : animated;
+ allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
// map the animated objects to store the original styles.
allAnimations = allAnimations.map(function() {
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 41a69c472..7f37b6b06 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -139,7 +139,7 @@ $.widget( "ui.menu", {
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).andSelf()
+ .find( ".ui-menu" ).addBack()
.removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
.removeAttr( "role" )
.removeAttr( "tabIndex" )
diff --git a/ui/jquery.ui.selectable.js b/ui/jquery.ui.selectable.js
index a9b15b20b..164862d14 100644
--- a/ui/jquery.ui.selectable.js
+++ b/ui/jquery.ui.selectable.js
@@ -113,7 +113,7 @@ $.widget("ui.selectable", $.ui.mouse, {
}
});
- $(event.target).parents().andSelf().each(function() {
+ $(event.target).parents().addBack().each(function() {
var doSelect,
selectee = $.data(this, "selectable-item");
if (selectee) {
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index 02fee8364..4054f1848 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -256,7 +256,7 @@ $.widget( "ui.slider", $.ui.mouse, {
.focus();
offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
+ mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
top: event.pageY - offset.top -
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index e142a0ede..08de5b22a 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -126,7 +126,7 @@ $.widget("ui.sortable", $.ui.mouse, {
return false;
}
if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").andSelf().each(function() {
+ $(this.options.handle, currentItem).find("*").addBack().each(function() {
if(this === event.target) {
validHandle = true;
}
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index ab8d5173c..3984826ce 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -113,7 +113,7 @@ $.widget( "ui.tooltip", {
});
// remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).andSelf().each(function() {
+ this.element.find( this.options.items ).addBack().each(function() {
var element = $( this );
if ( element.is( "[title]" ) ) {
element
@@ -125,7 +125,7 @@ $.widget( "ui.tooltip", {
_enable: function() {
// restore title attributes
- this.element.find( this.options.items ).andSelf().each(function() {
+ this.element.find( this.options.items ).addBack().each(function() {
var element = $( this );
if ( element.data( "ui-tooltip-title" ) ) {
element.attr( "title", element.data( "ui-tooltip-title" ) );