diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-06-30 23:34:08 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-07-21 11:00:42 -0400 |
commit | ebb8bbf16884cead816830711739181e27ff18de (patch) | |
tree | 8ee189625b687f744ea71dddab099294dd286a90 /demos | |
parent | 19328423fe0fae1381319911357dc9ad12c3d274 (diff) | |
download | jquery-ui-ebb8bbf16884cead816830711739181e27ff18de.tar.gz jquery-ui-ebb8bbf16884cead816830711739181e27ff18de.zip |
Spinner: Update demos to use AMD
Ref #10119
Diffstat (limited to 'demos')
-rw-r--r-- | demos/spinner/currency.html | 14 | ||||
-rw-r--r-- | demos/spinner/decimal.html | 14 | ||||
-rw-r--r-- | demos/spinner/default.html | 11 | ||||
-rw-r--r-- | demos/spinner/latlong.html | 13 | ||||
-rw-r--r-- | demos/spinner/overflow.html | 11 | ||||
-rw-r--r-- | demos/spinner/time.html | 53 |
6 files changed, 33 insertions, 83 deletions
diff --git a/demos/spinner/currency.html b/demos/spinner/currency.html index 0509e80a0..c19a1b816 100644 --- a/demos/spinner/currency.html +++ b/demos/spinner/currency.html @@ -4,18 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Spinner - Currency</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/jquery-mousewheel/jquery.mousewheel.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize.culture.de-DE.js"></script> - <script src="../../external/globalize/globalize.culture.ja-JP.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/spinner.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/globalize/globalize external/globalize/globalize.culture.de-DE external/globalize/globalize.culture.ja-JP external/jquery-mousewheel/jquery.mousewheel"> $( "#currency" ).on( "change", function() { $( "#spinner" ).spinner( "option", "culture", $( this ).val() ); }); @@ -27,7 +18,6 @@ start: 1000, numberFormat: "C" }); - }); </script> </head> <body> diff --git a/demos/spinner/decimal.html b/demos/spinner/decimal.html index 6c3df9439..680d7b3d3 100644 --- a/demos/spinner/decimal.html +++ b/demos/spinner/decimal.html @@ -4,18 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Spinner - Decimal</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/jquery-mousewheel/jquery.mousewheel.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize.culture.de-DE.js"></script> - <script src="../../external/globalize/globalize.culture.ja-JP.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/spinner.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/globalize/globalize external/globalize/globalize.culture.de-DE external/globalize/globalize.culture.ja-JP external/jquery-mousewheel/jquery.mousewheel"> $( "#spinner" ).spinner({ step: 0.01, numberFormat: "n" @@ -26,7 +17,6 @@ Globalize.culture( $(this).val() ); $( "#spinner" ).spinner( "value", current ); }); - }); </script> </head> <body> diff --git a/demos/spinner/default.html b/demos/spinner/default.html index 328d4d13c..3d08a60bb 100644 --- a/demos/spinner/default.html +++ b/demos/spinner/default.html @@ -4,15 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Spinner - Default functionality</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/jquery-mousewheel/jquery.mousewheel.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/spinner.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/jquery-mousewheel/jquery.mousewheel"> var spinner = $( "#spinner" ).spinner(); $( "#disable" ).on( "click", function() { @@ -37,7 +31,6 @@ }); $( "button" ).button(); - }); </script> </head> <body> diff --git a/demos/spinner/latlong.html b/demos/spinner/latlong.html index 2921cc076..9c67de0f9 100644 --- a/demos/spinner/latlong.html +++ b/demos/spinner/latlong.html @@ -4,16 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Spinner - Map</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="http://maps.google.com/maps/api/js?sensor=false"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/jquery-mousewheel/jquery.mousewheel.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/spinner.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="http://maps.google.com/maps/api/js?sensor=false"></script> + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/jquery-mousewheel/jquery.mousewheel"> function latlong() { return new google.maps.LatLng( $("#lat").val(), $("#lng").val() ); } @@ -31,7 +25,6 @@ center: latlong(), mapTypeId: google.maps.MapTypeId.ROADMAP }); - }); </script> <style> #map { diff --git a/demos/spinner/overflow.html b/demos/spinner/overflow.html index 0b4985d29..80e3981fc 100644 --- a/demos/spinner/overflow.html +++ b/demos/spinner/overflow.html @@ -4,15 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Spinner - Overflow</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/jquery-mousewheel/jquery.mousewheel.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/spinner.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/jquery-mousewheel/jquery.mousewheel"> $( "#spinner" ).spinner({ spin: function( event, ui ) { if ( ui.value > 10 ) { @@ -24,7 +18,6 @@ } } }); - }); </script> </head> <body> diff --git a/demos/spinner/time.html b/demos/spinner/time.html index 229b0e6b4..ff27b1b75 100644 --- a/demos/spinner/time.html +++ b/demos/spinner/time.html @@ -4,41 +4,33 @@ <meta charset="utf-8"> <title>jQuery UI Spinner - Time</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/jquery-mousewheel/jquery.mousewheel.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize.culture.de-DE.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/spinner.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $.widget( "ui.timespinner", $.ui.spinner, { - options: { - // seconds - step: 60 * 1000, - // hours - page: 60 - }, + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/globalize/globalize external/globalize/globalize.culture.de-DE external/jquery-mousewheel/jquery.mousewheel"> + $.widget( "ui.timespinner", $.ui.spinner, { + options: { + // seconds + step: 60 * 1000, + // hours + page: 60 + }, - _parse: function( value ) { - if ( typeof value === "string" ) { - // already a timestamp - if ( Number( value ) == value ) { - return Number( value ); + _parse: function( value ) { + if ( typeof value === "string" ) { + // already a timestamp + if ( Number( value ) == value ) { + return Number( value ); + } + return +Globalize.parseDate( value ); } - return +Globalize.parseDate( value ); - } - return value; - }, + return value; + }, - _format: function( value ) { - return Globalize.format( new Date(value), "t" ); - } - }); + _format: function( value ) { + return Globalize.format( new Date(value), "t" ); + } + }); - $(function() { $( "#spinner" ).timespinner(); $( "#culture" ).on( "change", function() { @@ -46,7 +38,6 @@ Globalize.culture( $(this).val() ); $( "#spinner" ).timespinner( "value", current ); }); - }); </script> </head> <body> |