Skip to content
Permalink
Browse files

Merge commit '1.8.1' into tooltip

  • Loading branch information...
jzaefferer committed Apr 21, 2010
2 parents 19b76a1 + 469d0c5 commit cfa185d962a153aa50c1ec991f37a24d222abce2
Showing with 646 additions and 119 deletions.
  1. +7 −1 demos/autocomplete/custom-data.html
  2. +64 −0 demos/autocomplete/folding.html
  3. +2 −0 demos/autocomplete/index.html
  4. +75 −0 demos/autocomplete/multiple-remote.html
  5. +69 −0 demos/autocomplete/multiple.html
  6. +3 −4 demos/autocomplete/remote-with-cache.html
  7. +1 −1 demos/draggable/visual-feedback.html
  8. +1 −1 demos/effect/index.html
  9. +172 −0 tests/static/menu/all-menus-icons.html
  10. +12 −3 tests/unit/accordion/accordion.html
  11. +8 −21 tests/unit/accordion/accordion_methods.js
  12. +11 −20 tests/unit/accordion/accordion_options.js
  13. +3 −2 tests/unit/autocomplete/autocomplete_events.js
  14. +4 −0 tests/unit/autocomplete/autocomplete_methods.js
  15. +4 −0 tests/unit/button/button_methods.js
  16. +12 −1 tests/unit/core/core.html
  17. +12 −1 tests/unit/datepicker/datepicker.html
  18. +12 −1 tests/unit/dialog/dialog.html
  19. +12 −4 tests/unit/draggable/draggable.html
  20. +12 −4 tests/unit/droppable/droppable.html
  21. +2 −0 tests/unit/position/position_core.js
  22. +2 −2 tests/unit/progressbar/progressbar_core.js
  23. +12 −4 tests/unit/resizable/resizable.html
  24. +12 −4 tests/unit/selectable/selectable.html
  25. +12 −4 tests/unit/sortable/sortable.html
  26. +2 −1 tests/unit/sortable/sortable_methods.js
  27. +12 −1 tests/unit/tabs/tabs.html
  28. +34 −7 tests/unit/tabs/tabs_events.js
  29. +36 −20 tests/unit/tabs/tabs_methods.js
  30. +6 −6 ui/i18n/jquery.ui.datepicker-fr-CH.js
  31. +7 −5 ui/jquery.ui.autocomplete.js
  32. +12 −0 ui/jquery.ui.sortable.js
  33. +1 −1 version.txt
@@ -64,7 +64,13 @@
return false;
}
});
})
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
.appendTo( ul );
};
});
</script>
</head>
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Autocomplete Accent Folding Demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
var names = [ "Jörn Zaefferer", "Scott González", "John Resig" ];
var accentMap = {
'á':'a',
'ö':'o'
};
var normalize = function( term ) {
var ret = '';
for ( var i = 0; i < term.length; i++ ) {
ret += accentMap[ term.charAt(i) ] || term.charAt(i);
}
return ret;
};
$( "#developer" ).autocomplete({
source: function( request, response ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( request.term ), "i" );
response( $.grep( names, function( value ) {
value = value.label || value.value || value;
return matcher.test( value ) || matcher.test( normalize( value ) );
}) );
}
});
});
</script>
</head>
<body>

<div class="demo">

<div class="ui-widget">
<form>
<label for="developer">Developer: </label>
<input id="developer" />
</form>
</div>

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

<div class="demo-description">
<p>
The autocomplete field uses a custom source option which will match results that have accented characters even when the text field doesn't contain accented characters. However if the you type in accented characters in the text field it is smart enough not to show results that aren't accented.
</p>
<p>
Try typing "Jo" to see "John" and "Jörn", then type "Jö" to see only "Jörn".
</p>
</div><!-- End demo-description -->

</body>
</html>
@@ -17,6 +17,8 @@ <h4>Examples</h4>
<li><a href="custom-data.html">Custom data and display</a></li>
<li><a href="xml.html">XML data parsed once</a></li>
<li><a href="categories.html">Categories</a></li>
<li><a href="multiple.html">Multiple values</a></li>
<li><a href="multiple-remote.html">Multiple, remote</a></li>
</ul>
</div>
</body>
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Autocomplete multiple demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
$("#birds").autocomplete({
source: function(request, response) {
$.getJSON("search.php", {
term: extractLast(request.term)
}, response);
},
search: function() {
// custom minLength
var term = extractLast(this.value);
if (term.length < 2) {
return false;
}
},
focus: function() {
// prevent value inserted on focus
return false;
},
select: function(event, ui) {
var terms = split( this.value );
// remove the current input
terms.pop();
// add the selected item
terms.push( ui.item.value );
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});
</script>
</head>
<body>

<div class="demo">

<div class="ui-widget">
<label for="birds">Birds: </label>
<input id="birds" size="50" />
</div>

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

<div class="demo-description">
<p>
Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names.
</p>
<p>
This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.
</p>
</div><!-- End demo-description -->

</body>
</html>
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Autocomplete multiple demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
$("#tags").autocomplete({
minLength: 0,
source: function(request, response) {
// delegate back to autocomplete, but extract the last term
response($.ui.autocomplete.filter(availableTags, extractLast(request.term)));
},
focus: function() {
// prevent value inserted on focus
return false;
},
select: function(event, ui) {
var terms = split( this.value );
// remove the current input
terms.pop();
// add the selected item
terms.push( ui.item.value );
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});
</script>
</head>
<body>

<div class="demo">

<div class="ui-widget">
<label for="tags">Tag programming languages: </label>
<input id="tags" size="50" />
</div>

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

<div class="demo-description">
<p>
Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more.
</p>
<p>
This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.
</p>
</div><!-- End demo-description -->

</body>
</html>
@@ -22,12 +22,11 @@
source: function(request, response) {
if (cache.term == request.term && cache.content) {
response(cache.content);
return;
}
if (new RegExp(cache.term).test(request.term) && cache.content && cache.content.length < 13) {
var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i");
response($.grep(cache.content, function(value) {
return matcher.test(value.value)
}));
response($.ui.autocomplete.filter(cache.content, request.term));
return;
}
$.ajax({
url: "search.php",
@@ -27,7 +27,7 @@
return $('<div class="ui-widget-header">I\'m a custom helper</div>');
}
});
$("#set div").draggable({ stack: { group: '#set div', min: 1 } });
$("#set div").draggable({ stack: '#set div' });
});
</script>
</head>
@@ -11,7 +11,7 @@
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Effect showcase</a></li>
<li class="demo-config-on"><a href="easing.html">Easing showcase</a></li>
<li><a href="easing.html">Easing showcase</a></li>
<!-- WIP
<li class="demo-config-on"><a href="scale.html">Scale effect</a></li>
<li class="demo-config-on"><a href="size.html">Size effect</a></li>

0 comments on commit cfa185d

Please sign in to comment.
You can’t perform that action at this time.