From 811b377aad83f97a817542bd9d9eda957beab99d Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Tue, 28 Feb 2012 15:15:32 +0100 Subject: Update data naming for autocomplete. Backwards compatible for overrides of _renderItem. Partial fix for #7810 --- ui/jquery.ui.autocomplete.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index e261b9147..83326e27f 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -225,7 +225,8 @@ $.widget( "ui.autocomplete", { // custom key handling for now input: $(), focus: function( event, ui ) { - var item = ui.item.data( "item.autocomplete" ); + // back compat for _renderItem using item.autocomplete + var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ); if ( false !== self._trigger( "focus", event, { item: item } ) ) { // use value to match what will end up in the input, if it was a key event if ( /^key/.test(event.originalEvent.type) ) { @@ -234,7 +235,8 @@ $.widget( "ui.autocomplete", { } }, select: function( event, ui ) { - var item = ui.item.data( "item.autocomplete" ), + // back compat for _renderItem using item.autocomplete + var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ); previous = self.previous; // only trigger when focus was lost (click on menu) @@ -470,13 +472,16 @@ $.widget( "ui.autocomplete", { _renderMenu: function( ul, items ) { var self = this; $.each( items, function( index, item ) { - self._renderItem( ul, item ); + self._renderItemData( ul, item ); }); }, - _renderItem: function( ul, item) { + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); + }, + + _renderItem: function( ul, item ) { return $( "
  • " ) - .data( "item.autocomplete", item ) .append( $( "" ).text( item.label ) ) .appendTo( ul ); }, -- cgit v1.2.3 From 3a0b8b84335f5d576cfb6d0a01301086a091fa39 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:26:44 +0100 Subject: Update data naming for Accordion. Partial fix for #7810 --- ui/jquery.ui.accordion.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 48e964a94..6c4432828 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -405,7 +405,7 @@ $.widget( "ui.accordion", { animate = this.options.animate || {}, options = down && animate.down || animate, complete = function() { - toShow.removeData( "accordionHeight" ); + toShow.removeData( "ui-accordion-height" ); that._completed( data ); }; @@ -430,7 +430,7 @@ $.widget( "ui.accordion", { toHide.animate( hideProps, duration, easing ); toShow .hide() - .data( "accordionHeight", { + .data( "ui-accordion-height", { total: total, toHide: toHide }) @@ -455,7 +455,7 @@ $.widget( "ui.accordion", { $.fx.step.accordionHeight = function( fx ) { var elem = $( fx.elem ), - data = elem.data( "accordionHeight" ); + data = elem.data( "ui-accordion-height" ); elem.height( data.total - elem.outerHeight() - data.toHide.outerHeight() + elem.height() ); }; var hideProps = {}, -- cgit v1.2.3 From 98daa6af8406d50a204a77b082f570fdf0f61b6d Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:29:31 +0100 Subject: Slider: Whitespace cleanup --- ui/jquery.ui.slider.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index aff9093ba..29dca7c03 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -74,7 +74,7 @@ $.widget( "ui.slider", $.ui.mouse, { .addClass( "ui-slider-range" + // note: this isn't the most fittingly semantic framework class for this element, // but worked best visually with a variety of themes - " ui-widget-header" + + " ui-widget-header" + ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) ); } @@ -120,11 +120,11 @@ $.widget( "ui.slider", $.ui.mouse, { curVal, newVal, step; - + if ( self.options.disabled ) { return; } - + switch ( event.keyCode ) { case $.ui.keyCode.HOME: case $.ui.keyCode.END: @@ -145,14 +145,14 @@ $.widget( "ui.slider", $.ui.mouse, { } break; } - + step = self.options.step; if ( self.options.values && self.options.values.length ) { curVal = newVal = self.values( index ); } else { curVal = newVal = self.value(); } - + switch ( event.keyCode ) { case $.ui.keyCode.HOME: newVal = self._valueMin(); @@ -181,19 +181,19 @@ $.widget( "ui.slider", $.ui.mouse, { newVal = self._trimAlignValue( curVal - step ); break; } - + self._slide( event, index, newVal ); }) .keyup(function( event ) { var index = $( this ).data( "index.ui-slider-handle" ); - + if ( self._keySliding ) { self._keySliding = false; self._stop( event, index ); self._change( event, index ); $( this ).removeClass( "ui-state-active" ); } - + }); this._refreshValue(); @@ -275,7 +275,7 @@ $.widget( "ui.slider", $.ui.mouse, { closestHandle .addClass( "ui-state-active" ) .focus(); - + offset = closestHandle.offset(); mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" ); this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { @@ -301,7 +301,7 @@ $.widget( "ui.slider", $.ui.mouse, { _mouseDrag: function( event ) { var position = { x: event.pageX, y: event.pageY }, normValue = this._normValueFromMouse( position ); - + this._slide( event, this._handleIndex, normValue ); return false; @@ -320,7 +320,7 @@ $.widget( "ui.slider", $.ui.mouse, { return false; }, - + _detectOrientation: function() { this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; }, @@ -377,7 +377,7 @@ $.widget( "ui.slider", $.ui.mouse, { if ( this.options.values && this.options.values.length ) { otherVal = this.values( index ? 0 : 1 ); - if ( ( this.options.values.length === 2 && this.options.range === true ) && + if ( ( this.options.values.length === 2 && this.options.range === true ) && ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) ) { newVal = otherVal; @@ -562,7 +562,7 @@ $.widget( "ui.slider", $.ui.mouse, { return vals; } }, - + // returns the step-aligned value that val is closest to, between (inclusive) min and max _trimAlignValue: function( val ) { if ( val <= this._valueMin() ) { @@ -591,7 +591,7 @@ $.widget( "ui.slider", $.ui.mouse, { _valueMax: function() { return this.options.max; }, - + _refreshValue: function() { var oRange = this.options.range, o = this.options, -- cgit v1.2.3 From b141d63a17a7f79b36ee9c9a0f1dd66493f3ef8e Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:29:56 +0100 Subject: Update data naming for Slider. Partial fix for #7810 --- ui/jquery.ui.slider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index 29dca7c03..36075507e 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -110,12 +110,12 @@ $.widget( "ui.slider", $.ui.mouse, { }); this.handles.each(function( i ) { - $( this ).data( "index.ui-slider-handle", i ); + $( this ).data( "ui-slider-handle-index", i ); }); this.handles .keydown(function( event ) { - var index = $( this ).data( "index.ui-slider-handle" ), + var index = $( this ).data( "ui-slider-handle-index" ), allowed, curVal, newVal, @@ -185,7 +185,7 @@ $.widget( "ui.slider", $.ui.mouse, { self._slide( event, index, newVal ); }) .keyup(function( event ) { - var index = $( this ).data( "index.ui-slider-handle" ); + var index = $( this ).data( "ui-slider-handle-index" ); if ( self._keySliding ) { self._keySliding = false; -- cgit v1.2.3 From bfadd5c5a26893bef76435f0ebf278db9113dc6b Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:30:57 +0100 Subject: Tabs: Whitespace cleanup --- ui/jquery.ui.tabs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 90f021a69..513aa2613 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -15,7 +15,7 @@ var tabId = 0, rhash = /#.*$/; - + function getNextTabId() { return ++tabId; } @@ -24,7 +24,7 @@ var isLocal = function( anchor ) { // clone the node to work around IE 6 not normalizing the href property // if it's manually set, i.e., a.href = "#foo" kills the normalization anchor = anchor.cloneNode( false ); - return anchor.hash.length > 1 && + return anchor.hash.length > 1 && anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" ); }; -- cgit v1.2.3 From e93993c54fd87130061a3ae1832ccb032d20ccfb Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:31:25 +0100 Subject: Update data naming for Tabs. Partial fix for #7810 --- ui/jquery.ui.tabs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 513aa2613..eca1a5c1b 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -257,7 +257,7 @@ $.widget( "ui.tabs", { return $( "
    " ) .attr( "id", id ) .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) - .data( "destroy.tabs", true ); + .data( "ui-tabs-destroy", true ); }, _setupDisabled: function( disabled ) { @@ -457,7 +457,7 @@ $.widget( "ui.tabs", { .removeData( "load.tabs" ); this.lis.unbind( ".tabs" ).add( this.panels ).each(function() { - if ( $.data( this, "destroy.tabs" ) ) { + if ( $.data( this, "ui-tabs-destroy" ) ) { $( this ).remove(); } else { $( this ).removeClass([ @@ -755,7 +755,7 @@ if ( $.uiBackCompat !== false ) { url.replace( "#", "" ) : this._tabId( li.find( "a" )[ 0 ] ); - li.addClass( "ui-state-default ui-corner-top" ).data( "destroy.tabs", true ); + li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true ); li.find( "a" ).attr( "aria-controls", id ); var doInsertAfter = index >= this.lis.length; @@ -855,7 +855,7 @@ if ( $.uiBackCompat !== false ) { return $( this.options.panelTemplate ) .attr( "id", id ) .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) - .data( "destroy.tabs", true ); + .data( "ui-tabs-destroy", true ); } }); -- cgit v1.2.3 From 59f2e88c58f0018f22b1c3be4bb5e9549a944381 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:32:47 +0100 Subject: Update data naming for Tooltip. Partial fix for #7810 --- ui/jquery.ui.tooltip.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 6a41f8c4a..08ad19636 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -72,7 +72,7 @@ $.widget( "ui.tooltip", { var element = $( this ); if ( element.is( "[title]" ) ) { element - .data( "tooltip-title", element.attr( "title" ) ) + .data( "ui-tooltip-title", element.attr( "title" ) ) .attr( "title", "" ); } }); @@ -82,8 +82,8 @@ $.widget( "ui.tooltip", { // restore title attributes this.element.find( this.options.items ).andSelf().each(function() { var element = $( this ); - if ( element.data( "tooltip-title" ) ) { - element.attr( "title", element.data( "tooltip-title" ) ); + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); } }); }, @@ -99,8 +99,8 @@ $.widget( "ui.tooltip", { return; } - if ( !target.data( "tooltip-title" ) ) { - target.data( "tooltip-title", target.attr( "title" ) ); + if ( !target.data( "ui-tooltip-title" ) ) { + target.data( "ui-tooltip-title", target.attr( "title" ) ); } target.data( "tooltip-open", true ); @@ -180,8 +180,8 @@ $.widget( "ui.tooltip", { } // only set title if we had one before (see comment in _open()) - if ( target.data( "tooltip-title" ) ) { - target.attr( "title", target.data( "tooltip-title" ) ); + if ( target.data( "ui-tooltip-title" ) ) { + target.attr( "title", target.data( "ui-tooltip-title" ) ); } target.removeAttr( "aria-describedby" ); -- cgit v1.2.3 From 45ca20fa33204e2304295f2fb194f59c821b1512 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 13:42:42 +0100 Subject: Update data naming for Effects. Partial fix for #7810 --- ui/jquery.effects.core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index b28e4c4ee..bc69c9477 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -159,7 +159,7 @@ var classAnimationActions = [ "add", "remove", "toggle" ], padding: 1 }, // prefix used for storing data on .data() - dataSpace = "ec.storage."; + dataSpace = "ui-effects-"; $.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { $.fx.step[ prop ] = function( fx ) { @@ -689,7 +689,7 @@ $.extend( baseEasings, { Bounce: function ( p ) { var pow2, bounce = 4; - + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); } -- cgit v1.2.3 From 5fda4f6828ad523bd0692b76f903010a458fcac4 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 14:30:02 +0100 Subject: Update data naming for Widget, including backwards compability. Updated tests and added one for the custom expression. Partial fix for #7810 --- tests/unit/widget/widget_core.js | 42 ++++++++++++++++++++++++++-------------- ui/jquery.ui.widget.js | 14 +++++++++++--- 2 files changed, 39 insertions(+), 17 deletions(-) (limited to 'ui') diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index c451c4cf6..b4bb6356d 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -32,28 +32,28 @@ test( "element normalization", function() { // workaround for core ticket #8381 this.element.appendTo( "#qunit-fixture" ); ok( this.element.is( "div" ), "generated div" ); - deepEqual( this.element.data( "testWidget" ), this, "intance stored in .data()" ); + deepEqual( this.element.data( "ui-testWidget" ), this, "instance stored in .data()" ); }; $.ui.testWidget(); $.ui.testWidget.prototype.defaultElement = ""; $.ui.testWidget.prototype._create = function() { ok( this.element.is( "span[data-test=pass]" ), "generated span with properties" ); - deepEqual( this.element.data( "testWidget" ), this, "instace stored in .data()" ); + deepEqual( this.element.data( "ui-testWidget" ), this, "instace stored in .data()" ); }; $.ui.testWidget(); elem = $( "" ); $.ui.testWidget.prototype._create = function() { deepEqual( this.element[ 0 ], elem[ 0 ], "from element" ); - deepEqual( elem.data( "testWidget" ), this, "instace stored in .data()" ); + deepEqual( elem.data( "ui-testWidget" ), this, "instace stored in .data()" ); }; $.ui.testWidget( {}, elem[ 0 ] ); elem = $( "
    " ); $.ui.testWidget.prototype._create = function() { deepEqual( this.element[ 0 ], elem[ 0 ], "from jQuery object" ); - deepEqual( elem.data( "testWidget" ), this, "instace stored in .data()" ); + deepEqual( elem.data( "ui-testWidget" ), this, "instace stored in .data()" ); }; $.ui.testWidget( {}, elem ); @@ -61,7 +61,7 @@ test( "element normalization", function() { .appendTo( "#qunit-fixture" ); $.ui.testWidget.prototype._create = function() { deepEqual( this.element[ 0 ], elem[ 0 ], "from selector" ); - deepEqual( elem.data( "testWidget" ), this, "instace stored in .data()" ); + deepEqual( elem.data( "ui-testWidget" ), this, "instace stored in .data()" ); }; $.ui.testWidget( {}, "#element-normalization-selector" ); @@ -73,8 +73,16 @@ test( "element normalization", function() { $.ui.testWidget(); }); +test( "custom selector expression", function() { + var elem = $( "
    " ).appendTo( "#qunit-fixture" ); + $.widget( "ui.testWidget", {} ); + elem.testWidget(); + deepEqual( $( ":ui-testWidget" )[0], elem[0] ); + elem.testWidget( "destroy" ); +}); + test( "jQuery usage", function() { - expect( 13 ); + expect( 15 ); var shouldCreate = false; @@ -112,12 +120,18 @@ test( "jQuery usage", function() { .testWidget(); shouldCreate = false; - var instance = elem.data( "testWidget" ); + var instance = elem.data( "ui-testWidget" ); equal( typeof instance, "object", "instance stored in .data(pluginName)" ); equal( instance.element[0], elem[0], "element stored on widget" ); var ret = elem.testWidget( "methodWithParams", "value1", "value2" ); equal( ret, elem, "jQuery object returned from method call" ); + // 1.9 BC for #7810 + // TODO remove + var bcInstance = elem.data("testWidget"); + equal( typeof bcInstance, "object", "instance stored in .data(pluginName)" ); + equal( bcInstance.element[0], elem[0], "element stored on widget" ); + ret = elem.testWidget( "getterSetterMethod" ); equal( ret, 5, "getter/setter can act as getter" ); ret = elem.testWidget( "getterSetterMethod", 30 ); @@ -160,7 +174,7 @@ test( "direct usage", function() { var instance = new $.ui.testWidget( {}, elem ); shouldCreate = false; - equal( $( elem ).data( "testWidget" ), instance, + equal( $( elem ).data( "ui-testWidget" ), instance, "instance stored in .data(pluginName)" ); equal( instance.element[ 0 ], elem, "element stored on widget" ); @@ -374,7 +388,7 @@ test( "._super()", function() { } }); - instance = $( "
    " ).testWidget3().data( "testWidget3" ); + instance = $( "
    " ).testWidget3().data( "ui-testWidget3" ); instance.method( 5 ); delete $.ui.testWidget3; delete $.ui.testWidget2; @@ -411,7 +425,7 @@ test( "._superApply()", function() { } }); - instance = $( "
    " ).testWidget3().data( "testWidget3" ); + instance = $( "
    " ).testWidget3().data( "ui-testWidget3" ); instance.method( 5, 10 ); delete $.ui.testWidget3; delete $.ui.testWidget2; @@ -521,7 +535,7 @@ test( ".option() - deep option setter", function() { $.widget( "ui.testWidget", {} ); var div = $( "
    " ).testWidget(); function deepOption( from, to, msg ) { - div.data( "testWidget" ).options.foo = from; + div.data( "ui-testWidget" ).options.foo = from; $.ui.testWidget.prototype._setOption = function( key, value ) { deepEqual( key, "foo", msg + ": key" ); deepEqual( value, to, msg + ": value" ); @@ -804,7 +818,7 @@ test( "._trigger() - no event, no ui", function() { deepEqual( ui, {}, "empty ui hash passed" ); handlers.push( this ); }); - deepEqual( $( "#widget" ).data( "testWidget" )._trigger( "foo" ), true, + deepEqual( $( "#widget" ).data( "ui-testWidget" )._trigger( "foo" ), true, "_trigger returns true when event is not cancelled" ); deepEqual( handlers, [ $( "#widget" )[ 0 ], @@ -832,7 +846,7 @@ test( "._trigger() - cancelled event", function() { ok( true, "event was triggered" ); return false; }); - deepEqual( $( "#widget" ).data( "testWidget" )._trigger( "foo" ), false, + deepEqual( $( "#widget" ).data( "ui-testWidget" )._trigger( "foo" ), false, "_trigger returns false when event is cancelled" ); }); @@ -846,7 +860,7 @@ test( "._trigger() - cancelled callback", function() { return false; } }); - deepEqual( $( "#widget" ).data( "testWidget" )._trigger( "foo" ), false, + deepEqual( $( "#widget" ).data( "ui-testWidget" )._trigger( "foo" ), false, "_trigger returns false when callback returns false" ); }); diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 2d48ae26d..d11f993c6 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -36,7 +36,7 @@ $.widget = function( name, base, prototype ) { // create selector for plugin $.expr[ ":" ][ fullName ] = function( elem ) { - return !!$.data( elem, name ); + return !!$.data( elem, fullName ); }; $[ namespace ] = $[ namespace ] || {}; @@ -148,6 +148,7 @@ $.widget.extend = function( target ) { }; $.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetBaseClass; $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string", args = slice.call( arguments, 1 ), @@ -160,7 +161,9 @@ $.widget.bridge = function( name, object ) { if ( isMethodCall ) { this.each(function() { - var instance = $.data( this, name ); + // 1.9 BC for #7810 + // TODO remove fallback to name + var instance = $.data( this, fullName ) || $.data( this, name ); if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); @@ -178,7 +181,9 @@ $.widget.bridge = function( name, object ) { }); } else { this.each(function() { - var instance = $.data( this, name ); + // 1.9 BC for #7810 + // TODO remove fallback to name + var instance = $.data( this, fullName ) || $.data( this, name ); if ( instance ) { instance.option( options || {} )._init(); } else { @@ -217,7 +222,10 @@ $.Widget.prototype = { this.focusable = $(); if ( element !== this ) { + // 1.9 BC for #7810 + // TODO remove dual storage $.data( element, this.widgetName, this ); + $.data( element, this.widgetBaseClass, this ); this._bind({ remove: "destroy" }); this.document = $( element.style ? // element within the document -- cgit v1.2.3 From 1b80154832611f8f440f4559c429fbdc4e773177 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 14:36:17 +0100 Subject: Widget: Rename widgetBaseClass to widgetFullName. Deprecates widgetBaseClass, to be removed later. Fixes #8154 --- ui/jquery.ui.widget.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index d11f993c6..d06b2654f 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -105,7 +105,9 @@ $.widget = function( name, base, prototype ) { constructor: constructor, namespace: namespace, widgetName: name, - widgetBaseClass: fullName + // TODO remove widgetBaseClass, see #8155 + widgetBaseClass: fullName, + widgetFullName: fullName }); // If this widget is being redefined then we need to find all widgets that @@ -148,7 +150,7 @@ $.widget.extend = function( target ) { }; $.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetBaseClass; + var fullName = object.prototype.widgetFullName; $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string", args = slice.call( arguments, 1 ), @@ -225,7 +227,7 @@ $.Widget.prototype = { // 1.9 BC for #7810 // TODO remove dual storage $.data( element, this.widgetName, this ); - $.data( element, this.widgetBaseClass, this ); + $.data( element, this.widgetFullName, this ); this._bind({ remove: "destroy" }); this.document = $( element.style ? // element within the document @@ -255,7 +257,7 @@ $.Widget.prototype = { .unbind( "." + this.widgetName ) .removeAttr( "aria-disabled" ) .removeClass( - this.widgetBaseClass + "-disabled " + + this.widgetFullName + "-disabled " + "ui-state-disabled" ); // clean up events and states @@ -322,7 +324,7 @@ $.Widget.prototype = { if ( key === "disabled" ) { this.widget() - .toggleClass( this.widgetBaseClass + "-disabled ui-state-disabled", !!value ) + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) .attr( "aria-disabled", value ); this.hoverable.removeClass( "ui-state-hover" ); this.focusable.removeClass( "ui-state-focus" ); -- cgit v1.2.3 From d901cd416069c153fba627ee9ec6daad2a4f67aa Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 14:40:23 +0100 Subject: Autocomplete: Add removal TODOs for #7810 --- ui/jquery.ui.autocomplete.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 83326e27f..05a2a28f2 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -225,7 +225,8 @@ $.widget( "ui.autocomplete", { // custom key handling for now input: $(), focus: function( event, ui ) { - // back compat for _renderItem using item.autocomplete + // back compat for _renderItem using item.autocomplete, via #7810 + // TODO remove the fallback, see #8156 var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ); if ( false !== self._trigger( "focus", event, { item: item } ) ) { // use value to match what will end up in the input, if it was a key event @@ -235,7 +236,8 @@ $.widget( "ui.autocomplete", { } }, select: function( event, ui ) { - // back compat for _renderItem using item.autocomplete + // back compat for _renderItem using item.autocomplete, via #7810 + // TODO remove the fallback, see #8156 var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ); previous = self.previous; -- cgit v1.2.3 From 5e51b8db284b23bf818148051aaf5b41a7b9c7b1 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 15:03:30 +0100 Subject: Update Widget data naming/usage. Remove unnecessary fallbacks, update .removeData to use full name. --- tests/unit/widget/widget_core.js | 5 ++++- ui/jquery.ui.widget.js | 10 +++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'ui') diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index b4bb6356d..e104d4ae9 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -82,7 +82,7 @@ test( "custom selector expression", function() { }); test( "jQuery usage", function() { - expect( 15 ); + expect( 16 ); var shouldCreate = false; @@ -140,6 +140,9 @@ test( "jQuery usage", function() { ret = elem.testWidget( "jQueryObject" ); equal( ret[ 0 ], document.body, "returned jQuery object" ); equal( ret.end(), elem, "stack preserved" ); + + elem.testWidget( "destroy" ); + equal( elem.data( "ui-testWidget" ), null ); }); test( "direct usage", function() { diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index d06b2654f..17416ff9f 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -163,9 +163,7 @@ $.widget.bridge = function( name, object ) { if ( isMethodCall ) { this.each(function() { - // 1.9 BC for #7810 - // TODO remove fallback to name - var instance = $.data( this, fullName ) || $.data( this, name ); + var instance = $.data( this, fullName ); if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); @@ -183,9 +181,7 @@ $.widget.bridge = function( name, object ) { }); } else { this.each(function() { - // 1.9 BC for #7810 - // TODO remove fallback to name - var instance = $.data( this, fullName ) || $.data( this, name ); + var instance = $.data( this, fullName ); if ( instance ) { instance.option( options || {} )._init(); } else { @@ -252,7 +248,7 @@ $.Widget.prototype = { // all event bindings should go through this._bind() this.element .unbind( "." + this.widgetName ) - .removeData( this.widgetName ); + .removeData( this.widgetFullName ); this.widget() .unbind( "." + this.widgetName ) .removeAttr( "aria-disabled" ) -- cgit v1.2.3 From 2321ae06cbe44b86d14c82ebd452d06e3922dca9 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 1 Mar 2012 15:13:52 +0100 Subject: Remove both widgetName and widgetFullName data --- ui/jquery.ui.widget.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui') diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 17416ff9f..40abd67de 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -248,6 +248,9 @@ $.Widget.prototype = { // all event bindings should go through this._bind() this.element .unbind( "." + this.widgetName ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) .removeData( this.widgetFullName ); this.widget() .unbind( "." + this.widgetName ) -- cgit v1.2.3 From 3e8ec7eb6bee97034363fe4e8704ed762fadbaba Mon Sep 17 00:00:00 2001 From: gromo Date: Wed, 22 Feb 2012 13:05:02 +0500 Subject: Resizable: Update aspectRatio to use calculated aspectRatio in case of: containment - parent; aspectRatio - true. Fixes #8158 - Resizable: aspectRatio: true isn't handled properly. --- ui/jquery.ui.resizable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index 34efe834a..0fdd69532 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -688,13 +688,13 @@ $.ui.plugin.add("resizable", "containment", { if (cp.left < (self._helper ? co.left : 0)) { self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left)); - if (pRatio) self.size.height = self.size.width / o.aspectRatio; + if (pRatio) self.size.height = self.size.width / self.aspectRatio; self.position.left = o.helper ? co.left : 0; } if (cp.top < (self._helper ? co.top : 0)) { self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top); - if (pRatio) self.size.width = self.size.height * o.aspectRatio; + if (pRatio) self.size.width = self.size.height * self.aspectRatio; self.position.top = self._helper ? co.top : 0; } -- cgit v1.2.3 From 374661a2ffaaef93f2b679826bc69c0b214b5310 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 2 Mar 2012 07:14:44 -0500 Subject: Accordion: Code review. --- ui/jquery.ui.accordion.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 6c4432828..5a49d7813 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -56,8 +56,7 @@ $.widget( "ui.accordion", { } this.active = this._findActive( options.active ) .addClass( "ui-accordion-header-active ui-state-active" ) - .toggleClass( "ui-corner-all" ) - .toggleClass( "ui-corner-top" ); + .toggleClass( "ui-corner-all ui-corner-top" ) this.active.next().addClass( "ui-accordion-content-active" ); this._createIcons(); @@ -69,6 +68,7 @@ $.widget( "ui.accordion", { this.headers .attr( "role", "tab" ) + // TODO: use _bind() .bind( "keydown.accordion", $.proxy( this, "_keydown" ) ) .next() .attr( "role", "tabpanel" ); @@ -76,6 +76,7 @@ $.widget( "ui.accordion", { this.headers .not( this.active ) .attr({ + // TODO: document support for each of these "aria-expanded": "false", "aria-selected": "false", tabIndex: -1 @@ -137,9 +138,7 @@ $.widget( "ui.accordion", { .removeAttr( "role" ) .removeAttr( "aria-expanded" ) .removeAttr( "aria-selected" ) - .removeAttr( "tabIndex" ) - .find( "a" ) - .removeAttr( "tabIndex" ) + .removeAttr( "tabIndex" ); this._destroyIcons(); // clean up content panels @@ -162,6 +161,7 @@ $.widget( "ui.accordion", { if ( key === "event" ) { if ( this.options.event ) { + // TODO: this is incorrect for multiple events (see _setupEvents) this.headers.unbind( this.options.event + ".accordion", this._eventHandler ); } this._setupEvents( value ); @@ -184,12 +184,15 @@ $.widget( "ui.accordion", { // #5332 - opacity doesn't cascade to positioned elements in IE // so we need to add the disabled class to the headers and panels if ( key === "disabled" ) { - this.headers.add(this.headers.next()) + this.headers.add( this.headers.next() ) + // TODO: why do we have an accordion-specific disabled class? + // widget-specific classes seem to exist in a lot of plugins .toggleClass( "ui-accordion-disabled ui-state-disabled", !!value ); } }, _keydown: function( event ) { + // TODO: remove disabled check when using _bind() if ( this.options.disabled || event.altKey || event.ctrlKey ) { return; } @@ -300,6 +303,7 @@ $.widget( "ui.accordion", { _setupEvents: function( event ) { if ( event ) { + // TODO: use _bind() this.headers.bind( event.split( " " ).join( ".accordion " ) + ".accordion", $.proxy( this, "_eventHandler" ) ); } @@ -377,7 +381,7 @@ $.widget( "ui.accordion", { } else { toHide.hide(); toShow.show(); - this._completed( data ); + this._toggleComplete( data ); } // TODO assert that the blur and focus triggers are really necessary, remove otherwise @@ -406,7 +410,7 @@ $.widget( "ui.accordion", { options = down && animate.down || animate, complete = function() { toShow.removeData( "ui-accordion-height" ); - that._completed( data ); + that._toggleComplete( data ); }; if ( typeof options === "number" ) { @@ -438,7 +442,7 @@ $.widget( "ui.accordion", { duration, easing, complete ); }, - _completed: function( data ) { + _toggleComplete: function( data ) { var toShow = data.newContent, toHide = data.oldContent; -- cgit v1.2.3 From 471ac4dd1c0add6bdea19fbe871ec926e54824ee Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 7 Mar 2012 13:34:47 -0500 Subject: Accordion: Added missing semicolon. --- ui/jquery.ui.accordion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 5a49d7813..4aa4793cc 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -56,7 +56,7 @@ $.widget( "ui.accordion", { } this.active = this._findActive( options.active ) .addClass( "ui-accordion-header-active ui-state-active" ) - .toggleClass( "ui-corner-all ui-corner-top" ) + .toggleClass( "ui-corner-all ui-corner-top" ); this.active.next().addClass( "ui-accordion-content-active" ); this._createIcons(); -- cgit v1.2.3 From 932fe888c0cde8806a156514c700ec2d9855ff90 Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 8 Mar 2012 10:53:08 -0500 Subject: Updated copyright year. --- MIT-LICENSE.txt | 2 +- tests/jquery.simulate.js | 2 +- themes/base/jquery.ui.accordion.css | 2 +- themes/base/jquery.ui.all.css | 2 +- themes/base/jquery.ui.autocomplete.css | 2 +- themes/base/jquery.ui.base.css | 2 +- themes/base/jquery.ui.button.css | 2 +- themes/base/jquery.ui.core.css | 2 +- themes/base/jquery.ui.datepicker.css | 2 +- themes/base/jquery.ui.dialog.css | 2 +- themes/base/jquery.ui.menu.css | 2 +- themes/base/jquery.ui.progressbar.css | 2 +- themes/base/jquery.ui.resizable.css | 2 +- themes/base/jquery.ui.selectable.css | 2 +- themes/base/jquery.ui.slider.css | 2 +- themes/base/jquery.ui.spinner.css | 2 +- themes/base/jquery.ui.tabs.css | 2 +- themes/base/jquery.ui.theme.css | 2 +- themes/base/jquery.ui.tooltip.css | 2 +- ui/jquery.effects.blind.js | 2 +- ui/jquery.effects.bounce.js | 2 +- ui/jquery.effects.clip.js | 2 +- ui/jquery.effects.core.js | 2 +- ui/jquery.effects.drop.js | 2 +- ui/jquery.effects.explode.js | 2 +- ui/jquery.effects.fade.js | 2 +- ui/jquery.effects.fold.js | 2 +- ui/jquery.effects.highlight.js | 2 +- ui/jquery.effects.pulsate.js | 2 +- ui/jquery.effects.scale.js | 2 +- ui/jquery.effects.shake.js | 2 +- ui/jquery.effects.slide.js | 2 +- ui/jquery.effects.transfer.js | 2 +- ui/jquery.ui.accordion.js | 2 +- ui/jquery.ui.autocomplete.js | 2 +- ui/jquery.ui.button.js | 2 +- ui/jquery.ui.core.js | 2 +- ui/jquery.ui.datepicker.js | 2 +- ui/jquery.ui.dialog.js | 2 +- ui/jquery.ui.draggable.js | 2 +- ui/jquery.ui.droppable.js | 2 +- ui/jquery.ui.menu.js | 2 +- ui/jquery.ui.mouse.js | 2 +- ui/jquery.ui.position.js | 2 +- ui/jquery.ui.progressbar.js | 2 +- ui/jquery.ui.resizable.js | 2 +- ui/jquery.ui.selectable.js | 2 +- ui/jquery.ui.slider.js | 2 +- ui/jquery.ui.sortable.js | 2 +- ui/jquery.ui.spinner.js | 2 +- ui/jquery.ui.tabs.js | 2 +- ui/jquery.ui.tooltip.js | 2 +- ui/jquery.ui.widget.js | 2 +- 53 files changed, 53 insertions(+), 53 deletions(-) (limited to 'ui') diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt index be226805d..29652242a 100644 --- a/MIT-LICENSE.txt +++ b/MIT-LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2011 Paul Bakaus, http://jqueryui.com/ +Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/ This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about) For exact diff --git a/tests/jquery.simulate.js b/tests/jquery.simulate.js index 8ecd60fa7..a85ca6ef3 100644 --- a/tests/jquery.simulate.js +++ b/tests/jquery.simulate.js @@ -1,7 +1,7 @@ /* * jquery.simulate - simulate browser mouse and keyboard events * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css index 18e087e8f..3e2777adf 100644 --- a/themes/base/jquery.ui.accordion.css +++ b/themes/base/jquery.ui.accordion.css @@ -1,7 +1,7 @@ /* * jQuery UI Accordion @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.all.css b/themes/base/jquery.ui.all.css index 96b15aa51..60fd9d6fb 100644 --- a/themes/base/jquery.ui.all.css +++ b/themes/base/jquery.ui.all.css @@ -1,7 +1,7 @@ /* * jQuery UI CSS Framework @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.autocomplete.css b/themes/base/jquery.ui.autocomplete.css index b5dff74ca..5ab05e2fd 100644 --- a/themes/base/jquery.ui.autocomplete.css +++ b/themes/base/jquery.ui.autocomplete.css @@ -1,7 +1,7 @@ /* * jQuery UI Autocomplete @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.base.css b/themes/base/jquery.ui.base.css index 9a18856c1..97dfd36f0 100644 --- a/themes/base/jquery.ui.base.css +++ b/themes/base/jquery.ui.base.css @@ -1,7 +1,7 @@ /* * jQuery UI CSS Framework @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.button.css b/themes/base/jquery.ui.button.css index 2ae50afd1..ccee26aab 100644 --- a/themes/base/jquery.ui.button.css +++ b/themes/base/jquery.ui.button.css @@ -1,7 +1,7 @@ /* * jQuery UI Button @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.core.css b/themes/base/jquery.ui.core.css index 143d6c240..1522dabb8 100644 --- a/themes/base/jquery.ui.core.css +++ b/themes/base/jquery.ui.core.css @@ -1,7 +1,7 @@ /* * jQuery UI CSS Framework @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.datepicker.css b/themes/base/jquery.ui.datepicker.css index 8d574bac4..d5c81a529 100644 --- a/themes/base/jquery.ui.datepicker.css +++ b/themes/base/jquery.ui.datepicker.css @@ -1,7 +1,7 @@ /* * jQuery UI Datepicker @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.dialog.css b/themes/base/jquery.ui.dialog.css index c3a1d85ea..7d6bc0672 100644 --- a/themes/base/jquery.ui.dialog.css +++ b/themes/base/jquery.ui.dialog.css @@ -1,7 +1,7 @@ /* * jQuery UI Dialog @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.menu.css b/themes/base/jquery.ui.menu.css index 2df00733f..84d7d85b1 100644 --- a/themes/base/jquery.ui.menu.css +++ b/themes/base/jquery.ui.menu.css @@ -1,7 +1,7 @@ /* * jQuery UI Menu @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.progressbar.css b/themes/base/jquery.ui.progressbar.css index 79d786fa7..e24afc886 100644 --- a/themes/base/jquery.ui.progressbar.css +++ b/themes/base/jquery.ui.progressbar.css @@ -1,7 +1,7 @@ /* * jQuery UI Progressbar @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.resizable.css b/themes/base/jquery.ui.resizable.css index ed6395230..c652ddb98 100644 --- a/themes/base/jquery.ui.resizable.css +++ b/themes/base/jquery.ui.resizable.css @@ -1,7 +1,7 @@ /* * jQuery UI Resizable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.selectable.css b/themes/base/jquery.ui.selectable.css index 5177f6b1f..0305e2df2 100644 --- a/themes/base/jquery.ui.selectable.css +++ b/themes/base/jquery.ui.selectable.css @@ -1,7 +1,7 @@ /* * jQuery UI Selectable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.slider.css b/themes/base/jquery.ui.slider.css index 8d9b403a9..e9fc963f2 100644 --- a/themes/base/jquery.ui.slider.css +++ b/themes/base/jquery.ui.slider.css @@ -1,7 +1,7 @@ /* * jQuery UI Slider @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.spinner.css b/themes/base/jquery.ui.spinner.css index 319782ecb..2603f2012 100644 --- a/themes/base/jquery.ui.spinner.css +++ b/themes/base/jquery.ui.spinner.css @@ -1,7 +1,7 @@ /* * jQuery UI Spinner @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.tabs.css b/themes/base/jquery.ui.tabs.css index b6429cf72..a44242a36 100644 --- a/themes/base/jquery.ui.tabs.css +++ b/themes/base/jquery.ui.tabs.css @@ -1,7 +1,7 @@ /* * jQuery UI Tabs @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.theme.css b/themes/base/jquery.ui.theme.css index 368ebfbb5..94db2c5a7 100644 --- a/themes/base/jquery.ui.theme.css +++ b/themes/base/jquery.ui.theme.css @@ -1,7 +1,7 @@ /* * jQuery UI CSS Framework @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/themes/base/jquery.ui.tooltip.css b/themes/base/jquery.ui.tooltip.css index 058ce6cf4..d6cbcb26d 100644 --- a/themes/base/jquery.ui.tooltip.css +++ b/themes/base/jquery.ui.tooltip.css @@ -1,7 +1,7 @@ /* * jQuery UI Tooltip @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js index 0e3f25db7..a5e0d1c8b 100644 --- a/ui/jquery.effects.blind.js +++ b/ui/jquery.effects.blind.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Blind @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js index 41ee34f64..73fe3c502 100644 --- a/ui/jquery.effects.bounce.js +++ b/ui/jquery.effects.bounce.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Bounce @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.clip.js b/ui/jquery.effects.clip.js index c6eecc671..983ac9c53 100644 --- a/ui/jquery.effects.clip.js +++ b/ui/jquery.effects.clip.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Clip @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index bc69c9477..24df7178c 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.drop.js b/ui/jquery.effects.drop.js index 2e7a6ec0f..54cdc25f3 100644 --- a/ui/jquery.effects.drop.js +++ b/ui/jquery.effects.drop.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Drop @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js index 22f506045..08908d3eb 100644 --- a/ui/jquery.effects.explode.js +++ b/ui/jquery.effects.explode.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Explode @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js index 9b79ad3bc..b653f1dfd 100644 --- a/ui/jquery.effects.fade.js +++ b/ui/jquery.effects.fade.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Fade @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.fold.js b/ui/jquery.effects.fold.js index 7c4f583c1..3642edf3f 100644 --- a/ui/jquery.effects.fold.js +++ b/ui/jquery.effects.fold.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Fold @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js index edde845a3..88a69ab51 100644 --- a/ui/jquery.effects.highlight.js +++ b/ui/jquery.effects.highlight.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Highlight @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js index 7d6e9328f..e1e4d0631 100644 --- a/ui/jquery.effects.pulsate.js +++ b/ui/jquery.effects.pulsate.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Pulsate @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js index 96a9269ec..64e31ea96 100644 --- a/ui/jquery.effects.scale.js +++ b/ui/jquery.effects.scale.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Scale @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js index 7d83a9bb8..0e12cfe56 100644 --- a/ui/jquery.effects.shake.js +++ b/ui/jquery.effects.shake.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Shake @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js index de393c779..a376d3c56 100644 --- a/ui/jquery.effects.slide.js +++ b/ui/jquery.effects.slide.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Slide @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.effects.transfer.js b/ui/jquery.effects.transfer.js index 1fa291228..df392339b 100644 --- a/ui/jquery.effects.transfer.js +++ b/ui/jquery.effects.transfer.js @@ -1,7 +1,7 @@ /* * jQuery UI Effects Transfer @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 4aa4793cc..7f167d6b1 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -1,7 +1,7 @@ /* * jQuery UI Accordion @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 05a2a28f2..d95d81bca 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -1,7 +1,7 @@ /* * jQuery UI Autocomplete @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 25f1668a5..c8e345d93 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -1,7 +1,7 @@ /* * jQuery UI Button @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 6345ef69c..574256cad 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -1,7 +1,7 @@ /*! * jQuery UI @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 529032a99..5dacd6943 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1,7 +1,7 @@ /* * jQuery UI Datepicker @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 1f959a837..35b18929f 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -1,7 +1,7 @@ /* * jQuery UI Dialog @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 62864454d..0e4389305 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -1,7 +1,7 @@ /* * jQuery UI Draggable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js index 62bba2aba..19334bf4d 100644 --- a/ui/jquery.ui.droppable.js +++ b/ui/jquery.ui.droppable.js @@ -1,7 +1,7 @@ /* * jQuery UI Droppable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 05ecd3feb..18f4eb9f8 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -1,7 +1,7 @@ /* * jQuery UI Menu @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 4ff18ff4f..64a081961 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -1,7 +1,7 @@ /*! * jQuery UI Mouse @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index b8bb2c883..977e621a6 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -1,7 +1,7 @@ /* * jQuery UI Position @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js index f754f61a4..26f5e76f0 100644 --- a/ui/jquery.ui.progressbar.js +++ b/ui/jquery.ui.progressbar.js @@ -1,7 +1,7 @@ /* * jQuery UI Progressbar @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index 0fdd69532..77fe8bcc1 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -1,7 +1,7 @@ /* * jQuery UI Resizable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.selectable.js b/ui/jquery.ui.selectable.js index 408771eff..ec54b5d9c 100644 --- a/ui/jquery.ui.selectable.js +++ b/ui/jquery.ui.selectable.js @@ -1,7 +1,7 @@ /* * jQuery UI Selectable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index 36075507e..75c6631ca 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -1,7 +1,7 @@ /* * jQuery UI Slider @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 7c81dd2e4..4c6a47169 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -1,7 +1,7 @@ /* * jQuery UI Sortable @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index c99520b7c..dab7ce471 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -1,7 +1,7 @@ /* * jQuery UI Spinner @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index eca1a5c1b..ba48c3770 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -1,7 +1,7 @@ /* * jQuery UI Tabs @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 08ad19636..eddd9a0c9 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -1,7 +1,7 @@ /* * jQuery UI Tooltip @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 40abd67de..1b7405e28 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -1,7 +1,7 @@ /*! * jQuery UI Widget @VERSION * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * -- cgit v1.2.3 From ec062c1156d58726dc212e6e2191ee7196302c44 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 14 Mar 2012 11:08:19 -0400 Subject: Accordion: Removed ui-accordion-disabled class. Fixes #8193 - Accordion: Remove ui-accordion-disabled class. --- ui/jquery.ui.accordion.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 7f167d6b1..169a07409 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -134,7 +134,7 @@ $.widget( "ui.accordion", { // clean up headers this.headers .unbind( ".accordion" ) - .removeClass( "ui-accordion-header ui-accordion-header-active ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeClass( "ui-accordion-header ui-accordion-header-active 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" ) @@ -145,7 +145,7 @@ $.widget( "ui.accordion", { var contents = this.headers.next() .css( "display", "" ) .removeAttr( "role" ) - .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled" ); + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" ); if ( this.options.heightStyle !== "content" ) { this.element.css( "height", this.originalHeight ); contents.css( "height", "" ); @@ -185,9 +185,7 @@ $.widget( "ui.accordion", { // so we need to add the disabled class to the headers and panels if ( key === "disabled" ) { this.headers.add( this.headers.next() ) - // TODO: why do we have an accordion-specific disabled class? - // widget-specific classes seem to exist in a lot of plugins - .toggleClass( "ui-accordion-disabled ui-state-disabled", !!value ); + .toggleClass( "ui-state-disabled", !!value ); } }, -- cgit v1.2.3