mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Calendar: Update Button widget implementation to latest changes
This commit is contained in:
parent
c10ef0a170
commit
5d3bdde5f1
@ -478,18 +478,23 @@ return $.widget( "ui.calendar", {
|
||||
|
||||
// Change the context for the click callback to be the main element
|
||||
click = props.click;
|
||||
props.click = function() {
|
||||
click.apply( that.buttonClickContext, arguments );
|
||||
};
|
||||
buttonOptions = {
|
||||
icons: props.icons,
|
||||
text: props.showText
|
||||
icon: props.icon,
|
||||
iconPosition: props.iconPosition,
|
||||
showLabel: props.showLabel
|
||||
};
|
||||
delete props.icons;
|
||||
delete props.showText;
|
||||
|
||||
delete props.click;
|
||||
delete props.icon;
|
||||
delete props.iconPosition;
|
||||
delete props.showLabel;
|
||||
|
||||
$( "<button></button>", props )
|
||||
.button( buttonOptions )
|
||||
.appendTo( that.buttonSet );
|
||||
.appendTo( that.buttonSet )
|
||||
.on( "click", function() {
|
||||
click.apply( that.buttonClickContext, arguments );
|
||||
} );
|
||||
} );
|
||||
this.element.addClass( "ui-calendar-buttons" );
|
||||
this.buttonPane.appendTo( this.element );
|
||||
|
Loading…
Reference in New Issue
Block a user