mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Demos: Remove deprecated button APIs
Remove usage of deprecated button options: * `icons`: https://jqueryui.com/upgrade-guide/1.12/#deprecated-icons-options-in-favor-of-icon-and-iconposition * `text`: https://jqueryui.com/upgrade-guide/1.12/#deprecated-text-option-in-favor-of-showlabel Fixes gh-2295 Closes gh-2296
This commit is contained in:
parent
36ed9fc3b0
commit
b8fff16dc4
@ -78,10 +78,8 @@
|
|||||||
.tooltip()
|
.tooltip()
|
||||||
.appendTo( this.wrapper )
|
.appendTo( this.wrapper )
|
||||||
.button({
|
.button({
|
||||||
icons: {
|
icon: "ui-icon-triangle-1-s",
|
||||||
primary: "ui-icon-triangle-1-s"
|
showLabel: false
|
||||||
},
|
|
||||||
text: false
|
|
||||||
})
|
})
|
||||||
.removeClass( "ui-corner-all" )
|
.removeClass( "ui-corner-all" )
|
||||||
.addClass( "custom-combobox-toggle ui-corner-right" )
|
.addClass( "custom-combobox-toggle ui-corner-right" )
|
||||||
|
@ -63,10 +63,8 @@
|
|||||||
|
|
||||||
$( "button" ).each(function() {
|
$( "button" ).each(function() {
|
||||||
var button = $( this ).button({
|
var button = $( this ).button({
|
||||||
icons: {
|
icon: $( this ).data( "icon" ),
|
||||||
primary: $( this ).data( "icon" )
|
showLabel: !!$( this ).attr( "title" )
|
||||||
},
|
|
||||||
text: !!$( this ).attr( "title" )
|
|
||||||
});
|
});
|
||||||
button.not( ".menu" ).on( "click", function() {
|
button.not( ".menu" ).on( "click", function() {
|
||||||
notify( button );
|
notify( button );
|
||||||
|
@ -72,15 +72,11 @@
|
|||||||
|
|
||||||
$( "#button1" ).button();
|
$( "#button1" ).button();
|
||||||
$( "#button2" ).button({
|
$( "#button2" ).button({
|
||||||
icons: {
|
icon: "ui-icon-wrench"
|
||||||
primary: "ui-icon-wrench"
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
$( "#button3, #button4" ).button({
|
$( "#button3, #button4" ).button({
|
||||||
icons: {
|
icon: "ui-icon-wrench",
|
||||||
primary: "ui-icon-wrench"
|
showLabel: false
|
||||||
},
|
|
||||||
text: false
|
|
||||||
});
|
});
|
||||||
$( "#buttons" ).tooltip({
|
$( "#buttons" ).tooltip({
|
||||||
position: {
|
position: {
|
||||||
|
Loading…
Reference in New Issue
Block a user