Permalink
Browse files

Merge commit '1.8.1' into panel

  • Loading branch information...
2 parents 76b22c0 + 469d0c5 commit 66f480d9ade5ea3a8c611a0bae86762528a6d15b @rdworth rdworth committed Apr 21, 2010
Showing with 2,207 additions and 782 deletions.
  1. +86 −26 build/build.xml
  2. +12 −7 demos/autocomplete/combobox.html
  3. +7 −1 demos/autocomplete/custom-data.html
  4. +64 −0 demos/autocomplete/folding.html
  5. +3 −0 demos/autocomplete/index.html
  6. +75 −0 demos/autocomplete/multiple-remote.html
  7. +69 −0 demos/autocomplete/multiple.html
  8. +3 −4 demos/autocomplete/remote-with-cache.html
  9. +15 −13 demos/button/splitbutton.html
  10. +1 −1 demos/draggable/visual-feedback.html
  11. +1 −0 demos/droppable/index.html
  12. +101 −0 demos/droppable/shopping-cart.html
  13. +1 −1 demos/effect/index.html
  14. +57 −0 demos/tabs/cookie.html
  15. +1 −0 demos/tabs/index.html
  16. +5 −7 external/qunit.js
  17. +172 −0 tests/static/menu/all-menus-icons.html
  18. +27 −4 tests/unit/accordion/accordion.html
  19. +0 −11 tests/unit/accordion/accordion_core.js
  20. +12 −28 tests/unit/accordion/accordion_methods.js
  21. +11 −30 tests/unit/accordion/accordion_options.js
  22. +22 −4 tests/unit/autocomplete/autocomplete_events.js
  23. +4 −0 tests/unit/autocomplete/autocomplete_methods.js
  24. +1 −1 tests/unit/autocomplete/autocomplete_options.js
  25. +4 −0 tests/unit/button/button_methods.js
  26. +12 −1 tests/unit/core/core.html
  27. +12 −1 tests/unit/datepicker/datepicker.html
  28. +12 −1 tests/unit/dialog/dialog.html
  29. +12 −1 tests/unit/draggable/draggable.html
  30. +12 −1 tests/unit/droppable/droppable.html
  31. +2 −0 tests/unit/position/position_core.js
  32. +2 −2 tests/unit/progressbar/progressbar_core.js
  33. +12 −1 tests/unit/resizable/resizable.html
  34. +12 −1 tests/unit/selectable/selectable.html
  35. +37 −4 tests/unit/slider/slider_options.js
  36. +12 −1 tests/unit/sortable/sortable.html
  37. +2 −1 tests/unit/sortable/sortable_methods.js
  38. +12 −1 tests/unit/tabs/tabs.html
  39. +15 −13 tests/unit/tabs/tabs_core.js
  40. +34 −7 tests/unit/tabs/tabs_events.js
  41. +36 −20 tests/unit/tabs/tabs_methods.js
  42. +552 −0 tests/visual/button/button_performance.html
  43. +225 −225 tests/visual/compound/widgets_in_dialog.html
  44. +1 −0 themes/base/jquery.ui.autocomplete.css
  45. +1 −1 themes/base/jquery.ui.tabs.css
  46. +6 −6 ui/i18n/jquery.ui.datepicker-fr-CH.js
  47. +1 −1 ui/i18n/jquery.ui.datepicker-pl.js
  48. +2 −2 ui/jquery.ui.accordion.js
  49. +16 −7 ui/jquery.ui.autocomplete.js
  50. +2 −4 ui/jquery.ui.core.js
  51. +396 −339 ui/jquery.ui.slider.js
  52. +12 −0 ui/jquery.ui.sortable.js
  53. +2 −2 ui/jquery.ui.widget.js
  54. +1 −1 version.txt
