Skip to content

Commit 27a7dee

Browse files
committed
Merge branch 'master' into effects-unit
Conflicts: ui/jquery.effects.pulsate.js
2 parents 4dcfeee + 85ac420 commit 27a7dee

File tree

78 files changed

+1556
-1153
lines changed

Some content is hidden

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

78 files changed

+1556
-1153
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,20 @@ If you want to use jQuery UI, go to [jqueryui.com](http://jqueryui.com) to get s
77

88
If you are interested in helping developing jQuery UI, you are in the right place.
99
To discuss development with team members and the community, visit the [Developing jQuery UI Forum](http://forum.jquery.com/developing-jquery-ui).
10+
11+
For commiters
12+
---
13+
When looking at pull requests, first check for [proper commit messages](http://wiki.jqueryui.com/w/page/12137724/Bug-Fixing-Guide).
14+
15+
Unless everything is fine and you can merge directly via GitHub's interface, fetch the remote first:
16+
17+
git remote add [username] [his-fork.git] -f
18+
19+
If you want just one commit and edit the commit message:
20+
21+
git cherry-pick -e [sha-of-commit]
22+
23+
If it should go to the stable brach, cherry-pick it to stable:
24+
25+
git checkout 1-8-stable
26+
git cherry-pick -x [sha-of-commit]

demos/autocomplete/combobox.html

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<style>
1717
.ui-button { margin-left: -1px; }
1818
.ui-button-icon-only .ui-button-text { padding: 0.35em; }
19-
.ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; }
19+
.ui-autocomplete-input { margin: 0; padding: 0.4em 0 0.4em 0.45em; }
2020
</style>
2121
<script>
2222
(function( $ ) {
@@ -26,6 +26,32 @@
2626
select = this.element.hide(),
2727
selected = select.children( ":selected" ),
2828
value = selected.val() ? selected.text() : "";
29+
30+
function removeIfInvalid(element) {
31+
var value = $( element ).val(),
32+
matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( value ) + "$", "i" ),
33+
valid = false;
34+
select.children( "option" ).each(function() {
35+
if ( $( this ).text().match( matcher ) ) {
36+
this.selected = valid = true;
37+
return false;
38+
}
39+
});
40+
if ( !valid ) {
41+
// remove invalid value, as it didn't match anything
42+
$( element )
43+
.val( "" )
44+
.attr( "title", value + " didn't match any item" )
45+
.tooltip( "open" );
46+
select.val( "" );
47+
setTimeout(function() {
48+
input.tooltip( "close" ).attr( "title", "" );
49+
}, 2500 );
50+
input.data( "autocomplete" ).term = "";
51+
return false;
52+
}
53+
}
54+
2955
var input = this.input = $( "<input>" )
3056
.insertAfter( select )
3157
.val( value )
@@ -57,30 +83,8 @@
5783
});
5884
},
5985
change: function( event, ui ) {
60-
if ( !ui.item ) {
61-
var value = $( this ).val(),
62-
matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( value ) + "$", "i" ),
63-
valid = false;
64-
select.children( "option" ).each(function() {
65-
if ( $( this ).text().match( matcher ) ) {
66-
this.selected = valid = true;
67-
return false;
68-
}
69-
});
70-
if ( !valid ) {
71-
// remove invalid value, as it didn't match anything
72-
$( this )
73-
.val( "" )
74-
.attr( "title", value + " didn't match any item" )
75-
.tooltip( "open" );
76-
select.val( "" );
77-
setTimeout(function() {
78-
input.tooltip( "close" ).attr( "title", "" );
79-
}, 2500 );
80-
input.data( "autocomplete" ).term = "";
81-
return false;
82-
}
83-
}
86+
if ( !ui.item )
87+
return removeIfInvalid( this );
8488
}
8589
})
8690
.addClass( "ui-widget ui-widget-content ui-corner-left" );
@@ -109,6 +113,7 @@
109113
// close if already visible
110114
if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
111115
input.autocomplete( "close" );
116+
removeIfInvalid( input );
112117
return;
113118
}
114119

@@ -124,10 +129,9 @@
124129
.tooltip({
125130
position: {
126131
of: this.button
127-
}
128-
})
129-
.tooltip( "widget" )
130-
.addClass( "ui-state-highlight" );
132+
},
133+
tooltipClass: "ui-state-highlight"
134+
});
131135
},
132136

