]> source.dussan.org Git - jquery-ui.git/commitdiff
Demos: Remove deprecated button APIs
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 30 Sep 2024 16:05:22 +0000 (18:05 +0200)
committerGitHub <noreply@github.com>
Mon, 30 Sep 2024 16:05:22 +0000 (18:05 +0200)
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

demos/autocomplete/combobox.html
demos/tooltip/video-player.html
tests/visual/tooltip/tooltip.html

index 9fc997c11bf10ba912835c9450bd7ebe37950131..afe30134906a86fb9b60116dc9754b85403410d8 100644 (file)
                                        .tooltip()
                                        .appendTo( this.wrapper )
                                        .button({
-                                               icons: {
-                                                       primary: "ui-icon-triangle-1-s"
-                                               },
-                                               text: false
+                                               icon: "ui-icon-triangle-1-s",
+                                               showLabel: false
                                        })
                                        .removeClass( "ui-corner-all" )
                                        .addClass( "custom-combobox-toggle ui-corner-right" )
index 74db642aa1f51229db643dfa57defc93901f7581..c7601b7478ff76f0bb7d213a89671237cbd70d8d 100644 (file)
 
                $( "button" ).each(function() {
                        var button = $( this ).button({
-                               icons: {
-                                       primary: $( this ).data( "icon" )
-                               },
-                               text: !!$( this ).attr( "title" )
+                               icon: $( this ).data( "icon" ),
+                               showLabel: !!$( this ).attr( "title" )
                        });
                        button.not( ".menu" ).on( "click", function() {
                                notify( button );
index 9453190d727fab0a7edecd7b256d9ecd65ab4d57..a5e12b944e3856a276302e8bc02ba3d0f22daf76 100644 (file)
 
                $( "#button1" ).button();
                $( "#button2" ).button({
-                       icons: {
-                               primary: "ui-icon-wrench"
-                       }
+                       icon: "ui-icon-wrench"
                });
                $( "#button3, #button4" ).button({
-                       icons: {
-                               primary: "ui-icon-wrench"
-                       },
-                       text: false
+                       icon: "ui-icon-wrench",
+                       showLabel: false
                });
                $( "#buttons" ).tooltip({
                        position: {