Large diffs are not rendered by default.

@@ -114,9 +114,8 @@ $.widget( "ui.button", {

_updateTooltip: function() {
this.title = this.element.attr( "title" );
this.noTitle = !this.title;

if ( !this.options.showLabel && !this.noTitle ){
if ( !this.options.showLabel && !this.title ){
this.element.attr( "title", this.options.label );
}
},
@@ -24,10 +24,9 @@
}
}(function( $ ) {

var baseClasses = "ui-button ui-widget ui-corner-all",
typeClasses = " ui-icon ui-icon-background ui-state-focus ui-icon-check ui-icon-blank" +
" ui-radio-label ui-checkbox-label ui-state-active ui-icon-beginning ui-icon-end" +
" ui-icon-top ui-icon-bottom ui-radio-checked ui-checkbox-checked",
var baseClasses = "ui-button ui-widget",
typeClasses = "ui-state-focus ui-radio-label ui-checkbox-label ui-state-active " +
"ui-icon-beginning ui-icon-end ui-icon-top ui-icon-bottom ui-radio-checked ui-checkbox-checked",
formResetHandler = function() {
var form = $( this );
setTimeout(function() {
@@ -104,11 +103,11 @@ $.widget( "ui.checkboxradio", {
var formElement = $( this.element[ 0 ].form );

// We don't use _on and _off here because we want all the checkboxes in the same form to use
// single handler which handles all the checkboxradio widgets in the form
// a single handler which handles all the checkboxradio widgets in the form
formElement.off( "reset" + this.eventNamespace, formResetHandler );
formElement.on( "reset" + this.eventNamespace, formResetHandler );

// If it is null the user set it explicitly to null so we need to check the dom
// If it is null the user set it explicitly to null so we need to check the DOM
if ( this.options.disabled == null ) {
this.options.disabled = this.element.prop( "disabled" ) || false;
}
@@ -137,7 +136,7 @@ $.widget( "ui.checkboxradio", {
_readType: function() {
this.type = this.element[ 0 ].type;
if ( !/radio|checkbox/.test( this.type ) ) {
throw new Error( "Can't create checkboxradio widget for type " + this.type );
$.error( "Can't create checkboxradio widget for type " + this.type );
}
},

@@ -218,7 +217,8 @@ $.widget( "ui.checkboxradio", {
},

_destroy: function() {
this.label.removeClass( baseClasses + " " + typeClasses );
this.label.removeClass( this._classes( "ui-radio-label ui-checkbox-label" ) + " " +
baseClasses + " " + typeClasses );
if ( this.icon ) {
this.icon.remove();
}
@@ -209,22 +209,6 @@ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );

$.fn.extend({
focus: (function( orig ) {
return function( delay, fn ) {
return typeof delay === "number" ?
this.each(function() {
var elem = this;
setTimeout(function() {
$( elem ).focus();
if ( fn ) {
fn.call( elem );
}
}, delay );
}) :
orig.apply( this, arguments );
};
})( $.fn.focus ),

disableSelection: (function() {
var eventType = "onselectstart" in document.createElement( "div" ) ?
"selectstart" :
@@ -239,35 +223,6 @@ $.fn.extend({

enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
},

zIndex: function( zIndex ) {
if ( zIndex !== undefined ) {
return this.css( "zIndex", zIndex );
}

if ( this.length ) {
var elem = $( this[ 0 ] ), position, value;
while ( elem.length && elem[ 0 ] !== document ) {
// Ignore z-index if position is set to a value where z-index is ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
position = elem.css( "position" );
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
value = parseInt( elem.css( "zIndex" ), 10 );
if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
elem = elem.parent();
}
}

return 0;
}
});

@@ -58,10 +58,6 @@ return $.widget( "ui.tabs", {
return function( anchor ) {
var anchorUrl, locationUrl;

// support: IE7
// IE7 doesn't normalize the href property when set via script (#9317)
anchor = anchor.cloneNode( false );

anchorUrl = anchor.href.replace( rhash, "" );
locationUrl = location.href.replace( rhash, "" );

@@ -276,30 +272,29 @@ return $.widget( "ui.tabs", {
},

_elementsFromClassKey: function( classKey ) {
switch( classKey ) {
case "ui-tabs":
return this.element;
switch ( classKey ) {
case "ui-tabs-collapsible":
if ( this.options.collapsible ) {
return this.element;
if ( !this.options.collapsible ) {
return $();
}
break;
case "ui-tabs-active":
return this.active;
case "ui-tabs-nav":
return this.tablist;
case "ui-tab"
case "ui-tab":
return this.tabs;
case "ui-tabs-anchor":
return this.anchors;
case "ui-tabs-panel":
return this.panels;
case "ui-tabs-loading":
if( this.tab.hasClass( classKey ) ) {
if ( this.tab.hasClass( classKey ) ) {
return this.tab;
}
default:
return this._superApply( arguments );
return $();
}
return this._superApply( arguments );
},

_setOption: function( key, value ) {
@@ -254,10 +254,6 @@ $.Widget.prototype = {
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );

this.bindings = $();
this.hoverable = $();
@@ -280,6 +276,11 @@ $.Widget.prototype = {
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}

this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );

this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
@@ -356,6 +357,7 @@ $.Widget.prototype = {

return this;
},

_setOptions: function( options ) {
var key;

@@ -365,14 +367,18 @@ $.Widget.prototype = {

return this;
},

_elementsFromClassKey: function( classKey ) {
return $();
if ( this.options.classes[ classKey ] ) {
return this.element;
} else {
return $();
}
},
_setOption: function( key, value ) {
var classKey;

_setOption: function( key, value ) {
if ( key === "classes" ) {
for ( classKey in value ) {
for ( var classKey in value ) {
if ( value[ classKey ] !== this.options.classes[ classKey ] ) {
this._elementsFromClassKey( classKey )
.removeClass( this._classesFromObject( classKey, this.options.classes ) )
@@ -58,6 +58,7 @@
'widgets/listview.hidedividers.js',
'nojs.js',
'widgets/forms/reset.js',
'../external/jquery-ui/accordion.js',
'../external/jquery-ui/checkboxradio.js',
'../external/jquery-ui/button.js',
'widgets/forms/button.js',
@@ -25,6 +25,7 @@ define([
"./widgets/listview.autodividers",
"./widgets/listview.hidedividers",
"./nojs",
"./jquery-ui/accordion",
"./jquery-ui/checkboxradio",
"./jquery-ui/button",
"./widgets/forms/slider",