Skip to content

Commit 6528b48

Browse files
committed
Merge branch 'master' into selectmenu
2 parents 98d72c7 + d32a9e8 commit 6528b48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1050
-4098
lines changed

demos/accordion/hoverintent.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
3030
},
3131
handler: function( event ) {
32-
var self = this,
32+
var that = this,
3333
args = arguments,
3434
target = $( event.target ),
3535
cX, cY, pX, pY;
@@ -50,7 +50,11 @@
5050
if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) {
5151
clear();
5252
event.type = "hoverintent";
53-
jQuery.event.handle.apply( self, args );
53+
// prevent accessing the original event since the new event
54+
// is fired asynchronously and the old event is no longer
55+
// usable (#6028)
56+
event.originalEvent = {};
57+
jQuery.event.handle.apply( that, args );
5458
} else {
5559
pX = cX;
5660
pY = cY;

demos/accordion/sortable.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,23 @@
1111
<script src="../../ui/jquery.ui.sortable.js"></script>
1212
<script src="../../ui/jquery.ui.accordion.js"></script>
1313
<link rel="stylesheet" href="../demos.css">
14+
<style>
15+
/* IE has layout issues when sorting (see #5413) */
16+
.group { zoom: 1 }
17+
</style>
1418
<script>
1519
$(function() {
16-
var stop = false;
17-
$( "#accordion h3" ).click(function( event ) {
18-
if ( stop ) {
19-
event.stopImmediatePropagation();
20-
event.preventDefault();
21-
stop = false;
22-
}
23-
});
2420
$( "#accordion" )
2521
.accordion({
2622
header: "> div > h3"
2723
})
2824
.sortable({
2925
axis: "y",
3026
handle: "h3",
31-
stop: function() {
32-
stop = true;
27+
stop: function( event, ui ) {
28+
// IE doesn't register the blur when sorting
29+
// so trigger focusout handlers to remove .ui-state-focus
30+
ui.item.children( "h3" ).triggerHandler( "focusout" );
3331
}
3432
});
3533
});
@@ -40,19 +38,19 @@
4038
<div class="demo">
4139

4240
<div id="accordion">
43-
<div>
41+
<div class="group">
4442
<h3><a href="#">Section 1</a></h3>
4543
<div>
4644
<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>
4745
</div>
4846
</div>
49-
<div>
47+
<div class="group">
5048
<h3><a href="#">Section 2</a></h3>
5149
<div>
5250
<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>
5351
</div>
5452
</div>
55-
<div>
53+
<div class="group">
5654
<h3><a href="#">Section 3</a></h3>
5755
<div>
5856
<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 @@ <h3><a href="#">Section 3</a></h3>
6361
</ul>
6462
</div>
6563
</div>
66-
<div>
64+
<div class="group">
6765
<h3><a href="#">Section 4</a></h3>
6866
<div>
6967
<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>

demos/addClass/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<div class="demo">
3434

3535
<div class="toggler">
36-
<div id="effect" class=" ui-corner-all">
36+
<div id="effect" class="ui-corner-all">
3737
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
3838
</div>
3939
</div>

demos/autocomplete/categories.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
<script>
2323
$.widget( "custom.catcomplete", $.ui.autocomplete, {
2424
_renderMenu: function( ul, items ) {
25-
var self = this,
25+
var that = this,
2626
currentCategory = "";
2727
$.each( items, function( index, item ) {
2828
if ( item.category != currentCategory ) {
2929
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
3030
currentCategory = item.category;
3131
}
32-
self._renderItem( ul, item );
32+
that._renderItem( ul, item );
3333
});
3434
}
3535
});

demos/autocomplete/combobox.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
(function( $ ) {
3030
$.widget( "ui.combobox", {
3131
_create: function() {
32-
var self = this,
32+
var that = this,
3333
select = this.element.hide(),
3434
selected = select.children( ":selected" ),
3535
value = selected.val() ? selected.text() : "";
@@ -85,7 +85,7 @@
8585
},
8686
select: function( event, ui ) {
8787
ui.item.option.selected = true;
88-
self._trigger( "selected", event, {
88+
that._trigger( "selected", event, {
8989
item: ui.item.option
9090
});
9191
},

demos/datepicker/localization.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<script src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
3535
<script src="../../ui/i18n/jquery.ui.datepicker-gl.js"></script>
3636
<script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
37+
<script src="../../ui/i18n/jquery.ui.datepicker-hi.js"></script>
3738
<script src="../../ui/i18n/jquery.ui.datepicker-hr.js"></script>
3839
<script src="../../ui/i18n/jquery.ui.datepicker-hu.js"></script>
3940
<script src="../../ui/i18n/jquery.ui.datepicker-hy.js"></script>
@@ -42,6 +43,7 @@
4243
<script src="../../ui/i18n/jquery.ui.datepicker-it.js"></script>
4344
<script src="../../ui/i18n/jquery.ui.datepicker-ja.js"></script>
4445
<script src="../../ui/i18n/jquery.ui.datepicker-kk.js"></script>
46+
<script src="../../ui/i18n/jquery.ui.datepicker-km.js"></script>
4547
<script src="../../ui/i18n/jquery.ui.datepicker-ko.js"></script>
4648
<script src="../../ui/i18n/jquery.ui.datepicker-lb.js"></script>
4749
<script src="../../ui/i18n/jquery.ui.datepicker-lt.js"></script>
@@ -123,12 +125,14 @@
123125
<option value="de">German (Deutsch)</option>
124126
<option value="el">Greek (&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;)</option>
125127
<option value="he">Hebrew (&#8235;(&#1506;&#1489;&#1512;&#1497;&#1514;</option>
128+
<option value="hi">Hindi (&#2361;&#2367;&#2306;&#2342;&#2368;)</option>
126129
<option value="hu">Hungarian (Magyar)</option>
127130
<option value="is">Icelandic (&Otilde;slenska)</option>
128131
<option value="id">Indonesian (Bahasa Indonesia)</option>
129132
<option value="it">Italian (Italiano)</option>
130133
<option value="ja">Japanese (&#26085;&#26412;&#35486;)</option>
131134
<option value="kk">Kazakhstan (Kazakh)</option>
135+
<option value="km">Khmer</option>
132136
<option value="ko">Korean (&#54620;&#44397;&#50612;)</option>
133137
<option value="lv">Latvian (Latvie&ouml;u Valoda)</option>
134138
<option value="lt">Lithuanian (lietuviu kalba)</option>

demos/draggable/cursor-style.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
</style>
1616
<script>
1717
$(function() {
18-
$( "#draggable" ).draggable({ cursorAt: { cursor: "move", top: 56, left: 56 } });
19-
$( "#draggable2" ).draggable({ cursorAt: { cursor: "crosshair", top: -5, left: -5 } });
18+
$( "#draggable" ).draggable({ cursor: "move", cursorAt: { top: 56, left: 56 } });
19+
$( "#draggable2" ).draggable({ cursor: "crosshair", cursorAt: { top: -5, left: -5 } });
2020
$( "#draggable3" ).draggable({ cursorAt: { bottom: 0 } });
2121
});
2222
</script>

demos/effect/easing.html

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,31 @@
1515
</style>
1616
<script>
1717
$(function() {
18-
if ( !$( "<canvas/>" )[0].getContext ) {
19-
$( "<div/>" ).text(
20-
"Your browser doesn't support canvas, which is required for this demo. " +
21-
"Give Firefox 3 a try!"
18+
if ( !$( "<canvas>" )[0].getContext ) {
19+
$( "<div>" ).text(
20+
"Your browser doesn't support canvas, which is required for this demo."
2221
).appendTo( "#graphs" );
2322
return;
2423
}
2524

2625
var i = 0,
2726
width = 100,
2827
height = 100;
28+
2929
$.each( $.easing, function( name, impl ) {
30-
// skip linear/jswing and any non functioning implementation
31-
if ( !$.isFunction( impl ) || /jswing/.test( name ) ) {
32-
return;
33-
}
34-
var graph = $( "<div/>" ).addClass( "graph" ).appendTo( "#graphs" ),
35-
text = $( "<div/>" ).text( ++i + ". " + name ).appendTo( graph ),
36-
wrap = $( "<div/>" ).appendTo( graph ).css( 'overflow', 'hidden' ),
37-
canvas = $( "<canvas/>" ).appendTo( wrap )[ 0 ];
30+
var graph = $( "<div>" ).addClass( "graph" ).appendTo( "#graphs" ),
31+
text = $( "<div>" ).text( ++i + ". " + name ).appendTo( graph ),
32+
wrap = $( "<div>" ).appendTo( graph ).css( 'overflow', 'hidden' ),
33+
canvas = $( "<canvas>" ).appendTo( wrap )[ 0 ];
34+
3835
canvas.width = width;
3936
canvas.height = height;
4037
var drawHeight = height * 0.8,
4138
cradius = 10;
4239
ctx = canvas.getContext( "2d" );
4340
ctx.fillStyle = "black";
4441

42+
// draw background
4543
ctx.beginPath();
4644
ctx.moveTo( cradius, 0 );
4745
ctx.quadraticCurveTo( 0, 0, 0, cradius );
@@ -53,31 +51,34 @@
5351
ctx.lineTo( cradius, 0 );
5452
ctx.fill();
5553

54+
// draw bottom line
5655
ctx.strokeStyle = "#555";
5756
ctx.beginPath();
5857
ctx.moveTo( width * 0.1, drawHeight + .5 );
5958
ctx.lineTo( width * 0.9, drawHeight + .5 );
6059
ctx.stroke();
6160

61+
// draw top line
6262
ctx.strokeStyle = "#555";
6363
ctx.beginPath();
6464
ctx.moveTo( width * 0.1, drawHeight * .3 - .5 );
6565
ctx.lineTo( width * 0.9, drawHeight * .3 - .5 );
6666
ctx.stroke();
67-
67+
68+
// plot easing
6869
ctx.strokeStyle = "white";
6970
ctx.beginPath();
7071
ctx.lineWidth = 2;
7172
ctx.moveTo( width * 0.1, drawHeight );
7273
$.each( new Array( width ), function( position ) {
73-
var val = impl( 0, position, 0, 1, height );
74-
if ( /linear|jswing/.test( name ) ) {
75-
val = position / width;
76-
}
74+
var state = position / width,
75+
val = impl( state, position, 0, 1, width );
7776
ctx.lineTo( position * 0.8 + width * 0.1,
7877
drawHeight - drawHeight * val * 0.7 );
7978
});
8079
ctx.stroke();
80+
81+
// animate on click
8182
graph.click(function() {
8283
wrap
8384
.animate( { height: "hide" }, 2000, name )

demos/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<script src="../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
6969
<script src="../ui/i18n/jquery.ui.datepicker-gl.js"></script>
7070
<script src="../ui/i18n/jquery.ui.datepicker-he.js"></script>
71+
<script src="../ui/i18n/jquery.ui.datepicker-hi.js"></script>
7172
<script src="../ui/i18n/jquery.ui.datepicker-hr.js"></script>
7273
<script src="../ui/i18n/jquery.ui.datepicker-hu.js"></script>
7374
<script src="../ui/i18n/jquery.ui.datepicker-hy.js"></script>
@@ -76,6 +77,7 @@
7677
<script src="../ui/i18n/jquery.ui.datepicker-it.js"></script>
7778
<script src="../ui/i18n/jquery.ui.datepicker-ja.js"></script>
7879
<script src="../ui/i18n/jquery.ui.datepicker-kk.js"></script>
80+
<script src="../ui/i18n/jquery.ui.datepicker-km.js"></script>
7981
<script src="../ui/i18n/jquery.ui.datepicker-ko.js"></script>
8082
<script src="../ui/i18n/jquery.ui.datepicker-lb.js"></script>
8183
<script src="../ui/i18n/jquery.ui.datepicker-lt.js"></script>
@@ -225,9 +227,9 @@
225227
return false;
226228
});
227229
});
228-
});
230+
}, "html" );
229231
}
230-
});
232+
}, "html" );
231233
}
232234

233235
function updateDemoNotes() {

demos/sortable/connect-lists.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<script src="../../ui/jquery.ui.sortable.js"></script>
1212
<link rel="stylesheet" href="../demos.css">
1313
<style>
14-
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
14+
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0 0 2.5em; float: left; margin-right: 10px; }
1515
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
1616
</style>
1717
<script>

tests/jquery.simulate.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ $.extend( $.simulate.prototype, {
157157
},
158158

159159
drag: function( el ) {
160-
var self = this,
161-
center = this.findCenter(this.target),
160+
var center = this.findCenter(this.target),
162161
options = this.options,
163162
x = Math.floor( center.x ),
164163
y = Math.floor( center.y ),

tests/static/slider/default.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/static/slider/default_vertical.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/static/slider/slider_horizontal.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/static/slider/slider_horizontal_range.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/static/slider/slider_horizontal_range_max.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)