Skip to content

Commit 42b419d

Browse files
committed
Merge branch 'master' into checksums
2 parents 415ee93 + 9fa1578 commit 42b419d

28 files changed

Lines changed: 902 additions & 256 deletions

AUTHORS.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
jQuery UI Authors (http://ui.jquery.com/about)
1+
jQuery UI Authors (http://jqueryui.com/about)
22

33
This software consists of voluntary contributions made by many
44
individuals. For exact contribution history, see the revision history
5-
and logs, available at http://jquery-ui.googlecode.com/svn/
5+
and logs, available at http://github.com/jquery/jquery-ui
66

77
Brandon Aaron
88
Paul Bakaus (paulbakaus.com)

build/build.xml

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@
2828
<property name="theme.dir" value="${ui.dir}/themes/base/" />
2929
<property name="docs.dir" value="${ui.dir}/docs/" />
3030

31-
<property name="min.folder" value="${dist.dir}/ui/minified" />
31+
<property name="min.dir" value="${dist.dir}/ui/minified" />
3232

3333
<property name="concatenated" value="jquery-ui" />
3434
<property name="concatenated.i18n" value="jquery-ui-i18n" />
3535

3636
<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" />
37+
<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" />
3738

3839
<property description="Google Closure" name="closure-jar" value="${build.dir}/google-compiler-20091218.jar" />
3940

40-
<target name="deploy-release" depends="docs-download, concatenate, minify, copy, replace-version, prepend-header, zip" description="Release builder">
41+
<target name="deploy-release" depends="clean, docs-download, concatenate, minify, copy, replace-version, prepend-header, zip" description="Release builder">
4142
</target>
42-
43+
4344
<target name="replace-version">
4445
<replaceregexp match="@VERSION" replace="${release.version}" flags="g" byline="true">
4546
<fileset dir="${dist.dir}/ui/" includes="*.js"/>
@@ -49,15 +50,14 @@
4950
</target>
5051

5152
<target name="prepend-header">
52-
<!-- TODO: refactor this ugly mess -->
5353
<copy todir="${dist.dir}/headers/">
5454
<fileset dir="${dist.dir}/ui/" includes="*.js" />
5555
</copy>
5656
<replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
5757
<fileset dir="${dist.dir}/headers/" includes="*.js"/>
5858
</replaceregexp>
5959
<for param="file">
60-
<path><fileset dir="${dist.dir}/ui/minified/" includes="*.js" /></path>
60+
<path><fileset dir="${min.dir}/" includes="*.js" /></path>
6161
<sequential>
6262
<propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
6363
<concat destfile="${dist.dir}/ui-headered/${target}.min.js">
@@ -66,9 +66,33 @@
6666
</concat>
6767
</sequential>
6868
</for>
69-
<copy todir="${dist.dir}/ui/minified">
69+
<copy todir="${min.dir}">
7070
<fileset dir="${dist.dir}/ui-headered/" includes="*.js" />
7171
</copy>
72+
73+
<!-- once more for the i18n files -->
74+
<!-- need to clean up headers in those files first
75+
<copy todir="${dist.dir}/headers/i18n/">
76+
<fileset dir="${dist.dir}/ui/i18n/" includes="*.js" />
77+
</copy>
78+
<replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
79+
<fileset dir="${dist.dir}/headers/i18n/" includes="*.js"/>
80+
</replaceregexp>
81+
<for param="file">
82+
<path><fileset dir="${min.dir}/i18n/" includes="*.js" /></path>
83+
<sequential>
84+
<propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
85+
<concat destfile="${dist.dir}/ui-headered/i18n/${target}.min.js">
86+
<header file="${dist.dir}/headers/i18n/${target}.js" />
87+
<fileset file="@{file}" />
88+
</concat>
89+
</sequential>
90+
</for>
91+
<copy todir="${min.dir}/i18n/">
92+
<fileset dir="${dist.dir}/ui-headered/i18n/" includes="*.js" />
93+
</copy>
94+
-->
95+
7296
<delete dir="${dist.dir}/headers/" />
7397
<delete dir="${dist.dir}/ui-headered/" />
7498
</target>
@@ -108,45 +132,44 @@
108132

109133
<target name="minify" depends="concatenate" description="Remove all comments and whitespace, no compression, great in combination with GZip">
110134
<echo message="Building minified" />
111-
<delete dir="${min.folder}/" />
112-
<mkdir dir="${min.folder}" />
113-
<delete dir="${min.folder}/i18n/" />
114-
<mkdir dir="${min.folder}/i18n/" />
135+
<delete dir="${min.dir}/" />
136+
<mkdir dir="${min.dir}" />
137+
<delete dir="${min.dir}/i18n/" />
138+
<mkdir dir="${min.dir}/i18n/" />
115139

116140
<apply executable="java" parallel="false">
117141
<fileset dir="${src.dir}/" includes="jquery.ui.*.js, jquery.effects.*.js" />
118142
<arg line="-jar" />
119-
<arg path="build/google-compiler-20091218.jar" />
143+
<arg path="${closure-jar}" />
120144
<arg value="--warning_level" />
121145
<arg value="QUIET" />
122146
<arg value="--js_output_file" />
123147
<targetfile />
124148
<arg value="--js" />
125-
<mapper type="glob" from="*.js" to="${min.folder}/*.min.js" />
149+
<mapper type="glob" from="*.js" to="${min.dir}/*.min.js" />
126150
</apply>
151+
152+
<concat destfile="${min.dir}/${concatenated}.min.js">
153+
<filelist dir="${min.dir}" files="${core.files.min}" />
154+
<fileset dir="${min.dir}" includes="jquery.ui.*.js, jquery.effects.*.js" excludes="${core.files.min}" />
155+
</concat>
127156

128-
<apply executable="java" parallel="false" verbose="true" dest="${dist.dir}">
129-
<filelist dir="${dist.dir}/ui/" files="${concatenated}.js" />
157+
<apply executable="java" parallel="false">
158+
<fileset dir="${src.dir}/i18n/" includes="jquery.ui.*.js" />
130159
<arg line="-jar" />
131-
<arg path="build/google-compiler-20091218.jar" />
160+
<arg path="${closure-jar}" />
132161
<arg value="--warning_level" />
133162
<arg value="QUIET" />
134163
<arg value="--js_output_file" />
135164
<targetfile />
136165
<arg value="--js" />
137-
<mapper type="glob" from="${concatenated}.js" to="tmpmin" />
166+
<mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" />
138167
</apply>
139-
<concat destfile="${min.folder}/jquery-ui.min.js">
140-
<filelist files="${src.dir}/jquery.ui.core.js, ${dist.dir}/tmpmin"/>
141-
<filterchain>
142-
<headfilter lines="9"/>
143-
</filterchain>
144-
</concat>
145-
<concat destfile="${min.folder}/jquery-ui.min.js" append="yes">
146-
<filelist files="${dist.dir}/tmpmin"/>
168+
169+
<concat destfile="${min.dir}/i18n/${concatenated.i18n}.min.js">
170+
<fileset dir="${min.dir}/i18n" includes="jquery.ui.*.js" />
147171
</concat>
148-
<delete file="${dist.dir}/tmpmin"/>
149-
172+
150173
<echo message="Minified ui/ built." />
151174
</target>
152175

demos/autocomplete/combobox.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
if (!request.term || matcher.test(text))
3434
return {
3535
id: $(this).val(),
36-
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
36+
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
3737
value: text
3838
};
3939
}));

