Large diffs are not rendered by default.

@@ -6,6 +6,7 @@ var disabled = TestHelpers.tabs.disabled,
module( "tabs: methods" );

test( "destroy", function() {
expect( 1 );
domEqual( "#tabs1", function() {
$( "#tabs1" ).tabs().tabs( "destroy" );
});
@@ -148,6 +149,26 @@ test( "refresh", function() {
disabled( element, false );
});

test( "refresh - looping", function() {
expect( 6 );

var element = $( "#tabs1" ).tabs({
disabled: [ 0 ],
active: 1
});
state( element, 0, 1, 0 );
disabled( element, [ 0 ] );

// remove active, jump to previous
// previous is disabled, just back one more
// reached first tab, move to end
// activate last tab
element.find( ".ui-tabs-nav li" ).eq( 2 ).remove();
element.tabs( "refresh" );
state( element, 0, 1 );
disabled( element, [ 0 ] );
});

asyncTest( "load", function() {
expect( 30 );

@@ -69,6 +69,8 @@ test( "{ active: Number }", function() {

if ( $.uiBackCompat === false ) {
test( "{ active: -Number }", function() {
expect( 8 );

var element = $( "#tabs1" ).tabs({
active: -1
});
@@ -278,6 +280,54 @@ test( "{ heightStyle: 'fill' } with multiple siblings", function() {
equalHeight( element, 335 );
});

// TODO: add animation tests
test( "hide and show: false", function() {
expect( 3 );
var element = $( "#tabs1" ).tabs({
show: false,
hide: false
}),
widget = element.data( "tabs" ),
panels = element.find( ".ui-tabs-panel" );
widget._show = function() {
ok( false, "_show() called" );
};
widget._hide = function() {
ok( false, "_hide() called" );
};

ok( panels.eq( 0 ).is( ":visible" ), "first panel visible" );
element.tabs( "option", "active", 1 );
ok( panels.eq( 0 ).is( ":hidden" ), "first panel hidden" );
ok( panels.eq( 1 ).is( ":visible" ), "second panel visible" );
});

asyncTest( "hide and show - animation", function() {
expect( 5 );
var element = $( "#tabs1" ).tabs({
show: "drop",
hide: 2000
}),
widget = element.data( "tabs" ),
panels = element.find( ".ui-tabs-panel" );
widget._show = function( element, options, callback ) {
strictEqual( element[ 0 ], panels[ 1 ], "correct element in _show()" );
equal( options, "drop", "correct options in _show()" );
setTimeout(function() {
callback();
}, 1 );
};
widget._hide = function( element, options, callback ) {
strictEqual( element[ 0 ], panels[ 0 ], "correct element in _hide()" );
equal( options, 2000, "correct options in _hide()" );
setTimeout(function() {
callback();
start();
}, 1 );
};

ok( panels.eq( 0 ).is( ":visible" ), "first panel visible" );
element.tabs( "option", "active", 1 );
});


}( jQuery ) );
@@ -10,7 +10,14 @@ function includeScript( url ) {
document.write( "<script src='../../../" + url + "'></script>" );
}

QUnit.config.urlConfig.push( "min" );
QUnit.config.requireExpects = true;

QUnit.config.urlConfig.push({
id: "min",
label: "Minified source",
tooltip: "Load minified source files instead of the regular unminified ones."
});

TestHelpers.loadResources = QUnit.urlParams.min ?
function() {
// TODO: proper include with theme images
@@ -26,7 +33,12 @@ TestHelpers.loadResources = QUnit.urlParams.min ?
});
};

QUnit.config.urlConfig.push( "nojshint" );
QUnit.config.urlConfig.push({
id: "nojshint",
label: "Skip JSHint",
tooltip: "Skip running JSHint, e.g. within TestSwarm, where Jenkins runs it already"
});

var jshintLoaded = false;
TestHelpers.testJshint = function( module ) {
if ( QUnit.urlParams.nojshint ) {
@@ -47,7 +59,7 @@ TestHelpers.testJshint = function( module ) {
dataType: "json"
}),
$.ajax({
url: "../../../ui/jquery." + module + ".js",
url: "../../../ui/jquery.ui." + module + ".js",
dataType: "text"
})
).done(function( hintArgs, srcArgs ) {
@@ -76,7 +88,9 @@ function testWidgetDefaults( widget, defaults ) {

// ensure that all defaults have the correct value
test( "defined defaults", function() {
var count = 0;
$.each( defaults, function( key, val ) {
expect( ++count );
if ( $.isFunction( val ) ) {
ok( $.isFunction( pluginDefaults[ key ] ), key );
return;
@@ -87,7 +101,9 @@ function testWidgetDefaults( widget, defaults ) {

// ensure that all defaults were tested
test( "tested defaults", function() {
var count = 0;
$.each( pluginDefaults, function( key, val ) {
expect( ++count );
ok( key in defaults, key );
});
});
@@ -96,6 +112,7 @@ function testWidgetDefaults( widget, defaults ) {
function testWidgetOverrides( widget ) {
if ( $.uiBackCompat === false ) {
test( "$.widget overrides", function() {
expect( 4 );
$.each([
"_createWidget",
"destroy",
@@ -111,6 +128,8 @@ function testWidgetOverrides( widget ) {

function testBasicUsage( widget ) {
test( "basic usage", function() {
expect( 3 );

var defaultElement = $.ui[ widget ].prototype.defaultElement;
$( defaultElement ).appendTo( "body" )[ widget ]().remove();
ok( true, "initialized on element" );
@@ -126,11 +145,12 @@ function testBasicUsage( widget ) {
TestHelpers.commonWidgetTests = function( widget, settings ) {
module( widget + ": common widget" );

TestHelpers.testJshint( "ui." + widget );
TestHelpers.testJshint( widget );
testWidgetDefaults( widget, settings.defaults );
testWidgetOverrides( widget );
testBasicUsage( widget );
test( "version", function() {
expect( 1 );
ok( "version" in $.ui[ widget ].prototype, "version property exists" );
});
};
@@ -188,6 +208,9 @@ window.domEqual = function( selector, modifier, message ) {
var value = elem.attr( attr );
result[ attr ] = value !== undefined ? value : "";
});
result.events = $._data( elem[ 0 ], "events" );
result.data = $.extend( {}, elem.data() );
delete result.data[ $.expando ];
children = elem.children();
if ( children.length ) {
result.children = elem.children().map(function( ind ) {
@@ -11,6 +11,7 @@ TestHelpers.commonWidgetTests( "tooltip", {
},
show: true,
tooltipClass: null,
track: false,

// callbacks
close: null,
@@ -34,7 +34,10 @@ test( "accessibility", function() {
equal( element.attr( "aria-describedby" ), "fixture-span " + tooltipId,
"multiple describedby when open" );
// strictEqual to distinguish between .removeAttr( "title" ) and .attr( "title", "" )
strictEqual( element.attr( "title" ), undefined, "no title when open" );
// support: jQuery <1.6.2
// support: IE <8
// We should use strictEqual( ..., undefined ) when dropping jQuery 1.6.1 support (or IE6/7)
ok( !element.attr( "title" ), "no title when open" );
element.tooltip( "close" );
equal( element.attr( "aria-describedby" ), "fixture-span",
"correct describedby when closed" );
@@ -42,7 +42,10 @@ test( "enable/disable", function() {

element.tooltip( "disable" );
equal( $( ".ui-tooltip" ).length, 0, "no tooltip when disabled" );
equal( tooltip.attr( "title" ), undefined, "title removed on disable" );
// support: jQuery <1.6.2
// support: IE <8
// We should use strictEqual( ..., undefined ) when dropping jQuery 1.6.1 support (or IE6/7)
ok( !tooltip.attr( "title" ), "title removed on disable" );

element.tooltip( "open" );
equal( $( ".ui-tooltip" ).length, 0, "open does nothing when disabled" );
@@ -3,11 +3,13 @@
module( "tooltip: options" );

test( "content: default", function() {
expect( 1 );
var element = $( "#tooltipped1" ).tooltip().tooltip( "open" );
deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "anchortitle" );
});

test( "content: return string", function() {
expect( 1 );
var element = $( "#tooltipped1" ).tooltip({
content: function() {
return "customstring";
@@ -17,6 +19,7 @@ test( "content: return string", function() {
});

test( "content: return jQuery", function() {
expect( 1 );
var element = $( "#tooltipped1" ).tooltip({
content: function() {
return $( "<div>" ).html( "cu<b>s</b>tomstring" );
@@ -8,9 +8,10 @@ module( "widget factory", {
}
});

TestHelpers.testJshint( "ui.widget" );
TestHelpers.testJshint( "widget" );

test( "widget creation", function() {
expect( 5 );
var myPrototype = {
_create: function() {},
creationTest: function() {}
@@ -78,10 +79,11 @@ test( "element normalization", function() {
});

test( "custom selector expression", function() {
expect( 1 );
var elem = $( "<div>" ).appendTo( "#qunit-fixture" );
$.widget( "ui.testWidget", {} );
elem.testWidget();
deepEqual( $( ":ui-testWidget" )[0], elem[0] );
deepEqual( $( ":ui-testwidget" )[0], elem[0] );
elem.testWidget( "destroy" );
});

@@ -300,6 +302,7 @@ test( "._getCreateEventData()", function() {
});

test( "re-init", function() {
expect( 3 );
var div = $( "<div>" ),
actions = [];

@@ -329,6 +332,7 @@ test( "re-init", function() {
});

test( "inheritance - options", function() {
expect( 4 );
// #5830 - Widget: Using inheritance overwrites the base classes options
$.widget( "ui.testWidgetBase", {
options: {
@@ -441,6 +445,7 @@ test( "._superApply()", function() {
});

test( ".option() - getter", function() {
expect( 6 );
$.widget( "ui.testWidget", {
_create: function() {}
});
@@ -472,6 +477,7 @@ test( ".option() - getter", function() {
});

test( ".option() - deep option getter", function() {
expect( 5 );
$.widget( "ui.testWidget", {} );
var div = $( "<div>" ).testWidget({
foo: {
@@ -490,6 +496,7 @@ test( ".option() - deep option getter", function() {
});

test( ".option() - delegate to ._setOptions()", function() {
expect( 2 );
var div,
calls = [];
$.widget( "ui.testWidget", {
@@ -514,6 +521,7 @@ test( ".option() - delegate to ._setOptions()", function() {
});

test( ".option() - delegate to ._setOption()", function() {
expect( 2 );
var div,
calls = [];
$.widget( "ui.testWidget", {
@@ -544,6 +552,7 @@ test( ".option() - delegate to ._setOption()", function() {
});

test( ".option() - deep option setter", function() {
expect( 6 );
$.widget( "ui.testWidget", {} );
var div = $( "<div>" ).testWidget();
function deepOption( from, to, msg ) {
@@ -592,6 +601,7 @@ test( ".disable()", function() {
});

test( ".widget() - base", function() {
expect( 1 );
$.widget( "ui.testWidget", {
_create: function() {}
});
@@ -600,6 +610,7 @@ test( ".widget() - base", function() {
});

test( ".widget() - overriden", function() {
expect( 1 );
var wrapper = $( "<div>" );
$.widget( "ui.testWidget", {
_create: function() {},
@@ -610,13 +621,13 @@ test( ".widget() - overriden", function() {
deepEqual( wrapper[0], $( "<div>" ).testWidget().testWidget( "widget" )[0] );
});

test( "._bind() to element (default)", function() {
test( "._on() to element (default)", function() {
expect( 12 );
var that, widget;
$.widget( "ui.testWidget", {
_create: function() {
that = this;
this._bind({
this._on({
keyup: this.keyup,
keydown: "keydown"
});
@@ -650,13 +661,13 @@ test( "._bind() to element (default)", function() {
.trigger( "keydown" );
});

test( "._bind() to descendent", function() {
test( "._on() to descendent", function() {
expect( 12 );
var that, widget, descendant;
$.widget( "ui.testWidget", {
_create: function() {
that = this;
this._bind( this.element.find( "strong" ), {
this._on( this.element.find( "strong" ), {
keyup: this.keyup,
keydown: "keydown"
});
@@ -707,13 +718,14 @@ test( "._bind() to descendent", function() {
.trigger( "keydown" );
});

test( "_bind() with delegate", function() {
test( "_on() with delegate", function() {
expect( 8 );
$.widget( "ui.testWidget", {
_create: function() {
var uuid = this.uuid;
this.element = {
bind: function( event, handler ) {
equal( event, "click.testWidget" );
equal( event, "click.testWidget" + uuid );
ok( $.isFunction(handler) );
},
trigger: $.noop
@@ -722,33 +734,129 @@ test( "_bind() with delegate", function() {
return {
delegate: function( selector, event, handler ) {
equal( selector, "a" );
equal( event, "click.testWidget" );
equal( event, "click.testWidget" + uuid );
ok( $.isFunction(handler) );
}
};
};
this._bind({
this._on({
"click": "handler",
"click a": "handler"
});
this.widget = function() {
return {
delegate: function( selector, event, handler ) {
equal( selector, "form fieldset > input" );
equal( event, "change.testWidget" );
equal( event, "change.testWidget" + uuid );
ok( $.isFunction(handler) );
}
};
};
this._bind({
this._on({
"change form fieldset > input": "handler"
});
}
});
$.ui.testWidget();
});

test( "_on() to common element", function() {
expect( 1 );
$.widget( "ui.testWidget", {
_create: function() {
this._on( this.document, {
"customevent": "_handler"
});
},
_handler: function() {
ok( true, "handler triggered" );
}
});
var widget = $( "#widget" ).testWidget().data( "testWidget" );
$( "#widget-wrapper" ).testWidget();
widget.destroy();
$( document ).trigger( "customevent" );
});

test( "_off() - single event", function() {
expect( 3 );

$.widget( "ui.testWidget", {} );
var shouldTriggerWidget, shouldTriggerOther,
element = $( "#widget" ),
widget = element.testWidget().data( "testWidget" );
widget._on( element, { foo: function() {
ok( shouldTriggerWidget, "foo called from _on" );
}});
element.bind( "foo", function() {
ok( shouldTriggerOther, "foo called from bind" );
});
shouldTriggerWidget = true;
shouldTriggerOther = true;
element.trigger( "foo" );
shouldTriggerWidget = false;
widget._off( element, "foo" );
element.trigger( "foo" );
});

test( "_off() - multiple events", function() {
expect( 6 );

$.widget( "ui.testWidget", {} );
var shouldTriggerWidget, shouldTriggerOther,
element = $( "#widget" ),
widget = element.testWidget().data( "testWidget" );
widget._on( element, {
foo: function() {
ok( shouldTriggerWidget, "foo called from _on" );
},
bar: function() {
ok( shouldTriggerWidget, "bar called from _on" );
}
});
element.bind( "foo bar", function( event ) {
ok( shouldTriggerOther, event.type + " called from bind" );
});
shouldTriggerWidget = true;
shouldTriggerOther = true;
element.trigger( "foo" );
element.trigger( "bar" );
shouldTriggerWidget = false;
widget._off( element, "foo bar" );
element.trigger( "foo" );
element.trigger( "bar" );
});

test( "_off() - all events", function() {
expect( 6 );

$.widget( "ui.testWidget", {} );
var shouldTriggerWidget, shouldTriggerOther,
element = $( "#widget" ),
widget = element.testWidget().data( "testWidget" );
widget._on( element, {
foo: function() {
ok( shouldTriggerWidget, "foo called from _on" );
},
bar: function() {
ok( shouldTriggerWidget, "bar called from _on" );
}
});
element.bind( "foo bar", function( event ) {
ok( shouldTriggerOther, event.type + " called from bind" );
});
shouldTriggerWidget = true;
shouldTriggerOther = true;
element.trigger( "foo" );
element.trigger( "bar" );
shouldTriggerWidget = false;
widget._off( element );
element.trigger( "foo" );
element.trigger( "bar" );
});

test( "._hoverable()", function() {
expect( 10 );
$.widget( "ui.testWidget", {
_create: function() {
this._hoverable( this.element.children() );
@@ -780,10 +888,11 @@ test( "._hoverable()", function() {
});

test( "._focusable()", function() {
expect( 10 );
$.widget( "ui.testWidget", {
_create: function() {
this._focusable( this.element.children() );
}
this._focusable( this.element.children() );
}
});

var div = $( "#widget" ).testWidget().children();
@@ -863,6 +972,7 @@ test( "._trigger() - cancelled event", function() {
});

test( "._trigger() - cancelled callback", function() {
expect( 1 );
$.widget( "ui.testWidget", {
_create: function() {}
});
@@ -5,7 +5,7 @@
<title>addClass Visual Test : Queue</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
<script src="../../../jquery-1.7.2.js"></script>
<script src="../../../ui/jquery.effects.core.js"></script>
<script src="../../../ui/jquery.ui.effect.js"></script>
<style>
.box {
width: 100px;
@@ -5,20 +5,20 @@
<title>jQuery UI Effects Test Suite</title>
<link rel="stylesheet" href="effects.css">
<script src="../../../jquery-1.7.2.js"></script>
<script src="../../../ui/jquery.effects.core.js"></script>
<script src="../../../ui/jquery.effects.blind.js"></script>
<script src="../../../ui/jquery.effects.bounce.js"></script>
<script src="../../../ui/jquery.effects.clip.js"></script>
<script src="../../../ui/jquery.effects.drop.js"></script>
<script src="../../../ui/jquery.effects.explode.js"></script>
<script src="../../../ui/jquery.effects.fade.js"></script>
<script src="../../../ui/jquery.effects.fold.js"></script>
<script src="../../../ui/jquery.effects.highlight.js"></script>
<script src="../../../ui/jquery.effects.pulsate.js"></script>
<script src="../../../ui/jquery.effects.scale.js"></script>
<script src="../../../ui/jquery.effects.shake.js"></script>
<script src="../../../ui/jquery.effects.slide.js"></script>
<script src="../../../ui/jquery.effects.transfer.js"></script>
<script src="../../../ui/jquery.ui.effect.js"></script>
<script src="../../../ui/jquery.ui.effect-blind.js"></script>
<script src="../../../ui/jquery.ui.effect-bounce.js"></script>
<script src="../../../ui/jquery.ui.effect-clip.js"></script>
<script src="../../../ui/jquery.ui.effect-drop.js"></script>
<script src="../../../ui/jquery.ui.effect-explode.js"></script>
<script src="../../../ui/jquery.ui.effect-fade.js"></script>
<script src="../../../ui/jquery.ui.effect-fold.js"></script>
<script src="../../../ui/jquery.ui.effect-highlight.js"></script>
<script src="../../../ui/jquery.ui.effect-pulsate.js"></script>
<script src="../../../ui/jquery.ui.effect-scale.js"></script>
<script src="../../../ui/jquery.ui.effect-shake.js"></script>
<script src="../../../ui/jquery.ui.effect-slide.js"></script>
<script src="../../../ui/jquery.ui.effect-transfer.js"></script>
<script src="effects.js"></script>
</head>
<body>
@@ -5,8 +5,8 @@
<title>jQuery UI Effects Test Suite</title>
<link rel="stylesheet" href="effects.css">
<script src="../../../jquery-1.7.2.js"></script>
<script src="../../../ui/jquery.effects.core.js"></script>
<script src="../../../ui/jquery.effects.scale.js"></script>
<script src="../../../ui/jquery.ui.effect.js"></script>
<script src="../../../ui/jquery.ui.effect-scale.js"></script>
<script>
$(function() {
var test = $( "#testBox" ),
@@ -26,7 +26,8 @@

$( "#menu6" ).menu({
menus: ".menuElement",
select: logger
select: logger,
icon: "ui-icon-carat-1-s"
});
});
</script>
@@ -212,7 +213,7 @@ <h2>Menu with custom markup</h2>
</blockquote>
</div>

<h2>Menu with custom markup, multi-line items</h2>
<h2>Menu with custom markup, multi-line items and a custom submenu icon</h2>
<div class="menuElement" id="menu6">
<div class="address-item">
<a href="#">
@@ -9,11 +9,11 @@
<script src="../../../ui/jquery.ui.widget.js"></script>
<script src="../../../ui/jquery.ui.position.js"></script>
<script src="../../../ui/jquery.ui.tooltip.js"></script>
<script src="../../../ui/jquery.effects.core.js"></script>
<script src="../../../ui/jquery.effects.blind.js"></script>
<script src="../../../ui/jquery.effects.bounce.js"></script>
<script src="../../../ui/jquery.effects.drop.js"></script>
<script src="../../../ui/jquery.effects.explode.js"></script>
<script src="../../../ui/jquery.ui.effect.js"></script>
<script src="../../../ui/jquery.ui.effect-blind.js"></script>
<script src="../../../ui/jquery.ui.effect-bounce.js"></script>
<script src="../../../ui/jquery.ui.effect-drop.js"></script>
<script src="../../../ui/jquery.ui.effect-explode.js"></script>
<style>
pre {
width: 250px;
@@ -1,7 +1,8 @@
/*!
* jQuery UI Accordion @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Autocomplete @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,13 +1,15 @@
/*!
* jQuery UI Button @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
@@ -1,7 +1,8 @@
/*!
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Datepicker @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -56,8 +57,6 @@

/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
@@ -1,7 +1,8 @@
/*!
* jQuery UI Dialog @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Menu @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Progressbar @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Resizable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Selectable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Slider @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Spinner @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,15 +1,16 @@
/*!
* jQuery UI Tabs @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
@@ -1,7 +1,8 @@
/*!
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Tooltip @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/

This file was deleted.

@@ -1,7 +1,8 @@
/*!
* jQuery UI Accordion @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -137,8 +138,8 @@ $.widget( "ui.accordion", {
});
}

this._bind( this.headers, { keydown: "_keydown" });
this._bind( this.headers.next(), { keydown: "_panelKeyDown" });
this._on( this.headers, { keydown: "_keydown" });
this._on( this.headers.next(), { keydown: "_panelKeyDown" });
this._setupEvents( options.event );
},

@@ -219,8 +220,7 @@ $.widget( "ui.accordion", {

if ( key === "event" ) {
if ( this.options.event ) {
this.headers.unbind(
this.options.event.split( " " ).join( ".accordion " ) + ".accordion" );
this._off( this.headers, this.options.event );
}
this._setupEvents( value );
}
@@ -376,7 +376,7 @@ $.widget( "ui.accordion", {
$.each( event.split(" "), function( index, eventName ) {
events[ eventName ] = "_eventHandler";
});
this._bind( this.headers, events );
this._on( this.headers, events );
},

_eventHandler: function( event ) {
@@ -1,7 +1,8 @@
/*!
* jQuery UI Autocomplete @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -55,15 +56,15 @@ $.widget( "ui.autocomplete", {
// search term. #7799
var suppressKeyPress, suppressKeyPressRepeat, suppressInput;

this.isMultiLine = this.element.is( "textarea,[contenteditable]" );
this.isMultiLine = this._isMultiLine();
this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
this.isNewMenu = true;

this.element
.addClass( "ui-autocomplete-input" )
.attr( "autocomplete", "off" );

this._bind({
this._on({
keydown: function( event ) {
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
@@ -190,7 +191,7 @@ $.widget( "ui.autocomplete", {
.zIndex( this.element.zIndex() + 1 )
.hide()
.data( "menu" );
this._bind( this.menu.element, {
this._on( this.menu.element, {
mousedown: function( event ) {
// prevent moving focus out of the text field
event.preventDefault();
@@ -297,7 +298,7 @@ $.widget( "ui.autocomplete", {
// turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete
// if the page is unloaded before the widget is destroyed. #7790
this._bind( this.window, {
this._on( this.window, {
beforeunload: function() {
this.element.removeAttr( "autocomplete" );
}
@@ -326,6 +327,20 @@ $.widget( "ui.autocomplete", {
}
},

_isMultiLine: function() {
// Textareas are always multi-line
if ( this.element.is( "textarea" ) ) {
return true;
}
// Inputs are always single-line, even if inside a contentEditable element
// IE also treats inputs as contentEditable
if ( this.element.is( "input" ) ) {
return false;
}
// All other element types are determined by whether or not they're contentEditable
return this.element.prop( "isContentEditable" );
},

_initSource: function() {
var array, url,
that = this;
@@ -1,7 +1,8 @@
/*!
* jQuery UI Button @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -54,8 +55,8 @@ $.widget( "ui.button", {
},
_create: function() {
this.element.closest( "form" )
.unbind( "reset.button" )
.bind( "reset.button", formResetHandler );
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );

if ( typeof this.options.disabled !== "boolean" ) {
this.options.disabled = !!this.element.prop( "disabled" );
@@ -79,7 +80,7 @@ $.widget( "ui.button", {
this.buttonElement
.addClass( baseClasses )
.attr( "role", "button" )
.bind( "mouseenter.button", function() {
.bind( "mouseenter" + this.eventNamespace, function() {
if ( options.disabled ) {
return;
}
@@ -88,30 +89,30 @@ $.widget( "ui.button", {
$( this ).addClass( "ui-state-active" );
}
})
.bind( "mouseleave.button", function() {
.bind( "mouseleave" + this.eventNamespace, function() {
if ( options.disabled ) {
return;
}
$( this ).removeClass( hoverClass );
})
.bind( "click.button", function( event ) {
.bind( "click" + this.eventNamespace, function( event ) {
if ( options.disabled ) {
event.preventDefault();
event.stopImmediatePropagation();
}
});

this.element
.bind( "focus.button", function() {
.bind( "focus" + this.eventNamespace, function() {
// no need to check disabled, focus won't be triggered anyway
that.buttonElement.addClass( focusClass );
})
.bind( "blur.button", function() {
.bind( "blur" + this.eventNamespace, function() {
that.buttonElement.removeClass( focusClass );
});

if ( toggleButton ) {
this.element.bind( "change.button", function() {
this.element.bind( "change" + this.eventNamespace, function() {
if ( clickDragged ) {
return;
}
@@ -121,15 +122,15 @@ $.widget( "ui.button", {
// prevents issue where button state changes but checkbox/radio checked state
// does not in Firefox (see ticket #6970)
this.buttonElement
.bind( "mousedown.button", function( event ) {
.bind( "mousedown" + this.eventNamespace, function( event ) {
if ( options.disabled ) {
return;
}
clickDragged = false;
startXPos = event.pageX;
startYPos = event.pageY;
})
.bind( "mouseup.button", function( event ) {
.bind( "mouseup" + this.eventNamespace, function( event ) {
if ( options.disabled ) {
return;
}
@@ -140,15 +141,15 @@ $.widget( "ui.button", {
}

if ( this.type === "checkbox" ) {
this.buttonElement.bind( "click.button", function() {
this.buttonElement.bind( "click" + this.eventNamespace, function() {
if ( options.disabled || clickDragged ) {
return false;
}
$( this ).toggleClass( "ui-state-active" );
that.buttonElement.attr( "aria-pressed", that.element[0].checked );
});
} else if ( this.type === "radio" ) {
this.buttonElement.bind( "click.button", function() {
this.buttonElement.bind( "click" + this.eventNamespace, function() {
if ( options.disabled || clickDragged ) {
return false;
}
@@ -166,7 +167,7 @@ $.widget( "ui.button", {
});
} else {
this.buttonElement
.bind( "mousedown.button", function() {
.bind( "mousedown" + this.eventNamespace, function() {
if ( options.disabled ) {
return false;
}
@@ -176,21 +177,21 @@ $.widget( "ui.button", {
lastActive = null;
});
})
.bind( "mouseup.button", function() {
.bind( "mouseup" + this.eventNamespace, function() {
if ( options.disabled ) {
return false;
}
$( this ).removeClass( "ui-state-active" );
})
.bind( "keydown.button", function(event) {
.bind( "keydown" + this.eventNamespace, function(event) {
if ( options.disabled ) {
return false;
}
if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
$( this ).addClass( "ui-state-active" );
}
})
.bind( "keyup.button", function() {
.bind( "keyup" + this.eventNamespace, function() {
$( this ).removeClass( "ui-state-active" );
});

@@ -344,7 +345,7 @@ $.widget( "ui.button", {
buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );

if ( !this.hasTitle ) {
buttonElement.attr( "title", buttonText );
buttonElement.attr( "title", $.trim( buttonText ) );
}
}
} else {
@@ -1,7 +1,8 @@
/*!
* jQuery UI @VERSION
* jQuery UI Core @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -215,9 +216,16 @@ function visible( element ) {
}

$.extend( $.expr[ ":" ], {
data: function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
},
data: $.expr.createPseudo ?
$.expr.createPseudo(function( dataName ) {
return function( elem ) {
return !!$.data( elem, dataName );
};
}) :
// support: jQuery <1.8
function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
},

focusable: function( element ) {
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
@@ -1,7 +1,8 @@
/*!
* jQuery UI Datepicker @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -665,10 +666,6 @@ $.extend(Datepicker.prototype, {
isFixed |= $(this).css('position') == 'fixed';
return !isFixed;
});
if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
$.datepicker._pos[0] -= document.documentElement.scrollLeft;
$.datepicker._pos[1] -= document.documentElement.scrollTop;
}
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
$.datepicker._pos = null;
//to avoid flashes on Firefox
@@ -1804,12 +1801,6 @@ function extendRemove(target, props) {
return target;
};

/* Determine whether an object is an array. */
function isArray(a) {
return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
};

/* Invoke the datepicker functionality.
@param options string - a command, optionally followed by additional parameters or
Object - settings for attaching new datepicker functionality
@@ -1,7 +1,8 @@
/*!
* jQuery UI Dialog @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -224,7 +225,7 @@ $.widget("ui.dialog", {
if ( this.overlay ) {
this.overlay.destroy();
}
this.uiDialog.unbind( "keypress.ui-dialog" );
this._off( this.uiDialog, "keypress" );

if ( this.options.hide ) {
this.uiDialog.hide( this.options.hide, function() {
@@ -310,12 +311,12 @@ $.widget("ui.dialog", {

// prevent tabbing out of modal dialogs
if ( options.modal ) {
uiDialog.bind( "keydown.ui-dialog", function( event ) {
this._on( uiDialog, { keydown: function( event ) {
if ( event.keyCode !== $.ui.keyCode.TAB ) {
return;
}

var tabbables = $( ":tabbable", this ),
var tabbables = $( ":tabbable", uiDialog ),
first = tabbables.filter( ":first" ),
last = tabbables.filter( ":last" );

@@ -326,7 +327,7 @@ $.widget("ui.dialog", {
last.focus( 1 );
return false;
}
});
}});
}

// set focus to the first tabbable element in the content area or the first button
@@ -1,7 +1,8 @@
/*!
* jQuery UI Draggable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -400,13 +401,13 @@ $.widget("ui.draggable", $.ui.mouse, {
pos.top // The absolute mouse position
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
),
left: (
pos.left // The absolute mouse position
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
)
};

@@ -460,14 +461,14 @@ $.widget("ui.draggable", $.ui.mouse, {
- this.offset.click.top // Click offset (relative to the element)
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
pageX // The absolute mouse position
- this.offset.click.left // Click offset (relative to the element)
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
)
};

@@ -1,7 +1,8 @@
/*!
* jQuery UI Droppable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Blind @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Blind
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Bounce @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Bounce
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Clip @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Clip
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Drop @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Drop
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Explode @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Explode
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,36 +1,30 @@
/*!
* jQuery UI Effects Fade @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Fade
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

$.effects.effect.fade = function( o, done ) {
var el = $( this ),
mode = $.effects.setMode( el, o.mode || "toggle" ),
hide = mode === "hide";
mode = $.effects.setMode( el, o.mode || "toggle" );

el.show();
el.animate({
opacity: hide ? 0 : 1
opacity: mode
}, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( hide ) {
el.hide();
}
done();
}
complete: done
});
};

})(jQuery);
})( jQuery );
@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Fold @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Fold
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Highlight @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Highlight
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Pulsate @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Pulsate
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Scale @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Scale
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Shake @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Shake
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Slide @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Slide
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

@@ -1,14 +1,15 @@
/*!
* jQuery UI Effects Transfer @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Transfer
*
* Depends:
* jquery.effects.core.js
* jquery.ui.effect.js
*/
(function( $, undefined ) {

Large diffs are not rendered by default.

@@ -1,7 +1,8 @@
/*!
* jQuery UI Menu @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -10,8 +11,9 @@
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.position.js
*/
(function($) {
(function( $, undefined ) {

var currentEventTarget = null;

@@ -20,6 +22,9 @@ $.widget( "ui.menu", {
defaultElement: "<ul>",
delay: 300,
options: {
icons: {
submenu: "ui-icon-carat-1-e"
},
menus: "ul",
position: {
my: "left top",
@@ -32,6 +37,7 @@ $.widget( "ui.menu", {
focus: null,
select: null
},

_create: function() {
this.activeMenu = this.element;
this.element
@@ -43,8 +49,8 @@ $.widget( "ui.menu", {
tabIndex: 0
})
// need to catch all clicks on disabled menu
// not possible through _bind
.bind( "click.menu", $.proxy(function( event ) {
// not possible through _on
.bind( "click" + this.eventNamespace, $.proxy(function( event ) {
if ( this.options.disabled ) {
event.preventDefault();
}
@@ -56,7 +62,7 @@ $.widget( "ui.menu", {
.attr( "aria-disabled", "true" );
}

this._bind({
this._on({
// Prevent focus from sticking to links inside menu after clicking
// them (focus should always stay on UL during navigation).
"mousedown .ui-menu-item > a": function( event ) {
@@ -69,7 +75,10 @@ $.widget( "ui.menu", {
var target = $( event.target );
if ( target[0] !== currentEventTarget ) {
currentEventTarget = target[0];
target.one( "click.menu", function( event ) {
// TODO: What are we trying to accomplish with this check?
// Clicking a menu item twice results in a select event with
// an empty ui.item.
target.one( "click" + this.eventNamespace, function( event ) {
currentEventTarget = null;
});
// Don't select disabled menu items
@@ -94,20 +103,11 @@ $.widget( "ui.menu", {
mouseleave: "collapseAll",
"mouseleave .ui-menu": "collapseAll",
focus: function( event ) {
var menu = this.element,
firstItem = menu.children( ".ui-menu-item" ).eq( 0 );
if ( this._hasScroll() && !this.active ) {
menu.children().each(function() {
var currentItem = $( this );
if ( currentItem.offset().top - menu.offset().top >= 0 ) {
firstItem = currentItem;
return false;
}
});
} else if ( this.active ) {
firstItem = this.active;
}
this.focus( event, firstItem );
// If there's already an active item, keep it active
// If not, activate the first item
var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );

this.focus( event, item );
},
blur: function( event ) {
this._delay(function() {
@@ -121,19 +121,33 @@ $.widget( "ui.menu", {

this.refresh();

// TODO: We probably shouldn't bind to document for each menu.
// TODO: This isn't being cleaned up on destroy.
this._bind( this.document, {
// Clicks outside of a menu collapse any open menus
this._on( this.document, {
click: function( event ) {
if ( !$( event.target ).closest( ".ui-menu" ).length ) {
this.collapseAll( event );
}
}
});

if ( this.options.trigger ) {
this.element.popup({
trigger: this.options.trigger,
managed: true,
focusPopup: $.proxy( function( event, ui ) {
this.focus( event, this.element.children( ".ui-menu-item" ).first() );
this.element.focus( 1 );
}, this)
});
}
},

_destroy: function() {
// destroy (sub)menus
if ( this.options.trigger ) {
this.element.popup( "destroy" );
}

// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).andSelf()
@@ -147,7 +161,7 @@ $.widget( "ui.menu", {
.removeUniqueId()
.show();

// destroy menu items
// Destroy menu items
this.element.find( ".ui-menu-item" )
.removeClass( "ui-menu-item" )
.removeAttr( "role" )
@@ -165,15 +179,15 @@ $.widget( "ui.menu", {
}
});

// destroy menu dividers
// Destroy menu dividers
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );

// unbind currentEventTarget click event handler
$( currentEventTarget ).unbind( "click.menu" );
// Unbind currentEventTarget click event handler
this._off( $( currentEventTarget ), "click" );
},

_keydown: function( event ) {
var match, prev, character, skip,
var match, prev, character, skip, regex,
preventDefault = true;

function escape( value ) {
@@ -208,8 +222,6 @@ $.widget( "ui.menu", {
}
break;
case $.ui.keyCode.ENTER:
this._activate( event );
break;
case $.ui.keyCode.SPACE:
this._activate( event );
break;
@@ -230,9 +242,9 @@ $.widget( "ui.menu", {
character = prev + character;
}

regex = new RegExp( "^" + escape( character ), "i" );
match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
return new RegExp( "^" + escape( character ), "i" )
.test( $( this ).children( "a" ).text() );
return regex.test( $( this ).children( "a" ).text() );
});
match = skip && match.index( this.active.next() ) !== -1 ?
this.active.nextAll( ".ui-menu-item" ) :
@@ -242,9 +254,9 @@ $.widget( "ui.menu", {
// to move down the menu to the first item that starts with that character
if ( !match.length ) {
character = String.fromCharCode( event.keyCode );
regex = new RegExp( "^" + escape( character ), "i" );
match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
return new RegExp( "^" + escape(character), "i" )
.test( $( this ).children( "a" ).text() );
return regex.test( $( this ).children( "a" ).text() );
});
}

@@ -279,8 +291,9 @@ $.widget( "ui.menu", {
},

refresh: function() {
// initialize nested menus
// Initialize nested menus
var menus,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus + ":not(.ui-menu)" )
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
.hide()
@@ -290,10 +303,10 @@ $.widget( "ui.menu", {
"aria-expanded": "false"
});

// don't refresh list items that are already adapted
// Don't refresh list items that are already adapted
menus = submenus.add( this.element );

menus.children( ":not( .ui-menu-item ):has( a )" )
menus.children( ":not(.ui-menu-item):has(a)" )
.addClass( "ui-menu-item" )
.attr( "role", "presentation" )
.children( "a" )
@@ -304,22 +317,24 @@ $.widget( "ui.menu", {
role: this._itemRole()
});

// initialize unlinked menu-items containing spaces and/or dashes only as dividers
menus.children( ":not(.ui-menu-item)" ).each( function() {
// Initialize unlinked menu-items containing spaces and/or dashes only as dividers
menus.children( ":not(.ui-menu-item)" ).each(function() {
var item = $( this );
// hyphen, em dash, en dash
if ( !/[^\-—–\s]/.test( item.text() ) ) {
item.addClass( "ui-widget-content ui-menu-divider" );
}
});

// add aria-disabled attribute to any disabled menu item
// Add aria-disabled attribute to any disabled menu item
menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );

submenus.each(function() {
var menu = $( this ),
item = menu.prev( "a" ),
submenuCarat = $( '<span class="ui-menu-icon ui-icon ui-icon-carat-1-e"></span>' ).data( "ui-menu-submenu-carat", true );
submenuCarat = $( "<span>" )
.addClass( "ui-menu-icon ui-icon " + icon )
.data( "ui-menu-submenu-carat", true );

item
.attr( "aria-haspopup", "true" )
@@ -343,13 +358,13 @@ $.widget( "ui.menu", {

this.active = item.first();
focused = this.active.children( "a" ).addClass( "ui-state-focus" );
// only update aria-activedescendant if there's a role
// Only update aria-activedescendant if there's a role
// otherwise we assume focus is managed elsewhere
if ( this.options.role ) {
this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
}

// highlight active parent menu item, if any
// Highlight active parent menu item, if any
this.active
.parent()
.closest( ".ui-menu-item" )
@@ -364,7 +379,7 @@ $.widget( "ui.menu", {
}, this.delay );
}

nested = $( "> .ui-menu", item );
nested = item.children( ".ui-menu" );
if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
this._startOpening(nested);
}
@@ -424,13 +439,10 @@ $.widget( "ui.menu", {
_open: function( submenu ) {
var position = $.extend({
of: this.active
}, $.type( this.options.position ) === "function" ?
this.options.position( this.active ) :
this.options.position
);
}, this.options.position );

clearTimeout( this.timer );
this.element.find( ".ui-menu" ).not( submenu.parents() )
this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
.hide()
.attr( "aria-hidden", "true" );

@@ -444,11 +456,11 @@ $.widget( "ui.menu", {
collapseAll: function( event, all ) {
clearTimeout( this.timer );
this.timer = this._delay(function() {
// if we were passed an event, look for the submenu that contains the event
// If we were passed an event, look for the submenu that contains the event
var currentMenu = all ? this.element :
$( event && event.target ).closest( this.element.find( ".ui-menu" ) );

// if we found no valid submenu ancestor, use the main menu to close all sub menus anyway
// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
if ( !currentMenu.length ) {
currentMenu = this.element;
}
@@ -483,7 +495,6 @@ $.widget( "ui.menu", {
if ( newItem && newItem.length ) {
this._close();
this.focus( event, newItem );
return true;
}
},

@@ -497,11 +508,10 @@ $.widget( "ui.menu", {
if ( newItem && newItem.length ) {
this._open( newItem.parent() );

// timeout so Firefox will not hide activedescendant change in expanding submenu from AT
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
this._delay(function() {
this.focus( event, newItem );
}, 20 );
return true;
}
},

@@ -542,47 +552,48 @@ $.widget( "ui.menu", {
},

nextPage: function( event ) {
var item, base, height;

if ( !this.active ) {
this._move( "next", "first", event );
this.next( event );
return;
}
if ( this.isLastItem() ) {
return;
}
if ( this._hasScroll() ) {
var base = this.active.offset().top,
height = this.element.height(),
result;
base = this.active.offset().top;
height = this.element.height();
this.active.nextAll( ".ui-menu-item" ).each(function() {
result = $( this );
return $( this ).offset().top - base - height < 0;
item = $( this );
return item.offset().top - base - height < 0;
});

this.focus( event, result );
this.focus( event, item );
} else {
this.focus( event, this.activeMenu.children( ".ui-menu-item" )
[ !this.active ? "first" : "last" ]() );
}
},

previousPage: function( event ) {
var item, base, height;
if ( !this.active ) {
this._move( "next", "first", event );
this.next( event );
return;
}
if ( this.isFirstItem() ) {
return;
}
if ( this._hasScroll() ) {
var base = this.active.offset().top,
height = this.element.height(),
result;
base = this.active.offset().top;
height = this.element.height();
this.active.prevAll( ".ui-menu-item" ).each(function() {
result = $( this );
return $(this).offset().top - base + height > 0;
item = $( this );
return item.offset().top - base + height > 0;
});

this.focus( event, result );
this.focus( event, item );
} else {
this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
}
@@ -593,7 +604,7 @@ $.widget( "ui.menu", {
},

select: function( event ) {
// save active reference before collapseAll triggers blur
// Save active reference before collapseAll triggers blur
var ui = {
item: this.active
};
@@ -141,7 +141,7 @@ $.widget( "ui.menubar", {
}

});
that._bind( {
that._on( {
keydown: function( event ) {
if ( event.keyCode === $.ui.keyCode.ESCAPE && that.active && that.active.menu( "collapse", event ) !== true ) {
var active = that.active;
@@ -1,7 +1,8 @@
/*!
* jQuery UI Mouse @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -61,7 +61,7 @@ $.widget( "ui.popup", {
this._beforeClose();
this.element.hide();

this._bind(this.options.trigger, {
this._on(this.options.trigger, {
keydown: function( event ) {
switch ( event.keyCode ) {
case $.ui.keyCode.TAB:
@@ -124,7 +124,7 @@ $.widget( "ui.popup", {
});

if ( this.options.expandOnFocus ) {
this._bind( this.options.trigger, {
this._on( this.options.trigger, {
focus : function( event ) {
if ( !suppressExpandOnFocus ) {
this._delay( function() {
@@ -144,7 +144,7 @@ $.widget( "ui.popup", {
}
if ( !this.options.managed ) {
//default use case, wrap tab order in popup
this._bind({ keydown : function( event ) {
this._on({ keydown : function( event ) {
if ( event.keyCode !== $.ui.keyCode.TAB ) {
return;
}
@@ -162,7 +162,7 @@ $.widget( "ui.popup", {
});
}

this._bind({
this._on({
focusout: function( event ) {
// use a timer to allow click to clear it and letting that
// handle the closing instead of opening again
@@ -178,7 +178,7 @@ $.widget( "ui.popup", {
}
});

this._bind({
this._on({
keyup: function( event ) {
if ( event.keyCode === $.ui.keyCode.ESCAPE && this.element.is( ":visible" ) ) {
this.close( event );
@@ -187,7 +187,7 @@ $.widget( "ui.popup", {
}
});

this._bind( this.document, {
this._on( this.document, {
click: function( event ) {
if ( this.isOpen && !$( event.target ).closest( this.element.add( this.options.trigger ) ).length ) {
this.close( event );
@@ -1,7 +1,8 @@
/*!
* jQuery UI Position @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Progressbar @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Resizable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -446,9 +447,6 @@ $.widget("ui.resizable", $.ui.mouse, {
});
}

if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
continue;

prel.css({
height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
@@ -1,7 +1,8 @@
/*!
* jQuery UI Selectable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -1,7 +1,8 @@
/*!
* jQuery UI Slider @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -114,7 +115,7 @@ $.widget( "ui.slider", $.ui.mouse, {
$( this ).data( "ui-slider-handle-index", i );
});

this._bind( this.handles, {
this._on( this.handles, {
keydown: function( event ) {
var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index" );
@@ -1,7 +1,8 @@
/*!
* jQuery UI Sortable @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -887,13 +888,13 @@ $.widget("ui.sortable", $.ui.mouse, {
pos.top // The absolute mouse position
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
),
left: (
pos.left // The absolute mouse position
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
)
};

@@ -944,14 +945,14 @@ $.widget("ui.sortable", $.ui.mouse, {
- this.offset.click.top // Click offset (relative to the element)
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
pageX // The absolute mouse position
- this.offset.click.left // Click offset (relative to the element)
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
)
};

@@ -1,7 +1,8 @@
/*!
* jQuery UI Spinner @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -31,6 +32,10 @@ $.widget( "ui.spinner", {
widgetEventPrefix: "spin",
options: {
culture: null,
icons: {
down: "ui-icon-triangle-1-s",
up: "ui-icon-triangle-1-n"
},
incremental: true,
max: null,
min: null,
@@ -54,13 +59,13 @@ $.widget( "ui.spinner", {
this._value( this.element.val(), true );

this._draw();
this._bind( this._events );
this._on( this._events );
this._refresh();

// turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete
// if the page is unloaded before the widget is destroyed. #7790
this._bind( this.window, {
this._on( this.window, {
beforeunload: function() {
this.element.removeAttr( "autocomplete" );
}
@@ -243,10 +248,10 @@ $.widget( "ui.spinner", {
_buttonHtml: function() {
return "" +
"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
"<span class='ui-icon ui-icon-triangle-1-n'>&#9650;</span>" +
"<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
"</a>" +
"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
"<span class='ui-icon ui-icon-triangle-1-s'>&#9660;</span>" +
"<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
"</a>";
},

Large diffs are not rendered by default.

@@ -1,7 +1,8 @@
/*!
* jQuery UI Tooltip @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -54,14 +55,15 @@ $.widget( "ui.tooltip", {
},
show: true,
tooltipClass: null,
track: false,

// callbacks
close: null,
open: null
},

_create: function() {
this._bind({
this._on({
mouseover: "open",
focusin: "open"
});
@@ -117,8 +119,18 @@ $.widget( "ui.tooltip", {
target = $( event ? event.target : this.element )
.closest( this.options.items );

// if ui-tooltip-id exists, then the tooltip is already open
if ( !target.length || target.data( "ui-tooltip-id" ) ) {
// No element to show a tooltip for
if ( !target.length ) {
return;
}

// If the tooltip is open and we're tracking then reposition the tooltip.
// This makes sure that a tracking tooltip doesn't obscure a focused element
// if the user was hovering when the element gained focused.
if ( this.options.track && target.data( "ui-tooltip-id" ) ) {
this._find( target ).position( $.extend({
of: target
}, this.options.position ) );
return;
}

@@ -145,10 +157,19 @@ $.widget( "ui.tooltip", {
},

_open: function( event, target, content ) {
var tooltip, positionOption;
if ( !content ) {
return;
}

// Content can be updated multiple times. If the tooltip already
// exists, then just update the content and bail.
tooltip = this._find( target );
if ( tooltip.length ) {
tooltip.find( ".ui-tooltip-content" ).html( content );
return;
}

// if we have a title, clear it to prevent the native tooltip
// we have to check first to avoid defining a title if none exists
// (we don't want to cause an element to start matching [title])
@@ -164,25 +185,34 @@ $.widget( "ui.tooltip", {
}
}

// ajaxy tooltip can update an existing one
var tooltip = this._find( target );
if ( !tooltip.length ) {
tooltip = this._tooltip( target );
addDescribedBy( target, tooltip.attr( "id" ) );
}
tooltip = this._tooltip( target );
addDescribedBy( target, tooltip.attr( "id" ) );
tooltip.find( ".ui-tooltip-content" ).html( content );
tooltip
.stop( true )
.position( $.extend({

function position( event ) {
positionOption.of = event;
tooltip.position( positionOption );
}
if ( this.options.track && /^mouse/.test( event.originalEvent.type ) ) {
positionOption = $.extend( {}, this.options.position );
this._on( this.document, {
mousemove: position
});
// trigger once to override element-relative positioning
position( event );
} else {
tooltip.position( $.extend({
of: target
}, this.options.position ) )
.hide();
}, this.options.position ) );
}

tooltip.hide();

this._show( tooltip, this.options.show );

this._trigger( "open", event, { tooltip: tooltip } );

this._bind( target, {
this._on( target, {
mouseleave: "close",
focusout: "close",
keyup: function( event ) {
@@ -230,7 +260,8 @@ $.widget( "ui.tooltip", {
});

target.removeData( "tooltip-open" );
target.unbind( "mouseleave.tooltip focusout.tooltip keyup.tooltip" );
this._off( target, "mouseleave focusout keyup" );
this._off( this.document, "mousemove" );

this.closing = true;
this._trigger( "close", event, { tooltip: tooltip } );
@@ -1,15 +1,17 @@
/*!
* jQuery UI Widget @VERSION
* http://jqueryui.com
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Copyright 2012 jQuery Foundation and other contributors
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
(function( $, undefined ) {

var slice = Array.prototype.slice,
var uuid = 0,
slice = Array.prototype.slice,
_cleanData = $.cleanData;
$.cleanData = function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
@@ -34,7 +36,7 @@ $.widget = function( name, base, prototype ) {
}

// create selector for plugin
$.expr[ ":" ][ fullName ] = function( elem ) {
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};

@@ -210,6 +212,8 @@ $.Widget.prototype = {
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
@@ -224,7 +228,7 @@ $.Widget.prototype = {
// TODO remove dual storage
$.data( element, this.widgetName, this );
$.data( element, this.widgetFullName, this );
this._bind({ remove: "destroy" });
this._on({ remove: "destroy" });
this.document = $( element.style ?
// element within the document
element.ownerDocument :
@@ -245,22 +249,25 @@ $.Widget.prototype = {
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._bind()
// all event bindings should go through this._on()
this.element
.unbind( "." + this.widgetName )
.unbind( this.eventNamespace )
// 1.9 BC for #7810
// TODO remove dual storage
.removeData( this.widgetName )
.removeData( this.widgetFullName );
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( "." + this.widgetName )
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );

// clean up events and states
this.bindings.unbind( "." + this.widgetName );
this.bindings.unbind( this.eventNamespace );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
},
@@ -339,7 +346,7 @@ $.Widget.prototype = {
return this._setOption( "disabled", true );
},

_bind: function( element, handlers ) {
_on: function( element, handlers ) {
// no element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
@@ -367,11 +374,11 @@ $.Widget.prototype = {
// copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || jQuery.guid++;
handler.guid || handlerProxy.guid || $.guid++;
}

var match = event.match( /^(\w+)\s*(.*)$/ ),
eventName = match[1] + "." + instance.widgetName,
eventName = match[1] + instance.eventNamespace,
selector = match[2];
if ( selector ) {
instance.widget().delegate( selector, eventName, handlerProxy );
@@ -381,6 +388,11 @@ $.Widget.prototype = {
});
},

_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );
},

_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
@@ -392,7 +404,7 @@ $.Widget.prototype = {

_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._bind( element, {
this._on( element, {
mouseenter: function( event ) {
$( event.currentTarget ).addClass( "ui-state-hover" );
},
@@ -404,7 +416,7 @@ $.Widget.prototype = {

_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._bind( element, {
this._on( element, {
focusin: function( event ) {
$( event.currentTarget ).addClass( "ui-state-focus" );
},