Skip to content
Browse files

Merge branch 'master' into selectmenu

  • Loading branch information...
2 parents 94b3a65 + d6c6b7d commit 7ce8e0515ea7cc513c3c065946c85cf2d1aa5652 @fnagel fnagel committed
Showing with 9,920 additions and 10,502 deletions.
  1. +5 −0 .editorconfig
  2. +3 −3 .jshintrc
  3. +0 −13 build/.jshintrc
  4. +32 −0 build/release/changelog-shell
  5. +4 −33 build/release/release.js
  6. +5 −2 build/tasks/build.js
  7. +12 −14 build/tasks/testswarm.js
  8. +0 −1 demos/autocomplete/combobox.html
  9. +0 −1 demos/autocomplete/custom-data.html
  10. +1 −1 demos/button/icons.html
  11. +2 −0 demos/datepicker/localization.html
  12. +8 −6 demos/dialog/animated.html
  13. +0 −1 demos/dialog/default.html
  14. +0 −1 demos/dialog/modal-confirmation.html
  15. +0 −1 demos/dialog/modal-form.html
  16. +0 −1 demos/dialog/modal-message.html
  17. +0 −1 demos/dialog/modal.html
  18. +2 −2 demos/droppable/photo-manager.html
  19. +1 −1 demos/droppable/shopping-cart.html
  20. +41 −16 demos/menu/default.html
  21. +44 −0 demos/menu/icons.html
  22. +1 −2 demos/menu/index.html
  23. +0 −74 demos/menu/navigationmenu.html
  24. +0 −87 demos/menu/topalignmenu.html
  25. +4 −2 demos/position/cycler.html
  26. +0 −5 demos/position/default.html
  27. +1 −1 demos/slider/hotelrooms.html
  28. +0 −1 demos/slider/side-scroll.html
  29. +3 −0 demos/tooltip/custom-content.html
  30. +1 −1 demos/tooltip/forms.html
  31. +0 −39 external/jquery.bgiframe-2.1.2.js
  32. +0 −89 external/jquery.cookie.js
  33. +0 −122 external/jquery.metadata.js
  34. +1,615 −1,170 external/jshint.js
  35. +8 −10 grunt.js
  36. +1,664 −1,664 jquery-1.8.2.js
  37. +2 −7 package.json
  38. +2 −27 tests/.jshintrc
  39. +53 −53 tests/jquery-1.6.1.js
  40. +55 −55 tests/jquery-1.6.2.js
  41. +54 −54 tests/jquery-1.6.3.js
  42. +54 −54 tests/jquery-1.6.4.js
  43. +65 −65 tests/jquery-1.6.js
  44. +41 −41 tests/jquery-1.7.1.js
  45. +1 −1 tests/jquery-1.7.2.js
  46. +41 −41 tests/jquery-1.7.js
  47. +1,461 −1,461 tests/jquery-1.8.0.js
  48. +1,529 −1,529 tests/jquery-1.8.1.js
  49. +1,664 −1,664 tests/jquery-1.8.2.js
  50. +2 −2 tests/jquery.simulate.js
  51. +0 −3 tests/unit/accordion/accordion.html
  52. +0 −29 tests/unit/accordion/accordion_common_deprecated.js
  53. +0 −140 tests/unit/accordion/accordion_deprecated.html
  54. +0 −342 tests/unit/accordion/accordion_deprecated.js
  55. +28 −21 tests/unit/accordion/accordion_options.js
  56. +0 −72 tests/unit/all-active.html
  57. +5 −8 tests/unit/all.html
  58. +3 −4 tests/unit/autocomplete/autocomplete_core.js
  59. +3 −3 tests/unit/autocomplete/autocomplete_events.js
  60. +1 −1 tests/unit/autocomplete/autocomplete_options.js
  61. +1 −1 tests/unit/button/button_events.js
  62. +8 −0 tests/unit/button/button_tickets.js
  63. +5 −0 tests/unit/core/core.html
  64. +12 −0 tests/unit/core/selector.js
  65. +1 −11 tests/unit/datepicker/datepicker.html
  66. +60 −99 tests/unit/datepicker/datepicker_core.js
  67. +3 −1 tests/unit/datepicker/datepicker_defaults.js
  68. +24 −5 tests/unit/datepicker/datepicker_events.js
  69. +19 −19 tests/unit/datepicker/datepicker_methods.js
  70. +182 −128 tests/unit/datepicker/datepicker_options.js
  71. +22 −0 tests/unit/datepicker/datepicker_test_helpers.js
  72. +0 −88 tests/unit/datepicker/datepicker_tickets.js
  73. +3 −12 tests/unit/dialog/dialog.html
  74. +0 −2 tests/unit/dialog/dialog_common.js
  75. +10 −89 tests/unit/dialog/dialog_core.js
  76. +140 −113 tests/unit/dialog/dialog_events.js
  77. +41 −31 tests/unit/dialog/dialog_methods.js
  78. +146 −138 tests/unit/dialog/dialog_options.js
  79. +45 −0 tests/unit/dialog/dialog_test_helpers.js
  80. +20 −94 tests/unit/dialog/dialog_tickets.js
  81. +4 −10 tests/unit/draggable/draggable.html
  82. +1 −0 tests/unit/draggable/draggable_common.js
  83. +19 −39 tests/unit/draggable/draggable_core.js
  84. +30 −24 tests/unit/draggable/draggable_events.js
  85. +24 −29 tests/unit/draggable/draggable_methods.js
  86. +359 −315 tests/unit/draggable/draggable_options.js
  87. +57 −0 tests/unit/draggable/draggable_test_helpers.js
  88. +1 −10 tests/unit/droppable/droppable.html
  89. +1 −0 tests/unit/droppable/droppable_common.js
  90. +7 −14 tests/unit/droppable/droppable_core.js
  91. +7 −0 tests/unit/droppable/droppable_events.js
  92. +21 −19 tests/unit/droppable/droppable_methods.js
  93. +8 −5 tests/unit/droppable/droppable_options.js
  94. +10 −0 tests/unit/droppable/droppable_test_helpers.js
  95. +0 −3 tests/unit/effects/effects.html
  96. +16 −9 tests/unit/effects/effects_core.js
  97. +15 −15 tests/unit/menu/menu_events.js
  98. +10 −1 tests/unit/menu/menu_methods.js
  99. +2 −2 tests/unit/menu/menu_options.js
  100. +0 −3 tests/unit/position/position.html
  101. +3 −0 tests/unit/position/position_core.js
  102. +0 −56 tests/unit/position/position_deprecated.html
  103. +0 −33 tests/unit/position/position_deprecated.js
  104. +18 −0 tests/unit/progressbar/progressbar_options.js
  105. +1 −10 tests/unit/resizable/resizable.html
  106. +36 −32 tests/unit/resizable/resizable_core.js
  107. +4 −0 tests/unit/resizable/resizable_events.js
  108. +3 −0 tests/unit/resizable/resizable_methods.js
