]> source.dussan.org Git - jquery-ui.git/commitdiff
Droppable: Update demos to use AMD
authorAlexander Schmitz <arschmitz@gmail.com>
Tue, 30 Jun 2015 21:18:16 +0000 (17:18 -0400)
committerAlexander Schmitz <arschmitz@gmail.com>
Tue, 21 Jul 2015 15:00:41 +0000 (11:00 -0400)
Ref #10119

demos/droppable/accepted-elements.html
demos/droppable/default.html
demos/droppable/photo-manager.html
demos/droppable/propagation.html
demos/droppable/revert.html
demos/droppable/visual-feedback.html

index 2a50295260d7ab3312a76c61b5b963bb4272591c..b073087e25ab88a5df3c7260bb2a3b524b5a4612 100644 (file)
@@ -4,19 +4,13 @@
        <meta charset="utf-8">
        <title>jQuery UI Droppable - Accept</title>
        <link rel="stylesheet" href="../../themes/base/all.css">
-       <script src="../../external/jquery/jquery.js"></script>
-       <script src="../../ui/core.js"></script>
-       <script src="../../ui/widget.js"></script>
-       <script src="../../ui/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/droppable.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
        #draggable, #draggable-nonvalid { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#draggable, #draggable-nonvalid" ).draggable();
                $( "#droppable" ).droppable({
                        accept: "#draggable",
@@ -31,7 +25,6 @@
                                                .html( "Dropped!" );
                        }
                });
-       });
        </script>
 </head>
 <body>
index a097e7183744a9abb709b48b01996ebc99c06658..0ed58cae315c6d57ea1c9be024b8a8f6dc2f8491 100644 (file)
@@ -4,19 +4,13 @@
        <meta charset="utf-8">
        <title>jQuery UI Droppable - Default functionality</title>
        <link rel="stylesheet" href="../../themes/base/all.css">
-       <script src="../../external/jquery/jquery.js"></script>
-       <script src="../../ui/core.js"></script>
-       <script src="../../ui/widget.js"></script>
-       <script src="../../ui/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/droppable.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#draggable" ).draggable();
                $( "#droppable" ).droppable({
                        drop: function( event, ui ) {
@@ -26,7 +20,6 @@
                                                .html( "Dropped!" );
                        }
                });
-       });
        </script>
 </head>
 <body>
index 39afa9c325a0b793711a066702311ca1f99ae5ea..2b324c1e96109312727374197ca25db0eeacf92b 100644 (file)
@@ -4,16 +4,6 @@
        <meta charset="utf-8">
        <title>jQuery UI Droppable - Simple photo manager</title>
        <link rel="stylesheet" href="../../themes/base/all.css">
-       <script src="../../external/jquery/jquery.js"></script>
-       <script src="../../ui/position.js"></script>
-       <script src="../../ui/core.js"></script>
-       <script src="../../ui/widget.js"></script>
-       <script src="../../ui/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/droppable.js"></script>
-       <script src="../../ui/resizable.js"></script>
-       <script src="../../ui/button.js"></script>
-       <script src="../../ui/dialog.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #gallery { float: left; width: 65%; min-height: 12em; }
@@ -29,8 +19,9 @@
        #trash h4 .ui-icon { float: left; }
        #trash .gallery h5 { display: none; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js" data-modules="dialog">
+
                // there's the gallery and the trash
                var $gallery = $( "#gallery" ),
                        $trash = $( "#trash" );
 
                        return false;
                });
-       });
        </script>
 </head>
 <body>
index 99fb21711876bfa7aa67b9648169e41710d84ae3..048c847f3e55ec28feb887e0e1b2f37d1ec362fb 100644 (file)
@@ -4,20 +4,14 @@
        <meta charset="utf-8">
        <title>jQuery UI Droppable - Prevent propagation</title>
        <link rel="stylesheet" href="../../themes/base/all.css">
-       <script src="../../external/jquery/jquery.js"></script>
-       <script src="../../ui/core.js"></script>
-       <script src="../../ui/widget.js"></script>
-       <script src="../../ui/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/droppable.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #draggable { width: 100px; height: 40px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        #droppable, #droppable2 { width: 230px; height: 120px; padding: 0.5em; float: left; margin: 10px; }
        #droppable-inner, #droppable2-inner { width: 170px; height: 60px; padding: 0.5em; float: left; margin: 10px; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#draggable" ).draggable();
 
                $( "#droppable, #droppable-inner" ).droppable({
@@ -47,7 +41,6 @@
                                                .html( "Dropped!" );
                        }
                });
-       });
        </script>
 </head>
 <body>
index f34801e90a62e48a2e07d25963a36870303612b6..2a05f0169a979eaad2c2817dec4492d001f2bc2f 100644 (file)
@@ -4,19 +4,13 @@
        <meta charset="utf-8">
        <title>jQuery UI Droppable - Revert draggable position</title>
        <link rel="stylesheet" href="../../themes/base/all.css">
-       <script src="../../external/jquery/jquery.js"></script>
-       <script src="../../ui/core.js"></script>
-       <script src="../../ui/widget.js"></script>
-       <script src="../../ui/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/droppable.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#draggable" ).draggable({ revert: "valid" });
                $( "#draggable2" ).draggable({ revert: "invalid" });
 
@@ -32,7 +26,6 @@
                                                .html( "Dropped!" );
                        }
                });
-       });
        </script>
 </head>
 <body>
index 9852f371b05a5faae9bf69de721efaef88ebf607..3ef5cd1e2f8cfd742f027238b78eb04ffa248e88 100644 (file)
@@ -4,20 +4,14 @@
        <meta charset="utf-8">
        <title>jQuery UI Droppable - Visual feedback</title>
        <link rel="stylesheet" href="../../themes/base/all.css">
-       <script src="../../external/jquery/jquery.js"></script>
-       <script src="../../ui/core.js"></script>
-       <script src="../../ui/widget.js"></script>
-       <script src="../../ui/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/droppable.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #draggable, #draggable2 { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        #droppable, #droppable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 10px; }
        h3 { clear: left; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#draggable" ).draggable();
                $( "#droppable" ).droppable({
                        classes: {
@@ -44,7 +38,6 @@
                                                .html( "Dropped!" );
                        }
                });
-       });
        </script>
 </head>
 <body>