diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-08-20 09:48:11 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-08-20 09:48:11 -0400 |
commit | 31d9184aa3d5411db11834bd738547775fad487a (patch) | |
tree | 0a13f424bf7b061f03a33fa8f9d16132a5b64790 | |
parent | 8bd40304433004dd955fcbf925ed4f24502bfeb5 (diff) | |
parent | caf6f2dc84295878f0a692b540e6f910b2a1d505 (diff) | |
download | jquery-ui-31d9184aa3d5411db11834bd738547775fad487a.tar.gz jquery-ui-31d9184aa3d5411db11834bd738547775fad487a.zip |
Merge branch 'master' into datepicker
297 files changed, 1478 insertions, 2082 deletions
@@ -6,7 +6,6 @@ "expr": true, "immed": true, "noarg": true, - "onevar": true, "quotmark": "double", "smarttabs": true, "trailing": true, diff --git a/Gruntfile.js b/Gruntfile.js index ee949a3f5..85dfb42be 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,30 +24,6 @@ var allI18nFiles = expandFiles( "ui/i18n/*.js" ), - cssFiles = [ - "core", - "accordion", - "autocomplete", - "calendar", - "button", - "datepicker", - "dialog", - "draggable", - "menu", - "progressbar", - "resizable", - "selectable", - "selectmenu", - "sortable", - "slider", - "spinner", - "tabs", - "tooltip", - "theme" - ].map(function( component ) { - return "themes/base/" + component + ".css"; - }), - // minified files minify = { options: { @@ -150,33 +126,30 @@ grunt.initConfig({ dist: "<%= pkg.name %>-<%= pkg.version %>" }, compare_size: compareFiles, - concat: { - ui: { - options: { - banner: createBanner( uiFiles ), - stripBanners: { - block: true - } - }, - src: uiFiles, - dest: "dist/jquery-ui.js" - }, - i18n: { - options: { - banner: createBanner( allI18nFiles ) - }, - src: allI18nFiles, - dest: "dist/i18n/jquery-ui-i18n.js" - }, - css: { + requirejs: { + js: { options: { - banner: createBanner( cssFiles ), - stripBanners: { - block: true + baseUrl: "./", + paths: { + jquery: "./external/jquery/jquery", + external: "./external/" + }, + preserveLicenseComments: false, + optimize: "none", + findNestedDependencies: true, + skipModuleInsertion: true, + exclude: [ "jquery" ], + include: expandFiles( [ + "ui/**/*.js", + "!ui/widgets/calendar.js", + "!ui/widgets/datepicker.js", + "!ui/i18n/*" + ] ), + out: "dist/jquery-ui.js", + wrap: { + start: createBanner( uiFiles ), } - }, - src: cssFiles, - dest: "dist/jquery-ui.css" + } } }, @@ -202,13 +175,31 @@ grunt.initConfig({ requireSpacesInsideParentheses: null }, src: [ "Gruntfile.js", "build/tasks/*.js" ] + }, + demos: { + options: { + + // While the style guide removed onevar upgrading jscs to allow it causes too many + // errors right now + disallowMultipleVarDecl: null + }, + src: "demos/**/*.js" } }, uglify: minify, htmllint: { - good: [ "demos/**/*.html", "tests/**/*.html" ].concat( htmllintBad.map( function( file ) { + good: [ "tests/**/*.html" ].concat( htmllintBad.map( function( file ) { return "!" + file; } ) ), + demos: { + options: { + ignore: [ + /The text content of element “script” was not in the required format: Expected space, tab, newline, or slash but found “.” instead/ + ] }, + src: [ "demos/**/*.html" ].concat( htmllintBad.map( function( file ) { + return "!" + file; + } ) ) + }, bad: { options: { ignore: [ @@ -241,7 +232,8 @@ grunt.initConfig({ "Gruntfile.js", "build/**/*.js", "tests/unit/**/*.js", - "tests/lib/**/*.js" + "tests/lib/**/*.js", + "demos/**/*.js" ] }, csslint: { @@ -447,10 +439,10 @@ grunt.registerTask( "update-authors", function() { }); }); -grunt.registerTask( "default", [ "lint", "test" ]); +grunt.registerTask( "default", [ "lint", "requirejs", "test" ]); grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ]); grunt.registerTask( "test", [ "qunit" ]); -grunt.registerTask( "sizer", [ "concat:ui", "uglify:main", "compare_size:all" ]); -grunt.registerTask( "sizer_all", [ "concat:ui", "uglify", "compare_size" ]); +grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ]); +grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ]); }; @@ -33,7 +33,7 @@ You can also run the unit tests inside phantomjs by [setting up your environment jQuery UI uses the [Grunt](http://gruntjs.com/) build system. -To build jQuery UI, [setup your environment](CONTRIBUTING.md#environment-minimum-required) and then run the following commands: +To build jQuery UI, [set up your environment](CONTRIBUTING.md#environment-minimum-required) and then run the following commands: ```sh # Run the concat task to concatenate files diff --git a/demos/accordion/collapsible.html b/demos/accordion/collapsible.html index 8002e6556..913e82aa5 100644 --- a/demos/accordion/collapsible.html +++ b/demos/accordion/collapsible.html @@ -4,17 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Accordion - Collapse content</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/accordion.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#accordion" ).accordion({ collapsible: true }); - }); </script> </head> <body> diff --git a/demos/accordion/custom-icons.html b/demos/accordion/custom-icons.html index 9d43c3c8b..4828ffd45 100644 --- a/demos/accordion/custom-icons.html +++ b/demos/accordion/custom-icons.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Accordion - Customize icons</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/accordion.js"></script> - <script src="../../ui/button.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="button"> var icons = { header: "ui-icon-circle-arrow-e", activeHeader: "ui-icon-circle-arrow-s" @@ -26,7 +21,6 @@ $( "#accordion" ).accordion( "option", "icons", icons ); } }); - }); </script> </head> <body> diff --git a/demos/accordion/default.html b/demos/accordion/default.html index e5476378b..cbe8016b6 100644 --- a/demos/accordion/default.html +++ b/demos/accordion/default.html @@ -4,15 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Accordion - 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/accordion.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#accordion" ).accordion(); - }); </script> </head> <body> diff --git a/demos/accordion/fillspace.html b/demos/accordion/fillspace.html index 0bc503c61..b1d41777b 100644 --- a/demos/accordion/fillspace.html +++ b/demos/accordion/fillspace.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Accordion - Fill space</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/resizable.js"></script> - <script src="../../ui/accordion.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #accordion-resizer { @@ -18,13 +12,12 @@ height: 220px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="resizable"> $( "#accordion" ).accordion({ heightStyle: "fill" }); - }); - $(function() { + $( "#accordion-resizer" ).resizable({ minHeight: 140, minWidth: 200, @@ -32,7 +25,6 @@ $( "#accordion" ).accordion( "refresh" ); } }); - }); </script> </head> <body> diff --git a/demos/accordion/hoverintent.html b/demos/accordion/hoverintent.html deleted file mode 100644 index ad15721f3..000000000 --- a/demos/accordion/hoverintent.html +++ /dev/null @@ -1,148 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <title>jQuery UI Accordion - Open on hoverintent</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/accordion.js"></script> - <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { - $( "#accordion" ).accordion({ - event: "click hoverintent" - }); - }); - - /* - * hoverIntent | Copyright 2011 Brian Cherne - * http://cherne.net/brian/resources/jquery.hoverIntent.html - * modified by the jQuery UI team - */ - $.event.special.hoverintent = { - setup: function() { - $( this ).on( "mouseover", jQuery.event.special.hoverintent.handler ); - }, - teardown: function() { - $( this ).off( "mouseover", jQuery.event.special.hoverintent.handler ); - }, - handler: function( event ) { - var currentX, currentY, timeout, - args = arguments, - target = $( event.target ), - previousX = event.pageX, - previousY = event.pageY; - - function track( event ) { - currentX = event.pageX; - currentY = event.pageY; - }; - - function clear() { - target - .off( "mousemove", track ) - .off( "mouseout", clear ); - clearTimeout( timeout ); - } - - function handler() { - var prop, - orig = event; - - if ( ( Math.abs( previousX - currentX ) + - Math.abs( previousY - currentY ) ) < 7 ) { - clear(); - - event = $.Event( "hoverintent" ); - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - // Prevent accessing the original event since the new event - // is fired asynchronously and the old event is no longer - // usable (#6028) - delete event.originalEvent; - - target.trigger( event ); - } else { - previousX = currentX; - previousY = currentY; - timeout = setTimeout( handler, 100 ); - } - } - - timeout = setTimeout( handler, 100 ); - target.on({ - mousemove: track, - mouseout: clear - }); - } - }; - </script> -</head> -<body> - -<div id="accordion"> - <h3>Section 1</h3> - <div> - <p> - Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer - ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit - amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut - odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. - </p> - </div> - <h3>Section 2</h3> - <div> - <p> - Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet - purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor - velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In - suscipit faucibus urna. - </p> - </div> - <h3>Section 3</h3> - <div> - <p> - Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. - Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero - ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis - lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. - </p> - <ul> - <li>List item one</li> - <li>List item two</li> - <li>List item three</li> - </ul> - </div> - <h3>Section 4</h3> - <div> - <p> - Cras dictum. Pellentesque habitant morbi tristique senectus et netus - et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in - faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia - mauris vel est. - </p> - <p> - Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. - Class aptent taciti sociosqu ad litora torquent per conubia nostra, per - inceptos himenaeos. - </p> - </div> -</div> - -<div class="demo-description"> -<p> -Click headers to expand/collapse content that is broken into logical sections, much like tabs. -Optionally, toggle sections open/closed on mouseover. -</p> -<p> -The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is -usable without JavaScript. -</p> -</div> -</body> -</html> diff --git a/demos/accordion/index.html b/demos/accordion/index.html index 1d8a2892d..4f364a299 100644 --- a/demos/accordion/index.html +++ b/demos/accordion/index.html @@ -12,7 +12,6 @@ <li><a href="fillspace.html">Fill space</a></li> <li><a href="no-auto-height.html">No auto height</a></li> <li><a href="collapsible.html">Collapse content</a></li> - <li><a href="hoverintent.html">Open on hoverintent</a></li> <li><a href="custom-icons.html">Customize icons</a></li> <li><a href="sortable.html">Sortable</a></li> </ul> diff --git a/demos/accordion/no-auto-height.html b/demos/accordion/no-auto-height.html index c1375c3ef..48626ead0 100644 --- a/demos/accordion/no-auto-height.html +++ b/demos/accordion/no-auto-height.html @@ -4,17 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Accordion - No auto height</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/accordion.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#accordion" ).accordion({ heightStyle: "content" }); - }); </script> </head> <body> diff --git a/demos/accordion/sortable.html b/demos/accordion/sortable.html index 13356995f..6e66c2e9c 100644 --- a/demos/accordion/sortable.html +++ b/demos/accordion/sortable.html @@ -4,19 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Accordion - Sortable</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/sortable.js"></script> - <script src="../../ui/accordion.js"></script> <link rel="stylesheet" href="../demos.css"> - <style> - /* IE has layout issues when sorting (see #5413) */ - .group { zoom: 1 } - </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="sortable"> $( "#accordion" ) .accordion({ header: "> div > h3" @@ -33,7 +23,6 @@ $( this ).accordion( "refresh" ); } }); - }); </script> </head> <body> diff --git a/demos/autocomplete/categories.html b/demos/autocomplete/categories.html index d986fdb11..d2a107b53 100644 --- a/demos/autocomplete/categories.html +++ b/demos/autocomplete/categories.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Categories</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete-category { @@ -19,31 +13,29 @@ line-height: 1.5; } </style> - <script> - $.widget( "custom.catcomplete", $.ui.autocomplete, { - _create: function() { - this._super(); - this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" ); - }, - _renderMenu: function( ul, items ) { - var that = this, - currentCategory = ""; - $.each( items, function( index, item ) { - var li; - if ( item.category != currentCategory ) { - ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" ); - currentCategory = item.category; - } - li = that._renderItemData( ul, item ); - if ( item.category ) { - li.attr( "aria-label", item.category + " : " + item.label ); - } - }); - } - }); - </script> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> + $.widget( "custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" ); + }, + _renderMenu: function( ul, items ) { + var that = this, + currentCategory = ""; + $.each( items, function( index, item ) { + var li; + if ( item.category != currentCategory ) { + ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" ); + currentCategory = item.category; + } + li = that._renderItemData( ul, item ); + if ( item.category ) { + li.attr( "aria-label", item.category + " : " + item.label ); + } + }); + } + }); var data = [ { label: "anders", category: "" }, { label: "andreas", category: "" }, @@ -60,7 +52,6 @@ delay: 0, source: data }); - }); </script> </head> <body> diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index 76d792470..409e64d7c 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -4,14 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Combobox</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/button.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/menu.js"></script> - <script src="../../ui/autocomplete.js"></script> - <script src="../../ui/tooltip.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .custom-combobox { @@ -30,8 +22,8 @@ padding: 5px 10px; } </style> - <script> - (function( $ ) { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="tooltip button"> $.widget( "custom.combobox", { _create: function() { this.wrapper = $( "<span>" ) @@ -161,14 +153,11 @@ this.element.show(); } }); - })( jQuery ); - $(function() { $( "#combobox" ).combobox(); $( "#toggle" ).on( "click", function() { $( "#combobox" ).toggle(); }); - }); </script> </head> <body> diff --git a/demos/autocomplete/custom-data.html b/demos/autocomplete/custom-data.html index 1c94a877a..06a777440 100644 --- a/demos/autocomplete/custom-data.html +++ b/demos/autocomplete/custom-data.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Custom data and display</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #project-label { @@ -27,8 +21,8 @@ padding: 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var projects = [ { value: "jquery", @@ -71,7 +65,6 @@ .append( "<div>" + item.label + "<br>" + item.desc + "</div>" ) .appendTo( ul ); }; - }); </script> </head> <body> diff --git a/demos/autocomplete/default.html b/demos/autocomplete/default.html index f0ade5ea7..49e575898 100644 --- a/demos/autocomplete/default.html +++ b/demos/autocomplete/default.html @@ -4,15 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - 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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var availableTags = [ "ActionScript", "AppleScript", @@ -40,7 +34,6 @@ $( "#tags" ).autocomplete({ source: availableTags }); - }); </script> </head> <body> diff --git a/demos/autocomplete/folding.html b/demos/autocomplete/folding.html index 405809402..98bc6bbb7 100644 --- a/demos/autocomplete/folding.html +++ b/demos/autocomplete/folding.html @@ -4,15 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Accent folding</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var names = [ "Jörn Zaefferer", "Scott González", "John Resig" ]; var accentMap = { @@ -36,7 +30,6 @@ }) ); } }); - }); </script> </head> <body> diff --git a/demos/autocomplete/maxheight.html b/demos/autocomplete/maxheight.html index 9d7961591..8f65169c1 100644 --- a/demos/autocomplete/maxheight.html +++ b/demos/autocomplete/maxheight.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Scrollable results</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete { @@ -25,8 +19,8 @@ height: 100px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var availableTags = [ "ActionScript", "AppleScript", @@ -54,7 +48,6 @@ $( "#tags" ).autocomplete({ source: availableTags }); - }); </script> </head> <body> diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html index 45f319865..f263cf75c 100644 --- a/demos/autocomplete/multiple-remote.html +++ b/demos/autocomplete/multiple-remote.html @@ -4,20 +4,14 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Multiple, remote</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete-loading { background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> function split( val ) { return val.split( /,\s*/ ); } @@ -62,7 +56,6 @@ return false; } }); - }); </script> </head> <body> diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html index 1bd70f228..5ee4edb0a 100644 --- a/demos/autocomplete/multiple.html +++ b/demos/autocomplete/multiple.html @@ -4,15 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Multiple values</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var availableTags = [ "ActionScript", "AppleScript", @@ -75,7 +69,6 @@ return false; } }); - }); </script> </head> <body> diff --git a/demos/autocomplete/remote-jsonp.html b/demos/autocomplete/remote-jsonp.html index 0d71dae9a..3c2f4921f 100644 --- a/demos/autocomplete/remote-jsonp.html +++ b/demos/autocomplete/remote-jsonp.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Remote JSONP datasource</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete-loading { @@ -17,8 +11,8 @@ } #city { width: 25em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> function log( message ) { $( "<div>" ).text( message ).prependTo( "#log" ); $( "#log" ).scrollTop( 0 ); @@ -44,7 +38,6 @@ log( "Selected: " + ui.item.label ); } } ); - } ); </script> </head> <body> diff --git a/demos/autocomplete/remote-with-cache.html b/demos/autocomplete/remote-with-cache.html index 1eea5eff1..4ab2fdefb 100644 --- a/demos/autocomplete/remote-with-cache.html +++ b/demos/autocomplete/remote-with-cache.html @@ -4,20 +4,14 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Remote with caching</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete-loading { background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var cache = {}; $( "#birds" ).autocomplete({ minLength: 2, @@ -34,7 +28,6 @@ }); } }); - }); </script> </head> <body> diff --git a/demos/autocomplete/remote.html b/demos/autocomplete/remote.html index 95d2ae49c..1993f8e6d 100644 --- a/demos/autocomplete/remote.html +++ b/demos/autocomplete/remote.html @@ -4,20 +4,14 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - Remote datasource</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete-loading { background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> function log( message ) { $( "<div>" ).text( message ).prependTo( "#log" ); $( "#log" ).scrollTop( 0 ); @@ -32,7 +26,6 @@ "Nothing selected, input was " + this.value ); } }); - }); </script> </head> <body> diff --git a/demos/autocomplete/xml.html b/demos/autocomplete/xml.html index aa0394c10..5bdf4d3cc 100644 --- a/demos/autocomplete/xml.html +++ b/demos/autocomplete/xml.html @@ -4,20 +4,14 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete - XML data parsed once</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/autocomplete.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-autocomplete-loading { background: white url("images/ui-anim_basic_16x16.gif") right center no-repeat; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> function log( message ) { $( "<div/>" ).text( message ).prependTo( "#log" ); $( "#log" ).attr( "scrollTop", 0 ); @@ -45,7 +39,6 @@ }); } }); - }); </script> </head> <body> diff --git a/demos/bootstrap.js b/demos/bootstrap.js new file mode 100644 index 000000000..2f2b3209a --- /dev/null +++ b/demos/bootstrap.js @@ -0,0 +1,107 @@ +/* globals window:true, document:true */ +( function() { + +// Find the script element +var scripts = document.getElementsByTagName( "script" ); +var script = scripts[ scripts.length - 1 ]; + +// Read the modules +var modules = script.getAttribute( "data-modules" ); +var pathParts = window.location.pathname.split( "/" ); +var effectsAll = [ + "effects/effect-blind", + "effects/effect-bounce", + "effects/effect-clip", + "effects/effect-drop", + "effects/effect-explode", + "effects/effect-fade", + "effects/effect-fold", + "effects/effect-highlight", + "effects/effect-puff", + "effects/effect-pulsate", + "effects/effect-scale", + "effects/effect-shake", + "effects/effect-size", + "effects/effect-slide" +]; +var widgets = [ + "accordion", + "autocomplete", + "button", + "calendar", + "datepicker", + "dialog", + "draggable", + "droppable", + "menu", + "mouse", + "progressbar", + "resizable", + "selectable", + "selectmenu", + "slider", + "sortable", + "spinner", + "tabs", + "tooltip" +]; + +function getPath( module ) { + for ( var i = 0; i < widgets.length; i++ ) { + if ( widgets[ i ] === module ) { + return "widgets/" + module; + } + } + for ( var j = 0; j < effectsAll.length; j++ ) { + if ( module !== "effect" && effectsAll[ j ].indexOf( module ) !== -1 ) { + return "effects/" + module; + } + } + return module; +} +function fixPaths( modules ) { + for ( var i = 0; i < modules.length; i++ ) { + modules[ i ] = getPath( modules[ i ] ); + } + return modules; +} + +// Hide the page while things are loading to prevent a FOUC +document.documentElement.className = "demo-loading"; + +require.config( { + baseUrl: "../../ui", + paths: { + cldr: "../external/cldrjs/cldr", + date: "../external/date", + globalize: "../external/globalize/globalize", + "globalize-locales": "../external/localization", + jquery: "../external/jquery/jquery", + external: "../external/" + }, + shim: { + "external/globalize-old/globalize.culture.de-DE": [ "external/globalize-old/globalize" ], + "external/globalize-old/globalize.culture.ja-JP": [ "external/globalize-old/globalize" ] + } +} ); + + +// Replace effects all shortcut modules with all the effects modules +if ( modules && modules.indexOf( "effects-all" ) !== -1 ) { + modules = modules.replace( /effects-all/, effectsAll.join( " " ) ); +} + +modules = modules ? modules.replace( /^\s+|\s+$/g, "" ).split( /\s+/ ) : []; +modules.push( pathParts[ pathParts.length - 2 ] ); +modules = fixPaths( modules ); + +require( modules, function() { + var newScript = document.createElement( "script" ); + + document.documentElement.className = ""; + + newScript.text = "( function() { " + script.innerHTML + " } )();"; + document.head.appendChild( newScript ).parentNode.removeChild( newScript ); +} ); + +} )(); diff --git a/demos/calendar/buttonbar.html b/demos/calendar/buttonbar.html index 52a07a32f..9acd89bdd 100644 --- a/demos/calendar/buttonbar.html +++ b/demos/calendar/buttonbar.html @@ -4,22 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Display button bar</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#calendar" ).calendar({ buttons: { Today: function() { @@ -27,7 +14,6 @@ } } }); - }); </script> </head> <body> diff --git a/demos/calendar/default.html b/demos/calendar/default.html index c83b8f85d..9be0f1988 100644 --- a/demos/calendar/default.html +++ b/demos/calendar/default.html @@ -4,24 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Default functionality</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#calendar" ).calendar(); - }); </script> </head> <body> diff --git a/demos/calendar/dropdown-month-year.html b/demos/calendar/dropdown-month-year.html index fbb4b7b85..3aacaef47 100644 --- a/demos/calendar/dropdown-month-year.html +++ b/demos/calendar/dropdown-month-year.html @@ -4,27 +4,13 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Display month & year menus</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#calendar" ).calendar({ changeMonth: true, changeYear: true }); - }); </script> </head> <body> diff --git a/demos/calendar/localization.html b/demos/calendar/localization.html index 1307052ef..df50ca2c9 100644 --- a/demos/calendar/localization.html +++ b/demos/calendar/localization.html @@ -4,22 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Localize calendar</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> + <link rel="stylesheet" href="../../themes/base/all.css"> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/localization"> var calendar = $( "#calendar" ), select = $( "#locale" ); @@ -33,7 +21,6 @@ }); calendar.calendar( "valueAsDate", calendar.calendar( "valueAsDate" ) ); }); - }); </script> </head> <body> diff --git a/demos/calendar/min-max.html b/demos/calendar/min-max.html index f8af39bd2..36535b875 100644 --- a/demos/calendar/min-max.html +++ b/demos/calendar/min-max.html @@ -4,22 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Restrict date range</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var now = new Date(), dateMin = new Date( now.getFullYear(), now.getMonth(), now.getDay() + 1 ), dateMax = new Date( now.getFullYear(), now.getMonth(), now.getDay() + 8 ); @@ -28,7 +15,6 @@ min: dateMin, max: dateMax }); - }); </script> </head> <body> diff --git a/demos/calendar/multiple-months.html b/demos/calendar/multiple-months.html index 22118abaa..3bde416c0 100644 --- a/demos/calendar/multiple-months.html +++ b/demos/calendar/multiple-months.html @@ -4,26 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Display multiple months</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#calendar" ).calendar({ numberOfMonths: 3 }); - }); </script> </head> <body> diff --git a/demos/calendar/other-months.html b/demos/calendar/other-months.html index ef43f7b82..ac8df8d3a 100644 --- a/demos/calendar/other-months.html +++ b/demos/calendar/other-months.html @@ -4,22 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Dates in other months</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#calendar" ).calendar({ eachDay: function( day ) { if ( day.lead ) { @@ -29,7 +16,6 @@ } } }); - }); </script> </head> <body> diff --git a/demos/calendar/show-week.html b/demos/calendar/show-week.html index dfa762405..96f3c7da2 100644 --- a/demos/calendar/show-week.html +++ b/demos/calendar/show-week.html @@ -4,26 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Calendar - Show week of the year</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#calendar" ).calendar({ showWeek: true }); - }); </script> </head> <body> diff --git a/demos/datepicker/animation.html b/demos/datepicker/animation.html index f162231ba..95d18e81b 100644 --- a/demos/datepicker/animation.html +++ b/demos/datepicker/animation.html @@ -4,31 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Datepicker - Animations</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/effect.js"></script> - <script src="../../ui/effect-blind.js"></script> - <script src="../../ui/effect-bounce.js"></script> - <script src="../../ui/effect-clip.js"></script> - <script src="../../ui/effect-drop.js"></script> - <script src="../../ui/effect-fold.js"></script> - <script src="../../ui/effect-slide.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/datepicker.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-bounce effect-blind effect-bounce effect-clip effect-drop effect-fold effect-slide"> $( "#datepicker" ).datepicker(); $( "#anim" ).on( "change", function() { var value = $( this ).val(), @@ -37,7 +15,6 @@ .datepicker( "option", "show", value ) .datepicker( "option", "hide", hideValue || value ); }); - }); </script> </head> <body> diff --git a/demos/datepicker/date-formats.html b/demos/datepicker/date-formats.html index 6c713a339..87f4b0b44 100644 --- a/demos/datepicker/date-formats.html +++ b/demos/datepicker/date-formats.html @@ -4,24 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Datepicker - Format date</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/datepicker.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var value, datepicker = $( "#datepicker" ).datepicker(); @@ -34,7 +19,6 @@ datepicker.datepicker( "option", "dateFormat", { date: value } ); } }); - }); </script> </head> <body> diff --git a/demos/datepicker/default.html b/demos/datepicker/default.html index b4650ad1e..a0c1e7521 100644 --- a/demos/datepicker/default.html +++ b/demos/datepicker/default.html @@ -4,26 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Datepicker - Default functionality</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/datepicker.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#datepicker" ).datepicker(); - }); </script> </head> <body> diff --git a/demos/datepicker/icon-trigger.html b/demos/datepicker/icon-trigger.html index 2478d29d8..2ab3c2e23 100644 --- a/demos/datepicker/icon-trigger.html +++ b/demos/datepicker/icon-trigger.html @@ -4,41 +4,25 @@ <meta charset="utf-8"> <title>jQuery UI Datepicker - Icon trigger</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/datepicker.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { - var allowOpen = false, - datepicker = $( "#datepicker" ).datepicker({ - beforeOpen: function() { - return allowOpen; - }, - open: function() { - allowOpen = false; - } - }); + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> + var allowOpen = false, + datepicker = $( "#datepicker" ).datepicker({ + beforeOpen: function() { + return allowOpen; + }, + open: function() { + allowOpen = false; + } + }); - $( "<img src='images/calendar.gif' alt='Open Datepicker'>") - .insertAfter( datepicker ) - .click( function() { - allowOpen = true; - datepicker.focus(); - }); - }); + $( "<img src='images/calendar.gif' alt='Open Datepicker'>") + .insertAfter( datepicker ) + .on( "click", function() { + allowOpen = true; + datepicker.focus(); + }); </script> </head> <body> diff --git a/demos/datepicker/localization.html b/demos/datepicker/localization.html index 7d73a4154..4bede0e6a 100644 --- a/demos/datepicker/localization.html +++ b/demos/datepicker/localization.html @@ -4,24 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Datepicker - Localize calendar</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/cldrjs/cldr.js"></script> - <script src="../../external/cldrjs/cldr/supplemental.js"></script> - <script src="../../external/cldrjs/cldr/event.js"></script> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../external/globalize/globalize.js"></script> - <script src="../../external/globalize/globalize/number.js"></script> - <script src="../../external/globalize/globalize/date.js"></script> - <script src="../../external/localization.js"></script> - <script src="../../external/date.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/calendar.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/datepicker.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="external/localization"> var datepicker = $( "#datepicker" ), select = $( "#locale" ); @@ -35,7 +20,6 @@ }); datepicker.datepicker( "valueAsDate", datepicker.datepicker( "valueAsDate" ) ); }); - }); </script> </head> <body> diff --git a/demos/demos.css b/demos/demos.css index 405425328..0b5b5ee49 100644 --- a/demos/demos.css +++ b/demos/demos.css @@ -2,6 +2,10 @@ body { font-family: Arial, Helvetica, sans-serif; } +.demo-loading { + visibility: hidden; +} + table { font-size: 1em; } diff --git a/demos/dialog/animated.html b/demos/dialog/animated.html index 02c3fd31f..088ca0ea9 100644 --- a/demos/dialog/animated.html +++ b/demos/dialog/animated.html @@ -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> diff --git a/demos/dialog/default.html b/demos/dialog/default.html index 41c811668..e86281a47 100644 --- a/demos/dialog/default.html +++ b/demos/dialog/default.html @@ -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> diff --git a/demos/dialog/modal-confirmation.html b/demos/dialog/modal-confirmation.html index 741f59d38..9ae4b1e98 100644 --- a/demos/dialog/modal-confirmation.html +++ b/demos/dialog/modal-confirmation.html @@ -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> diff --git a/demos/dialog/modal-form.html b/demos/dialog/modal-form.html index 919bb0733..7933c685a 100644 --- a/demos/dialog/modal-form.html +++ b/demos/dialog/modal-form.html @@ -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 @@ -116,7 +106,6 @@ $( "#create-user" ).button().on( "click", function() { dialog.dialog( "open" ); }); - }); </script> </head> <body> diff --git a/demos/dialog/modal-message.html b/demos/dialog/modal-message.html index ce04bd66c..137884627 100644 --- a/demos/dialog/modal-message.html +++ b/demos/dialog/modal-message.html @@ -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> diff --git a/demos/draggable/constrain-movement.html b/demos/draggable/constrain-movement.html index cca74be21..adb2f745f 100644 --- a/demos/draggable/constrain-movement.html +++ b/demos/draggable/constrain-movement.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Constrain movement</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> <link rel="stylesheet" href="../demos.css"> <style> .draggable { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } @@ -18,14 +13,13 @@ #containment-wrapper { width: 95%; height:150px; border:2px solid #ccc; padding: 10px; } h3 { clear: left; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ axis: "y" }); $( "#draggable2" ).draggable({ axis: "x" }); $( "#draggable3" ).draggable({ containment: "#containment-wrapper", scroll: false }); $( "#draggable5" ).draggable({ containment: "parent" }); - }); </script> </head> <body> diff --git a/demos/draggable/cursor-style.html b/demos/draggable/cursor-style.html index 7f3b0fda4..56dd4bb3a 100644 --- a/demos/draggable/cursor-style.html +++ b/demos/draggable/cursor-style.html @@ -4,21 +4,15 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Cursor style</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> <link rel="stylesheet" href="../demos.css"> <style> #draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ cursor: "move", cursorAt: { top: 56, left: 56 } }); $( "#draggable2" ).draggable({ cursor: "crosshair", cursorAt: { top: -5, left: -5 } }); $( "#draggable3" ).draggable({ cursorAt: { bottom: 0 } }); - }); </script> </head> <body> diff --git a/demos/draggable/default.html b/demos/draggable/default.html index df6bf9da9..d164139af 100644 --- a/demos/draggable/default.html +++ b/demos/draggable/default.html @@ -4,19 +4,13 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - 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> <link rel="stylesheet" href="../demos.css"> <style> #draggable { width: 150px; height: 150px; padding: 0.5em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable(); - }); </script> </head> <body> diff --git a/demos/draggable/events.html b/demos/draggable/events.html index ad8a98aaf..5496a9486 100644 --- a/demos/draggable/events.html +++ b/demos/draggable/events.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Events</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> <link rel="stylesheet" href="../demos.css"> <style> #draggable { width: 16em; padding: 0 1em; } @@ -16,8 +11,8 @@ #draggable ul li span.ui-icon { float: left; } #draggable ul li span.count { font-weight: bold; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var $start_counter = $( "#event-start" ), $drag_counter = $( "#event-drag" ), $stop_counter = $( "#event-stop" ), @@ -47,7 +42,6 @@ // ...then update the numbers $( "span.count", $event_counter ).text( new_count ); } - }); </script> </head> <body> diff --git a/demos/draggable/handle.html b/demos/draggable/handle.html index 2e7fd2295..ae8983b85 100644 --- a/demos/draggable/handle.html +++ b/demos/draggable/handle.html @@ -4,22 +4,16 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Handles</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> <link rel="stylesheet" href="../demos.css"> <style> #draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } #draggable p { cursor: move; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ handle: "p" }); $( "#draggable2" ).draggable({ cancel: "p.ui-widget-header" }); $( "div, p" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/draggable/revert.html b/demos/draggable/revert.html index 4371b7f2b..5720dbe88 100644 --- a/demos/draggable/revert.html +++ b/demos/draggable/revert.html @@ -4,20 +4,14 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Revert 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> <link rel="stylesheet" href="../demos.css"> <style> #draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ revert: true }); $( "#draggable2" ).draggable({ revert: true, helper: "clone" }); - }); </script> </head> <body> diff --git a/demos/draggable/scroll.html b/demos/draggable/scroll.html index d3e97f326..2704842bc 100644 --- a/demos/draggable/scroll.html +++ b/demos/draggable/scroll.html @@ -4,21 +4,15 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Auto-scroll</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> <link rel="stylesheet" href="../demos.css"> <style> #draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ scroll: true }); $( "#draggable2" ).draggable({ scroll: true, scrollSensitivity: 100 }); $( "#draggable3" ).draggable({ scroll: true, scrollSpeed: 100 }); - }); </script> </head> <body> diff --git a/demos/draggable/snap-to.html b/demos/draggable/snap-to.html index 726a51384..28cb9d5a7 100644 --- a/demos/draggable/snap-to.html +++ b/demos/draggable/snap-to.html @@ -4,25 +4,19 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - Snap to element or grid</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> <link rel="stylesheet" href="../demos.css"> <style> .draggable { width: 90px; height: 80px; padding: 5px; float: left; margin: 0 10px 10px 0; font-size: .9em; } .ui-widget-header p, .ui-widget-content p { margin: 0; } #snaptarget { height: 140px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ snap: true }); $( "#draggable2" ).draggable({ snap: ".ui-widget-header" }); $( "#draggable3" ).draggable({ snap: ".ui-widget-header", snapMode: "outer" }); $( "#draggable4" ).draggable({ grid: [ 20, 20 ] }); $( "#draggable5" ).draggable({ grid: [ 80, 80 ] }); - }); </script> </head> <body> diff --git a/demos/draggable/sortable.html b/demos/draggable/sortable.html index 1251f0e29..9f07c4752 100644 --- a/demos/draggable/sortable.html +++ b/demos/draggable/sortable.html @@ -4,19 +4,13 @@ <meta charset="utf-8"> <title>jQuery UI Draggable + Sortable</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> ul { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; } li { margin: 5px; padding: 5px; width: 150px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="sortable"> $( "#sortable" ).sortable({ revert: true }); @@ -26,7 +20,6 @@ revert: "invalid" }); $( "ul, li" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/draggable/visual-feedback.html b/demos/draggable/visual-feedback.html index 135d86c2a..65f28bb9e 100644 --- a/demos/draggable/visual-feedback.html +++ b/demos/draggable/visual-feedback.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Draggable - 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> <link rel="stylesheet" href="../demos.css"> <style> #draggable, #draggable2, #draggable3, #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } @@ -16,8 +11,8 @@ #set { clear:both; float:left; width: 368px; height: 120px; } p { clear:both; margin:0; padding:1em 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#draggable" ).draggable({ helper: "original" }); $( "#draggable2" ).draggable({ opacity: 0.7, helper: "clone" }); $( "#draggable3" ).draggable({ @@ -28,7 +23,6 @@ } }); $( "#set div" ).draggable({ stack: "#set div" }); - }); </script> </head> <body> diff --git a/demos/droppable/accepted-elements.html b/demos/droppable/accepted-elements.html index 2a5029526..b073087e2 100644 --- a/demos/droppable/accepted-elements.html +++ b/demos/droppable/accepted-elements.html @@ -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> diff --git a/demos/droppable/default.html b/demos/droppable/default.html index a097e7183..0ed58cae3 100644 --- a/demos/droppable/default.html +++ b/demos/droppable/default.html @@ -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> diff --git a/demos/droppable/index.html b/demos/droppable/index.html index 74bc2282c..c3317f6c4 100644 --- a/demos/droppable/index.html +++ b/demos/droppable/index.html @@ -13,7 +13,6 @@ <li><a href="propagation.html">Prevent propagation</a></li> <li><a href="visual-feedback.html">Visual feedback</a></li> <li><a href="revert.html">Revert draggable position</a></li> - <li><a href="shopping-cart.html">Shopping Cart</a></li> <li><a href="photo-manager.html">Simple photo manager</a></li> </ul> diff --git a/demos/droppable/photo-manager.html b/demos/droppable/photo-manager.html index 39afa9c32..2b324c1e9 100644 --- a/demos/droppable/photo-manager.html +++ b/demos/droppable/photo-manager.html @@ -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" ); @@ -138,7 +129,6 @@ return false; }); - }); </script> </head> <body> diff --git a/demos/droppable/propagation.html b/demos/droppable/propagation.html index 99fb21711..048c847f3 100644 --- a/demos/droppable/propagation.html +++ b/demos/droppable/propagation.html @@ -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> diff --git a/demos/droppable/revert.html b/demos/droppable/revert.html index f34801e90..2a05f0169 100644 --- a/demos/droppable/revert.html +++ b/demos/droppable/revert.html @@ -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> diff --git a/demos/droppable/visual-feedback.html b/demos/droppable/visual-feedback.html index 9852f371b..3ef5cd1e2 100644 --- a/demos/droppable/visual-feedback.html +++ b/demos/droppable/visual-feedback.html @@ -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> diff --git a/demos/effect/addClass.html b/demos/effect/addClass.html index 915a72f2d..09de61312 100644 --- a/demos/effect/addClass.html +++ b/demos/effect/addClass.html @@ -4,8 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - addClass demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; position: relative; } @@ -13,8 +11,8 @@ #effect { width: 240px; padding: 1em; border: 1px solid #000; background: #eee; color: #333; } .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 120px; padding: 30px; margin: 10px; font-size: 1.1em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#button" ).on( "click", function() { $( "#effect" ).addClass( "newClass", 1000, callback ); }); @@ -24,7 +22,6 @@ $( "#effect" ).removeClass( "newClass" ); }, 1500 ); } - }); </script> </head> <body> diff --git a/demos/effect/animate.html b/demos/effect/animate.html index 853b72326..603e93fe9 100644 --- a/demos/effect/animate.html +++ b/demos/effect/animate.html @@ -4,8 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - Animate demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; position: relative; } @@ -13,8 +11,8 @@ #effect { width: 240px; height: 170px; padding: 0.4em; position: relative; background: #fff; } #effect h3 { margin: 0; padding: 0.4em; text-align: center; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var state = true; $( "#button" ).on( "click", function() { if ( state ) { @@ -32,7 +30,6 @@ } state = !state; }); - }); </script> </head> <body> diff --git a/demos/effect/default.html b/demos/effect/default.html index 624318f22..bd28652a6 100644 --- a/demos/effect/default.html +++ b/demos/effect/default.html @@ -4,23 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - Effect demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> - <script src="../../ui/effect-blind.js"></script> - <script src="../../ui/effect-bounce.js"></script> - <script src="../../ui/effect-clip.js"></script> - <script src="../../ui/effect-drop.js"></script> - <script src="../../ui/effect-explode.js"></script> - <script src="../../ui/effect-fade.js"></script> - <script src="../../ui/effect-fold.js"></script> - <script src="../../ui/effect-highlight.js"></script> - <script src="../../ui/effect-puff.js"></script> - <script src="../../ui/effect-pulsate.js"></script> - <script src="../../ui/effect-scale.js"></script> - <script src="../../ui/effect-shake.js"></script> - <script src="../../ui/effect-size.js"></script> - <script src="../../ui/effect-slide.js"></script> - <script src="../../ui/effect-transfer.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; position: relative; } @@ -29,8 +12,8 @@ #effect h3 { margin: 0; padding: 0.4em; text-align: center; } .ui-effects-transfer { border: 2px dotted gray; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="effects-all"> // run the currently selected effect function runEffect() { // get effect type from @@ -63,7 +46,6 @@ runEffect(); return false; }); - }); </script> </head> <body> diff --git a/demos/effect/easing.html b/demos/effect/easing.html index 26d0a96b5..5985dc699 100644 --- a/demos/effect/easing.html +++ b/demos/effect/easing.html @@ -4,8 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - Easing demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .graph { @@ -13,8 +11,8 @@ margin-left: 10px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> if ( !$( "<canvas>" )[0].getContext ) { $( "<div>" ).text( "Your browser doesn't support canvas, which is required for this demo." @@ -88,7 +86,6 @@ graph.width( width ).height( height + text.height() + 10 ); }); - }); </script> </head> <body> diff --git a/demos/effect/hide.html b/demos/effect/hide.html index b19ec0209..1fcd6477e 100644 --- a/demos/effect/hide.html +++ b/demos/effect/hide.html @@ -4,22 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - Hide Demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> - <script src="../../ui/effect-blind.js"></script> - <script src="../../ui/effect-bounce.js"></script> - <script src="../../ui/effect-clip.js"></script> - <script src="../../ui/effect-drop.js"></script> - <script src="../../ui/effect-explode.js"></script> - <script src="../../ui/effect-fade.js"></script> - <script src="../../ui/effect-fold.js"></script> - <script src="../../ui/effect-highlight.js"></script> - <script src="../../ui/effect-puff.js"></script> - <script src="../../ui/effect-pulsate.js"></script> - <script src="../../ui/effect-scale.js"></script> - <script src="../../ui/effect-shake.js"></script> - <script src="../../ui/effect-size.js"></script> - <script src="../../ui/effect-slide.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; } @@ -27,8 +11,8 @@ #effect { width: 240px; height: 170px; padding: 0.4em; position: relative; } #effect h3 { margin: 0; padding: 0.4em; text-align: center; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="effects-all"> // run the currently selected effect function runEffect() { // get effect type from @@ -58,7 +42,6 @@ $( "#button" ).on( "click", function() { runEffect(); }); - }); </script> </head> <body> diff --git a/demos/effect/removeClass.html b/demos/effect/removeClass.html index f4a902185..0980bae83 100644 --- a/demos/effect/removeClass.html +++ b/demos/effect/removeClass.html @@ -13,8 +13,8 @@ #effect { position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; } .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#button" ).on( "click", function() { $( "#effect" ).removeClass( "newClass", 1000, callback ); }); @@ -24,7 +24,6 @@ $( "#effect" ).addClass( "newClass" ); }, 1500 ); } - }); </script> </head> <body> diff --git a/demos/effect/show.html b/demos/effect/show.html index f95c513ae..4bb0919e4 100644 --- a/demos/effect/show.html +++ b/demos/effect/show.html @@ -4,22 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - Show Demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> - <script src="../../ui/effect-blind.js"></script> - <script src="../../ui/effect-bounce.js"></script> - <script src="../../ui/effect-clip.js"></script> - <script src="../../ui/effect-drop.js"></script> - <script src="../../ui/effect-explode.js"></script> - <script src="../../ui/effect-fade.js"></script> - <script src="../../ui/effect-fold.js"></script> - <script src="../../ui/effect-highlight.js"></script> - <script src="../../ui/effect-puff.js"></script> - <script src="../../ui/effect-pulsate.js"></script> - <script src="../../ui/effect-scale.js"></script> - <script src="../../ui/effect-shake.js"></script> - <script src="../../ui/effect-size.js"></script> - <script src="../../ui/effect-slide.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; } @@ -27,8 +11,8 @@ #effect { width: 240px; height: 170px; padding: 0.4em; position: relative; } #effect h3 { margin: 0; padding: 0.4em; text-align: center; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="effects-all"> // run the currently selected effect function runEffect() { // get effect type from @@ -60,7 +44,6 @@ }); $( "#effect" ).hide(); - }); </script> </head> <body> diff --git a/demos/effect/switchClass.html b/demos/effect/switchClass.html index f7c6d12da..c02f4420b 100644 --- a/demos/effect/switchClass.html +++ b/demos/effect/switchClass.html @@ -4,8 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - switchClass Demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; position: relative; } @@ -14,13 +12,12 @@ .newClass { width: 240px; padding: 1em; letter-spacing: 0; margin: 0; } .anotherNewClass { text-indent: 40px; letter-spacing: .2em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.1em; } </style> - <script> - $(function() { - $( "#button" ).on( "click", function(){ + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> + $( "#button" ).on( "click", function() { $( ".newClass" ).switchClass( "newClass", "anotherNewClass", 1000 ); $( ".anotherNewClass" ).switchClass( "anotherNewClass", "newClass", 1000 ); }); - }); </script> </head> <body> diff --git a/demos/effect/toggle.html b/demos/effect/toggle.html index e646ec994..65c4747a9 100644 --- a/demos/effect/toggle.html +++ b/demos/effect/toggle.html @@ -4,22 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - Toggle Demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> - <script src="../../ui/effect-blind.js"></script> - <script src="../../ui/effect-bounce.js"></script> - <script src="../../ui/effect-clip.js"></script> - <script src="../../ui/effect-drop.js"></script> - <script src="../../ui/effect-explode.js"></script> - <script src="../../ui/effect-fade.js"></script> - <script src="../../ui/effect-fold.js"></script> - <script src="../../ui/effect-highlight.js"></script> - <script src="../../ui/effect-puff.js"></script> - <script src="../../ui/effect-pulsate.js"></script> - <script src="../../ui/effect-scale.js"></script> - <script src="../../ui/effect-shake.js"></script> - <script src="../../ui/effect-size.js"></script> - <script src="../../ui/effect-slide.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { @@ -42,8 +26,8 @@ text-align: center; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="effects-all"> // run the currently selected effect function runEffect() { // get effect type from @@ -66,7 +50,6 @@ $( "#button" ).on( "click", function() { runEffect(); }); - }); </script> </head> <body> diff --git a/demos/effect/toggleClass.html b/demos/effect/toggleClass.html index 20161a81a..e1e3778ce 100644 --- a/demos/effect/toggleClass.html +++ b/demos/effect/toggleClass.html @@ -4,8 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Effects - toggleClass Demo</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/effect.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .toggler { width: 500px; height: 200px; position: relative; } @@ -13,12 +11,11 @@ #effect {position: relative; width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; } .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#button" ).on( "click", function() { $( "#effect" ).toggleClass( "newClass", 1000 ); }); - }); </script> </head> <body> diff --git a/demos/menu/categories.html b/demos/menu/categories.html index 213e97a4e..a1526153e 100644 --- a/demos/menu/categories.html +++ b/demos/menu/categories.html @@ -4,18 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Menu - Categories</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> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#menu" ).menu({ items: "> :not(.ui-widget-header)" }); - }); </script> <style> .ui-menu { width: 200px; } diff --git a/demos/menu/default.html b/demos/menu/default.html index cb4e237a8..2440ea72e 100644 --- a/demos/menu/default.html +++ b/demos/menu/default.html @@ -4,16 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Menu - 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> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#menu" ).menu(); - }); </script> <style> .ui-menu { width: 150px; } diff --git a/demos/menu/icons.html b/demos/menu/icons.html index 1afdba5e1..c3663179a 100644 --- a/demos/menu/icons.html +++ b/demos/menu/icons.html @@ -4,16 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Menu - Icons</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> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#menu" ).menu(); - }); </script> <style> .ui-menu { width: 150px; } diff --git a/demos/position/cycler.html b/demos/position/cycler.html index f7e0b1302..af0c00a82 100644 --- a/demos/position/cycler.html +++ b/demos/position/cycler.html @@ -4,10 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Position - Image Cycler</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> <link rel="stylesheet" href="../demos.css"> <style> body { @@ -23,8 +19,8 @@ position: absolute; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> function left( element, using ) { element.position({ my: "right middle", @@ -83,7 +79,6 @@ center( $( "img:eq(1)" ), animate ); right( $( "img:eq(2)" ), animate ); }); - }); </script> </head> <body> diff --git a/demos/position/default.html b/demos/position/default.html index 284653c96..142787980 100644 --- a/demos/position/default.html +++ b/demos/position/default.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Position - 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> <link rel="stylesheet" href="../demos.css"> <style> #parent { @@ -41,8 +35,8 @@ margin-left: 15px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="draggable"> function position() { $( ".positionable" ).position({ of: $( "#parent" ), @@ -61,7 +55,6 @@ }); position(); - }); </script> </head> <body> diff --git a/demos/progressbar/default.html b/demos/progressbar/default.html index 197a976c5..b1ada1a0a 100644 --- a/demos/progressbar/default.html +++ b/demos/progressbar/default.html @@ -4,17 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Progressbar - 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/progressbar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#progressbar" ).progressbar({ value: 37 }); - }); </script> </head> <body> diff --git a/demos/progressbar/download.html b/demos/progressbar/download.html index 1253176a4..a7731b387 100644 --- a/demos/progressbar/download.html +++ b/demos/progressbar/download.html @@ -4,18 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Progressbar - Download Dialog</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/progressbar.js"></script> - <script src="../../ui/mouse.js"></script> - <script src="../../ui/draggable.js"></script> - <script src="../../ui/button.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" data-modules="dialog"> var progressTimer, progressbar = $( "#progressbar" ), progressLabel = $( ".progress-label" ), @@ -83,7 +74,6 @@ .text( "Starting download..." ); downloadButton.trigger( "focus" ); } - }); </script> <style> #progressbar { diff --git a/demos/progressbar/indeterminate.html b/demos/progressbar/indeterminate.html index ef5f446f2..d349a7436 100644 --- a/demos/progressbar/indeterminate.html +++ b/demos/progressbar/indeterminate.html @@ -4,13 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Progressbar - Indeterminate Value</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/progressbar.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#progressbar" ).progressbar({ value: false }); @@ -31,7 +27,6 @@ progressbar.progressbar( "option", "value", false ); } }); - }); </script> <style> #progressbar .ui-progressbar-value { diff --git a/demos/progressbar/label.html b/demos/progressbar/label.html index f4c493707..ea4c4ecdb 100644 --- a/demos/progressbar/label.html +++ b/demos/progressbar/label.html @@ -4,10 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Progressbar - Custom Label</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/progressbar.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-progressbar { @@ -21,8 +17,8 @@ text-shadow: 1px 1px 0 #fff; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var progressbar = $( "#progressbar" ), progressLabel = $( ".progress-label" ); @@ -47,7 +43,6 @@ } setTimeout( progress, 2000 ); - }); </script> </head> <body> diff --git a/demos/resizable/animate.html b/demos/resizable/animate.html index b06e41ddb..344bba014 100644 --- a/demos/resizable/animate.html +++ b/demos/resizable/animate.html @@ -4,23 +4,17 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Animate</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 150px; height: 150px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } .ui-resizable-helper { border: 1px dotted gray; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ animate: true }); - }); </script> </head> <body> diff --git a/demos/resizable/aspect-ratio.html b/demos/resizable/aspect-ratio.html index 2da2a2926..3878b18ec 100644 --- a/demos/resizable/aspect-ratio.html +++ b/demos/resizable/aspect-ratio.html @@ -4,22 +4,16 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Preserve aspect ratio</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 160px; height: 90px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ aspectRatio: 16 / 9 }); - }); </script> </head> <body> diff --git a/demos/resizable/constrain-area.html b/demos/resizable/constrain-area.html index e6ce3b28b..e000fcf07 100644 --- a/demos/resizable/constrain-area.html +++ b/demos/resizable/constrain-area.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Constrain resize area</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #container { width: 300px; height: 300px; } @@ -16,12 +11,11 @@ #resizable { background-position: top left; width: 150px; height: 150px; } #resizable, #container { padding: 0.5em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ containment: "#container" }); - }); </script> </head> <body> diff --git a/demos/resizable/default.html b/demos/resizable/default.html index a77afc34e..60b3380ef 100644 --- a/demos/resizable/default.html +++ b/demos/resizable/default.html @@ -4,20 +4,14 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - 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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 150px; height: 150px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable(); - }); </script> </head> <body> diff --git a/demos/resizable/helper.html b/demos/resizable/helper.html index fff0c8bd9..d10e5b523 100644 --- a/demos/resizable/helper.html +++ b/demos/resizable/helper.html @@ -4,23 +4,17 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Helper</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 150px; height: 150px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } .ui-resizable-helper { border: 2px dotted #00F; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ helper: "ui-resizable-helper" }); - }); </script> </head> <body> diff --git a/demos/resizable/max-min.html b/demos/resizable/max-min.html index 88e8ca3f3..ed43ec795 100644 --- a/demos/resizable/max-min.html +++ b/demos/resizable/max-min.html @@ -4,25 +4,19 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Maximum / minimum size</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 200px; height: 150px; padding: 5px; } #resizable h3 { text-align: center; margin: 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ maxHeight: 250, maxWidth: 350, minHeight: 150, minWidth: 200 }); - }); </script> </head> <body> diff --git a/demos/resizable/snap-to-grid.html b/demos/resizable/snap-to-grid.html index 6e13ae618..ce897a98e 100644 --- a/demos/resizable/snap-to-grid.html +++ b/demos/resizable/snap-to-grid.html @@ -4,22 +4,16 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Snap to grid</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 150px; height: 150px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ grid: 50 }); - }); </script> </head> <body> diff --git a/demos/resizable/synchronous-resize.html b/demos/resizable/synchronous-resize.html index e645ea351..ddc89cd88 100644 --- a/demos/resizable/synchronous-resize.html +++ b/demos/resizable/synchronous-resize.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Synchronous resize</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { background-position: top left; } @@ -16,13 +11,12 @@ #resizable h3, #also h3 { text-align: center; margin: 0; } #also { margin-top: 1em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ alsoResize: "#also" }); $( "#also" ).resizable(); - }); </script> </head> <body> diff --git a/demos/resizable/textarea.html b/demos/resizable/textarea.html index 04b180a11..f3e0fa25e 100644 --- a/demos/resizable/textarea.html +++ b/demos/resizable/textarea.html @@ -4,23 +4,17 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - Textarea</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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-resizable-se { bottom: 17px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ handles: "se" }); - }); </script> </head> <body> diff --git a/demos/resizable/visual-feedback.html b/demos/resizable/visual-feedback.html index aa66fb5cf..a9a1c3f39 100644 --- a/demos/resizable/visual-feedback.html +++ b/demos/resizable/visual-feedback.html @@ -4,23 +4,17 @@ <meta charset="utf-8"> <title>jQuery UI Resizable - 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/resizable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #resizable { width: 150px; height: 150px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } .ui-resizable-ghost { border: 1px dotted gray; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#resizable" ).resizable({ ghost: true }); - }); </script> </head> <body> diff --git a/demos/selectable/default.html b/demos/selectable/default.html index 6b72bda75..d71b25ff9 100644 --- a/demos/selectable/default.html +++ b/demos/selectable/default.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Selectable - 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/selectable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> @@ -18,10 +13,9 @@ #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#selectable" ).selectable(); - }); </script> </head> <body> diff --git a/demos/selectable/display-grid.html b/demos/selectable/display-grid.html index 27babbf6a..f561673ed 100644 --- a/demos/selectable/display-grid.html +++ b/demos/selectable/display-grid.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Selectable - Display as grid</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/selectable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> @@ -18,10 +13,9 @@ #selectable { list-style-type: none; margin: 0; padding: 0; width: 450px; } #selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#selectable" ).selectable(); - }); </script> </head> <body> diff --git a/demos/selectable/serialize.html b/demos/selectable/serialize.html index 82391b9e7..9acd37fd5 100644 --- a/demos/selectable/serialize.html +++ b/demos/selectable/serialize.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Selectable - Serialize</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/selectable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> @@ -18,8 +13,8 @@ #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#selectable" ).selectable({ stop: function() { var result = $( "#select-result" ).empty(); @@ -29,7 +24,6 @@ }); } }); - }); </script> </head> <body> diff --git a/demos/selectmenu/custom_render.html b/demos/selectmenu/custom_render.html index ec0b4b6d5..b77aaf663 100644 --- a/demos/selectmenu/custom_render.html +++ b/demos/selectmenu/custom_render.html @@ -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 { diff --git a/demos/selectmenu/default.html b/demos/selectmenu/default.html index 5fa1af28b..e8bb1a6a7 100644 --- a/demos/selectmenu/default.html +++ b/demos/selectmenu/default.html @@ -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; @@ -38,6 +18,19 @@ 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> diff --git a/demos/selectmenu/product-selection.html b/demos/selectmenu/product-selection.html index e759ea36a..a6f1a2203 100644 --- a/demos/selectmenu/product-selection.html +++ b/demos/selectmenu/product-selection.html @@ -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; @@ -50,6 +24,25 @@ 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> diff --git a/demos/slider/colorpicker.html b/demos/slider/colorpicker.html index 6f438a2e5..32ea4f89e 100644 --- a/demos/slider/colorpicker.html +++ b/demos/slider/colorpicker.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Colorpicker</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #red, #green, #blue { @@ -31,28 +26,29 @@ #blue .ui-slider-range { background: #729fcf; } #blue .ui-slider-handle { border-color: #729fcf; } </style> - <script> - function hexFromRGB(r, g, b) { - var hex = [ - r.toString( 16 ), - g.toString( 16 ), - b.toString( 16 ) - ]; - $.each( hex, function( nr, val ) { - if ( val.length === 1 ) { - hex[ nr ] = "0" + val; - } - }); - return hex.join( "" ).toUpperCase(); - } - function refreshSwatch() { - var red = $( "#red" ).slider( "value" ), - green = $( "#green" ).slider( "value" ), - blue = $( "#blue" ).slider( "value" ), - hex = hexFromRGB( red, green, blue ); - $( "#swatch" ).css( "background-color", "#" + hex ); - } - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> + function hexFromRGB(r, g, b) { + var hex = [ + r.toString( 16 ), + g.toString( 16 ), + b.toString( 16 ) + ]; + $.each( hex, function( nr, val ) { + if ( val.length === 1 ) { + hex[ nr ] = "0" + val; + } + }); + return hex.join( "" ).toUpperCase(); + } + function refreshSwatch() { + var red = $( "#red" ).slider( "value" ), + green = $( "#green" ).slider( "value" ), + blue = $( "#blue" ).slider( "value" ), + hex = hexFromRGB( red, green, blue ); + $( "#swatch" ).css( "background-color", "#" + hex ); + } + $( "#red, #green, #blue" ).slider({ orientation: "horizontal", range: "min", @@ -64,7 +60,6 @@ $( "#red" ).slider( "value", 255 ); $( "#green" ).slider( "value", 140 ); $( "#blue" ).slider( "value", 60 ); - }); </script> </head> <body class="ui-widget-content" style="border:0;"> diff --git a/demos/slider/default.html b/demos/slider/default.html index 141fec23d..9fcd6d07d 100644 --- a/demos/slider/default.html +++ b/demos/slider/default.html @@ -4,16 +4,10 @@ <meta charset="utf-8" > <title>jQuery UI Slider - 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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider" ).slider(); - }); </script> </head> <body> diff --git a/demos/slider/hotelrooms.html b/demos/slider/hotelrooms.html index 0268d1dc0..05d16aa52 100644 --- a/demos/slider/hotelrooms.html +++ b/demos/slider/hotelrooms.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Slider bound to select</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> var select = $( "#minbeds" ); var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({ min: 1, @@ -25,7 +20,6 @@ $( "#minbeds" ).on( "change", function() { slider.slider( "value", this.selectedIndex + 1 ); }); - }); </script> </head> <body> diff --git a/demos/slider/index.html b/demos/slider/index.html index 480083c6f..1bc1198c4 100644 --- a/demos/slider/index.html +++ b/demos/slider/index.html @@ -18,7 +18,6 @@ <li><a href="range-vertical.html">Vertical range slider</a></li> <li><a href="multiple-vertical.html">Multiple sliders</a></li> <li><a href="colorpicker.html">Simple colorpicker</a></li> - <li><a href="side-scroll.html">Simple scrollbar</a></li> </ul> </body> diff --git a/demos/slider/multiple-vertical.html b/demos/slider/multiple-vertical.html index 5f23a2dd2..97e2349d1 100644 --- a/demos/slider/multiple-vertical.html +++ b/demos/slider/multiple-vertical.html @@ -15,8 +15,8 @@ height:120px; float:left; margin:15px } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> // setup master volume $( "#master" ).slider({ value: 60, @@ -35,7 +35,6 @@ orientation: "vertical" }); }); - }); </script> </head> <body> diff --git a/demos/slider/range-vertical.html b/demos/slider/range-vertical.html index a29737b90..bed2e8cb2 100644 --- a/demos/slider/range-vertical.html +++ b/demos/slider/range-vertical.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Vertical range slider</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider-range" ).slider({ orientation: "vertical", range: true, @@ -22,7 +17,6 @@ }); $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " - $" + $( "#slider-range" ).slider( "values", 1 ) ); - }); </script> </head> <body> diff --git a/demos/slider/range.html b/demos/slider/range.html index a923a6d15..a660fee55 100644 --- a/demos/slider/range.html +++ b/demos/slider/range.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Range slider</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider-range" ).slider({ range: true, min: 0, @@ -23,7 +18,6 @@ }); $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " - $" + $( "#slider-range" ).slider( "values", 1 ) ); - }); </script> </head> <body> diff --git a/demos/slider/rangemax.html b/demos/slider/rangemax.html index b96346b6f..38bcf4016 100644 --- a/demos/slider/rangemax.html +++ b/demos/slider/rangemax.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Range with fixed maximum</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider-range-max" ).slider({ range: "max", min: 1, @@ -22,7 +17,6 @@ } }); $( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) ); - }); </script> </head> <body> diff --git a/demos/slider/rangemin.html b/demos/slider/rangemin.html index a3d1b0628..1105ff71e 100644 --- a/demos/slider/rangemin.html +++ b/demos/slider/rangemin.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Range with fixed minimum</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider-range-min" ).slider({ range: "min", value: 37, @@ -22,7 +17,6 @@ } }); $( "#amount" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) ); - }); </script> </head> <body> diff --git a/demos/slider/slider-vertical.html b/demos/slider/slider-vertical.html index 0a5ecd97d..f59f08a30 100644 --- a/demos/slider/slider-vertical.html +++ b/demos/slider/slider-vertical.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Vertical slider</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider-vertical" ).slider({ orientation: "vertical", range: "min", @@ -23,7 +18,6 @@ } }); $( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) ); - }); </script> </head> <body> diff --git a/demos/slider/steps.html b/demos/slider/steps.html index 9b8ca2add..deb05bbc0 100644 --- a/demos/slider/steps.html +++ b/demos/slider/steps.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Slider - Snap to increments</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/slider.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#slider" ).slider({ value:100, min: 0, @@ -22,7 +17,6 @@ } }); $( "#amount" ).val( "$" + $( "#slider" ).slider( "value" ) ); - }); </script> </head> <body> diff --git a/demos/sortable/connect-lists.html b/demos/sortable/connect-lists.html index 834cb560a..4461e7364 100644 --- a/demos/sortable/connect-lists.html +++ b/demos/sortable/connect-lists.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - Connect lists</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable1, #sortable2 { @@ -28,12 +23,11 @@ width: 120px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#sortable1, #sortable2" ).sortable({ connectWith: ".connectedSortable" }).disableSelection(); - }); </script> </head> <body> diff --git a/demos/sortable/default.html b/demos/sortable/default.html index 6d3e742db..9b225e897 100644 --- a/demos/sortable/default.html +++ b/demos/sortable/default.html @@ -4,22 +4,16 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - 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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; } #sortable li span { position: absolute; margin-left: -1.3em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#sortable" ).sortable(); $( "#sortable" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/sortable/display-grid.html b/demos/sortable/display-grid.html index 3e8e5be75..8f0f6ae35 100644 --- a/demos/sortable/display-grid.html +++ b/demos/sortable/display-grid.html @@ -4,21 +4,15 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - Display as grid</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable { list-style-type: none; margin: 0; padding: 0; width: 450px; } #sortable li { margin: 3px 3px 3px 0; padding: 1px; float: left; width: 100px; height: 90px; font-size: 4em; text-align: center; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#sortable" ).sortable(); $( "#sortable" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/sortable/empty-lists.html b/demos/sortable/empty-lists.html index 192544619..fa515b377 100644 --- a/demos/sortable/empty-lists.html +++ b/demos/sortable/empty-lists.html @@ -4,18 +4,13 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - Handle empty lists</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable1, #sortable2, #sortable3 { list-style-type: none; margin: 0; float: left; margin-right: 10px; background: #eee; padding: 5px; width: 143px;} #sortable1 li, #sortable2 li, #sortable3 li { margin: 5px; padding: 5px; font-size: 1.2em; width: 120px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "ul.droptrue" ).sortable({ connectWith: "ul" }); @@ -26,7 +21,6 @@ }); $( "#sortable1, #sortable2, #sortable3" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/sortable/items.html b/demos/sortable/items.html index b6ed39235..21a7230d5 100644 --- a/demos/sortable/items.html +++ b/demos/sortable/items.html @@ -4,18 +4,13 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - Include / exclude items</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; zoom: 1; } #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 3px; width: 90%; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#sortable1" ).sortable({ items: "li:not(.ui-state-disabled)" }); @@ -25,7 +20,6 @@ }); $( "#sortable1 li, #sortable2 li" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/sortable/placeholder.html b/demos/sortable/placeholder.html index c925b77ad..7a17e6914 100644 --- a/demos/sortable/placeholder.html +++ b/demos/sortable/placeholder.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - Drop placeholder</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; } @@ -16,13 +11,12 @@ html>body #sortable li { height: 1.5em; line-height: 1.2em; } .ui-state-highlight { height: 1.5em; line-height: 1.2em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#sortable" ).sortable({ placeholder: "ui-state-highlight" }); $( "#sortable" ).disableSelection(); - }); </script> </head> <body> diff --git a/demos/sortable/portlets.html b/demos/sortable/portlets.html index 42ddb4444..a3f42a254 100644 --- a/demos/sortable/portlets.html +++ b/demos/sortable/portlets.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Sortable - Portlets</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/sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> body { @@ -43,8 +38,8 @@ height: 50px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( ".column" ).sortable({ connectWith: ".column", handle: ".portlet-header", @@ -63,7 +58,6 @@ icon.toggleClass( "ui-icon-minusthick ui-icon-plusthick" ); icon.closest( ".portlet" ).find( ".portlet-content" ).toggle(); }); - }); </script> </head> <body> diff --git a/demos/spinner/currency.html b/demos/spinner/currency.html index 1f2ef8c24..ecf193b09 100644 --- a/demos/spinner/currency.html +++ b/demos/spinner/currency.html @@ -4,18 +4,14 @@ <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-old/globalize.js"></script> - <script src="../../external/globalize-old/globalize.culture.de-DE.js"></script> - <script src="../../external/globalize-old/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-old/globalize + external/globalize-old/globalize.culture.de-DE + external/globalize-old/globalize.culture.ja-JP + external/jquery-mousewheel/jquery.mousewheel + "> $( "#currency" ).on( "change", function() { $( "#spinner" ).spinner( "option", "culture", $( this ).val() ); }); @@ -27,7 +23,6 @@ start: 1000, numberFormat: "C" }); - }); </script> </head> <body> diff --git a/demos/spinner/decimal.html b/demos/spinner/decimal.html index 40ce5b223..cb7e2b8a0 100644 --- a/demos/spinner/decimal.html +++ b/demos/spinner/decimal.html @@ -4,18 +4,14 @@ <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-old/globalize.js"></script> - <script src="../../external/globalize-old/globalize.culture.de-DE.js"></script> - <script src="../../external/globalize-old/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-old/globalize + external/globalize-old/globalize.culture.de-DE + external/globalize-old/globalize.culture.ja-JP + external/jquery-mousewheel/jquery.mousewheel + "> $( "#spinner" ).spinner({ step: 0.01, numberFormat: "n" @@ -26,7 +22,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 e3cf6a66d..5e8638b1c 100644 --- a/demos/spinner/time.html +++ b/demos/spinner/time.html @@ -4,41 +4,37 @@ <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-old/globalize.js"></script> - <script src="../../external/globalize-old/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-old/globalize + external/globalize-old/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 +42,6 @@ Globalize.culture( $(this).val() ); $( "#spinner" ).timespinner( "value", current ); }); - }); </script> </head> <body> diff --git a/demos/tabs/ajax.html b/demos/tabs/ajax.html index 7a486fc96..c8a247e66 100644 --- a/demos/tabs/ajax.html +++ b/demos/tabs/ajax.html @@ -4,13 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - Content via Ajax</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/tabs.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#tabs" ).tabs({ beforeLoad: function( event, ui ) { ui.jqXHR.fail(function() { @@ -20,7 +16,6 @@ }); } }); - }); </script> </head> <body> diff --git a/demos/tabs/collapsible.html b/demos/tabs/collapsible.html index dcb79954e..d1e3861a8 100644 --- a/demos/tabs/collapsible.html +++ b/demos/tabs/collapsible.html @@ -4,17 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - Collapse content</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/tabs.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#tabs" ).tabs({ collapsible: true }); - }); </script> </head> <body> diff --git a/demos/tabs/default.html b/demos/tabs/default.html index 966a1057f..c68e0afa6 100644 --- a/demos/tabs/default.html +++ b/demos/tabs/default.html @@ -4,15 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - 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/tabs.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#tabs" ).tabs(); - }); </script> </head> <body> diff --git a/demos/tabs/manipulation.html b/demos/tabs/manipulation.html index f7202ee48..bb4bb34c7 100644 --- a/demos/tabs/manipulation.html +++ b/demos/tabs/manipulation.html @@ -4,13 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - Simple manipulation</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/button.js"></script> - <script src="../../ui/tabs.js"></script> - <script src="../../ui/dialog.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #dialog label, #dialog input { display:block; } @@ -20,8 +13,8 @@ #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; } #add_tab { cursor: pointer; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="dialog"> var tabTitle = $( "#tab_title" ), tabContent = $( "#tab_content" ), tabTemplate = "<li><a href='#{href}'>#{label}</a> <span class='ui-icon ui-icon-close' role='presentation'>Remove Tab</span></li>", @@ -88,7 +81,6 @@ tabs.tabs( "refresh" ); } }); - }); </script> </head> <body> diff --git a/demos/tabs/mouseover.html b/demos/tabs/mouseover.html index 6fb316114..2a356d109 100644 --- a/demos/tabs/mouseover.html +++ b/demos/tabs/mouseover.html @@ -4,17 +4,12 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - Open on mouseover</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/tabs.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#tabs" ).tabs({ event: "mouseover" }); - }); </script> </head> <body> diff --git a/demos/tabs/sortable.html b/demos/tabs/sortable.html index 1bc865aa0..7c4a05b60 100644 --- a/demos/tabs/sortable.html +++ b/demos/tabs/sortable.html @@ -4,15 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - Sortable</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/sortable.js"></script> - <script src="../../ui/tabs.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="sortable"> var tabs = $( "#tabs" ).tabs(); tabs.find( ".ui-tabs-nav" ).sortable({ axis: "x", @@ -20,7 +14,6 @@ tabs.tabs( "refresh" ); } }); - }); </script> </head> <body> diff --git a/demos/tabs/vertical.html b/demos/tabs/vertical.html index 98f2ba3b4..00e16eafc 100644 --- a/demos/tabs/vertical.html +++ b/demos/tabs/vertical.html @@ -4,16 +4,11 @@ <meta charset="utf-8"> <title>jQuery UI Tabs - Vertical Tabs 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/tabs.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); - }); </script> <style> .ui-tabs-vertical { width: 55em; } diff --git a/demos/tooltip/custom-animation.html b/demos/tooltip/custom-animation.html index 892462a89..9f09c1353 100644 --- a/demos/tooltip/custom-animation.html +++ b/demos/tooltip/custom-animation.html @@ -4,16 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - Custom animation demo</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/tooltip.js"></script> - <script src="../../ui/effect.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-explode"> $( "#show-option" ).tooltip({ show: { effect: "slideDown", @@ -36,7 +29,6 @@ ui.tooltip.animate({ top: ui.tooltip.position().top + 10 }, "fast" ); } }); - }); </script> </head> <body> diff --git a/demos/tooltip/custom-content.html b/demos/tooltip/custom-content.html index 530b33525..66e7e0c01 100644 --- a/demos/tooltip/custom-content.html +++ b/demos/tooltip/custom-content.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - Custom content</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/tooltip.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .photo { @@ -26,8 +21,8 @@ max-width: 350px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( document ).tooltip({ items: "img, [data-geo], [title]", content: function() { @@ -47,7 +42,6 @@ } } }); - }); </script> </head> <body> diff --git a/demos/tooltip/custom-style.html b/demos/tooltip/custom-style.html index c926776c5..8e0574f8e 100644 --- a/demos/tooltip/custom-style.html +++ b/demos/tooltip/custom-style.html @@ -4,14 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - Custom Styling</title> <link rel="stylesheet" href="../../themes/base/tooltip.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/tooltip.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( document ).tooltip({ position: { my: "center bottom-20", @@ -26,7 +21,6 @@ } } }); - }); </script> <style> .ui-tooltip, .arrow:after { diff --git a/demos/tooltip/default.html b/demos/tooltip/default.html index e70f92320..c467b1c1a 100644 --- a/demos/tooltip/default.html +++ b/demos/tooltip/default.html @@ -4,16 +4,10 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - 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/tooltip.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( document ).tooltip(); - }); </script> <style> label { diff --git a/demos/tooltip/forms.html b/demos/tooltip/forms.html index 4a593ef51..37c849a21 100644 --- a/demos/tooltip/forms.html +++ b/demos/tooltip/forms.html @@ -4,12 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - Forms</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/tooltip.js"></script> - <script src="../../ui/button.js"></script> <link rel="stylesheet" href="../demos.css"> <style> label { @@ -25,8 +19,8 @@ width: 210px; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="button"> var tooltips = $( "[title]" ).tooltip({ position: { my: "left top", @@ -40,7 +34,6 @@ tooltips.tooltip( "open" ); }) .insertAfter( "form" ); - }); </script> </head> <body> diff --git a/demos/tooltip/tracking.html b/demos/tooltip/tracking.html index 856f55564..3cca5ec42 100644 --- a/demos/tooltip/tracking.html +++ b/demos/tooltip/tracking.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - Track the mouse</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/tooltip.js"></script> <link rel="stylesheet" href="../demos.css"> <style> label { @@ -16,12 +11,11 @@ width: 5em; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( document ).tooltip({ track: true }); - }); </script> </head> <body> diff --git a/demos/tooltip/video-player.html b/demos/tooltip/video-player.html index 3d4e467be..cd667e3db 100644 --- a/demos/tooltip/video-player.html +++ b/demos/tooltip/video-player.html @@ -4,15 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Tooltip - Video Player demo</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/tooltip.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/menu.js"></script> - <script src="../../ui/effect.js"></script> - <script src="../../ui/effect-blind.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .player { @@ -42,8 +33,8 @@ box-shadow: 2px 2px 5px -2px rgba(0,0,0,0.5); } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="button menu effect effect-blind"> function notify( input ) { var msg = "Selected " + $.trim( input.data( "tooltip-title" ) || input.text() ); $( "<div>" ) @@ -115,7 +106,6 @@ effect: "hide" } }); - }); </script> </head> <body> diff --git a/demos/widget/default.html b/demos/widget/default.html index 62a373114..e545ef6ad 100644 --- a/demos/widget/default.html +++ b/demos/widget/default.html @@ -4,11 +4,6 @@ <meta charset="utf-8"> <title>jQuery UI Widget - 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/position.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .custom-colorize { @@ -24,8 +19,8 @@ bottom: 0; } </style> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="button"> // the widget definition, where "custom" is the namespace, // "colorize" the widget name $.widget( "custom.colorize", { @@ -157,7 +152,6 @@ blue: 8 }); }); - }); </script> </head> <body> diff --git a/package.json b/package.json index d6dabf366..355bb3a5a 100644 --- a/package.json +++ b/package.json @@ -45,12 +45,7 @@ "url": "git://github.com/jquery/jquery-ui.git" }, "bugs": "http://bugs.jqueryui.com/", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/jquery/jquery-ui/blob/master/LICENSE.txt" - } - ], + "license": "MIT", "scripts": { "test": "grunt" }, @@ -60,10 +55,10 @@ "grunt": "0.4.2", "grunt-bowercopy": "1.1.0", "grunt-compare-size": "0.4.0", - "grunt-contrib-concat": "0.1.3", "grunt-contrib-csslint": "0.2.0", "grunt-contrib-jshint": "0.7.1", "grunt-contrib-qunit": "0.6.0", + "grunt-contrib-requirejs": "0.4.4", "grunt-contrib-uglify": "0.1.1", "grunt-esformatter": "0.2.0", "grunt-git-authors": "2.0.0", diff --git a/tests/lib/common.js b/tests/lib/common.js index 9faa4e246..8e4acbea8 100644 --- a/tests/lib/common.js +++ b/tests/lib/common.js @@ -67,7 +67,7 @@ function testBasicUsage( widget ) { exports.testWidget = function( widget, settings ) { module( widget + ": common widget" ); - exports.testJshint( widget ); + exports.testJshint( "/widgets/" + widget ); testWidgetDefaults( widget, settings.defaults ); testWidgetOverrides( widget ); testBasicUsage( widget ); diff --git a/tests/unit/accordion/common.js b/tests/unit/accordion/common.js index 8a859f0ca..1a8ce55c4 100644 --- a/tests/unit/accordion/common.js +++ b/tests/unit/accordion/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/accordion" + "ui/widgets/accordion" ], function( common ) { common.testWidget( "accordion", { diff --git a/tests/unit/accordion/core.js b/tests/unit/accordion/core.js index 0a3931162..ed538c368 100644 --- a/tests/unit/accordion/core.js +++ b/tests/unit/accordion/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/accordion" + "ui/widgets/accordion" ], function( $, testHelper ) { var setupTeardown = testHelper.setupTeardown, diff --git a/tests/unit/accordion/events.js b/tests/unit/accordion/events.js index fef1a0aac..03aee3434 100644 --- a/tests/unit/accordion/events.js +++ b/tests/unit/accordion/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/accordion" + "ui/widgets/accordion" ], function( $, testHelper ) { var setupTeardown = testHelper.setupTeardown, diff --git a/tests/unit/accordion/helper.js b/tests/unit/accordion/helper.js index 5eb3a4bc3..ec9b7ecb8 100644 --- a/tests/unit/accordion/helper.js +++ b/tests/unit/accordion/helper.js @@ -1,7 +1,7 @@ define( [ "jquery", "lib/helper", - "ui/accordion" + "ui/widgets/accordion" ], function( $, helper ) { return $.extend( helper, { diff --git a/tests/unit/accordion/methods.js b/tests/unit/accordion/methods.js index efabfed10..455e80c58 100644 --- a/tests/unit/accordion/methods.js +++ b/tests/unit/accordion/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/accordion" + "ui/widgets/accordion" ], function( $, testHelper ) { var equalHeight = testHelper.equalHeight, diff --git a/tests/unit/accordion/options.js b/tests/unit/accordion/options.js index 52d54ed32..06248d6cb 100644 --- a/tests/unit/accordion/options.js +++ b/tests/unit/accordion/options.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/accordion" + "ui/widgets/accordion" ], function( $, testHelper ) { var equalHeight = testHelper.equalHeight, diff --git a/tests/unit/autocomplete/common.js b/tests/unit/autocomplete/common.js index 5ee7cdda0..94e98048d 100644 --- a/tests/unit/autocomplete/common.js +++ b/tests/unit/autocomplete/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/autocomplete" + "ui/widgets/autocomplete" ], function( common ) { common.testWidget( "autocomplete", { diff --git a/tests/unit/autocomplete/core.js b/tests/unit/autocomplete/core.js index 184bcdbf4..d57f2a980 100644 --- a/tests/unit/autocomplete/core.js +++ b/tests/unit/autocomplete/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/autocomplete" + "ui/widgets/autocomplete" ], function( $ ) { module( "autocomplete: core" ); diff --git a/tests/unit/autocomplete/events.js b/tests/unit/autocomplete/events.js index 8f96fb77f..59d5dd540 100644 --- a/tests/unit/autocomplete/events.js +++ b/tests/unit/autocomplete/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/autocomplete" + "ui/widgets/autocomplete" ], function( $ ) { module( "autocomplete: events" ); diff --git a/tests/unit/autocomplete/methods.js b/tests/unit/autocomplete/methods.js index 32080207a..f614c13cd 100644 --- a/tests/unit/autocomplete/methods.js +++ b/tests/unit/autocomplete/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/autocomplete" + "ui/widgets/autocomplete" ], function( $ ) { module( "autocomplete: methods" ); diff --git a/tests/unit/autocomplete/options.js b/tests/unit/autocomplete/options.js index 06c75722b..7d281fb31 100644 --- a/tests/unit/autocomplete/options.js +++ b/tests/unit/autocomplete/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/autocomplete" + "ui/widgets/autocomplete" ], function( $ ) { module( "autocomplete: options" ); diff --git a/tests/unit/button/common.js b/tests/unit/button/common.js index d376f4f05..0372cddbf 100644 --- a/tests/unit/button/common.js +++ b/tests/unit/button/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/button" + "ui/widgets/button" ], function( common ) { common.testWidget( "button", { diff --git a/tests/unit/button/core.js b/tests/unit/button/core.js index 8539464ba..f3ae2e583 100644 --- a/tests/unit/button/core.js +++ b/tests/unit/button/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module("button: core"); diff --git a/tests/unit/button/events.js b/tests/unit/button/events.js index 63550e2f8..d778b4a2b 100644 --- a/tests/unit/button/events.js +++ b/tests/unit/button/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module("button: events"); diff --git a/tests/unit/button/methods.js b/tests/unit/button/methods.js index be36096b2..29e917022 100644 --- a/tests/unit/button/methods.js +++ b/tests/unit/button/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module("button: methods"); diff --git a/tests/unit/button/options.js b/tests/unit/button/options.js index 23020fc10..ad4169e14 100644 --- a/tests/unit/button/options.js +++ b/tests/unit/button/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module( "button: options" ); diff --git a/tests/unit/calendar/common.js b/tests/unit/calendar/common.js index ffbb4c5a3..5dae54464 100644 --- a/tests/unit/calendar/common.js +++ b/tests/unit/calendar/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/calendar", + "ui/widgets/calendar", "globalize-locales" ], function( common ) { diff --git a/tests/unit/calendar/core.js b/tests/unit/calendar/core.js index 1f30419ac..23e5da43a 100644 --- a/tests/unit/calendar/core.js +++ b/tests/unit/calendar/core.js @@ -1,9 +1,8 @@ define( [ "jquery", "./helper", - "globalize", - "ui/calendar" -], function( $, testHelper, Globalize ) { + "ui/widgets/calendar" +], function( $, testHelper ) { module( "calendar: core" ); diff --git a/tests/unit/calendar/methods.js b/tests/unit/calendar/methods.js index e28d30d6b..23989860c 100644 --- a/tests/unit/calendar/methods.js +++ b/tests/unit/calendar/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/calendar" + "ui/widgets/calendar" ], function( $, testHelper ) { module( "calendar: methods" ); diff --git a/tests/unit/calendar/options.js b/tests/unit/calendar/options.js index c6049fce3..5af5e479e 100644 --- a/tests/unit/calendar/options.js +++ b/tests/unit/calendar/options.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/calendar" + "ui/widgets/calendar" ], function( $, testHelper ) { module( "calendar: options" ); diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js index ac9f28e00..d1b65403e 100644 --- a/tests/unit/core/core.js +++ b/tests/unit/core/core.js @@ -1,7 +1,9 @@ define( [ "jquery", "lib/common", - "ui/core" + "ui/form", + "ui/labels", + "ui/unique-id" ], function( $, common ) { module( "core - jQuery extensions" ); diff --git a/tests/unit/core/selector.js b/tests/unit/core/selector.js index ff4bb064a..e553e769d 100644 --- a/tests/unit/core/selector.js +++ b/tests/unit/core/selector.js @@ -1,6 +1,9 @@ define( [ "jquery", - "ui/core" + "ui/data", + "ui/escape-selector", + "ui/focusable", + "ui/tabbable" ], function( $ ) { module( "core - selectors" ); diff --git a/tests/unit/datepicker/common.js b/tests/unit/datepicker/common.js index 6389adaec..61c7ace43 100644 --- a/tests/unit/datepicker/common.js +++ b/tests/unit/datepicker/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/datepicker", + "ui/widgets/datepicker", "globalize-locales" ], function( common ) { diff --git a/tests/unit/datepicker/core.js b/tests/unit/datepicker/core.js index a9f5b0abf..2a8910875 100644 --- a/tests/unit/datepicker/core.js +++ b/tests/unit/datepicker/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/datepicker" + "ui/widgets/datepicker" ], function( $, testHelper ) { module( "datepicker: core" ); diff --git a/tests/unit/datepicker/events.js b/tests/unit/datepicker/events.js index dcadfecf9..833316ce4 100644 --- a/tests/unit/datepicker/events.js +++ b/tests/unit/datepicker/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/datepicker" + "ui/widgets/datepicker" ], function( $, testHelper ) { module( "datepicker: events" ); diff --git a/tests/unit/datepicker/helper.js b/tests/unit/datepicker/helper.js index 7cc21bb66..81fdd9d00 100644 --- a/tests/unit/datepicker/helper.js +++ b/tests/unit/datepicker/helper.js @@ -1,7 +1,7 @@ define( [ "jquery", "lib/helper", - "ui/datepicker" + "ui/widgets/datepicker" ], function( $, helper ) { return $.extend( helper, { diff --git a/tests/unit/datepicker/methods.js b/tests/unit/datepicker/methods.js index db3762fff..f05958af0 100644 --- a/tests/unit/datepicker/methods.js +++ b/tests/unit/datepicker/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/datepicker" + "ui/widgets/datepicker" ], function( $, testHelper ) { module( "datepicker: methods" ); diff --git a/tests/unit/datepicker/options.js b/tests/unit/datepicker/options.js index 6bad27b6a..75d745460 100644 --- a/tests/unit/datepicker/options.js +++ b/tests/unit/datepicker/options.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/datepicker" + "ui/widgets/datepicker" ], function( $, testHelper ) { module( "datepicker: options" ); diff --git a/tests/unit/dialog/common-deprecated.js b/tests/unit/dialog/common-deprecated.js index 7b0091277..69153039c 100644 --- a/tests/unit/dialog/common-deprecated.js +++ b/tests/unit/dialog/common-deprecated.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/dialog" + "ui/widgets/dialog" ], function( common ) { common.testWidget( "dialog", { diff --git a/tests/unit/dialog/common.js b/tests/unit/dialog/common.js index 389b2ddff..8722d1753 100644 --- a/tests/unit/dialog/common.js +++ b/tests/unit/dialog/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/dialog" + "ui/widgets/dialog" ], function( common ) { common.testWidget( "dialog", { diff --git a/tests/unit/dialog/core.js b/tests/unit/dialog/core.js index 770d9f543..1560c34ac 100644 --- a/tests/unit/dialog/core.js +++ b/tests/unit/dialog/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/dialog" + "ui/widgets/dialog" ], function( $ ) { // TODO add teardown callback to remove dialogs diff --git a/tests/unit/dialog/deprecated.js b/tests/unit/dialog/deprecated.js index 1f7087c57..2d75cad0d 100644 --- a/tests/unit/dialog/deprecated.js +++ b/tests/unit/dialog/deprecated.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/dialog" + "ui/widgets/dialog" ], function( $ ) { module( "dialog (deprecated): options" ); diff --git a/tests/unit/dialog/events.js b/tests/unit/dialog/events.js index 0e48b7afa..13c452501 100644 --- a/tests/unit/dialog/events.js +++ b/tests/unit/dialog/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/dialog" + "ui/widgets/dialog" ], function( $, testHelper ) { module("dialog: events"); diff --git a/tests/unit/dialog/helper.js b/tests/unit/dialog/helper.js index f84d1d624..87ca9c172 100644 --- a/tests/unit/dialog/helper.js +++ b/tests/unit/dialog/helper.js @@ -1,7 +1,7 @@ define( [ "jquery", "lib/helper", - "ui/dialog" + "ui/widgets/dialog" ], function( $, helper ) { return $.extend( helper, { diff --git a/tests/unit/dialog/methods.js b/tests/unit/dialog/methods.js index cee0cd3a7..a730350b1 100644 --- a/tests/unit/dialog/methods.js +++ b/tests/unit/dialog/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/dialog" + "ui/widgets/dialog" ], function( $ ) { module("dialog: methods", { diff --git a/tests/unit/dialog/options.js b/tests/unit/dialog/options.js index 6de336fd6..c4f1b3e15 100644 --- a/tests/unit/dialog/options.js +++ b/tests/unit/dialog/options.js @@ -1,9 +1,9 @@ define( [ "jquery", "./helper", - "ui/dialog", - "ui/effect-blind", - "ui/effect-explode" + "ui/widgets/dialog", + "ui/effects/effect-blind", + "ui/effects/effect-explode" ], function( $, testHelper ) { module("dialog: options"); diff --git a/tests/unit/draggable/common.js b/tests/unit/draggable/common.js index 7ae032c0f..d09e6b7b7 100644 --- a/tests/unit/draggable/common.js +++ b/tests/unit/draggable/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/draggable" + "ui/widgets/draggable" ], function( common ) { common.testWidget( "draggable", { diff --git a/tests/unit/draggable/core.js b/tests/unit/draggable/core.js index 802ed2928..30563b622 100644 --- a/tests/unit/draggable/core.js +++ b/tests/unit/draggable/core.js @@ -1,9 +1,9 @@ define( [ "jquery", "./helper", - "ui/draggable", - "ui/droppable", - "ui/resizable" + "ui/widgets/draggable", + "ui/widgets/droppable", + "ui/widgets/resizable" ], function( $, testHelper ) { module( "draggable: core" ); diff --git a/tests/unit/draggable/events.js b/tests/unit/draggable/events.js index ebbf606ef..7e276092b 100644 --- a/tests/unit/draggable/events.js +++ b/tests/unit/draggable/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/draggable" + "ui/widgets/draggable" ], function( $ ) { var element; diff --git a/tests/unit/draggable/helper.js b/tests/unit/draggable/helper.js index 4af87d37f..7aabe2a00 100644 --- a/tests/unit/draggable/helper.js +++ b/tests/unit/draggable/helper.js @@ -1,7 +1,7 @@ define( [ "jquery", "lib/helper", - "ui/draggable" + "ui/widgets/draggable" ], function( $, helper ) { return $.extend( helper, { diff --git a/tests/unit/draggable/methods.js b/tests/unit/draggable/methods.js index 195e9e2fb..10a17efdb 100644 --- a/tests/unit/draggable/methods.js +++ b/tests/unit/draggable/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/draggable" + "ui/widgets/draggable" ], function( $, testHelper ) { var element; diff --git a/tests/unit/draggable/options.js b/tests/unit/draggable/options.js index 877b4275c..e1fd8288a 100644 --- a/tests/unit/draggable/options.js +++ b/tests/unit/draggable/options.js @@ -1,9 +1,9 @@ define( [ "jquery", "./helper", - "ui/draggable", - "ui/droppable", - "ui/sortable" + "ui/widgets/draggable", + "ui/widgets/droppable", + "ui/widgets/sortable" ], function( $, testHelper ) { // TODO: This doesn't actually test whether append happened, possibly remove diff --git a/tests/unit/droppable/common-deprecated.js b/tests/unit/droppable/common-deprecated.js index 9d2f6c6b6..e9fdc69cc 100644 --- a/tests/unit/droppable/common-deprecated.js +++ b/tests/unit/droppable/common-deprecated.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/droppable" + "ui/widgets/droppable" ], function( common ) { common.testWidget( "droppable", { diff --git a/tests/unit/droppable/common.js b/tests/unit/droppable/common.js index ef8e11692..d3bffc67b 100644 --- a/tests/unit/droppable/common.js +++ b/tests/unit/droppable/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/droppable" + "ui/widgets/droppable" ], function( common ) { common.testWidget( "droppable", { diff --git a/tests/unit/droppable/core.js b/tests/unit/droppable/core.js index 43608353d..75951c1bc 100644 --- a/tests/unit/droppable/core.js +++ b/tests/unit/droppable/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/droppable" + "ui/widgets/droppable" ], function( $, testHelper ) { module("droppable: core"); diff --git a/tests/unit/droppable/events.js b/tests/unit/droppable/events.js index a60d9292e..9c84b099f 100644 --- a/tests/unit/droppable/events.js +++ b/tests/unit/droppable/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/droppable" + "ui/widgets/droppable" ], function( $ ) { module( "droppable: events" ); diff --git a/tests/unit/droppable/methods.js b/tests/unit/droppable/methods.js index 1c9bba023..10ac48499 100644 --- a/tests/unit/droppable/methods.js +++ b/tests/unit/droppable/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/droppable" + "ui/widgets/droppable" ], function( $, testHelper ) { module("droppable: methods"); diff --git a/tests/unit/droppable/options.js b/tests/unit/droppable/options.js index c7c0dbdd6..2fdf483d2 100644 --- a/tests/unit/droppable/options.js +++ b/tests/unit/droppable/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/droppable" + "ui/widgets/droppable" ], function( $ ) { module( "droppable: options" ); diff --git a/tests/unit/effects/core.js b/tests/unit/effects/core.js index db83ca093..c8e7c2632 100644 --- a/tests/unit/effects/core.js +++ b/tests/unit/effects/core.js @@ -2,21 +2,21 @@ define( [ "jquery", "lib/common", "ui/effect", - "ui/effect-blind", - "ui/effect-bounce", - "ui/effect-clip", - "ui/effect-drop", - "ui/effect-explode", - "ui/effect-fade", - "ui/effect-fold", - "ui/effect-highlight", - "ui/effect-puff", - "ui/effect-pulsate", - "ui/effect-scale", - "ui/effect-shake", - "ui/effect-size", - "ui/effect-slide", - "ui/effect-transfer" + "ui/effects/effect-blind", + "ui/effects/effect-bounce", + "ui/effects/effect-clip", + "ui/effects/effect-drop", + "ui/effects/effect-explode", + "ui/effects/effect-fade", + "ui/effects/effect-fold", + "ui/effects/effect-highlight", + "ui/effects/effect-puff", + "ui/effects/effect-pulsate", + "ui/effects/effect-scale", + "ui/effects/effect-shake", + "ui/effects/effect-size", + "ui/effects/effect-slide", + "ui/effects/effect-transfer" ], function( $, common ) { function present( value, array, message ) { diff --git a/tests/unit/effects/scale.js b/tests/unit/effects/scale.js index 186daf09f..0558810c8 100644 --- a/tests/unit/effects/scale.js +++ b/tests/unit/effects/scale.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/effect-scale" + "ui/effects/effect-scale" ], function( $ ) { module( "effect.scale: Scale" ); diff --git a/tests/unit/menu/common.js b/tests/unit/menu/common.js index 0f0a04de8..81674be35 100644 --- a/tests/unit/menu/common.js +++ b/tests/unit/menu/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/menu" + "ui/widgets/menu" ], function( common ) { common.testWidget( "menu", { diff --git a/tests/unit/menu/core.js b/tests/unit/menu/core.js index dc853be3c..68f613ee1 100644 --- a/tests/unit/menu/core.js +++ b/tests/unit/menu/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/menu" + "ui/widgets/menu" ], function( $, testHelper ) { module( "menu: core" ); diff --git a/tests/unit/menu/events.js b/tests/unit/menu/events.js index 88a1f288c..8a4b92fff 100644 --- a/tests/unit/menu/events.js +++ b/tests/unit/menu/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/menu" + "ui/widgets/menu" ], function( $, testHelper ) { var log = testHelper.log, diff --git a/tests/unit/menu/methods.js b/tests/unit/menu/methods.js index e322ab214..28482d65d 100644 --- a/tests/unit/menu/methods.js +++ b/tests/unit/menu/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/menu" + "ui/widgets/menu" ], function( $, testHelper ) { var log = testHelper.log, diff --git a/tests/unit/menu/options.js b/tests/unit/menu/options.js index 8994b026f..e22adccf6 100644 --- a/tests/unit/menu/options.js +++ b/tests/unit/menu/options.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/menu" + "ui/widgets/menu" ], function( $, testHelper ) { var log = testHelper.log, diff --git a/tests/unit/progressbar/common.js b/tests/unit/progressbar/common.js index c949f136f..baadb6d53 100644 --- a/tests/unit/progressbar/common.js +++ b/tests/unit/progressbar/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/progressbar" + "ui/widgets/progressbar" ], function( common ) { common.testWidget( "progressbar", { diff --git a/tests/unit/progressbar/core.js b/tests/unit/progressbar/core.js index 05eea9ef7..8c09f67ae 100644 --- a/tests/unit/progressbar/core.js +++ b/tests/unit/progressbar/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/progressbar" + "ui/widgets/progressbar" ], function( $ ) { module( "progressbar: core" ); diff --git a/tests/unit/progressbar/events.js b/tests/unit/progressbar/events.js index a40b2c432..7f4926466 100644 --- a/tests/unit/progressbar/events.js +++ b/tests/unit/progressbar/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/progressbar" + "ui/widgets/progressbar" ], function( $ ) { module( "progressbar: events" ); diff --git a/tests/unit/progressbar/methods.js b/tests/unit/progressbar/methods.js index eaf0a5c76..00de2f46e 100644 --- a/tests/unit/progressbar/methods.js +++ b/tests/unit/progressbar/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/progressbar" + "ui/widgets/progressbar" ], function( $ ) { module( "progressbar: methods" ); diff --git a/tests/unit/progressbar/options.js b/tests/unit/progressbar/options.js index 7b6ac9db2..533c15351 100644 --- a/tests/unit/progressbar/options.js +++ b/tests/unit/progressbar/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/progressbar" + "ui/widgets/progressbar" ], function( $ ) { module( "progressbar: options" ); diff --git a/tests/unit/resizable/common.js b/tests/unit/resizable/common.js index 822a4db87..6096446f3 100644 --- a/tests/unit/resizable/common.js +++ b/tests/unit/resizable/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/resizable" + "ui/widgets/resizable" ], function( common ) { common.testWidget( "resizable", { diff --git a/tests/unit/resizable/core.js b/tests/unit/resizable/core.js index 8c21fbd7d..450fd6ef8 100644 --- a/tests/unit/resizable/core.js +++ b/tests/unit/resizable/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/resizable" + "ui/widgets/resizable" ], function( $, testHelper ) { module("resizable: core"); diff --git a/tests/unit/resizable/events.js b/tests/unit/resizable/events.js index 2a06f87cc..eb64400c6 100644 --- a/tests/unit/resizable/events.js +++ b/tests/unit/resizable/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/resizable" + "ui/widgets/resizable" ], function( $, testHelper ) { module("resizable: events"); diff --git a/tests/unit/resizable/methods.js b/tests/unit/resizable/methods.js index a7056a105..ed79ef621 100644 --- a/tests/unit/resizable/methods.js +++ b/tests/unit/resizable/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/resizable" + "ui/widgets/resizable" ], function( $ ) { module( "resizable: methods" ); diff --git a/tests/unit/resizable/options.js b/tests/unit/resizable/options.js index 7d9615b64..1e643a576 100644 --- a/tests/unit/resizable/options.js +++ b/tests/unit/resizable/options.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/resizable" + "ui/widgets/resizable" ], function( $, testHelper ) { module("resizable: options"); diff --git a/tests/unit/selectable/common.js b/tests/unit/selectable/common.js index 9a14e6df5..317fde562 100644 --- a/tests/unit/selectable/common.js +++ b/tests/unit/selectable/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/selectable" + "ui/widgets/selectable" ], function( common ) { common.testWidget( "selectable", { diff --git a/tests/unit/selectable/events.js b/tests/unit/selectable/events.js index 6eb99f325..5d4e48996 100644 --- a/tests/unit/selectable/events.js +++ b/tests/unit/selectable/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "lib/helper", - "ui/selectable" + "ui/widgets/selectable" ], function( $, testHelpers ) { module("selectable: events"); diff --git a/tests/unit/selectable/methods.js b/tests/unit/selectable/methods.js index 045809670..ee60e4ebf 100644 --- a/tests/unit/selectable/methods.js +++ b/tests/unit/selectable/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/selectable" + "ui/widgets/selectable" ], function( $ ) { module("selectable: methods"); diff --git a/tests/unit/selectable/options.js b/tests/unit/selectable/options.js index cdbfb4aab..6bb898d26 100644 --- a/tests/unit/selectable/options.js +++ b/tests/unit/selectable/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/selectable" + "ui/widgets/selectable" ], function( $ ) { module("selectable: options"); diff --git a/tests/unit/selectmenu/common.js b/tests/unit/selectmenu/common.js index b24b8dace..758e004ba 100644 --- a/tests/unit/selectmenu/common.js +++ b/tests/unit/selectmenu/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/selectmenu" + "ui/widgets/selectmenu" ], function( common ) { common.testWidget( "selectmenu", { diff --git a/tests/unit/selectmenu/core.js b/tests/unit/selectmenu/core.js index e5807817e..96e83f69b 100644 --- a/tests/unit/selectmenu/core.js +++ b/tests/unit/selectmenu/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/selectmenu" + "ui/widgets/selectmenu" ], function( $ ) { module( "selectmenu: core" ); diff --git a/tests/unit/selectmenu/events.js b/tests/unit/selectmenu/events.js index d5c463fa9..2ab20c46c 100644 --- a/tests/unit/selectmenu/events.js +++ b/tests/unit/selectmenu/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/selectmenu" + "ui/widgets/selectmenu" ], function( $ ) { module( "selectmenu: events", { diff --git a/tests/unit/selectmenu/methods.js b/tests/unit/selectmenu/methods.js index 8481e804e..a386655ce 100644 --- a/tests/unit/selectmenu/methods.js +++ b/tests/unit/selectmenu/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/selectmenu" + "ui/widgets/selectmenu" ], function( $ ) { module( "selectmenu: methods" ); diff --git a/tests/unit/selectmenu/options.js b/tests/unit/selectmenu/options.js index deb7a6d3a..be2565e37 100644 --- a/tests/unit/selectmenu/options.js +++ b/tests/unit/selectmenu/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/selectmenu" + "ui/widgets/selectmenu" ], function( $ ) { module( "selectmenu: options" ); diff --git a/tests/unit/slider/common.js b/tests/unit/slider/common.js index 77004d159..e623a7402 100644 --- a/tests/unit/slider/common.js +++ b/tests/unit/slider/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/slider" + "ui/widgets/slider" ], function( common ) { common.testWidget( "slider", { diff --git a/tests/unit/slider/core.js b/tests/unit/slider/core.js index 797d5525c..7fdb8c68c 100644 --- a/tests/unit/slider/core.js +++ b/tests/unit/slider/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/slider" + "ui/widgets/slider" ], function( $ ) { var element, options; diff --git a/tests/unit/slider/events.js b/tests/unit/slider/events.js index db771ec27..0256a2093 100644 --- a/tests/unit/slider/events.js +++ b/tests/unit/slider/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/slider" + "ui/widgets/slider" ], function( $ ) { module( "slider: events" ); diff --git a/tests/unit/slider/methods.js b/tests/unit/slider/methods.js index bddafefca..5a87edfda 100644 --- a/tests/unit/slider/methods.js +++ b/tests/unit/slider/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/slider" + "ui/widgets/slider" ], function( $ ) { module( "slider: methods" ); diff --git a/tests/unit/slider/options.js b/tests/unit/slider/options.js index 02d7f8891..3853c4c5d 100644 --- a/tests/unit/slider/options.js +++ b/tests/unit/slider/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/slider" + "ui/widgets/slider" ], function( $ ) { var element, options; diff --git a/tests/unit/sortable/common.js b/tests/unit/sortable/common.js index ab43251ab..aefb28b70 100644 --- a/tests/unit/sortable/common.js +++ b/tests/unit/sortable/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/sortable" + "ui/widgets/sortable" ], function( common ) { common.testWidget( "sortable", { diff --git a/tests/unit/sortable/core.js b/tests/unit/sortable/core.js index 7e973ec05..68f275604 100644 --- a/tests/unit/sortable/core.js +++ b/tests/unit/sortable/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/sortable" + "ui/widgets/sortable" ], function( $, testHelper ) { module( "sortable: core" ); diff --git a/tests/unit/sortable/events.js b/tests/unit/sortable/events.js index 267534b16..bf5579fde 100644 --- a/tests/unit/sortable/events.js +++ b/tests/unit/sortable/events.js @@ -1,8 +1,8 @@ define( [ "jquery", "./helper", - "ui/sortable", - "ui/draggable" + "ui/widgets/sortable", + "ui/widgets/draggable" ], function( $, testHelper ) { module("sortable: events"); diff --git a/tests/unit/sortable/methods.js b/tests/unit/sortable/methods.js index d88b8089f..f58ac052d 100644 --- a/tests/unit/sortable/methods.js +++ b/tests/unit/sortable/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/sortable" + "ui/widgets/sortable" ], function( $, testHelper ) { module("sortable: methods"); diff --git a/tests/unit/sortable/options.js b/tests/unit/sortable/options.js index 930f339e6..744839096 100644 --- a/tests/unit/sortable/options.js +++ b/tests/unit/sortable/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/sortable" + "ui/widgets/sortable" ], function( $ ) { module("sortable: options"); diff --git a/tests/unit/spinner/common-deprecated.js b/tests/unit/spinner/common-deprecated.js index 2c40df76a..8ff50fa25 100644 --- a/tests/unit/spinner/common-deprecated.js +++ b/tests/unit/spinner/common-deprecated.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/spinner" + "ui/widgets/spinner" ], function( common ) { common.testWidget( "spinner", { diff --git a/tests/unit/spinner/common.js b/tests/unit/spinner/common.js index 2c40df76a..8ff50fa25 100644 --- a/tests/unit/spinner/common.js +++ b/tests/unit/spinner/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/spinner" + "ui/widgets/spinner" ], function( common ) { common.testWidget( "spinner", { diff --git a/tests/unit/spinner/core.js b/tests/unit/spinner/core.js index 2dc118666..64824e128 100644 --- a/tests/unit/spinner/core.js +++ b/tests/unit/spinner/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/spinner" + "ui/widgets/spinner" ], function( $, testHelper ) { var simulateKeyDownUp = testHelper.simulateKeyDownUp; diff --git a/tests/unit/spinner/deprecated.js b/tests/unit/spinner/deprecated.js index c45a053fd..6e177ba4b 100644 --- a/tests/unit/spinner/deprecated.js +++ b/tests/unit/spinner/deprecated.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/spinner" + "ui/widgets/spinner" ], function( $ ) { var originalSpinner = $.ui.spinner.prototype; diff --git a/tests/unit/spinner/events.js b/tests/unit/spinner/events.js index 14445f48e..8fa409b99 100644 --- a/tests/unit/spinner/events.js +++ b/tests/unit/spinner/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/spinner" + "ui/widgets/spinner" ], function( $, testHelper ) { var simulateKeyDownUp = testHelper.simulateKeyDownUp; diff --git a/tests/unit/spinner/methods.js b/tests/unit/spinner/methods.js index d6bf325f2..6f165b936 100644 --- a/tests/unit/spinner/methods.js +++ b/tests/unit/spinner/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/spinner" + "ui/widgets/spinner" ], function( $, testHelper ) { var simulateKeyDownUp = testHelper.simulateKeyDownUp; diff --git a/tests/unit/spinner/options.js b/tests/unit/spinner/options.js index 424932da4..6a9d3e9b7 100644 --- a/tests/unit/spinner/options.js +++ b/tests/unit/spinner/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/spinner", + "ui/widgets/spinner", "globalize-old", "globalize-old/ja-JP" ], function( $ ) { diff --git a/tests/unit/tabs/common.js b/tests/unit/tabs/common.js index d3aa5cd48..42dd0c2fc 100644 --- a/tests/unit/tabs/common.js +++ b/tests/unit/tabs/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/tabs" + "ui/widgets/tabs" ], function( common ) { common.testWidget( "tabs", { diff --git a/tests/unit/tabs/core.js b/tests/unit/tabs/core.js index 0d9a7306b..b64f1d8f3 100644 --- a/tests/unit/tabs/core.js +++ b/tests/unit/tabs/core.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/tabs" + "ui/widgets/tabs" ], function( $, testHelper ) { var state = testHelper.state; diff --git a/tests/unit/tabs/events.js b/tests/unit/tabs/events.js index d54d47926..7e3d27fda 100644 --- a/tests/unit/tabs/events.js +++ b/tests/unit/tabs/events.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/tabs" + "ui/widgets/tabs" ], function( $, testHelper ) { var state = testHelper.state; diff --git a/tests/unit/tabs/helper.js b/tests/unit/tabs/helper.js index 5c9625f8c..132061753 100644 --- a/tests/unit/tabs/helper.js +++ b/tests/unit/tabs/helper.js @@ -1,7 +1,7 @@ define( [ "jquery", "lib/helper", - "ui/tabs" + "ui/widgets/tabs" ], function( $, helper ) { return $.extend( helper, { diff --git a/tests/unit/tabs/methods.js b/tests/unit/tabs/methods.js index 5975e5889..3be31c5f8 100644 --- a/tests/unit/tabs/methods.js +++ b/tests/unit/tabs/methods.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/tabs" + "ui/widgets/tabs" ], function( $, testHelper ) { var disabled = testHelper.disabled, diff --git a/tests/unit/tabs/options.js b/tests/unit/tabs/options.js index dc1a03505..39771efe6 100644 --- a/tests/unit/tabs/options.js +++ b/tests/unit/tabs/options.js @@ -1,7 +1,7 @@ define( [ "jquery", "./helper", - "ui/tabs" + "ui/widgets/tabs" ], function( $, testHelper ) { var disabled = testHelper.disabled, diff --git a/tests/unit/tooltip/common-deprecated.js b/tests/unit/tooltip/common-deprecated.js index d32e7656d..9e3c5ef59 100644 --- a/tests/unit/tooltip/common-deprecated.js +++ b/tests/unit/tooltip/common-deprecated.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/tooltip" + "ui/widgets/tooltip" ], function( common ) { common.testWidget( "tooltip", { diff --git a/tests/unit/tooltip/common.js b/tests/unit/tooltip/common.js index f8045fc33..77e3f02b8 100644 --- a/tests/unit/tooltip/common.js +++ b/tests/unit/tooltip/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/tooltip" + "ui/widgets/tooltip" ], function( common ) { common.testWidget( "tooltip", { diff --git a/tests/unit/tooltip/core.js b/tests/unit/tooltip/core.js index de0b90224..e7e22b0e6 100644 --- a/tests/unit/tooltip/core.js +++ b/tests/unit/tooltip/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/tooltip" + "ui/widgets/tooltip" ], function( $ ) { module( "tooltip: core" ); diff --git a/tests/unit/tooltip/deprecated.js b/tests/unit/tooltip/deprecated.js index 057171ee2..b1325057b 100644 --- a/tests/unit/tooltip/deprecated.js +++ b/tests/unit/tooltip/deprecated.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/tooltip" + "ui/widgets/tooltip" ], function( $ ) { module( "tooltip: (deprecated) options" ); diff --git a/tests/unit/tooltip/events.js b/tests/unit/tooltip/events.js index d8e9fa2a9..7ad36dc08 100644 --- a/tests/unit/tooltip/events.js +++ b/tests/unit/tooltip/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/tooltip" + "ui/widgets/tooltip" ], function( $ ) { module( "tooltip: events" ); diff --git a/tests/unit/tooltip/methods.js b/tests/unit/tooltip/methods.js index 3db7b8f7c..b5b6ca6e9 100644 --- a/tests/unit/tooltip/methods.js +++ b/tests/unit/tooltip/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/tooltip" + "ui/widgets/tooltip" ], function( $ ) { module( "tooltip: methods" ); diff --git a/tests/unit/tooltip/options.js b/tests/unit/tooltip/options.js index a0730414e..6aa576583 100644 --- a/tests/unit/tooltip/options.js +++ b/tests/unit/tooltip/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/tooltip" + "ui/widgets/tooltip" ], function( $ ) { module( "tooltip: options" ); diff --git a/themes/base/spinner.css b/themes/base/spinner.css index a7563e6b9..19a0bb7b6 100644 --- a/themes/base/spinner.css +++ b/themes/base/spinner.css @@ -19,7 +19,7 @@ border: none; background: none; color: inherit; - padding: 0; + padding: .222em 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; diff --git a/themes/base/theme.css b/themes/base/theme.css index 12b94c653..0e0561dc1 100644 --- a/themes/base/theme.css +++ b/themes/base/theme.css @@ -28,6 +28,9 @@ font-family: Arial,Helvetica,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget.ui-widget-content { + border: 1px solid #c5c5c5/*{borderColorDefault}*/; +} .ui-widget-content { border: 1px solid #dddddd/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ /*{bgImgUrlContent}*/ /*{bgContentXPos}*/ /*{bgContentYPos}*/ /*{bgContentRepeat}*/; diff --git a/ui/core.js b/ui/core.js index 9ac196d38..8737993d9 100644 --- a/ui/core.js +++ b/ui/core.js @@ -12,336 +12,25 @@ //>>group: UI Core //>>description: The core of jQuery UI, required for all interactions and widgets. //>>docs: http://api.jqueryui.com/category/ui-core/ -//>>demos: http://jqueryui.com/ -( function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "jquery" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -}( function( $ ) { - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "@VERSION", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - }, - - // Internal use only - safeActiveElement: function( document ) { - var activeElement; - - // Support: IE 9 only - // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> - try { - activeElement = document.activeElement; - } catch ( error ) { - activeElement = document.body; - } - - // Support: IE 9 - 11 only - // IE may return null instead of an element - // Interestingly, this only seems to occur when NOT in an iframe - if ( !activeElement ) { - activeElement = document.body; - } - - // Support: IE 11 only - // IE11 returns a seemingly empty object in some cases when accessing - // document.activeElement from an <iframe> - if ( !activeElement.nodeName ) { - activeElement = document.body; - } - - return activeElement; - }, - - // Internal use only - safeBlur: function( element ) { - - // Support: IE9 - 10 only - // If the <body> is blurred, IE will switch windows, see #9420 - if ( element && element.nodeName.toLowerCase() !== "body" ) { - $( element ).trigger( "blur" ); - } - }, - - // Internal use only - escapeSelector: ( function() { - var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; - return function( selector ) { - return selector.replace( selectorEscape, "\\$1" ); - }; - } )() -} ); - -// plugins -$.fn.extend( { - scrollParent: function( includeHidden ) { - var position = this.css( "position" ), - excludeStaticParent = position === "absolute", - overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, - scrollParent = this.parents().filter( function() { - var parent = $( this ); - if ( excludeStaticParent && parent.css( "position" ) === "static" ) { - return false; - } - return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); - } ).eq( 0 ); - - return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; - }, - - uniqueId: ( function() { - var uuid = 0; - - return function() { - return this.each( function() { - if ( !this.id ) { - this.id = "ui-id-" + ( ++uuid ); - } - } ); - }; - } )(), - - removeUniqueId: function() { - return this.each( function() { - if ( /^ui-id-\d+$/.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - } ); - }, - - // Support: IE8 Only - // IE8 does not support the form attribute and when it is supplied. It overwrites the form prop - // with a string, so we need to find the proper form. - form: function() { - return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); - }, - - labels: function() { - var ancestor, selector, id, labels, ancestors; - - // Check control.labels first - if ( this[ 0 ].labels && this[ 0 ].labels.length ) { - return this.pushStack( this[ 0 ].labels ); - } - - // Support: IE <= 11, FF <= 37, Android <= 2.3 only - // Above browsers do not support control.labels. Everything below is to support them - // as well as document fragments. control.labels does not work on document fragments - labels = this.eq( 0 ).parents( "label" ); - - // Look for the label based on the id - id = this.attr( "id" ); - if ( id ) { - - // We don't search against the document in case the element - // is disconnected from the DOM - ancestor = this.eq( 0 ).parents().last(); - - // Get a full set of top level ancestors - ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); - - // Create a selector for the label based on the id - selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; - - labels = labels.add( ancestors.find( selector ).addBack( selector ) ); - - } - - // Return whatever we have found for labels - return this.pushStack( labels ); - } -} ); - -// selectors -function focusable( element, hasTabindex ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; - return !!img && visible( img ); - } - return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || hasTabindex : - hasTabindex ) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter( function() { - return $.css( this, "visibility" ) === "hidden"; - } ).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo( function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - } ) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, $.attr( element, "tabindex" ) != null ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - hasTabindex = tabIndex != null; - return ( !hasTabindex || tabIndex >= 0 ) && focusable( element, hasTabindex ); - } -} ); - -// support: jQuery 1.7 only -// Not a great way to check versions, but since we only support 1.7+ and only -// need to detect <1.8, this is a simple check that should suffice. Checking -// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 -// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting -// 1.7 anymore). See #11197 for why we're not using feature detection. -if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { - - // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() - // Unlike jQuery Core 1.8+, these only support numeric values to set the - // dimensions in pixels - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - } ); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each( function() { - $( this ).css( type, reduce( this, size ) + "px" ); - } ); - }; - - $.fn[ "outer" + name ] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each( function() { - $( this ).css( type, reduce( this, size, true, margin ) + "px" ); - } ); - }; - } ); - - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.fn.extend( { - disableSelection: ( function() { - var eventType = "onselectstart" in document.createElement( "div" ) ? - "selectstart" : - "mousedown"; - - return function() { - return this.on( eventType + ".ui-disableSelection", function( event ) { - event.preventDefault(); - } ); - }; - } )(), - - enableSelection: function() { - return this.off( ".ui-disableSelection" ); - } -} ); - -// $.ui.plugin is deprecated. Use $.widget() extensions instead. -$.ui.plugin = { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args, allowDisconnected ) { - var i, - set = instance.plugins[ name ]; - - if ( !set ) { - return; - } - - if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } -}; - -} ) ); +// This file is deprecated in 1.12.0 to be removed in 1.13 +( function() { +define( [ + "jquery", + "./data", + "./disable-selection", + "./focusable", + "./form", + "./ie", + "./keycode", + "./labels", + "./jquery-1-7", + "./plugin", + "./safe-active-element", + "./safe-blur", + "./scroll-parent", + "./tabbable", + "./unique-id", + "./version" +] ); +} )(); diff --git a/ui/data.js b/ui/data.js new file mode 100644 index 000000000..e989902da --- /dev/null +++ b/ui/data.js @@ -0,0 +1,38 @@ +/*! + * jQuery UI :data @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :data +//>>group: Core +//>>description: Selects elements which have data stored under the specified key. +//>>docs: http://api.jqueryui.com/data-selector/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { +return $.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + } +} ); +} ) ); diff --git a/ui/disable-selection.js b/ui/disable-selection.js new file mode 100644 index 000000000..aa6df0173 --- /dev/null +++ b/ui/disable-selection.js @@ -0,0 +1,46 @@ +/*! + * jQuery UI Disable Selection @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: disableSelection +//>>group: Core +//>>description: Disable selection of text content within the set of matched elements. +//>>docs: http://api.jqueryui.com/disableSelection/ + +// This file is deprecated +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +return $.fn.extend( { + disableSelection: ( function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.on( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + } ); + }; + } )(), + + enableSelection: function() { + return this.off( ".ui-disableSelection" ); + } +} ); + +} ) ); diff --git a/ui/effect.js b/ui/effect.js index 86afea226..7fa45cfc0 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -17,7 +17,7 @@ if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. - define( [ "jquery" ], factory ); + define( [ "jquery", "./version" ], factory ); } else { // Browser globals diff --git a/ui/effect-blind.js b/ui/effects/effect-blind.js index 45358d759..76781f4c7 100644 --- a/ui/effect-blind.js +++ b/ui/effects/effect-blind.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-bounce.js b/ui/effects/effect-bounce.js index 8a5d58e30..06bc84426 100644 --- a/ui/effect-bounce.js +++ b/ui/effects/effect-bounce.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-clip.js b/ui/effects/effect-clip.js index 4eb24eb88..df3a1d644 100644 --- a/ui/effect-clip.js +++ b/ui/effects/effect-clip.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-drop.js b/ui/effects/effect-drop.js index 3ad90caa6..059fd54ca 100644 --- a/ui/effect-drop.js +++ b/ui/effects/effect-drop.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-explode.js b/ui/effects/effect-explode.js index 3e468675a..55c247d3e 100644 --- a/ui/effect-explode.js +++ b/ui/effects/effect-explode.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-fade.js b/ui/effects/effect-fade.js index ecc44722a..1373ae8a7 100644 --- a/ui/effect-fade.js +++ b/ui/effects/effect-fade.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-fold.js b/ui/effects/effect-fold.js index a61eef0ab..2214a1cf3 100644 --- a/ui/effect-fold.js +++ b/ui/effects/effect-fold.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-highlight.js b/ui/effects/effect-highlight.js index 721a3a05b..2ab587939 100644 --- a/ui/effect-highlight.js +++ b/ui/effects/effect-highlight.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-puff.js b/ui/effects/effect-puff.js index ac3f90a64..bfe922f0c 100644 --- a/ui/effect-puff.js +++ b/ui/effects/effect-puff.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect", + "../version", + "../effect", "./effect-scale" ], factory ); } else { diff --git a/ui/effect-pulsate.js b/ui/effects/effect-pulsate.js index f6f46da76..9fce19194 100644 --- a/ui/effect-pulsate.js +++ b/ui/effects/effect-pulsate.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-scale.js b/ui/effects/effect-scale.js index 5d76ac166..9e254b27e 100644 --- a/ui/effect-scale.js +++ b/ui/effects/effect-scale.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect", + "../version", + "../effect", "./effect-size" ], factory ); } else { diff --git a/ui/effect-shake.js b/ui/effects/effect-shake.js index 52240fed0..ada249aec 100644 --- a/ui/effect-shake.js +++ b/ui/effects/effect-shake.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-size.js b/ui/effects/effect-size.js index 16a2adac1..20af22777 100644 --- a/ui/effect-size.js +++ b/ui/effects/effect-size.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-slide.js b/ui/effects/effect-slide.js index 1f4013058..12e8c9ca8 100644 --- a/ui/effect-slide.js +++ b/ui/effects/effect-slide.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/effect-transfer.js b/ui/effects/effect-transfer.js index 41208b9e6..38f815875 100644 --- a/ui/effect-transfer.js +++ b/ui/effects/effect-transfer.js @@ -19,7 +19,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./effect" + "../version", + "../effect" ], factory ); } else { diff --git a/ui/escape-selector.js b/ui/escape-selector.js new file mode 100644 index 000000000..d43e4f816 --- /dev/null +++ b/ui/escape-selector.js @@ -0,0 +1,21 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +// Internal use only +return $.ui.escapeSelector = ( function() { + var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; + return function( selector ) { + return selector.replace( selectorEscape, "\\$1" ); + }; +} )(); + +} ) ); diff --git a/ui/focusable.js b/ui/focusable.js new file mode 100644 index 000000000..b6e86e062 --- /dev/null +++ b/ui/focusable.js @@ -0,0 +1,64 @@ +/*! + * jQuery UI Focusable @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: focusable +//>>group: Core +//>>description: Selects elements which can be focused. +//>>docs: http://api.jqueryui.com/focusable-selector/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +// selectors +$.ui.focusable = function( element, hasTabindex ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; + return !!img && visible( img ); + } + return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || hasTabindex : + hasTabindex ) && + // the element and all of its ancestors must be visible + visible( element ); +}; + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter( function() { + return $.css( this, "visibility" ) === "hidden"; + } ).length; +} + +$.extend( $.expr[ ":" ], { + focusable: function( element ) { + return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); + } +} ); + +return $.ui.focusable; + +} ) ); diff --git a/ui/form-reset-mixin.js b/ui/form-reset-mixin.js index a751f7f2a..21704708e 100644 --- a/ui/form-reset-mixin.js +++ b/ui/form-reset-mixin.js @@ -4,7 +4,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "ui/core" + "./form", + "./version" ], factory ); } else { diff --git a/ui/form.js b/ui/form.js new file mode 100644 index 000000000..cfb4bd280 --- /dev/null +++ b/ui/form.js @@ -0,0 +1,20 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +// Support: IE8 Only +// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop +// with a string, so we need to find the proper form. +return $.fn.form = function() { + return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); +}; + +} ) ); diff --git a/ui/ie.js b/ui/ie.js new file mode 100644 index 000000000..1ce6a8450 --- /dev/null +++ b/ui/ie.js @@ -0,0 +1,15 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +// This file is deprecated +return $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); +} ) ); diff --git a/ui/jquery-1-7.js b/ui/jquery-1-7.js new file mode 100644 index 000000000..29e008e8a --- /dev/null +++ b/ui/jquery-1-7.js @@ -0,0 +1,89 @@ +/*! + * jQuery UI Support for jQuery core 1.7.x @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + */ + +//>>label: jQuery 1.7 Support +//>>group: UI Core +//>>description: Support version 1.7.x of jQuery core + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}( function( $ ) { + +// support: jQuery 1.7 only +// Not a great way to check versions, but since we only support 1.7+ and only +// need to detect <1.8, this is a simple check that should suffice. Checking +// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 +// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting +// 1.7 anymore). See #11197 for why we're not using feature detection. +if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { + + // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() + // Unlike jQuery Core 1.8+, these only support numeric values to set the + // dimensions in pixels + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + } ); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size ) + "px" ); + } ); + }; + + $.fn[ "outer" + name ] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size, true, margin ) + "px" ); + } ); + }; + } ); + + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +} ) ); diff --git a/ui/keycode.js b/ui/keycode.js new file mode 100644 index 000000000..17687fbbd --- /dev/null +++ b/ui/keycode.js @@ -0,0 +1,45 @@ +/*! + * jQuery UI Keycode @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Keycode +//>>group: Core +//>>description: Provide keycodes as keynames +//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { +return $.ui.keyCode = { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 +}; + +} ) ); diff --git a/ui/labels.js b/ui/labels.js new file mode 100644 index 000000000..2a78d886b --- /dev/null +++ b/ui/labels.js @@ -0,0 +1,62 @@ +/*! + * jQuery UI Labels @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: labels +//>>group: Core +//>>description: Find all the labels associated with a given input +//>>docs: http://api.jqueryui.com/labels/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version", "./escape-selector" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +return $.fn.labels = function() { + var ancestor, selector, id, labels, ancestors; + + // Check control.labels first + if ( this[ 0 ].labels && this[ 0 ].labels.length ) { + return this.pushStack( this[ 0 ].labels ); + } + + // Support: IE <= 11, FF <= 37, Android <= 2.3 only + // Above browsers do not support control.labels. Everything below is to support them + // as well as document fragments. control.labels does not work on document fragments + labels = this.eq( 0 ).parents( "label" ); + + // Look for the label based on the id + id = this.attr( "id" ); + if ( id ) { + + // We don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.eq( 0 ).parents().last(); + + // Get a full set of top level ancestors + ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); + + // Create a selector for the label based on the id + selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; + + labels = labels.add( ancestors.find( selector ).addBack( selector ) ); + + } + + // Return whatever we have found for labels + return this.pushStack( labels ); +}; + +} ) ); diff --git a/ui/plugin.js b/ui/plugin.js new file mode 100644 index 000000000..0f1d9b040 --- /dev/null +++ b/ui/plugin.js @@ -0,0 +1,43 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +// $.ui.plugin is deprecated. Use $.widget() extensions instead. +return $.ui.plugin = { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args, allowDisconnected ) { + var i, + set = instance.plugins[ name ]; + + if ( !set ) { + return; + } + + if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } +}; + +} ) ); diff --git a/ui/position.js b/ui/position.js index 367fc3978..e9e805bb6 100644 --- a/ui/position.js +++ b/ui/position.js @@ -19,7 +19,7 @@ if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. - define( [ "jquery" ], factory ); + define( [ "jquery", "./version" ], factory ); } else { // Browser globals @@ -27,9 +27,6 @@ } }( function( $ ) { ( function() { - -$.ui = $.ui || {}; - var cachedScrollbarWidth, supportsOffsetFractions, max = Math.max, abs = Math.abs, @@ -142,12 +139,13 @@ $.position = { getWithinInfo: function( element ) { var withinElement = $( element || window ), isWindow = $.isWindow( withinElement[ 0 ] ), - isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, + hasOffset = !isWindow && !isDocument; return { element: withinElement, isWindow: isWindow, isDocument: isDocument, - offset: withinElement.offset() || { left: 0, top: 0 }, + offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), width: withinElement.outerWidth(), diff --git a/ui/safe-active-element.js b/ui/safe-active-element.js new file mode 100644 index 000000000..4d04add5f --- /dev/null +++ b/ui/safe-active-element.js @@ -0,0 +1,40 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { +return $.ui.safeActiveElement = function( document ) { + var activeElement; + + // Support: IE 9 only + // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> + try { + activeElement = document.activeElement; + } catch ( error ) { + activeElement = document.body; + } + + // Support: IE 9 - 11 only + // IE may return null instead of an element + // Interestingly, this only seems to occur when NOT in an iframe + if ( !activeElement ) { + activeElement = document.body; + } + + // Support: IE 11 only + // IE11 returns a seemingly empty object in some cases when accessing + // document.activeElement from an <iframe> + if ( !activeElement.nodeName ) { + activeElement = document.body; + } + + return activeElement; +}; + +} ) ); diff --git a/ui/safe-blur.js b/ui/safe-blur.js new file mode 100644 index 000000000..525878268 --- /dev/null +++ b/ui/safe-blur.js @@ -0,0 +1,21 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { +return $.ui.safeBlur = function( element ) { + + // Support: IE9 - 10 only + // If the <body> is blurred, IE will switch windows, see #9420 + if ( element && element.nodeName.toLowerCase() !== "body" ) { + $( element ).trigger( "blur" ); + } +}; + +} ) ); diff --git a/ui/scroll-parent.js b/ui/scroll-parent.js new file mode 100644 index 000000000..478b86ae3 --- /dev/null +++ b/ui/scroll-parent.js @@ -0,0 +1,42 @@ +/*! + * jQuery UI Scroll Parent @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: scrollParent +//>>group: Core +//>>description: Get the closest ancestor element that is scrollable. +//>>docs: http://api.jqueryui.com/scrollParent/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +return $.fn.scrollParent = function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); + } ).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; +}; + +} ) ); diff --git a/ui/tabbable.js b/ui/tabbable.js new file mode 100644 index 000000000..86bebb77b --- /dev/null +++ b/ui/tabbable.js @@ -0,0 +1,35 @@ +/*! + * jQuery UI Tabbable @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: focusable +//>>group: Core +//>>description: Selects elements which can be tabbed to. +//>>docs: http://api.jqueryui.com/tabbable-selector/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version", "./focusable" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +return $.extend( $.expr[ ":" ], { + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + hasTabindex = tabIndex != null; + return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); + } +} ); + +} ) ); diff --git a/ui/unique-id.js b/ui/unique-id.js new file mode 100644 index 000000000..a8db136e3 --- /dev/null +++ b/ui/unique-id.js @@ -0,0 +1,49 @@ +/*! + * jQuery UI Unique ID @VERSION + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: uniqueId +//>>group: Core +//>>description: Functions to generate and remove uniqueId's +//>>docs: http://api.jqueryui.com/uniqueId/ + +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +return $.fn.extend( { + uniqueId: ( function() { + var uuid = 0; + + return function() { + return this.each( function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + } ); + }; + } )(), + + removeUniqueId: function() { + return this.each( function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + } ); + } +} ); + +} ) ); diff --git a/ui/version.js b/ui/version.js new file mode 100644 index 000000000..fdd99f79f --- /dev/null +++ b/ui/version.js @@ -0,0 +1,17 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +$.ui = $.ui || {}; + +return $.ui.version = "@VERSION"; + +} ) ); diff --git a/ui/widget.js b/ui/widget.js index 603a49136..c6f228efd 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -17,7 +17,7 @@ if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. - define( [ "jquery" ], factory ); + define( [ "jquery", "./version" ], factory ); } else { // Browser globals diff --git a/ui/accordion.js b/ui/widgets/accordion.js index a9b843cd5..88e9bdb6f 100644 --- a/ui/accordion.js +++ b/ui/widgets/accordion.js @@ -22,8 +22,10 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget" + "../version", + "../keycode", + "../unique-id", + "../widget" ], factory ); } else { diff --git a/ui/autocomplete.js b/ui/widgets/autocomplete.js index de173cc4f..a36282dd5 100644 --- a/ui/autocomplete.js +++ b/ui/widgets/autocomplete.js @@ -22,10 +22,12 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget", - "./position", - "./menu" + "./menu", + "../keycode", + "../position", + "../safe-active-element", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/button.js b/ui/widgets/button.js index 70cc31680..f5509b520 100644 --- a/ui/button.js +++ b/ui/widgets/button.js @@ -22,8 +22,11 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", - "./widget" + "../data", + "../keycode", + "../labels", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/calendar.js b/ui/widgets/calendar.js index 02bdc5950..947d79d8d 100644 --- a/ui/calendar.js +++ b/ui/widgets/calendar.js @@ -25,8 +25,11 @@ "globalize-locales", "date", "./button", - "./core", - "./button" + "../widget", + "../version", + "../keycode", + "../unique-id", + "../tabbable" ], factory ); } else { diff --git a/ui/datepicker.js b/ui/widgets/datepicker.js index 2056d9443..5e0e47eb5 100644 --- a/ui/datepicker.js +++ b/ui/widgets/datepicker.js @@ -21,10 +21,11 @@ "jquery", "globalize", "globalize/date", - "./core", - "./widget", "./calendar", - "./position" + "../widget", + "../position", + "../version", + "../keycode" ], factory ); } else { diff --git a/ui/dialog.js b/ui/widgets/dialog.js index a9238329e..40f6c614f 100644 --- a/ui/dialog.js +++ b/ui/widgets/dialog.js @@ -22,13 +22,19 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget", "./button", "./draggable", "./mouse", - "./position", - "./resizable" + "./resizable", + "../focusable", + "../keycode", + "../position", + "../safe-active-element", + "../safe-blur", + "../tabbable", + "../unique-id", + "../version", + "../widget" ], factory ); } else { @@ -860,9 +866,8 @@ $.widget( "ui.dialog", { var overlays = this.document.data( "ui-dialog-overlays" ) - 1; if ( !overlays ) { - this.document - .off( "focusin" ) - .removeData( "ui-dialog-overlays" ); + this._off( this.document, "focusin" ); + this.document.removeData( "ui-dialog-overlays" ); } else { this.document.data( "ui-dialog-overlays", overlays ); } diff --git a/ui/draggable.js b/ui/widgets/draggable.js index a3cd5ba7d..ab9d24667 100644 --- a/ui/draggable.js +++ b/ui/widgets/draggable.js @@ -20,9 +20,14 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", "./mouse", - "./widget" + "../data", + "../plugin", + "../safe-active-element", + "../safe-blur", + "../scroll-parent", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/droppable.js b/ui/widgets/droppable.js index 74d54d077..3a8bd7109 100644 --- a/ui/droppable.js +++ b/ui/widgets/droppable.js @@ -19,10 +19,10 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", - "./widget", + "./draggable", "./mouse", - "./draggable" + "../version", + "../widget" ], factory ); } else { diff --git a/ui/menu.js b/ui/widgets/menu.js index 89281e4f0..3e1f71a3b 100644 --- a/ui/menu.js +++ b/ui/widgets/menu.js @@ -22,9 +22,12 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget", - "./position" + "../keycode", + "../position", + "../safe-active-element", + "../unique-id", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/mouse.js b/ui/widgets/mouse.js index f9c259552..80242c0b7 100644 --- a/ui/mouse.js +++ b/ui/widgets/mouse.js @@ -18,7 +18,9 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./widget" + "../ie", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/progressbar.js b/ui/widgets/progressbar.js index 4dc44d22a..a52cbb713 100644 --- a/ui/progressbar.js +++ b/ui/widgets/progressbar.js @@ -22,8 +22,8 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget" + "../version", + "../widget" ], factory ); } else { diff --git a/ui/resizable.js b/ui/widgets/resizable.js index 6e51f4aac..95cf918d9 100644 --- a/ui/resizable.js +++ b/ui/widgets/resizable.js @@ -22,9 +22,11 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", "./mouse", - "./widget" + "../disable-selection", + "../plugin", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/selectable.js b/ui/widgets/selectable.js index c1d445954..4edf46ad6 100644 --- a/ui/selectable.js +++ b/ui/widgets/selectable.js @@ -20,9 +20,9 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", "./mouse", - "./widget" + "../version", + "../widget" ], factory ); } else { diff --git a/ui/selectmenu.js b/ui/widgets/selectmenu.js index db2cea712..bf415a826 100644 --- a/ui/selectmenu.js +++ b/ui/widgets/selectmenu.js @@ -22,10 +22,14 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget", - "./position", - "./menu" + "./menu", + "../escape-selector", + "../keycode", + "../labels", + "../position", + "../unique-id", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/slider.js b/ui/widgets/slider.js index 830c1cbd7..1ab319ebb 100644 --- a/ui/slider.js +++ b/ui/widgets/slider.js @@ -22,9 +22,10 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", "./mouse", - "./widget" + "../keycode", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/sortable.js b/ui/widgets/sortable.js index 6d872cbe6..1d384a80e 100644 --- a/ui/sortable.js +++ b/ui/widgets/sortable.js @@ -20,9 +20,12 @@ // AMD. Register as an anonymous module. define([ "jquery", - "./core", "./mouse", - "./widget" + "../data", + "../ie", + "../scroll-parent", + "../version", + "../widget" ], factory ); } else { @@ -588,18 +591,20 @@ return $.widget("ui.sortable", $.ui.mouse, { _intersectsWithPointer: function(item) { - var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + var verticalDirection, horizontalDirection, + isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); + isOverElement = isOverElementHeight && isOverElementWidth; if (!isOverElement) { return false; } + verticalDirection = this._getDragVerticalDirection(); + horizontalDirection = this._getDragHorizontalDirection(); + return this.floating ? - ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + ( (horizontalDirection === "right" || verticalDirection === "down") ? 2 : 1 ) : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); }, diff --git a/ui/spinner.js b/ui/widgets/spinner.js index c56d2c918..bc0535700 100644 --- a/ui/spinner.js +++ b/ui/widgets/spinner.js @@ -22,9 +22,11 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget", - "./button" + "./button", + "../version", + "../keycode", + "../safe-active-element", + "../widget" ], factory ); } else { diff --git a/ui/tabs.js b/ui/widgets/tabs.js index f267ad4bf..0b7bf5850 100644 --- a/ui/tabs.js +++ b/ui/widgets/tabs.js @@ -22,8 +22,12 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget" + "../escape-selector", + "../keycode", + "../safe-active-element", + "../unique-id", + "../version", + "../widget" ], factory ); } else { diff --git a/ui/tooltip.js b/ui/widgets/tooltip.js index e18f3e19d..1c919582e 100644 --- a/ui/tooltip.js +++ b/ui/widgets/tooltip.js @@ -22,9 +22,11 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget", - "./position" + "../keycode", + "../position", + "../unique-id", + "../version", + "../widget" ], factory ); } else { |