Use .uniqueSort isntead of deprecated .unique

This changes jQuery UI, hopefully it will be fixed in next version.

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-02-02 13:55:09 +01:00
parent ca03659f5e
commit d9a2fe5d36
4 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -502,7 +502,7 @@ $.Widget.prototype = {
for ( i = 0; i < classes.length; i++ ) {
current = that.classesElementLookup[ classes[ i ] ] || $();
if ( options.add ) {
current = $( $.unique( current.get().concat( options.element.get() ) ) );
current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
} else {
current = $( current.not( options.element ).get() );
}

View File

@ -150,7 +150,7 @@ return $.widget( "ui.controlgroup", {
} );
} );
this.childWidgets = $( $.unique( childWidgets ) );
this.childWidgets = $( $.uniqueSort( childWidgets ) );
this._addClass( this.childWidgets, "ui-controlgroup-item" );
},

View File

@ -96,7 +96,7 @@ $.widget( "ui.tabs", {
// Take disabling tabs via class attribute from HTML
// into account and update option properly.
if ( $.isArray( options.disabled ) ) {
options.disabled = $.unique( options.disabled.concat(
options.disabled = $.uniqueSort( options.disabled.concat(
$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
return that.tabs.index( li );
} )