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
var widgetElement = element[ widget ]( "widget" );
widgetElement.data(
"ui-controlgroup-data",
element.data( "ui-" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) )
);
$.data( widgetElement[ 0 ], "ui-controlgroup-data",
element[ widget ]( "instance" ) );
childWidgets.push( widgetElement[ 0 ] );
} );