]> source.dussan.org Git - jquery-ui.git/commitdiff
Effect: Remove demos & visual tests of the transfer effect
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 16 Sep 2024 15:16:40 +0000 (17:16 +0200)
committerGitHub <noreply@github.com>
Mon, 16 Sep 2024 15:16:40 +0000 (17:16 +0200)
The transfer effect is deprecated and not present unless `$.uiBackCompat` is set
to `true`. In previous UI versions, the default was including the backwards
compat layer so these demos & tests worked; now they do not by default. Just
remove them.

Fixes gh-2278
Closes gh-2291

demos/effect/default.html
tests/visual/effects/all.html
tests/visual/effects/effects.js

index 7d69abb2d76ab9b836d29f03ccb93a0c8277b151..289d5df7ff008ef6362c8ee7abc7762cbd7c4284 100644 (file)
@@ -11,7 +11,6 @@
                #button { padding: .5em 1em; text-decoration: none; }
                #effect { width: 240px; height: 170px; padding: 0.4em; position: relative; }
                #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
-               .ui-effects-transfer { border: 2px dotted gray; }
        </style>
        <script src="../../external/requirejs/require.js"></script>
        <script src="../bootstrap.js" data-modules="effects-all">
@@ -25,8 +24,6 @@
                        // some effects have required parameters
                        if ( selectedEffect === "scale" ) {
                                options = { percent: 50 };
-                       } else if ( selectedEffect === "transfer" ) {
-                               options = { to: "#button", className: "ui-effects-transfer" };
                        } else if ( selectedEffect === "size" ) {
                                options = { to: { width: 200, height: 60 } };
                        }
@@ -75,7 +72,6 @@
        <option value="shake">Shake</option>
        <option value="size">Size</option>
        <option value="slide">Slide</option>
-       <option value="transfer">Transfer</option>
 </select>
 
 <button id="button" class="ui-state-default ui-corner-all">Run Effect</button>
index e3fa3ee487f577ddc2c26b24a0b7e276f360d2a4..f4f9c270ebac19b54cd3b958498f80ecf5db9890 100644 (file)
                </div>
        </li>
 
-       <li>
-               <div class="effect" id="transfer">
-               <p>Transfer to first element</p>
-               </div>
-       </li>
-
        <li>
                <div class="effect" id="addClass">
                <p>addClass</p>
index ebe3347f286b37f4f3ea7b02adb7fdca833a1751..5e8390abe12a87b86da86f5dec1d4ee8336fbd89 100644 (file)
@@ -83,14 +83,6 @@ effect( "#slideUp", "slide", { direction: "up" } );
 effect( "#slideLeft", "slide", { direction: "left" } );
 effect( "#slideRight", "slide", { direction: "right" } );
 
-$( "#transfer" ).on( "click", function() {
-       $( this )
-               .addClass( "current" )
-               .effect( "transfer", { to: $( "div" ).eq( 0 ) }, 1000, function() {
-                       $( this ).removeClass( "current" );
-               } );
-} );
-
 $( "#addClass" ).on( "click", function() {
        $( this ).addClass( "current", duration, function() {
                $( this ).removeClass( "current" );