Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into effects-unit
Conflicts:
	ui/jquery.effects.pulsate.js
  • Loading branch information
gnarf committed May 10, 2011
2 parents 4dcfeee + 85ac420 commit 27a7dee
Show file tree
Hide file tree
Showing 78 changed files with 1,556 additions and 1,153 deletions.
17 changes: 17 additions & 0 deletions README.md
Expand Up @@ -7,3 +7,20 @@ If you want to use jQuery UI, go to [jqueryui.com](http://jqueryui.com) to get s


If you are interested in helping developing jQuery UI, you are in the right place. If you are interested in helping developing jQuery UI, you are in the right place.
To discuss development with team members and the community, visit the [Developing jQuery UI Forum](http://forum.jquery.com/developing-jquery-ui). To discuss development with team members and the community, visit the [Developing jQuery UI Forum](http://forum.jquery.com/developing-jquery-ui).

For commiters
---
When looking at pull requests, first check for [proper commit messages](http://wiki.jqueryui.com/w/page/12137724/Bug-Fixing-Guide).

Unless everything is fine and you can merge directly via GitHub's interface, fetch the remote first:

git remote add [username] [his-fork.git] -f

If you want just one commit and edit the commit message:

git cherry-pick -e [sha-of-commit]

If it should go to the stable brach, cherry-pick it to stable:

git checkout 1-8-stable
git cherry-pick -x [sha-of-commit]
62 changes: 33 additions & 29 deletions demos/autocomplete/combobox.html
Expand Up @@ -16,7 +16,7 @@
<style> <style>
.ui-button { margin-left: -1px; } .ui-button { margin-left: -1px; }
.ui-button-icon-only .ui-button-text { padding: 0.35em; } .ui-button-icon-only .ui-button-text { padding: 0.35em; }
.ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; } .ui-autocomplete-input { margin: 0; padding: 0.4em 0 0.4em 0.45em; }
</style> </style>
<script> <script>
(function( $ ) { (function( $ ) {
Expand All @@ -26,6 +26,32 @@
select = this.element.hide(), select = this.element.hide(),
selected = select.children( ":selected" ), selected = select.children( ":selected" ),
value = selected.val() ? selected.text() : ""; value = selected.val() ? selected.text() : "";

function removeIfInvalid(element) {
var value = $( element ).val(),
matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( value ) + "$", "i" ),
valid = false;
select.children( "option" ).each(function() {
if ( $( this ).text().match( matcher ) ) {
this.selected = valid = true;
return false;
}
});
if ( !valid ) {
// remove invalid value, as it didn't match anything
$( element )
.val( "" )
.attr( "title", value + " didn't match any item" )
.tooltip( "open" );
select.val( "" );
setTimeout(function() {
input.tooltip( "close" ).attr( "title", "" );
}, 2500 );
input.data( "autocomplete" ).term = "";
return false;
}
}

var input = this.input = $( "<input>" ) var input = this.input = $( "<input>" )
.insertAfter( select ) .insertAfter( select )
.val( value ) .val( value )
Expand Down Expand Up @@ -57,30 +83,8 @@
}); });
}, },
change: function( event, ui ) { change: function( event, ui ) {
if ( !ui.item ) { if ( !ui.item )
var value = $( this ).val(), return removeIfInvalid( this );
matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( value ) + "$", "i" ),
valid = false;
select.children( "option" ).each(function() {
if ( $( this ).text().match( matcher ) ) {
this.selected = valid = true;
return false;
}
});
if ( !valid ) {
// remove invalid value, as it didn't match anything
$( this )
.val( "" )
.attr( "title", value + " didn't match any item" )
.tooltip( "open" );
select.val( "" );
setTimeout(function() {
input.tooltip( "close" ).attr( "title", "" );
}, 2500 );
input.data( "autocomplete" ).term = "";
return false;
}
}
} }
}) })
.addClass( "ui-widget ui-widget-content ui-corner-left" ); .addClass( "ui-widget ui-widget-content ui-corner-left" );
Expand Down Expand Up @@ -109,6 +113,7 @@
// close if already visible // close if already visible
if ( input.autocomplete( "widget" ).is( ":visible" ) ) { if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
input.autocomplete( "close" ); input.autocomplete( "close" );
removeIfInvalid( input );
return; return;
} }