133137
destroy: function() {

demos/demos.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ eventually we should convert the font sizes to ems -- using px for now to minimi
129129

130130
.normal h3.demo-header { font-size:32px; padding:0 0 5px; border-bottom:1px solid #eee; text-transform: capitalize; }
131131
.normal h4.demo-subheader { font-size:10px; text-transform: uppercase; color:#999; padding:8px 0 3px; border:0; margin:0; }
132-
.normal a:link,
133-
.normal a:visited { color:#1b75bb; text-decoration:none; }
132+
#demo-notes a, #demo-link a, #demo-source a { color:#1b75bb; text-decoration:none; }
134133
.normal a:hover,
135134
.normal a:active { color:#0b559b; }
136135

demos/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<script src="../ui/jquery.ui.draggable.js"></script>
2121
<script src="../ui/jquery.ui.droppable.js"></script>
2222
<script src="../ui/jquery.ui.menu.js"></script>
23+
<script src="../ui/jquery.ui.menubar.js"></script>
24+
<script src="../ui/jquery.ui.popup.js"></script>
2325
<script src="../ui/jquery.ui.position.js"></script>
2426
<script src="../ui/jquery.ui.progressbar.js"></script>
2527
<script src="../ui/jquery.ui.resizable.js"></script>
@@ -279,6 +281,8 @@
279281
<dd><a href="datepicker/index.html">Datepicker</a></dd>
280282
<dd><a href="dialog/index.html">Dialog</a></dd>
281283
<dd><a href="menu/index.html">Menu</a></dd>
284+
<dd><a href="menubar/index.html">Menubar</a></dd>
285+
<dd><a href="popup/index.html">Popup</a></dd>
282286
<dd><a href="progressbar/index.html">Progressbar</a></dd>
283287
<dd><a href="slider/index.html">Slider</a></dd>
284288
<dd><a href="spinner/index.html">Spinner</a></dd>

demos/menu/contextmenu.html

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,28 @@
33
<head>
44
<meta charset="UTF-8" />
55
<title>jQuery UI Menu - Contextmenu demo</title>
6-
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7-
<script type="text/javascript" src="../../jquery-1.5.1.js"></script>
8-
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
9-
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
10-
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
11-
<script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
12-
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
13-
<link type="text/css" href="../demos.css" rel="stylesheet" />
14-
<script type="text/javascript">
6+
<link href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7+
<script src="../../jquery-1.5.1.js"></script>
8+
<script src="../../ui/jquery.ui.core.js"></script>
9+
<script src="../../ui/jquery.ui.position.js"></script>
10+
<script src="../../ui/jquery.ui.widget.js"></script>
11+
<script src="../../ui/jquery.ui.menu.js"></script>
12+
<script src="../../ui/jquery.ui.button.js"></script>
13+
<script src="../../ui/jquery.ui.popup.js"></script>
14+
<link href="../demos.css" rel="stylesheet" />
15+
<script>
1516
$(function() {
1617
$(".demo button").button({
1718
icons: {
1819
primary: "ui-icon-home",
1920
secondary: "ui-icon-triangle-1-s"
2021
}
21-
}).each(function() {
22-
$(this).next().menu({
23-
select: function(event, ui) {
24-
$(this).hide();
25-
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
26-
}
27-
}).hide();
28-
}).click(function(event) {
29-
var menu = $(this).next();
30-
if (menu.is(":visible")) {
31-
menu.hide();
32-
return false;
22+
}).next().menu({
23+
select: function(event, ui) {
24+
$(this).hide();
25+
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
3326
}
34-
menu.menu("blur").show().position({
35-
my: "left top",
36-
at: "right top",
37-
of: this
38-
});
39-
$(document).one("click", function() {
40-
menu.hide();
41-
});
42-
return false;
43-
})
27+
}).popup();
4428
});
4529
</script>
4630
<style>
@@ -69,7 +53,7 @@
6953

7054
<div class="demo-description">
7155

72-
<p>A simple contextmenu: Click the button, or tab to it and hit space to open the menu. Use the mouse or cursor keys to select an item, click it or hit enter to select it.</p>
56+
<p>TODO update - A simple contextmenu: Click the button, or tab to it and hit space to open the menu. Use the mouse or cursor keys to select an item, click it or hit enter to select it.</p>
7357

7458
<p>The keyboard handling is part of the menu. Using the input option to menu is configured to add the key event handlers to the button, as that button gets focused when clicked.</p>
7559

demos/menu/default.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<meta charset="UTF-8" />
55
<title>jQuery UI Menu - Default demo</title>
66
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7-
<script type="text/javascript" src="../../jquery-1.5.1.js"></script>
8-
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
9-
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
10-
<script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
11-
<link type="text/css" href="../demos.css" rel="stylesheet" />
12-
<script type="text/javascript">
7+
<script src="../../jquery-1.5.1.js"></script>
8+
<script src="../../ui/jquery.ui.core.js"></script>
9+
<script src="../../ui/jquery.ui.widget.js"></script>
10+
<script src="../../ui/jquery.ui.menu.js"></script>
11+
<link href="../demos.css" rel="stylesheet" />
12+
<script>
1313
$(function() {
1414
$(".demo ul").menu();
1515
});

demos/menu/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<title>jQuery UI Menu Demos</title>
6-
<link type="text/css" href="../demos.css" rel="stylesheet" />
6+
<link href="../demos.css" rel="stylesheet" />
77
</head>
88
<body>
99
<div class="demos-nav">

tests/visual/menu/menubar.html renamed to demos/menubar/default.html

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Menu Visual Test: Default</title>
5-
<link rel="stylesheet" href="../visual.css" type="text/css" />
6-
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
7-
<script type="text/javascript" src="../../../jquery-1.5.1.js"></script>
8-
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
9-
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
10-
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
11-
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
12-
<script type="text/javascript" src="../../../ui/jquery.ui.menu.js"></script>
13-
<script type="text/javascript" src="menubar.js"></script>
14-
<!--
15-
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
16-
-->
17-
<script type="text/javascript">
4+
<title>jQuery UI Menubar - Default demo</title>
5+
<link rel="stylesheet" href="../demos.css" type="text/css" />
6+
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
7+
<script src="../../jquery-1.5.1.js"></script>
8+
<script src="../../ui/jquery.ui.core.js"></script>
9+
<script src="../../ui/jquery.ui.widget.js"></script>
10+
<script src="../../ui/jquery.ui.position.js"></script>
11+
<script src="../../ui/jquery.ui.button.js"></script>
12+
<script src="../../ui/jquery.ui.menu.js"></script>
13+
<script src="../../ui/jquery.ui.menubar.js"></script>
14+
<script>
1815
$(function() {
19-
$.fn.themeswitcher && $('<div/>').css({
20-
position: "absolute",
21-
right: 10,
22-
top: 10
23-
}).appendTo(document.body).themeswitcher();
24-
2516
$("td:has(.menubar)").clone().appendTo("tbody tr:not(:first)");
2617

2718
$("#bar1, .menubar").menubar({
@@ -40,7 +31,6 @@
4031
});
4132
</script>
4233
<style type="text/css">
43-
body { font-size:62.5%; }
4434
#bar1, #bar2 { margin: 0 0 4em; } /* style for this page only */
4535
.ui-menu { width: 200px; position: absolute; outline: none; z-index: 9999; }
4636
.ui-menu .ui-icon { float: right; }
@@ -64,18 +54,20 @@
6454
.ui-menubar-item {
6555
float: left;
6656
}
67-
57+
/*
6858
table {
6959
border-collapse: collapse;
7060
}
7161
th, td {
7262
padding: 0.5em;
7363
border: 1px solid black;
7464
}
65+
*/
7566
</style>
7667
</head>
7768
<body>
7869

70+
<div class="demo">
7971
<ul id="bar1" class="menubar">
8072
<li>
8173
<a href="#">File</a>
@@ -168,6 +160,7 @@
168160
</li>
169161
</ul>
170162

163+
<!--
171164
<table id="movies" class="ui-widget">
172165
<thead>
173166
<tr>
@@ -222,11 +215,20 @@
222215
</tr>
223216
</tbody>
224217
</table>
218+
-->
225219

226220
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
227221
Log:
228-
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
222+
<div id="log" style="height: 100px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
229223
</div>
224+
</div>
225+
226+
<div class="demo-description">
227+
228+
<p>TODO</p>
229+
230+
</div><!-- End demo-description -->
231+
230232

231233
</body>
232234
</html>

demos/menubar/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>jQuery UI Menubar Demos</title>
6+
<link href="../demos.css" rel="stylesheet" />
7+
</head>
8+
<body>
9+
<div class="demos-nav">
10+
<h4>Examples</h4>
11+
<ul>
12+
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
13+
</ul>
14+
</div>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)