View
@@ -22,24 +22,26 @@
<property name="release.filename" value="jquery-ui-${release.version}" />
<property name="dist.dir" value="dist/${release.filename}/" />
+ <property name="cdndist.dir" value="dist/${release.filename}-googlecdn" />
<property name="build.dir" value="build" />
<property name="ui.dir" value="../" />
<property name="src.dir" value="${ui.dir}/ui/" />
<property name="theme.dir" value="${ui.dir}/themes/base/" />
<property name="docs.dir" value="${ui.dir}/docs/" />
- <property name="min.folder" value="${dist.dir}/ui/minified" />
+ <property name="min.dir" value="${dist.dir}/ui/minified" />
<property name="concatenated" value="jquery-ui" />
<property name="concatenated.i18n" value="jquery-ui-i18n" />
<property name="core.files" value="jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js" />
+ <property name="core.files.min" value="jquery.ui.core.min.js, jquery.ui.widget.min.js, jquery.ui.mouse.min.js, jquery.ui.draggable.min.js, jquery.ui.droppable.min.js, jquery.ui.resizable.min.js, jquery.ui.selectable.min.js, jquery.ui.sortable.min.js, jquery.effects.core.min.js" />
<property description="Google Closure" name="closure-jar" value="${build.dir}/google-compiler-20091218.jar" />
- <target name="deploy-release" depends="docs-download, concatenate, minify, copy, replace-version, prepend-header, zip" description="Release builder">
+ <target name="deploy-release" depends="clean, docs-download, concatenate, minify, copy, replace-version, prepend-header, zip, googlecdn" description="Release builder">
</target>
-
+
<target name="replace-version">
<replaceregexp match="@VERSION" replace="${release.version}" flags="g" byline="true">
<fileset dir="${dist.dir}/ui/" includes="*.js"/>
@@ -49,15 +51,14 @@
</target>
<target name="prepend-header">
- <!-- TODO: refactor this ugly mess -->
<copy todir="${dist.dir}/headers/">
<fileset dir="${dist.dir}/ui/" includes="*.js" />
</copy>
<replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
<fileset dir="${dist.dir}/headers/" includes="*.js"/>
</replaceregexp>
<for param="file">
- <path><fileset dir="${dist.dir}/ui/minified/" includes="*.js" /></path>
+ <path><fileset dir="${min.dir}/" includes="*.js" /></path>
<sequential>
<propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
<concat destfile="${dist.dir}/ui-headered/${target}.min.js">
@@ -66,9 +67,33 @@
</concat>
</sequential>
</for>
- <copy todir="${dist.dir}/ui/minified">
+ <copy todir="${min.dir}">
<fileset dir="${dist.dir}/ui-headered/" includes="*.js" />
</copy>
+
+ <!-- once more for the i18n files -->
+ <!-- need to clean up headers in those files first
+ <copy todir="${dist.dir}/headers/i18n/">
+ <fileset dir="${dist.dir}/ui/i18n/" includes="*.js" />
+ </copy>
+ <replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
+ <fileset dir="${dist.dir}/headers/i18n/" includes="*.js"/>
+ </replaceregexp>
+ <for param="file">
+ <path><fileset dir="${min.dir}/i18n/" includes="*.js" /></path>
+ <sequential>
+ <propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
+ <concat destfile="${dist.dir}/ui-headered/i18n/${target}.min.js">
+ <header file="${dist.dir}/headers/i18n/${target}.js" />
+ <fileset file="@{file}" />
+ </concat>
+ </sequential>
+ </for>
+ <copy todir="${min.dir}/i18n/">
+ <fileset dir="${dist.dir}/ui-headered/i18n/" includes="*.js" />
+ </copy>
+ -->
+
<delete dir="${dist.dir}/headers/" />
<delete dir="${dist.dir}/ui-headered/" />
</target>
@@ -108,45 +133,44 @@
<target name="minify" depends="concatenate" description="Remove all comments and whitespace, no compression, great in combination with GZip">
<echo message="Building minified" />
- <delete dir="${min.folder}/" />
- <mkdir dir="${min.folder}" />
- <delete dir="${min.folder}/i18n/" />
- <mkdir dir="${min.folder}/i18n/" />
+ <delete dir="${min.dir}/" />
+ <mkdir dir="${min.dir}" />
+ <delete dir="${min.dir}/i18n/" />
+ <mkdir dir="${min.dir}/i18n/" />
<apply executable="java" parallel="false">
<fileset dir="${src.dir}/" includes="jquery.ui.*.js, jquery.effects.*.js" />
<arg line="-jar" />
- <arg path="build/google-compiler-20091218.jar" />
+ <arg path="${closure-jar}" />
<arg value="--warning_level" />
<arg value="QUIET" />
<arg value="--js_output_file" />
<targetfile />
<arg value="--js" />
- <mapper type="glob" from="*.js" to="${min.folder}/*.min.js" />
+ <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" />
</apply>
+
+ <concat destfile="${min.dir}/${concatenated}.min.js">
+ <filelist dir="${min.dir}" files="${core.files.min}" />
+ <fileset dir="${min.dir}" includes="jquery.ui.*.js, jquery.effects.*.js" excludes="${core.files.min}" />
+ </concat>
- <apply executable="java" parallel="false" verbose="true" dest="${dist.dir}">
- <filelist dir="${dist.dir}/ui/" files="${concatenated}.js" />
+ <apply executable="java" parallel="false">
+ <fileset dir="${src.dir}/i18n/" includes="jquery.ui.*.js" />
<arg line="-jar" />
- <arg path="build/google-compiler-20091218.jar" />
+ <arg path="${closure-jar}" />
<arg value="--warning_level" />
<arg value="QUIET" />
<arg value="--js_output_file" />
<targetfile />
<arg value="--js" />
- <mapper type="glob" from="${concatenated}.js" to="tmpmin" />
+ <mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" />
</apply>
- <concat destfile="${min.folder}/jquery-ui.min.js">
- <filelist files="${src.dir}/jquery.ui.core.js, ${dist.dir}/tmpmin"/>
- <filterchain>
- <headfilter lines="9"/>
- </filterchain>
- </concat>
- <concat destfile="${min.folder}/jquery-ui.min.js" append="yes">
- <filelist files="${dist.dir}/tmpmin"/>
+
+ <concat destfile="${min.dir}/i18n/${concatenated.i18n}.min.js">
+ <fileset dir="${min.dir}/i18n" includes="jquery.ui.*.js" />
</concat>
- <delete file="${dist.dir}/tmpmin"/>
-
+
<echo message="Minified ui/ built." />
</target>
@@ -257,5 +281,41 @@
</replaceregexp>
<echo message="All trailing spaces removed." />
</target>
+
+ <target name="googlecdn">
+ <delete dir="${cdndist.dir}" />
+ <mkdir dir="${cdndist.dir}" />
+ <copy todir="${cdndist.dir}">
+ <fileset dir=".." includes="AUTHORS.txt, GPL-LICENSE.txt, MIT-LICENSE.txt, version.txt" />
+ </copy>
+ <copy todir="${cdndist.dir}">
+ <fileset dir="${dist.dir}ui" includes="jquery-ui.js" />
+ <fileset dir="${dist.dir}ui/minified" includes="jquery-ui.min.js" />
+ </copy>
+ <copy todir="${cdndist.dir}/i18n">
+ <fileset dir="${dist.dir}ui/i18n" />
+ <fileset dir="${dist.dir}ui/minified/i18n" />
+ </copy>
+ <copy todir="${cdndist.dir}/themes">
+ <fileset dir="${dist.dir}themes" />
+ </copy>
+ <checksum>
+ <fileset dir="${cdndist.dir}" />
+ </checksum>
+ <for param="file">
+ <path><fileset dir="${cdndist.dir}" includes="**/" excludes="**/*.MD5" /></path>
+ <sequential>
+ <!-- @{file} is an absolute path, use that ugly regexes to make it relative -->
+ <propertyregex override="yes" property="relativepath" input="@{file}" regexp=".+?googlecdn[\\/](.+)$" replace="\1"/>
+ <propertyregex override="yes" property="relativepath" input="${relativepath}" regexp="\\" replace="/" global="true" />
+ <concat destfile="${cdndist.dir}/MANIFEST" append="yes">${relativepath} </concat>
+ <concat destfile="${cdndist.dir}/MANIFEST" append="yes"><file file="@{file}.MD5" /></concat>
+ </sequential>
+ </for>
+ <delete dir="${cdndist.dir}" includes="**/*.MD5" />
+ <zip destfile="${dist.dir}/../${release.filename}-googlecdn.zip">
+ <zipfileset dir="${cdndist.dir}/" />
+ </zip>
+ </target>
</project>
@@ -30,24 +30,23 @@
var matcher = new RegExp(request.term, "i");
response(select.children("option").map(function() {
var text = $(this).text();
- if (!request.term || matcher.test(text))
+ if (this.value && (!request.term || matcher.test(text)))
return {
- id: $(this).val(),
+ id: this.value,
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
value: text
};
}));
},
delay: 0,
- select: function(e, ui) {
+ change: function(event, ui) {
if (!ui.item) {
// remove invalid value, as it didn't match anything
$(this).val("");
return false;
}
- $(this).focus();
select.val(ui.item.id);
- self._trigger("selected", null, {
+ self._trigger("selected", event, {
item: select.find("[value='" + ui.item.id + "']")
});
@@ -56,6 +55,7 @@
})
.addClass("ui-widget ui-widget-content ui-corner-left");
$("<button>&nbsp;</button>")
+ .attr("tabIndex", -1)
.attr("title", "Show All Items")
.insertAfter(input)
.button({
@@ -81,7 +81,10 @@
})(jQuery);
$(function() {
- $("select").combobox();
+ $("#combobox").combobox();
+ $("#toggle").click(function() {
+ $("#combobox").toggle();
+ });
});
</script>
</head>
@@ -91,7 +94,8 @@
<div class="ui-widget">
<label>Your preferred programming language: </label>
- <select>
+ <select id="combobox">
+ <option value="">Select one...</option>
<option value="a">asp</option>
<option value="c">c</option>
<option value="cpp">c++</option>
@@ -107,6 +111,7 @@
<option value="s">scala</option>
</select>
</div>
+<button id="toggle">Show underlying select</button>
</div><!-- End demo -->
@@ -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>
@@ -16,6 +16,9 @@
<li><a href="combobox.html">Combobox</a></li>
<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>
Oops, something went wrong.

0 comments on commit 66f480d

Please sign in to comment.