Permalink
Browse files

Merge branch 'master' into selectmenu

  • Loading branch information...
2 parents 98d72c7 + d32a9e8 commit 6528b48b4762b0ddf3697580444fdf9f34e7eca9 @jzaefferer jzaefferer committed Feb 21, 2012
Showing with 1,050 additions and 4,098 deletions.
  1. +6 −2 demos/accordion/hoverintent.html
  2. +12 −14 demos/accordion/sortable.html
  3. +1 −1 demos/addClass/default.html
  4. +2 −2 demos/autocomplete/categories.html
  5. +2 −2 demos/autocomplete/combobox.html
  6. +4 −0 demos/datepicker/localization.html
  7. +2 −2 demos/draggable/cursor-style.html
  8. +18 −17 demos/effect/easing.html
  9. +4 −2 demos/index.html
  10. +1 −1 demos/sortable/connect-lists.html
  11. +1 −2 tests/jquery.simulate.js
  12. +0 −17 tests/static/slider/default.html
  13. +0 −17 tests/static/slider/default_vertical.html
  14. +0 −17 tests/static/slider/slider_horizontal.html
  15. +0 −17 tests/static/slider/slider_horizontal_range.html
  16. +0 −17 tests/static/slider/slider_horizontal_range_max.html
  17. +0 −17 tests/static/slider/slider_horizontal_range_min.html
  18. +0 −17 tests/static/slider/slider_vertical.html
  19. +0 −17 tests/static/slider/slider_vertical_range.html
  20. +0 −17 tests/static/slider/slider_vertical_range_max.html
  21. +0 −17 tests/static/slider/slider_vertical_range_min.html
  22. +1 −1 tests/unit/accordion/accordion_defaults.js
  23. +1 −0 tests/unit/accordion/accordion_defaults_deprecated.js
  24. +39 −0 tests/unit/accordion/accordion_events.js
  25. +1 −1 tests/unit/accordion/accordion_options.js
  26. +3 −3 tests/unit/accordion/accordion_test_helpers.js
  27. +0 −43 tests/unit/autocomplete/autocomplete_core.js
  28. +4 −1 tests/unit/autocomplete/autocomplete_events.js
  29. +9 −2 tests/unit/autocomplete/autocomplete_methods.js
  30. +54 −0 tests/unit/autocomplete/autocomplete_options.js
  31. +14 −14 tests/unit/menu/menu_core.js
  32. +177 −148 tests/unit/menu/menu_events.js
  33. +30 −0 tests/unit/menu/menu_methods.js
  34. +28 −0 tests/unit/menu/menu_options.js
  35. +5 −5 tests/unit/tabs/tabs_deprecated.js
  36. +44 −1 tests/unit/widget/widget_core.js
  37. +50 −2,942 tests/visual/dialog/dialog_on_page_with_large_dom.html
  38. +7 −7 tests/visual/menu/drilldown.html
  39. +6 −5 tests/visual/menu/menu.html
  40. +5 −4 themes/base/jquery.ui.accordion.css
  41. +1 −1 themes/base/jquery.ui.menu.css
  42. +2 −2 ui/i18n/jquery.ui.datepicker-he.js
  43. +23 −0 ui/i18n/jquery.ui.datepicker-hi.js
  44. +23 −0 ui/i18n/jquery.ui.datepicker-km.js
  45. +36 −216 ui/jquery.effects.core.js
  46. +147 −183 ui/jquery.ui.accordion.js
  47. +27 −14 ui/jquery.ui.autocomplete.js
  48. +8 −8 ui/jquery.ui.button.js
  49. +7 −17 ui/jquery.ui.core.js
  50. +4 −5 ui/jquery.ui.datepicker.js
  51. +5 −5 ui/jquery.ui.draggable.js
  52. +37 −32 ui/jquery.ui.menu.js
  53. +8 −8 ui/jquery.ui.mouse.js
  54. +5 −5 ui/jquery.ui.position.js
  55. +1 −35 ui/jquery.ui.resizable.js
  56. +2 −6 ui/jquery.ui.slider.js
  57. +1 −1 ui/jquery.ui.sortable.js
  58. +121 −141 ui/jquery.ui.tabs.js
  59. +11 −1 ui/jquery.ui.tooltip.js
  60. +50 −26 ui/jquery.ui.widget.js
