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
|
// Change the context for the click callback to be the main element
|
||||||
click = props.click;
|
click = props.click;
|
||||||
props.click = function() {
|
|
||||||
click.apply( that.buttonClickContext, arguments );
|
|
||||||
};
|
|
||||||
buttonOptions = {
|
buttonOptions = {
|
||||||
icons: props.icons,
|
icon: props.icon,
|
||||||
text: props.showText
|
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></button>", props )
|
||||||
.button( buttonOptions )
|
.button( buttonOptions )
|
||||||
.appendTo( that.buttonSet );
|
.appendTo( that.buttonSet )
|
||||||
|
.on( "click", function() {
|
||||||
|
click.apply( that.buttonClickContext, arguments );
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
this.element.addClass( "ui-calendar-buttons" );
|
this.element.addClass( "ui-calendar-buttons" );
|
||||||
this.buttonPane.appendTo( this.element );
|
this.buttonPane.appendTo( this.element );
|
||||||
|
Loading…
Reference in New Issue
Block a user