Expand All @@ -124,10 +129,9 @@
.tooltip({ .tooltip({
position: { position: {
of: this.button of: this.button
} },
}) tooltipClass: "ui-state-highlight"
.tooltip( "widget" ) });
.addClass( "ui-state-highlight" );
}, },


destroy: function() { destroy: function() {
Expand Down
3 changes: 1 addition & 2 deletions demos/demos.css
Expand Up @@ -129,8 +129,7 @@ eventually we should convert the font sizes to ems -- using px for now to minimi


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


Expand Down
4 changes: 4 additions & 0 deletions demos/index.html
Expand Up @@ -20,6 +20,8 @@
<script src="../ui/jquery.ui.draggable.js"></script> <script src="../ui/jquery.ui.draggable.js"></script>
<script src="../ui/jquery.ui.droppable.js"></script> <script src="../ui/jquery.ui.droppable.js"></script>
<script src="../ui/jquery.ui.menu.js"></script> <script src="../ui/jquery.ui.menu.js"></script>
<script src="../ui/jquery.ui.menubar.js"></script>
<script src="../ui/jquery.ui.popup.js"></script>
<script src="../ui/jquery.ui.position.js"></script> <script src="../ui/jquery.ui.position.js"></script>
<script src="../ui/jquery.ui.progressbar.js"></script> <script src="../ui/jquery.ui.progressbar.js"></script>
<script src="../ui/jquery.ui.resizable.js"></script> <script src="../ui/jquery.ui.resizable.js"></script>
Expand Down Expand Up @@ -279,6 +281,8 @@
<dd><a href="datepicker/index.html">Datepicker</a></dd> <dd><a href="datepicker/index.html">Datepicker</a></dd>
<dd><a href="dialog/index.html">Dialog</a></dd> <dd><a href="dialog/index.html">Dialog</a></dd>
<dd><a href="menu/index.html">Menu</a></dd> <dd><a href="menu/index.html">Menu</a></dd>
<dd><a href="menubar/index.html">Menubar</a></dd>
<dd><a href="popup/index.html">Popup</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd> <dd><a href="progressbar/index.html">Progressbar</a></dd>
<dd><a href="slider/index.html">Slider</a></dd> <dd><a href="slider/index.html">Slider</a></dd>
<dd><a href="spinner/index.html">Spinner</a></dd> <dd><a href="spinner/index.html">Spinner</a></dd>
Expand Down
48 changes: 16 additions & 32 deletions demos/menu/contextmenu.html
Expand Up @@ -3,44 +3,28 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>jQuery UI Menu - Contextmenu demo</title> <title>jQuery UI Menu - Contextmenu demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" /> <link href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.5.1.js"></script> <script src="../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script> <script src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script> <script src="../../ui/jquery.ui.menu.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script> <script src="../../ui/jquery.ui.button.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" /> <script src="../../ui/jquery.ui.popup.js"></script>
<script type="text/javascript"> <link href="../demos.css" rel="stylesheet" />
<script>
$(function() { $(function() {
$(".demo button").button({ $(".demo button").button({
icons: { icons: {
primary: "ui-icon-home", primary: "ui-icon-home",
secondary: "ui-icon-triangle-1-s" secondary: "ui-icon-triangle-1-s"
} }
}).each(function() { }).next().menu({
$(this).next().menu({ select: function(event, ui) {
select: function(event, ui) { $(this).hide();
$(this).hide(); $("#log").append("<div>Selected " + ui.item.text() + "</div>");
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
}
}).hide();
}).click(function(event) {
var menu = $(this).next();
if (menu.is(":visible")) {
menu.hide();
return false;
} }
menu.menu("blur").show().position({ }).popup();
my: "left top",
at: "right top",
of: this
});
$(document).one("click", function() {
menu.hide();
});
return false;
})
}); });
</script> </script>
<style> <style>
Expand Down Expand Up @@ -69,7 +53,7 @@


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


<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> <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>


<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> <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>


Expand Down
12 changes: 6 additions & 6 deletions demos/menu/default.html
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>jQuery UI Menu - Default demo</title> <title>jQuery UI Menu - Default demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" /> <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.5.1.js"></script> <script src="../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script> <script src="../../ui/jquery.ui.menu.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" /> <link href="../demos.css" rel="stylesheet" />
<script type="text/javascript"> <script>
$(function() { $(function() {
$(".demo ul").menu(); $(".demo ul").menu();
}); });
Expand Down
2 changes: 1 addition & 1 deletion demos/menu/index.html
Expand Up @@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>jQuery UI Menu Demos</title> <title>jQuery UI Menu Demos</title>
<link type="text/css" href="../demos.css" rel="stylesheet" /> <link href="../demos.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div class="demos-nav"> <div class="demos-nav">
Expand Down
48 changes: 25 additions & 23 deletions tests/visual/menu/menubar.html → demos/menubar/default.html
@@ -1,27 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Menu Visual Test: Default</title> <title>jQuery UI Menubar - Default demo</title>
<link rel="stylesheet" href="../visual.css" type="text/css" /> <link rel="stylesheet" href="../demos.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" /> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
<script type="text/javascript" src="../../../jquery-1.5.1.js"></script> <script src="../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script> <script src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script> <script src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.menu.js"></script> <script src="../../ui/jquery.ui.menu.js"></script>
<script type="text/javascript" src="menubar.js"></script> <script src="../../ui/jquery.ui.menubar.js"></script>
<!-- <script>
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
-->
<script type="text/javascript">
$(function() { $(function() {
$.fn.themeswitcher && $('<div/>').css({
position: "absolute",
right: 10,
top: 10
}).appendTo(document.body).themeswitcher();

$("td:has(.menubar)").clone().appendTo("tbody tr:not(:first)"); $("td:has(.menubar)").clone().appendTo("tbody tr:not(:first)");


$("#bar1, .menubar").menubar({ $("#bar1, .menubar").menubar({
Expand All @@ -40,7 +31,6 @@
}); });
</script> </script>
<style type="text/css"> <style type="text/css">
body { font-size:62.5%; }
#bar1, #bar2 { margin: 0 0 4em; } /* style for this page only */ #bar1, #bar2 { margin: 0 0 4em; } /* style for this page only */
.ui-menu { width: 200px; position: absolute; outline: none; z-index: 9999; } .ui-menu { width: 200px; position: absolute; outline: none; z-index: 9999; }
.ui-menu .ui-icon { float: right; } .ui-menu .ui-icon { float: right; }
Expand All @@ -64,18 +54,20 @@
.ui-menubar-item { .ui-menubar-item {
float: left; float: left;
} }

/*
table { table {
border-collapse: collapse; border-collapse: collapse;
} }
th, td { th, td {
padding: 0.5em; padding: 0.5em;
border: 1px solid black; border: 1px solid black;
} }
*/
</style> </style>
</head> </head>
<body> <body>


<div class="demo">
<ul id="bar1" class="menubar"> <ul id="bar1" class="menubar">
<li> <li>
<a href="#">File</a> <a href="#">File</a>
Expand Down Expand Up @@ -168,6 +160,7 @@
</li> </li>
</ul> </ul>


<!--
<table id="movies" class="ui-widget"> <table id="movies" class="ui-widget">
<thead> <thead>
<tr> <tr>
Expand Down Expand Up @@ -222,11 +215,20 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
-->


<div class="ui-widget" style="margin-top:2em; font-family:Arial"> <div class="ui-widget" style="margin-top:2em; font-family:Arial">
Log: Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div> <div id="log" style="height: 100px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div> </div>
</div>

<div class="demo-description">

<p>TODO</p>

</div><!-- End demo-description -->



</body> </body>
</html> </html>
16 changes: 16 additions & 0 deletions demos/menubar/index.html
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Menubar Demos</title>
<link href="../demos.css" rel="stylesheet" />
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
</ul>
</div>
</body>
</html>

0 comments on commit 27a7dee

Please sign in to comment.