]> source.dussan.org Git - jquery-ui.git/commitdiff
Selectmenu: Update demos to use AMD
authorAlexander Schmitz <arschmitz@gmail.com>
Wed, 1 Jul 2015 02:53:45 +0000 (22:53 -0400)
committerAlexander Schmitz <arschmitz@gmail.com>
Tue, 21 Jul 2015 15:00:42 +0000 (11:00 -0400)
Ref #10119

demos/selectmenu/custom_render.html
demos/selectmenu/default.html
demos/selectmenu/product-selection.html

index ec0b4b6d5d3e8c5905731399b8f826f4a0b2c7ea..b77aaf6631eda4dbd682d0ae9a943685d814e420 100644 (file)
@@ -5,15 +5,9 @@
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>jQuery UI Selectmenu - Custom Rendering</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/position.js"></script>
-       <script src="../../ui/menu.js"></script>
-       <script src="../../ui/selectmenu.js"></script>
        <link rel="stylesheet" href="../demos.css">
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                $.widget( "custom.iconselectmenu", $.ui.selectmenu, {
                        _renderItem: function( ul, item ) {
                                var li = $( "<li>" ),
@@ -47,7 +41,6 @@
                        .iconselectmenu()
                        .iconselectmenu( "menuWidget")
                                .addClass( "ui-menu-icons avatar" );
-       });
        </script>
        <style>
                h2 {
index 5fa1af28b9dc03abfff7bb42e40022c31e3c6fa1..e8bb1a6a74f8e8223d4dc19f2937f7663a3f03ce 100644 (file)
@@ -5,27 +5,7 @@
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>jQuery UI Selectmenu - 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/position.js"></script>
-       <script src="../../ui/menu.js"></script>
-       <script src="../../ui/selectmenu.js"></script>
        <link rel="stylesheet" href="../demos.css">
-       <script>
-       $(function() {
-               $( "#speed" ).selectmenu();
-
-               $( "#files" ).selectmenu();
-
-               $( "#number" )
-                       .selectmenu()
-                       .selectmenu( "menuWidget" )
-                               .addClass( "overflow" );
-
-               $( "#salutation" ).selectmenu();
-       });
-       </script>
        <style>
                fieldset {
                        border: 0;
                        height: 200px;
                }
        </style>
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
+               $( "#speed" ).selectmenu();
+
+               $( "#files" ).selectmenu();
+
+               $( "#number" )
+                       .selectmenu()
+                       .selectmenu( "menuWidget" )
+                               .addClass( "overflow" );
+
+               $( "#salutation" ).selectmenu();
+       </script>
 </head>
 <body>
 
index e759ea36a4040b9240cc038be9647447edbb5bc9..a6f1a2203ff1441dff4e90b1d38faf89ba1a2737 100644 (file)
@@ -5,33 +5,7 @@
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>jQuery UI Selectmenu - Product Selection</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/position.js"></script>
-       <script src="../../ui/menu.js"></script>
-       <script src="../../ui/selectmenu.js"></script>
        <link rel="stylesheet" href="../demos.css">
-       <script>
-       $(function() {
-               var circle = $( "#circle" );
-
-               $( "#radius" ).selectmenu({
-                       change: function( event, data ) {
-                               circle.css({
-                                       width: data.item.value,
-                                       height: data.item.value
-                               });
-                       }
-                });
-
-               $( "#color" ).selectmenu({
-                        change: function( event, data ) {
-                                circle.css( "background", data.item.value );
-                        }
-                });
-       });
-       </script>
        <style>
                fieldset {
                        border: 0;
                        height: 150px;
                }
        </style>
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
+               var circle = $( "#circle" );
+
+               $( "#radius" ).selectmenu({
+                       change: function( event, data ) {
+                               circle.css({
+                                       width: data.item.value,
+                                       height: data.item.value
+                               });
+                       }
+                });
+
+               $( "#color" ).selectmenu({
+                        change: function( event, data ) {
+                                circle.css( "background", data.item.value );
+                        }
+                });
+       </script>
 </head>
 <body>