@@ -29,7 +29,7 @@
$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
},
handler: function( event ) {
- var self = this,
+ var that = this,
args = arguments,
target = $( event.target ),
cX, cY, pX, pY;
@@ -50,7 +50,11 @@
if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) {
clear();
event.type = "hoverintent";
- jQuery.event.handle.apply( self, args );
+ // prevent accessing the original event since the new event
+ // is fired asynchronously and the old event is no longer
+ // usable (#6028)
+ event.originalEvent = {};
+ jQuery.event.handle.apply( that, args );
} else {
pX = cX;
pY = cY;
@@ -11,25 +11,23 @@
<script src="../../ui/jquery.ui.sortable.js"></script>
<script src="../../ui/jquery.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() {
- var stop = false;
- $( "#accordion h3" ).click(function( event ) {
- if ( stop ) {
- event.stopImmediatePropagation();
- event.preventDefault();
- stop = false;
- }
- });
$( "#accordion" )
.accordion({
header: "> div > h3"
})
.sortable({
axis: "y",
handle: "h3",
- stop: function() {
- stop = true;
+ stop: function( event, ui ) {
+ // IE doesn't register the blur when sorting
+ // so trigger focusout handlers to remove .ui-state-focus
+ ui.item.children( "h3" ).triggerHandler( "focusout" );
}
});
});
@@ -40,19 +38,19 @@
<div class="demo">
<div id="accordion">
- <div>
+ <div class="group">
<h3><a href="#">Section 1</a></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>
</div>
- <div>
+ <div class="group">
<h3><a href="#">Section 2</a></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>
</div>
- <div>
+ <div class="group">
<h3><a href="#">Section 3</a></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>
@@ -63,7 +61,7 @@
</ul>
</div>
</div>
- <div>
+ <div class="group">
<h3><a href="#">Section 4</a></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>
@@ -33,7 +33,7 @@
<div class="demo">
<div class="toggler">
- <div id="effect" class=" ui-corner-all">
+ <div id="effect" class="ui-corner-all">
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
</div>
</div>
@@ -22,14 +22,14 @@
<script>
$.widget( "custom.catcomplete", $.ui.autocomplete, {
_renderMenu: function( ul, items ) {
- var self = this,
+ var that = this,
currentCategory = "";
$.each( items, function( index, item ) {
if ( item.category != currentCategory ) {
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
currentCategory = item.category;
}
- self._renderItem( ul, item );
+ that._renderItem( ul, item );
});
}
});
@@ -29,7 +29,7 @@
(function( $ ) {
$.widget( "ui.combobox", {
_create: function() {
- var self = this,
+ var that = this,
select = this.element.hide(),
selected = select.children( ":selected" ),
value = selected.val() ? selected.text() : "";
@@ -85,7 +85,7 @@
},
select: function( event, ui ) {
ui.item.option.selected = true;
- self._trigger( "selected", event, {
+ that._trigger( "selected", event, {
item: ui.item.option
});
},
@@ -34,6 +34,7 @@
<script src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-gl.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
+ <script src="../../ui/i18n/jquery.ui.datepicker-hi.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-hr.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-hu.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-hy.js"></script>
@@ -42,6 +43,7 @@
<script src="../../ui/i18n/jquery.ui.datepicker-it.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-ja.js"></script>
<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-lb.js"></script>
<script src="../../ui/i18n/jquery.ui.datepicker-lt.js"></script>
@@ -123,12 +125,14 @@
<option value="de">German (Deutsch)</option>
<option value="el">Greek (&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;)</option>
<option value="he">Hebrew (&#8235;(&#1506;&#1489;&#1512;&#1497;&#1514;</option>
+ <option value="hi">Hindi (&#2361;&#2367;&#2306;&#2342;&#2368;)</option>
<option value="hu">Hungarian (Magyar)</option>
<option value="is">Icelandic (&Otilde;slenska)</option>
<option value="id">Indonesian (Bahasa Indonesia)</option>
<option value="it">Italian (Italiano)</option>
<option value="ja">Japanese (&#26085;&#26412;&#35486;)</option>
<option value="kk">Kazakhstan (Kazakh)</option>
+ <option value="km">Khmer</option>
<option value="ko">Korean (&#54620;&#44397;&#50612;)</option>
<option value="lv">Latvian (Latvie&ouml;u Valoda)</option>
<option value="lt">Lithuanian (lietuviu kalba)</option>
@@ -15,8 +15,8 @@
</style>
<script>
$(function() {
- $( "#draggable" ).draggable({ cursorAt: { cursor: "move", top: 56, left: 56 } });
- $( "#draggable2" ).draggable({ cursorAt: { cursor: "crosshair", top: -5, left: -5 } });
+ $( "#draggable" ).draggable({ cursor: "move", cursorAt: { top: 56, left: 56 } });
+ $( "#draggable2" ).draggable({ cursor: "crosshair", cursorAt: { top: -5, left: -5 } });
$( "#draggable3" ).draggable({ cursorAt: { bottom: 0 } });
});
</script>
@@ -15,33 +15,31 @@
</style>
<script>
$(function() {
- if ( !$( "<canvas/>" )[0].getContext ) {
- $( "<div/>" ).text(
- "Your browser doesn't support canvas, which is required for this demo. " +
- "Give Firefox 3 a try!"
+ if ( !$( "<canvas>" )[0].getContext ) {
+ $( "<div>" ).text(
+ "Your browser doesn't support canvas, which is required for this demo."
).appendTo( "#graphs" );
return;
}
var i = 0,
width = 100,
height = 100;
+
$.each( $.easing, function( name, impl ) {
- // skip linear/jswing and any non functioning implementation
- if ( !$.isFunction( impl ) || /jswing/.test( name ) ) {
- return;
- }
- var graph = $( "<div/>" ).addClass( "graph" ).appendTo( "#graphs" ),
- text = $( "<div/>" ).text( ++i + ". " + name ).appendTo( graph ),
- wrap = $( "<div/>" ).appendTo( graph ).css( 'overflow', 'hidden' ),
- canvas = $( "<canvas/>" ).appendTo( wrap )[ 0 ];
+ var graph = $( "<div>" ).addClass( "graph" ).appendTo( "#graphs" ),
+ text = $( "<div>" ).text( ++i + ". " + name ).appendTo( graph ),
+ wrap = $( "<div>" ).appendTo( graph ).css( 'overflow', 'hidden' ),
+ canvas = $( "<canvas>" ).appendTo( wrap )[ 0 ];
+
canvas.width = width;
canvas.height = height;
var drawHeight = height * 0.8,
cradius = 10;
ctx = canvas.getContext( "2d" );
ctx.fillStyle = "black";
+ // draw background
ctx.beginPath();
ctx.moveTo( cradius, 0 );
ctx.quadraticCurveTo( 0, 0, 0, cradius );
@@ -53,31 +51,34 @@
ctx.lineTo( cradius, 0 );
ctx.fill();
+ // draw bottom line
ctx.strokeStyle = "#555";
ctx.beginPath();
ctx.moveTo( width * 0.1, drawHeight + .5 );
ctx.lineTo( width * 0.9, drawHeight + .5 );
ctx.stroke();
+ // draw top line
ctx.strokeStyle = "#555";
ctx.beginPath();
ctx.moveTo( width * 0.1, drawHeight * .3 - .5 );
ctx.lineTo( width * 0.9, drawHeight * .3 - .5 );
ctx.stroke();
-
+
+ // plot easing
ctx.strokeStyle = "white";
ctx.beginPath();
ctx.lineWidth = 2;
ctx.moveTo( width * 0.1, drawHeight );
$.each( new Array( width ), function( position ) {
- var val = impl( 0, position, 0, 1, height );
- if ( /linear|jswing/.test( name ) ) {
- val = position / width;
- }
+ var state = position / width,
+ val = impl( state, position, 0, 1, width );
ctx.lineTo( position * 0.8 + width * 0.1,
drawHeight - drawHeight * val * 0.7 );
});
ctx.stroke();
+
+ // animate on click
graph.click(function() {
wrap
.animate( { height: "hide" }, 2000, name )
View
@@ -68,6 +68,7 @@
<script src="../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-gl.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-he.js"></script>
+ <script src="../ui/i18n/jquery.ui.datepicker-hi.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-hr.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-hu.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-hy.js"></script>
@@ -76,6 +77,7 @@
<script src="../ui/i18n/jquery.ui.datepicker-it.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-ja.js"></script>
<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-lb.js"></script>
<script src="../ui/i18n/jquery.ui.datepicker-lt.js"></script>
@@ -225,9 +227,9 @@
return false;
});
});
- });
+ }, "html" );
}
- });
+ }, "html" );
}
function updateDemoNotes() {
@@ -11,7 +11,7 @@
<script src="../../ui/jquery.ui.sortable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
- #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
+ #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0 0 2.5em; float: left; margin-right: 10px; }
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
<script>
@@ -157,8 +157,7 @@ $.extend( $.simulate.prototype, {
},
drag: function( el ) {
- var self = this,
- center = this.findCenter(this.target),
+ var center = this.findCenter(this.target),
options = this.options,
x = Math.floor( center.x ),
y = Math.floor( center.y ),
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>Slider Static Test : Default</title>
- <link rel="stylesheet" href="../static.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.7.1.js"></script>
- <script type="text/javascript" src="../static.js"></script>
-</head>
-<body>
-
-<div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"><a style="left: 0%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a></div>
-
-</body>
-</html>
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>Slider Static Test : Default vertical</title>
- <link rel="stylesheet" href="../static.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.7.1.js"></script>
- <script type="text/javascript" src="../static.js"></script>
-</head>
-<body>
-
-<div class="ui-slider ui-slider-vertical ui-widget ui-widget-content ui-corner-all"><a style="bottom: 0%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a></div>
-
-</body>
-</html>
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>Slider Static Test : Slider horizontal</title>
- <link rel="stylesheet" href="../static.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.7.1.js"></script>
- <script type="text/javascript" src="../static.js"></script>
-</head>
-<body>
-
-<div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"><a style="left: 50%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a></div>
-
-</body>
-</html>
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>Slider Static Test : Slider horizontal range</title>
- <link rel="stylesheet" href="../static.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.7.1.js"></script>
- <script type="text/javascript" src="../static.js"></script>
-</head>
-<body>
-
-<div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"><div style="left: 25%; width: 50%;" class="ui-slider-range ui-widget-header"></div><a style="left: 25%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a><a style="left: 75%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a></div>
-
-</body>
-</html>
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>Slider Static Test : Slider horizontal range max</title>
- <link rel="stylesheet" href="../static.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.base.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.theme.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.7.1.js"></script>
- <script type="text/javascript" src="../static.js"></script>
-</head>
-<body>
-
-<div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"><div style="width:25%;" class="ui-slider-range ui-slider-range-max ui-widget-header"></div><a style="left: 75%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a></div>
-
-</body>
-</html>
Oops, something went wrong.

0 comments on commit 6528b48

Please sign in to comment.