Controlgroup: Optimize and simplify data access and storage

This commit is contained in:
Jörn Zaefferer 2015-09-30 15:48:30 +02:00 committed by Alexander Schmitz
parent 256a449213
commit 754e041cbd

View File

@ -88,10 +88,8 @@ return $.widget( "ui.controlgroup", {
// Store an instance of the controlgroup to be able to reference it later // Store an instance of the controlgroup to be able to reference it later
var widgetElement = element[ widget ]( "widget" ); var widgetElement = element[ widget ]( "widget" );
widgetElement.data( $.data( widgetElement[ 0 ], "ui-controlgroup-data",
"ui-controlgroup-data", element[ widget ]( "instance" ) );
element.data( "ui-" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) )
);
childWidgets.push( widgetElement[ 0 ] ); childWidgets.push( widgetElement[ 0 ] );
} ); } );