Sorry, we could not display the entire diff because it was too big.
View
5 .editorconfig
@@ -9,3 +9,8 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+
+[external/**]
+trim_trailing_whitespace = false
+insert_final_newline = varies
+end_of_line = varies
View
6 .jshintrc
@@ -3,10 +3,10 @@
"eqnull": true,
"eqeqeq": true,
"expr": true,
- "latedef": true,
"noarg": true,
+ "node": true,
"onevar": true,
- "smarttabs": true,
"trailing": true,
- "undef": true
+ "undef": true,
+ "unused": true
}
View
13 build/.jshintrc
@@ -1,13 +0,0 @@
-{
- "curly": true,
- "eqnull": true,
- "eqeqeq": true,
- "expr": true,
- "noarg": true,
- "node": true,
- "onevar": true,
- "smarttabs": true,
- "strict": false,
- "trailing": true,
- "undef": true
-}
View
32 build/release/changelog-shell
@@ -24,54 +24,86 @@ DELETE EVERYTHING ABOVE THE FOLLOWING LINE
## Build
+
## Core & Utilities
### UI Core
+
### Mouse
+
### Widget Factory
+
### Position
+
## Interactions
### Draggable
+
### Droppable
+
### Resizable
+
### Selectable
+
### Sortable
+
## Widgets
### Accordion
+
### Autocomplete
+
### Button
+
### Datepicker
+
### Dialog
+
+### Menu
+
+
### Progressbar
+
### Slider
+
+### Spinner
+
+
### Tabs
+
+### Tooltip
+
+
## Effects
+
### Individual effects
+
## CSS Framework
+
## Demos
+
## Website
+
### Download Builder
View
37 build/release/release.js
@@ -1,5 +1,7 @@
#!/usr/bin/env node
-/*global cat:true cd:true cp:true echo:true exec:true exit:true ls:true*/
+/*global cat:true cd:true echo:true exec:true exit:true*/
+
+"use strict";
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime,
fs = require( "fs" ),
@@ -41,9 +43,6 @@ walk([
section( "gathering contributors" ),
gatherContributors,
- section( "generating quick download" ),
- generateQuickDownload,
-
section( "updating trac" ),
updateTrac,
confirm
@@ -261,34 +260,6 @@ function gatherContributors() {
echo( "Stored contributors in " + contributorsPath.cyan + "." );
}
-function generateQuickDownload() {
- var config,
- downloadDir = repoDir + "/node_modules/download.jqueryui.com",
- filename = "jquery-ui-" + newVersion + ".custom.zip",
- destination = baseDir + "/" + filename;
-
- cd( downloadDir );
-
- // Update jQuery UI version for download builder
- config = JSON.parse( cat( "config.json" ) );
- config.jqueryUi = newVersion;
- JSON.stringify( config ).to( "config.json" );
-
- // Generate quick download
- // TODO: Find a way to avoid having to clone jquery-ui inside download builder
- if ( exec( "grunt prepare build" ).code !== 0 ) {
- abort( "Error generating quick download." );
- }
- cp( downloadDir + "/release/" + filename, destination );
- // cp() doesn't have error handling, so check for the file
- if ( ls( destination ).length !== 1 ) {
- abort( "Error copying quick download." );
- }
-
- // Go back to repo directory for consistency
- cd( repoDir );
-}
-
function updateTrac() {
echo( newVersion.cyan + " was tagged at " + tagTime.cyan + "." );
echo( "Close the " + newVersion.cyan + " Milestone with the above date and time." );
@@ -423,7 +394,7 @@ function abort( msg ) {
function walk( methods ) {
var method = methods.shift();
- function next( error ) {
+ function next() {
if ( methods.length ) {
walk( methods );
}
View
7 build/tasks/build.js
@@ -1,6 +1,9 @@
module.exports = function( grunt ) {
-var path = require( "path" );
+"use strict";
+
+var path = require( "path" ),
+ fs = require( "fs" );
grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() {
var pkg = grunt.config( "pkg" ),
@@ -143,7 +146,7 @@ grunt.registerMultiTask( "zip", "Create a zip file for release", function() {
opts: {
cwd: 'dist'
}
- }, function( err, result ) {
+ }, function( err ) {
if ( err ) {
grunt.log.error( err );
done();
View
26 build/tasks/testswarm.js
@@ -1,6 +1,7 @@
-/*jshint node: true */
module.exports = function( grunt ) {
+"use strict";
+
var versions = {
"git": "git",
"1.8": "1.8.0 1.8.1 1.8.2",
@@ -9,26 +10,23 @@ var versions = {
},
tests = {
"Accordion": "accordion/accordion.html",
- "Accordion_deprecated": "accordion/accordion_deprecated.html",
"Autocomplete": "autocomplete/autocomplete.html",
"Button": "button/button.html",
"Core": "core/core.html",
- //"datepicker/datepicker.html",
- //"dialog/dialog.html",
- //"draggable/draggable.html",
- //"droppable/droppable.html",
+ "Datepicker": "datepicker/datepicker.html",
+ "Dialog": "dialog/dialog.html",
+ "Draggable": "draggable/draggable.html",
+ "Droppable": "droppable/droppable.html",
"Effects": "effects/effects.html",
"Menu": "menu/menu.html",
"Position": "position/position.html",
- "Position_deprecated": "position/position_deprecated.html",
"Progressbar": "progressbar/progressbar.html",
- //"resizable/resizable.html",
- //"selectable/selectable.html",
- //"slider/slider.html",
- //"sortable/sortable.html",
+ "Resizable": "resizable/resizable.html",
+ "Selectable": "selectable/selectable.html",
+ "Slider": "slider/slider.html",
+ "Sortable": "sortable/sortable.html",
"Spinner": "spinner/spinner.html",
"Tabs": "tabs/tabs.html",
- "Tabs_deprecated": "tabs/tabs_deprecated.html",
"Tooltip": "tooltip/tooltip.html",
"Widget": "widget/widget.html"
};
@@ -53,9 +51,9 @@ function submit( commit, tests, configFile, version, done ) {
authToken: config.authToken,
jobName: 'jQuery UI ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
runMax: config.runMax,
- "runNames[]": Object.keys(tests),
+ "runNames[]": Object.keys( tests ),
"runUrls[]": testUrls,
- "browserSets[]": ["popular"]
+ "browserSets[]": [ "popular-no-ie6" ]
});
}
View
1 demos/autocomplete/combobox.html
@@ -111,7 +111,6 @@
input.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
- .data( "item.autocomplete", item )
.append( "<a>" + item.label + "</a>" )
.appendTo( ul );
};
View
1 demos/autocomplete/custom-data.html
@@ -68,7 +68,6 @@
})
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
- .data( "item.autocomplete", item )
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
.appendTo( ul );
};
View
2 demos/button/icons.html
@@ -43,7 +43,7 @@
<button>Button with two icons and no text</button>
<div class="demo-description">
-<p>Some buttons with various combinations of text and icons, here specified via metadata.</p>
+<p>Some buttons with various combinations of text and icons.</p>
</div>
</body>
</html>
View
2 demos/datepicker/localization.html
@@ -46,6 +46,7 @@
<script src="../../ui/i18n/jquery.ui.datepicker-kk.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-km.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-ko.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-ky.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-lb.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-lt.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-lv.js"></script>
@@ -134,6 +135,7 @@
<option value="kk">Kazakhstan (Kazakh)</option>
<option value="km">Khmer</option>
<option value="ko">Korean (&#54620;&#44397;&#50612;)</option>
+ <option value="ky">Kyrgyzstan (Kyrgyz)</option>
<option value="lv">Latvian (Latvie&ouml;u Valoda)</option>
<option value="lt">Lithuanian (lietuviu kalba)</option>
<option value="lb">Luxembourgish</option>
View
14 demos/dialog/animated.html
@@ -5,7 +5,6 @@
<title>jQuery UI Dialog - Animation</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
- <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
@@ -18,18 +17,21 @@
<script src="../../ui/jquery.ui.effect-explode.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
- // increase the default animation speed to exaggerate the effect
- $.fx.speeds._default = 1000;
$(function() {
$( "#dialog" ).dialog({
autoOpen: false,
- show: "blind",
- hide: "explode"
+ show: {
+ effect: "blind",
+ duration: 1000
+ },
+ hide: {
+ effect: "explode",
+ duration: 1000
+ }
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
- return false;
});
});
</script>
View
1 demos/dialog/default.html
@@ -5,7 +5,6 @@
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
- <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
View
1 demos/dialog/modal-confirmation.html
@@ -5,7 +5,6 @@
<title>jQuery UI Dialog - Modal confirmation</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
- <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
View
1 demos/dialog/modal-form.html
@@ -5,7 +5,6 @@
<title>jQuery UI Dialog - Modal form</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
- <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
View
1 demos/dialog/modal-message.html
@@ -5,7 +5,6 @@
<title>jQuery UI Dialog - Modal message</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
- <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
View
1 demos/dialog/modal.html
@@ -5,7 +5,6 @@
<title>jQuery UI Dialog - Basic modal</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
- <script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
View
4 demos/droppable/photo-manager.html
@@ -15,7 +15,7 @@
<script src="../../ui/jquery.ui.dialog.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
- #gallery { float: left; width: 65%; min-height: 12em; } * html #gallery { height: 12em; } /* IE6 */
+ #gallery { float: left; width: 65%; min-height: 12em; }
.gallery.custom-state-active { background: #eee; }
.gallery li { float: left; width: 96px; padding: 0.4em; margin: 0 0.4em 0.4em 0; text-align: center; }
.gallery li h5 { margin: 0 0 0.4em; cursor: move; }
@@ -23,7 +23,7 @@
.gallery li a.ui-icon-zoomin { float: left; }
.gallery li img { width: 100%; cursor: move; }
- #trash { float: right; width: 32%; min-height: 18em; padding: 1%;} * html #trash { height: 18em; } /* IE6 */
+ #trash { float: right; width: 32%; min-height: 18em; padding: 1%; }
#trash h4 { line-height: 16px; margin: 0 0 0.4em; }
#trash h4 .ui-icon { float: left; }
#trash .gallery h5 { display: none; }
View
2 demos/droppable/shopping-cart.html
@@ -88,7 +88,7 @@ <h1 class="ui-widget-header">Shopping Cart</h1>
</div>
<div class="demo-description">
-<p>Demonstrate how to use an accordion to structure products into a catalog and make use drag and drop for adding them to a shopping cart, where they are sortable.</p>
+<p>Demonstrate how to use an accordion to structure products into a catalog and make use of drag and drop for adding them to a shopping cart, where they are sortable.</p>
</div>
</body>
</html>
View
57 demos/menu/default.html
@@ -7,6 +7,7 @@
<script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.menu.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
@@ -14,29 +15,53 @@
$( "#menu" ).menu();
});
</script>
+ <style>
+ .ui-menu { width: 150px; }
+ </style>
</head>
<body>
<ul id="menu">
- <li><a href="#Aberdeen">Aberdeen</a></li>
- <li><a href="#Ada">Ada</a></li>
- <li><a href="#Adamsville">Adamsville</a></li>
- <li><a href="#Addyston">Addyston</a></li>
- <li><a href="#Adelphi">Adelphi</a></li>
- <li><a href="#Adena">Adena</a></li>
- <li><a href="#Adrian">Adrian</a></li>
- <li><a href="#Akron">Akron</a></li>
- <li><a href="#Albany">Albany</a></li>
- <li><a href="#Alexandria">Alexandria</a></li>
- <li><a href="#Alger">Alger</a></li>
- <li><a href="#Alledonia">Alledonia</a></li>
- <li><a href="#Alliance">Alliance</a></li>
- <li><a href="#Alpha">Alpha</a></li>
- <li><a href="#Alvada">Alvada</a></li>
+ <li class="ui-state-disabled"><a href="#">Aberdeen</a></li>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Adamsville</a></li>
+ <li><a href="#">Addyston</a></li>
+ <li>
+ <a href="#">Delphi</a>
+ <ul>
+ <li class="ui-state-disabled"><a href="#">Ada</a></li>
+ <li><a href="#">Saarland</a></li>
+ <li><a href="#">Salzburg</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Saarland</a></li>
+ <li>
+ <a href="#">Salzburg</a>
+ <ul>
+ <li>
+ <a href="#">Delphi</a>
+ <ul>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Saarland</a></li>
+ <li><a href="#">Salzburg</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Delphi</a>
+ <ul>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Saarland</a></li>
+ <li><a href="#">Salzburg</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Perch</a></li>
+ </ul>
+ </li>
+ <li class="ui-state-disabled"><a href="#">Amesville</a></li>
</ul>
<div class="demo-description">
-<p>A menu with the default configuration. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.</p>
+<p>A menu with the default configuration, disabled items and nested menus. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.</p>
</div>
</body>
</html>
View
44 demos/menu/icons.html
@@ -0,0 +1,44 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Menu - Icons</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.8.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ $( "#menu" ).menu();
+ });
+ </script>
+ <style>
+ .ui-menu { width: 150px; }
+ </style>
+</head>
+<body>
+
+<ul id="menu">
+ <li><a href="#"><span class="ui-icon ui-icon-disk"></span>Save</a></li>
+ <li><a href="#"><span class="ui-icon ui-icon-zoomin"></span>Zoom In</a></li>
+ <li><a href="#"><span class="ui-icon ui-icon-zoomout"></span>Zoom Out</a></li>
+ <li class="ui-state-disabled"><a href="#"><span class="ui-icon ui-icon-print"></span>Print...</a></li>
+ <li>
+ <a href="#">Playback</a>
+ <ul>
+ <li><a href="#"><span class="ui-icon ui-icon-seek-start"></span>Prev</a></li>
+ <li><a href="#"><span class="ui-icon ui-icon-stop"></span>Stop</a></li>
+ <li><a href="#"><span class="ui-icon ui-icon-play"></span>Play</a></li>
+ <li><a href="#"><span class="ui-icon ui-icon-seek-end"></span>Next</a></li>
+ </ul>
+ </li>
+</ul>
+
+<div class="demo-description">
+<p>A menu with the default configuration, showing how to use a menu with icons.</p>
+</div>
+</body>
+</html>
View
3 demos/menu/index.html
@@ -8,8 +8,7 @@
<ul>
<li><a href="default.html">Default functionality</a></li>
- <li><a href="topalignmenu.html">Top-aligned sub menus</a></li>
- <li><a href="navigationmenu.html">Navigation menu</a></li>
+ <li><a href="icons.html">Icons</a></li>
</ul>
</body>
View
74 demos/menu/navigationmenu.html
@@ -1,74 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Menu - Navigation Menu</title>
- <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.2.js"></script>
- <script src="../../ui/jquery.ui.core.js"></script>
- <script src="../../ui/jquery.ui.widget.js"></script>
- <script src="../../ui/jquery.ui.position.js"></script>
- <script src="../../ui/jquery.ui.menu.js"></script>
- <link rel="stylesheet" href="../demos.css">
- <script>
- $(function() {
- $( "#menu" ).menu({
- select: function( event, ui ) {
- var link = ui.item.children( "a:first" );
- if ( link.attr( "target" ) || event.metaKey || event.shiftKey || event.ctrlKey ) {
- return;
- }
- location.href = link.attr( "href" );
- }
- });
- });
- </script>
- <style>
- .ui-menu { width: 200px; margin-bottom: 2em; }
- </style>
-</head>
-<body>
-
-<ul id="menu">
- <li><a href="?Aberdeen">Aberdeen</a></li>
- <li><a href="?Ada">Ada</a></li>
- <li><a href="?Adamsville">Adamsville</a></li>
- <li><a href="?Addyston">Addyston</a></li>
- <li>
- <a href="?Delphi">Delphi</a>
- <ul>
- <li><a href="?Ada">Ada</a></li>
- <li><a href="?Saarland">Saarland</a></li>
- <li><a href="?Salzburg">Salzburg</a></li>
- </ul>
- </li>
- <li><a href="?Saarland">Saarland</a></li>
- <li>
- <a href="?Salzburg">Salzburg</a>
- <ul>
- <li>
- <a href="?Delphi">Delphi</a>
- <ul>
- <li><a href="?Ada">Ada</a></li>
- <li><a href="?Saarland">Saarland</a></li>
- <li><a href="?Salzburg">Salzburg</a></li>
- </ul>
- </li>
- <li>
- <a href="?Delphi">Delphi</a>
- <ul>
- <li><a href="?Ada">Ada</a></li>
- <li><a href="?Saarland">Saarland</a></li>
- <li><a href="?Salzburg">Salzburg</a></li>
- </ul>
- </li>
- <li><a href="?Perch">Perch</a></li>
- </ul>
- </li>
-</ul>
-
-<div class="demo-description">
-<p>A navigation menu. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.</p>
-</div>
-</body>
-</html>
View
87 demos/menu/topalignmenu.html
@@ -1,87 +0,0 @@
-<!doctype html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Menu Demo: Top-aligned Menu</title>
- <link rel="stylesheet" href="../demos.css">
- <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.2.js"></script>
- <script src="../../ui/jquery.ui.core.js"></script>
- <script src="../../ui/jquery.ui.widget.js"></script>
- <script src="../../ui/jquery.ui.position.js"></script>
- <script src="../../ui/jquery.ui.menu.js"></script>
- <script>
- $(function() {
- $( "#menu" ).menu({
- position: { of: "ul:has(a.ui-state-focus):last" },
- icons: {
- submenu: "ui-icon-carat-1-e"
- }
- });
- });
- </script>
- <style>
- .ui-menu { width: 200px; margin-bottom: 2em; }
- </style>
-</head>
-<body>
-
-<ul id="menu">
- <li><a href="#">Aberdeen</a></li>
- <li><a href="#">Ada</a></li>
- <li><a href="#">Adamsville</a></li>
- <li><a href="#">Addyston</a></li>
- <li>
- <a href="#">Delphi</a>
- <ul>
- <li><a href="#">Ada</a></li>
- <li><a href="#">Saarland</a></li>
- <li><a href="#">Salzburg</a></li>
- </ul>
- </li>
- <li><a href="#">Saarland</a></li>
- <li>
- <a href="#">Salzburg</a>
- <ul>
- <li>
- <a href="#">Delphi</a>
- <ul>
- <li><a href="#">Ada</a></li>
- <li><a href="#">Saarland</a></li>
- <li><a href="#">Salzburg</a></li>
- </ul>
- </li>
- <li>
- <a href="#">Adamsville</a>
- <ul>
- <li><a href="#">Aberdeen</a></li>
- <li><a href="#">Ada</a></li>
- <li><a href="#">Adamsville</a></li>
- <li><a href="#">Addyston</a></li>
- <li>
- <a href="#">Delphi</a>
- <ul>
- <li><a href="#">Ada</a></li>
- <li><a href="#">Saarland</a></li>
- <li><a href="#">Salzburg</a></li>
- </ul>
- </li>
- <li><a href="#">Saarland</a></li>
- </ul>
- </li>
- <li><a href="#">Perch</a>
- <ul>
- <li><a href="#">Addyston</a></li>
- <li><a href="#">Delphi</a></li>
- <li><a href="#">Perch</a></li>
- </ul>
- </li>
- </ul>
- </li>
-</ul>
-
-<div class="demo-description">
-<p>Menus can use custom positioning. There is a delay before activing an item on hover and a delay before closing a menu on mouse out to allow for moving to a submenu that is not touching its parent item.</p>
-</div>
-</body>
-</html>
View
6 demos/position/cycler.html
@@ -10,6 +10,9 @@
<script src="../../ui/jquery.ui.position.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
+ body {
+ margin: 0;
+ }
#container {
overflow: hidden;
position: relative;
@@ -96,10 +99,9 @@
</div>
<div class="demo-description">
-<p>A prototype for the <a href="http://wiki.jqueryui.com/Photoviewer">Photoviewer</a> using Position to place images at the center, left and right and cycle them.
+<p>A photoviewer prototype using Position to place images at the center, left and right and cycle them.
<br>Use the links at the top to cycle, or click on the images on the left and right.
<br>Note how the images are repositioned when resizing the window.
-<br>Warning: Doesn't currently work inside the demo viewer; open in a new window instead!</p>
</div>
</body>
</html>
View
5 demos/position/default.html
@@ -48,7 +48,6 @@
of: $( "#parent" ),
my: $( "#my_horizontal" ).val() + " " + $( "#my_vertical" ).val(),
at: $( "#at_horizontal" ).val() + " " + $( "#at_vertical" ).val(),
- offset: $( "#offset" ).val(),
collision: $( "#collision_horizontal" ).val() + " " + $( "#collision_vertical" ).val()
});
}
@@ -114,10 +113,6 @@
</select>
</div>
<div style="padding-bottom: 20px;">
- <b>offset:</b>
- <input id="offset">
- </div>
- <div style="padding-bottom: 20px;">
<b>collision:</b>
<select id="collision_horizontal">
<option value="flip">flip</option>
View
2 demos/slider/hotelrooms.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title>jQuery UI Slider - Range with fixed minimum</title>
+ <title>jQuery UI Slider - Slider bound to select</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
View
1 demos/slider/side-scroll.html
@@ -14,7 +14,6 @@
.scroll-pane { overflow: auto; width: 99%; float:left; }
.scroll-content { width: 2440px; float: left; }
.scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }
- * html .scroll-content-item { display: inline; } /* IE6 float double margin bug */
.scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }
.scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto; }
.scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }
View
3 demos/tooltip/custom-content.html
@@ -22,6 +22,9 @@
width: 350px;
height: 350px;
}
+ .ui-tooltip {
+ max-width: 350px;
+ }
</style>
<script>
$(function() {
View
2 demos/tooltip/forms.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title>jQuery UI Tooltip - Default demo</title>
+ <title>jQuery UI Tooltip - Forms</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
View
39 external/jquery.bgiframe-2.1.2.js
@@ -1,39 +0,0 @@
-/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
- * Licensed under the MIT License (LICENSE.txt).
- *
- * Version 2.1.2
- */
-
-(function($){
-
-$.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) {
- s = $.extend({
- top : 'auto', // auto == .currentStyle.borderTopWidth
- left : 'auto', // auto == .currentStyle.borderLeftWidth
- width : 'auto', // auto == offsetWidth
- height : 'auto', // auto == offsetHeight
- opacity : true,
- src : 'javascript:false;'
- }, s);
- var html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
- 'style="display:block;position:absolute;z-index:-1;'+
- (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
- 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
- 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
- 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
- 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
- '"/>';
- return this.each(function() {
- if ( $(this).children('iframe.bgiframe').length === 0 )
- this.insertBefore( document.createElement(html), this.firstChild );
- });
-} : function() { return this; });
-
-// old alias
-$.fn.bgIframe = $.fn.bgiframe;
-
-function prop(n) {
- return n && n.constructor === Number ? n + 'px' : n;
-}
-
-})(jQuery);
View
89 external/jquery.cookie.js
@@ -1,89 +0,0 @@
-/*jslint browser: true */ /*global jQuery: true */
-
-/**
- * jQuery Cookie plugin
- *
- * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-// TODO JsDoc
-
-/**
- * Create a cookie with the given key and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
- * used when the cookie was set.
- *
- * @param String key The key of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given key.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String key The key of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-jQuery.cookie = function (key, value, options) {
-
- // key and value given, set cookie...
- if (arguments.length > 1 && (value === null || typeof value !== "object")) {
- options = jQuery.extend({}, options);
-
- if (value === null) {
- options.expires = -1;
- }
-
- if (typeof options.expires === 'number') {
- var days = options.expires, t = options.expires = new Date();
- t.setDate(t.getDate() + days);
- }
-
- return (document.cookie = [
- encodeURIComponent(key), '=',
- options.raw ? String(value) : encodeURIComponent(String(value)),
- options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
- options.path ? '; path=' + options.path : '',
- options.domain ? '; domain=' + options.domain : '',
- options.secure ? '; secure' : ''
- ].join(''));
- }
-
- // key and possibly options given, get cookie...
- options = value || {};
- var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
- return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
-};
View
122 external/jquery.metadata.js
@@ -1,122 +0,0 @@
-/*
- * Metadata - jQuery plugin for parsing metadata from elements
- *
- * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $
- *
- */
-
-/**
- * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
- * in the JSON will become a property of the element itself.
- *
- * There are three supported types of metadata storage:
- *
- * attr: Inside an attribute. The name parameter indicates *which* attribute.
- *
- * class: Inside the class attribute, wrapped in curly braces: { }
- *
- * elem: Inside a child element (e.g. a script tag). The
- * name parameter indicates *which* element.
- *
- * The metadata for an element is loaded the first time the element is accessed via jQuery.
- *
- * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
- * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
- *
- * @name $.metadata.setType
- *
- * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
- * @before $.metadata.setType("class")
- * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
- * @desc Reads metadata from the class attribute
- *
- * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
- * @before $.metadata.setType("attr", "data")
- * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
- * @desc Reads metadata from a "data" attribute
- *
- * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
- * @before $.metadata.setType("elem", "script")
- * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
- * @desc Reads metadata from a nested script element
- *
- * @param String type The encoding type
- * @param String name The name of the attribute to be used to get metadata (optional)
- * @cat Plugins/Metadata
- * @descr Sets the type of encoding to be used when loading metadata for the first time
- * @type undefined
- * @see metadata()
- */
-
-(function($) {
-
-$.extend({
- metadata : {
- defaults : {
- type: 'class',
- name: 'metadata',
- cre: /({.*})/,
- single: 'metadata'
- },
- setType: function( type, name ){
- this.defaults.type = type;
- this.defaults.name = name;
- },
- get: function( elem, opts ){
- var settings = $.extend({},this.defaults,opts);
- // check for empty string in single property
- if ( !settings.single.length ) settings.single = 'metadata';
-
- var data = $.data(elem, settings.single);
- // returned cached data if it already exists
- if ( data ) return data;
-
- data = "{}";
-
- if ( settings.type == "class" ) {
- var m = settings.cre.exec( elem.className );
- if ( m )
- data = m[1];
- } else if ( settings.type == "elem" ) {
- if( !elem.getElementsByTagName )
- return undefined;
- var e = elem.getElementsByTagName(settings.name);
- if ( e.length )
- data = $.trim(e[0].innerHTML);
- } else if ( elem.getAttribute != undefined ) {
- var attr = elem.getAttribute( settings.name );
- if ( attr )
- data = attr;
- }
-
- if ( data.indexOf( '{' ) <0 )
- data = "{" + data + "}";
-
- data = eval("(" + data + ")");
-
- $.data( elem, settings.single, data );
- return data;
- }
- }
-});
-
-/**
- * Returns the metadata object for the first member of the jQuery object.
- *
- * @name metadata
- * @descr Returns element's metadata object
- * @param Object opts An object contianing settings to override the defaults
- * @type jQuery
- * @cat Plugins/Metadata
- */
-$.fn.metadata = function( opts ){
- return $.metadata.get( this[0], opts );
-};
-
-})(jQuery);
View
2,785 external/jshint.js
1,615 additions, 1,170 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
18 grunt.js
@@ -1,6 +1,7 @@
-/*jshint node: true */
module.exports = function( grunt ) {
+"use strict";
+
var
// files
coreFiles = [
@@ -161,6 +162,7 @@ grunt.initConfig({
"package.json",
"*.jquery.json",
"ui/**/*",
+ "ui/.jshintrc",
"demos/**/*",
"themes/**/*",
"external/**/*",
@@ -279,14 +281,11 @@ grunt.initConfig({
files: grunt.file.expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
// disabling everything that doesn't (quite) work with PhantomJS for now
// TODO except for all|index|test, try to include more as we go
- return !( /(all|all-active|index|test|draggable|droppable|selectable|resizable|sortable|dialog|slider|datepicker|tabs|tabs_deprecated)\.html$/ ).test( file );
+ return !( /(all|index|test|dialog|tabs|tooltip)\.html$/ ).test( file );
})
},
lint: {
- ui: grunt.file.expandFiles( "ui/*.js" ).filter(function( file ) {
- // TODO remove items from this list once rewritten
- return !( /(mouse|datepicker|draggable|droppable|resizable|selectable|sortable)\.js$/ ).test( file );
- }),
+ ui: "ui/*.js",
grunt: [ "grunt.js", "build/**/*.js" ],
tests: "tests/unit/**/*.js"
},
@@ -304,7 +303,8 @@ grunt.initConfig({
"important": false,
"outline-none": false,
// especially this one
- "overqualified-elements": false
+ "overqualified-elements": false,
+ "compatible-vendor-prefixes": false
}
}
},
@@ -325,9 +325,7 @@ grunt.initConfig({
}
return {
- // TODO: use "faux strict mode" https://github.com/jshint/jshint/issues/504
- // TODO: limit `smarttabs` to multi-line comments https://github.com/jshint/jshint/issues/503
- options: parserc(),
+ grunt: parserc(),
ui: parserc( "ui/" ),
// TODO: `evil: true` is only for document.write() https://github.com/jshint/jshint/issues/519
// TODO: don't create so many globals in tests
View
3,328 jquery-1.8.2.js
1,664 additions, 1,664 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
9 package.json
@@ -2,7 +2,7 @@
"name": "jquery-ui",
"title": "jQuery UI",
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
- "version": "1.9.1pre",
+ "version": "1.10.0pre",
"homepage": "http://jqueryui.com",
"author": {
"name": "jQuery Foundation and other contributors",
@@ -20,11 +20,6 @@
"url": "http://bassistance.de"
},
{
- "name": "Richard D. Worth",
- "email": "rdworth@gmail.com",
- "url": "http://rdworth.org"
- },
- {
"name": "Kris Borchers",
"email": "kris.borchers@gmail.com",
"url": "http://krisborchers.com"
@@ -48,7 +43,7 @@
],
"dependencies": {},
"devDependencies": {
- "grunt": "~0.3.9",
+ "grunt": "~0.3.17",
"grunt-css": "0.2.0",
"grunt-compare-size": "0.1.4",
"grunt-html": "0.1.1",
View
29 tests/.jshintrc
@@ -9,51 +9,26 @@
"latedef": true,
"noarg": true,
"onevar": true,
- "smarttabs": true,
"trailing": true,
"undef": true,
+ "unused": true,
"predef": [
- "addMonths",
"asyncTest",
- "container",
+ "closeEnough",
"deepEqual",
- "d1",
- "d2",
- "dlg",
"domEqual",
- "drag",
- "dragged",
- "el",
"equal",
- "equalsDate",
"expect",
"Globalize",
- "heightAfter",
- "init",
- "isNotOpen",
- "isOpen",
- "modal",
"module",
- "moved",
"notEqual",
- "offsetAfter",
- "offsetBefore",
"ok",
- "PROP_NAME",
"QUnit",
- "restoreScroll",
- "shouldBeDroppable",
- "shouldmove",
- "shouldNotBeDroppable",
- "shouldnotmove",
- "shouldnotresize",
- "shouldresize",
"start",
"strictEqual",
"stop",
"test",
"TestHelpers",
- "widthAfter",
"JSHINT"
]
}
View
106 tests/jquery-1.6.1.js
@@ -1895,11 +1895,11 @@ jQuery.fn.extend({
jQuery.removeAttr( this, name );
});
},
-
+
prop: function( name, value ) {
return jQuery.access( this, name, value, true, jQuery.prop );
},
-
+
removeProp: function( name ) {
name = jQuery.propFix[ name ] || name;
return this.each(function() {
@@ -2031,7 +2031,7 @@ jQuery.fn.extend({
val: function( value ) {
var hooks, ret,
elem = this[0];
-
+
if ( !arguments.length ) {
if ( elem ) {
hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
@@ -2159,15 +2159,15 @@ jQuery.extend({
height: true,
offset: true
},
-
+
attrFix: {
// Always normalize to ensure hook usage
tabindex: "tabIndex"
},
-
+
attr: function( elem, name, value, pass ) {
var nType = elem.nodeType;
-
+
// don't get/set attributes on text, comment and attribute nodes
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
return undefined;
@@ -2235,7 +2235,7 @@ jQuery.extend({
var propName;
if ( elem.nodeType === 1 ) {
name = jQuery.attrFix[ name ] || name;
-
+
if ( jQuery.support.getSetAttribute ) {
// Use removeAttribute in browsers that support it
elem.removeAttribute( name );
@@ -2299,7 +2299,7 @@ jQuery.extend({
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
-
+
prop: function( elem, name, value ) {
var nType = elem.nodeType;
@@ -2313,7 +2313,7 @@ jQuery.extend({
// Try to normalize/fix the name
name = notxml && jQuery.propFix[ name ] || name;
-
+
hooks = jQuery.propHooks[ name ];
if ( value !== undefined ) {
@@ -2333,7 +2333,7 @@ jQuery.extend({
}
}
},
-
+
propHooks: {}
});
@@ -2388,7 +2388,7 @@ if ( !jQuery.support.getSetAttribute ) {
// propFix is more comprehensive and contains all fixes
jQuery.attrFix = jQuery.propFix;
-
+
// Use this for any attribute on a form in IE6/7
formHook = jQuery.attrHooks.name = jQuery.valHooks.button = {
get: function( elem, name ) {
@@ -2759,7 +2759,7 @@ jQuery.event = {
}
}
},
-
+
// Events that are safe to short-circuit if no handlers are attached.
// Native DOM events should not be added, they may have inline handlers.
customEvent: {
@@ -2805,7 +2805,7 @@ jQuery.event = {
event.exclusive = exclusive;
event.namespace = namespaces.join(".");
event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
-
+
// triggerHandler() and global events don't bubble or run the default action
if ( onlyHandlers || !elem ) {
event.preventDefault();
@@ -2896,7 +2896,7 @@ jQuery.event = {
jQuery.event.triggered = undefined;
}
}
-
+
return event.result;
},
@@ -3731,7 +3731,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
-
+
if ( !selector || typeof selector !== "string" ) {
return results;
}
@@ -3741,7 +3741,7 @@ var Sizzle = function( selector, context, results, seed ) {
contextXML = Sizzle.isXML( context ),
parts = [],
soFar = selector;
-
+
// Reset the position of the chunker regexp (start from head)
do {
chunker.exec( "" );
@@ -3749,9 +3749,9 @@ var Sizzle = function( selector, context, results, seed ) {
if ( m ) {
soFar = m[3];
-
+
parts.push( m[1] );
-
+
if ( m[2] ) {
extra = m[3];
break;
@@ -3775,7 +3775,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
-
+
set = posProcess( selector, set );
}
}
@@ -3904,7 +3904,7 @@ Sizzle.find = function( expr, context, isXML ) {
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
var match,
type = Expr.order[i];
-
+
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
var left = match[1];
match.splice( 1, 1 );
@@ -4236,7 +4236,7 @@ var Expr = Sizzle.selectors = {
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1] = match[1].replace( rBackslash, "" );
-
+
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
@@ -4270,7 +4270,7 @@ var Expr = Sizzle.selectors = {
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
-
+
return match;
},
@@ -4280,7 +4280,7 @@ var Expr = Sizzle.selectors = {
return match;
}
},
-
+
filters: {
enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
@@ -4293,14 +4293,14 @@ var Expr = Sizzle.selectors = {
checked: function( elem ) {
return elem.checked === true;
},
-
+
selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
elem.parentNode.selectedIndex;
}
-
+
return elem.selected === true;
},
@@ -4322,7 +4322,7 @@ var Expr = Sizzle.selectors = {
text: function( elem ) {
var attr = elem.getAttribute( "type" ), type = elem.type;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
},
@@ -4438,21 +4438,21 @@ var Expr = Sizzle.selectors = {
case "only":
case "first":
while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
+ if ( node.nodeType === 1 ) {
+ return false;
}
}
- if ( type === "first" ) {
- return true;
+ if ( type === "first" ) {
+ return true;
}
node = elem;
case "last":
while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
+ if ( node.nodeType === 1 ) {
+ return false;
}
}
@@ -4465,22 +4465,22 @@ var Expr = Sizzle.selectors = {
if ( first === 1 && last === 0 ) {
return true;
}
-
+
var doneName = match[0],
parent = elem.parentNode;
-
+
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
-
+
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
- }
+ }
parent.sizcache = doneName;
}
-
+
var diff = elem.nodeIndex - last;
if ( first === 0 ) {
@@ -4499,7 +4499,7 @@ var Expr = Sizzle.selectors = {
TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
},
-
+
CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1;
@@ -4565,7 +4565,7 @@ var makeArray = function( array, results ) {
results.push.apply( results, array );
return results;
}
-
+
return array;
};
@@ -4817,7 +4817,7 @@ if ( document.querySelectorAll ) {
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
-
+
Sizzle = function( query, context, extra, seed ) {
context = context || document;
@@ -4826,24 +4826,24 @@ if ( document.querySelectorAll ) {
if ( !seed && !Sizzle.isXML(context) ) {
// See if we find a selector to speed up
var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
-
+
if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
// Speed-up: Sizzle("TAG")
if ( match[1] ) {
return makeArray( context.getElementsByTagName( query ), extra );
-
+
// Speed-up: Sizzle(".CLASS")
} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
return makeArray( context.getElementsByClassName( match[2] ), extra );
}
}
-
+
if ( context.nodeType === 9 ) {
// Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it
if ( query === "body" && context.body ) {
return makeArray( [ context.body ], extra );
-
+
// Speed-up: Sizzle("#ID")
} else if ( match && match[3] ) {
var elem = context.getElementById( match[3] );
@@ -4856,12 +4856,12 @@ if ( document.querySelectorAll ) {
if ( elem.id === match[3] ) {
return makeArray( [ elem ], extra );
}
-
+
} else {
return makeArray( [], extra );
}
}
-
+
try {
return makeArray( context.querySelectorAll(query), extra );
} catch(qsaError) {}
@@ -4899,7 +4899,7 @@ if ( document.querySelectorAll ) {
}
}
}
-
+
return oldSizzle(query, context, extra, seed);
};
@@ -4926,7 +4926,7 @@ if ( document.querySelectorAll ) {
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( document.documentElement, "[test!='']:sizzle" );
-
+
} catch( pseudoError ) {
pseudoWorks = true;
}
@@ -4936,7 +4936,7 @@ if ( document.querySelectorAll ) {
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if ( !Sizzle.isXML( node ) ) {
- try {
+ try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr );
@@ -4973,7 +4973,7 @@ if ( document.querySelectorAll ) {
if ( div.getElementsByClassName("e").length === 1 ) {
return;
}
-
+
Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
@@ -5024,7 +5024,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
if ( elem ) {
var match = false;
-
+
elem = elem[dir];
while ( elem ) {
@@ -5077,7 +5077,7 @@ if ( document.documentElement.contains ) {
Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
+ // (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
@@ -5198,7 +5198,7 @@ jQuery.fn.extend({
closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0];
-
+
// Array
if ( jQuery.isArray( selectors ) ) {
var match, selector,
View
110 tests/jquery-1.6.2.js
@@ -1511,7 +1511,7 @@ jQuery.extend({
return thisCache[ internalKey ] && thisCache[ internalKey ].events;
}
- return getByName ?
+ return getByName ?
// Check for both converted-to-camel and non-converted data property names
thisCache[ jQuery.camelCase( name ) ] || thisCache[ name ] :
thisCache;
@@ -1923,11 +1923,11 @@ jQuery.fn.extend({
jQuery.removeAttr( this, name );
});
},