demos/autocomplete/remote.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
}
1919

2020
$("#birds").autocomplete({
21-
// TODO doesn't work when loaded from /demos/#autocomplete|remote
2221
source: "search.php",
2322
minLength: 2,
2423
select: function(event, ui) {

external/qunit.js

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var QUnit = {
1818
stats: { all: 0, bad: 0 },
1919
moduleStats: { all: 0, bad: 0 },
2020
started: +new Date,
21+
updateRate: 1000,
2122
blocking: false,
2223
autorun: false,
2324
assertions: [],
@@ -578,7 +579,7 @@ function validTest( name ) {
578579

579580
function push(result, actual, expected, message) {
580581
message = message || (result ? "okay" : "failed");
581-
QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
582+
QUnit.ok( result, result ? message + ": " + QUnit.jsDump.parse(expected) : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
582583
}
583584

584585
function synchronize( callback ) {
@@ -590,8 +591,16 @@ function synchronize( callback ) {
590591
}
591592

592593
function process() {
594+
var start = (new Date()).getTime();
595+
593596
while ( config.queue.length && !config.blocking ) {
594-
config.queue.shift()();
597+
if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) {
598+
config.queue.shift()();
599+
600+
} else {
601+
setTimeout( process, 13 );
602+
break;
603+
}
595604
}
596605
}
597606

@@ -679,6 +688,7 @@ QUnit.equiv = function () {
679688

680689
var innerEquiv; // the real equiv function
681690
var callers = []; // stack to decide between skip/abort functions
691+
var parents = []; // stack to avoiding loops from circular referencing
682692

683693

684694
// Determine what is o.
@@ -788,28 +798,39 @@ QUnit.equiv = function () {
788798
},
789799

790800
"array": function (b, a) {
791-
var i;
801+
var i, j, loop;
792802
var len;
793803

794804
// b could be an object literal here
795805
if ( ! (hoozit(b) === "array")) {
796806
return false;
797-
}
798-
807+
}
808+
799809
len = a.length;
800810
if (len !== b.length) { // safe and faster
801811
return false;
802812
}
813+
814+
//track reference to avoid circular references
815+
parents.push(a);
803816
for (i = 0; i < len; i++) {
804-
if ( ! innerEquiv(a[i], b[i])) {
817+
loop = false;
818+
for(j=0;j<parents.length;j++){
819+
if(parents[j] === a[i]){
820+
loop = true;//dont rewalk array
821+
}
822+
}
823+
if (!loop && ! innerEquiv(a[i], b[i])) {
824+
parents.pop();
805825
return false;
806826
}
807827
}
828+
parents.pop();
808829
return true;
809830
},
810831

811832
"object": function (b, a) {
812-
var i;
833+
var i, j, loop;
813834
var eq = true; // unless we can proove it
814835
var aProperties = [], bProperties = []; // collection of strings
815836

@@ -820,18 +841,25 @@ QUnit.equiv = function () {
820841

821842
// stack constructor before traversing properties
822843
callers.push(a.constructor);
823-
844+
//track reference to avoid circular references
845+
parents.push(a);
846+
824847
for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
825-
848+
loop = false;
849+
for(j=0;j<parents.length;j++){
850+
if(parents[j] === a[i])
851+
loop = true; //don't go down the same path twice
852+
}
826853
aProperties.push(i); // collect a's properties
827854

828-
if ( ! innerEquiv(a[i], b[i])) {
855+
if (!loop && ! innerEquiv(a[i], b[i])) {
829856
eq = false;
830857
break;
831858
}
832859
}
833860

834861
callers.pop(); // unstack, we are done
862+
parents.pop();
835863

836864
for (i in b) {
837865
bProperties.push(i); // collect b's properties
@@ -1032,9 +1060,9 @@ QUnit.jsDump = (function() {
10321060
name:'name',
10331061
'class':'className'
10341062
},
1035-
HTML:true,//if true, entities are escaped ( <, >, \t, space and \n )
1063+
HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )
10361064
indentChar:' ',//indentation unit
1037-
multiline:true //if true, items in a collection, are separated by a \n, else just a space.
1065+
multiline:false //if true, items in a collection, are separated by a \n, else just a space.
10381066
};
10391067

10401068
return jsDump;

tests/unit/accordion/accordion.html

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525

2626
<style>
2727
#main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }
28-
#main h2 { margin: 0; }
29-
#main ul, #main li { padding: 0; }
28+
#navigation * { margin: 0; padding: 0; font-size: 12px; }
3029
</style>
3130
</head>
3231
<body>
@@ -39,37 +38,39 @@ <h2 id="qunit-userAgent"></h2>
3938

4039
<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
4140

42-
<div id="list1">
43-
<a>There is one obvious advantage:</a>
44-
<div>
45-
<p>
46-
You've seen it coming!
47-
<br/>
48-
Buy now and get nothing for free!
49-
<br/>
50-
Well, at least no free beer. Perhaps a bear, if you can afford it.
51-
</p>
52-
</div>
53-
<a>Now that you've got...</a>
54-
<div>
55-
<p>
56-
your bear, you have to admit it!
57-
<br/>
58-
No, we aren't selling bears.
59-
</p>
60-
<p>
61-
We could talk about renting one.
62-
</p>
63-
</div>
64-
<a>Rent one bear, ...</a>
65-
<div>
66-
<p>
67-
get two for three beer.
68-
</p>
69-
<p>
70-
And now, for something completely different.
71-
</p>
72-
</div>
41+
<div>
42+
<div id="list1" class="foo">
43+
<a class="bar">There is one obvious advantage:</a>
44+
<div style="" class="foo">
45+
<p>
46+
You've seen it coming!
47+
<br/>
48+
Buy now and get nothing for free!
49+
<br/>
50+
Well, at least no free beer. Perhaps a bear, if you can afford it.
51+
</p>
52+
</div>
53+
<a class="bar">Now that you've got...</a>
54+
<div style="" class="foo">
55+
<p>
56+
your bear, you have to admit it!
57+
<br/>
58+
No, we aren't selling bears.
59+
</p>
60+
<p>
61+
We could talk about renting one.
62+
</p>
63+
</div>
64+
<a class="bar">Rent one bear, ...</a>
65+
<div style="" class="foo">
66+
<p>
67+
get two for three beer.
68+
</p>
69+
<p>
70+
And now, for something completely different.
71+
</p>
72+
</div>
73+
</div>
7374
</div>
7475

7576
<div id="navigationWrapper">

0 commit comments

Comments
 (0)