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

demos/dialog/animated.html
demos/dialog/default.html
demos/dialog/modal-confirmation.html
demos/dialog/modal-form.html
demos/dialog/modal-message.html

index 02c3fd31fe92bbb52531dc0c7a87f238b786f050..088ca0ea9419dd6169c2d266391aa27752aed603 100644 (file)
@@ -4,21 +4,9 @@
        <meta charset="utf-8">
        <title>jQuery UI Dialog - Animation</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/position.js"></script>
-       <script src="../../ui/resizable.js"></script>
-       <script src="../../ui/button.js"></script>
-       <script src="../../ui/dialog.js"></script>
-       <script src="../../ui/effect.js"></script>
-       <script src="../../ui/effect-blind.js"></script>
-       <script src="../../ui/effect-explode.js"></script>
        <link rel="stylesheet" href="../demos.css">
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js" data-modules="effect effect-blind effect-explode">
                $( "#dialog" ).dialog({
                        autoOpen: false,
                        show: {
@@ -34,7 +22,6 @@
                $( "#opener" ).on( "click", function() {
                        $( "#dialog" ).dialog( "open" );
                });
-       });
        </script>
 </head>
 <body>
index 41c81166824aba2163c9104f3fde5e5399561544..e86281a4782cc1b12cbe8760567b31e3e7b58cb6 100644 (file)
@@ -4,20 +4,10 @@
        <meta charset="utf-8">
        <title>jQuery UI Dialog - 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/position.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">
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#dialog" ).dialog();
-       });
        </script>
 </head>
 <body>
index 741f59d38e88791ed0476bcf4886b081ee985fe5..9ae4b1e9801fa51e7ba20265290d3a7f509d7049 100644 (file)
@@ -4,17 +4,9 @@
        <meta charset="utf-8">
        <title>jQuery UI Dialog - Modal confirmation</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/button.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/position.js"></script>
-       <script src="../../ui/dialog.js"></script>
        <link rel="stylesheet" href="../demos.css">
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $( "#dialog-confirm" ).dialog({
                        resizable: false,
                        height: "auto",
@@ -29,7 +21,6 @@
                                }
                        }
                });
-       });
        </script>
 </head>
 <body>
index 919bb0733daf10d141a5c79969d87f1b9bf71da2..7933c685a1dbf0442a3ac5a2a2383fea40ac7c31 100644 (file)
@@ -4,16 +4,6 @@
        <meta charset="utf-8">
        <title>jQuery UI Dialog - Modal form</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/button.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/position.js"></script>
-       <script src="../../ui/resizable.js"></script>
-       <script src="../../ui/dialog.js"></script>
-       <script src="../../ui/effect.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
                label, input { display:block; }
@@ -26,8 +16,8 @@
                .ui-dialog .ui-state-error { padding: .3em; }
                .validateTips { border: 1px solid transparent; padding: 0.3em; }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js" data-modules="effect">
                var dialog, form,
 
                        // From http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29
                $( "#create-user" ).button().on( "click", function() {
                        dialog.dialog( "open" );
                });
-       });
        </script>
 </head>
 <body>
index ce04bd66c138c582acabf3e1b6f370c1ec320919..137884627588e5c750c61bf05b964b378da0aa67 100644 (file)
@@ -4,18 +4,9 @@
        <meta charset="utf-8">
        <title>jQuery UI Dialog - Modal message</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/button.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/position.js"></script>
-       <script src="../../ui/resizable.js"></script>
-       <script src="../../ui/dialog.js"></script>
        <link rel="stylesheet" href="../demos.css">
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js" data-modules="effect">
                $( "#dialog-message" ).dialog({
                        modal: true,
                        buttons: {
@@ -24,7 +15,6 @@
                                }
                        }
                });
-       });
        </script>
 </head>
 <body>