Skip to content

Commit 5092d02

Browse files
committed
Merge branch 'master' into selectmenu
2 parents 39532f0 + e054e28 commit 5092d02

File tree

141 files changed

+4128
-2184
lines changed

Some content is hidden

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

141 files changed

+4128
-2184
lines changed

AUTHORS.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Adam Sontag <ajpiano@ajpiano.com>
4242
Carl Fürstenberg <carl@excito.com>
4343
Kevin Dalman <development@allpro.net>
4444
Alberto Fernández Capel <afcapel@gmail.com>
45-
Jacek Jędrzejewski <jacek.jedrzejewski@gmail.com>
45+
Jacek Jędrzejewski (http://jacek.jedrzejewski.name)
4646
Ting Kuei <ting@kuei.com>
4747
Samuel Cormier-Iijima <sam@chide.it>
4848
Jon Palmer <jonspalmer@gmail.com>
@@ -170,7 +170,7 @@ Ian Simpson <spoonlikesham@gmail.com>
170170
Lev Kitsis <spam4lev@gmail.com>
171171
TJ VanToll <tj.vantoll@gmail.com>
172172
Justin Domnitz <jdomnitz@gmail.com>
173-
Douglas Cerna <replaceafill@system76.(none)>
173+
Douglas Cerna <douglascerna@yahoo.com>
174174
Bert ter Heide <bertjh@hotmail.com>
175175
Jasvir Nagra <jasvir@gmail.com>
176176
Petr Hromadko <yuriy@tokyoscale.com>
@@ -187,3 +187,10 @@ Jason Moon <jmoon@socialcast.com>
187187
Martin Frost <martinf55@hotmail.com>
188188
Eneko Illarramendi <eneko@illarra.com>
189189
EungJun Yi <semtlenori@gmail.com>
190+
Courtland Allen <courtlandallen@gmail.com>
191+
Viktar Varvanovich <non4eg@gmail.com>
192+
Danny Trunk <dtrunk90@googlemail.com>
193+
Pavel Stetina <pavel.stetina@nangu.tv>
194+
Mike Stay <metaweta@gmail.com>
195+
Steven Roussey <sroussey@gmail.com>
196+
Mike Hollis <hollis21@gmail.com>

MIT-LICENSE.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/
1+
Copyright 2012 jQuery Foundation and other contributors,
2+
http://jqueryui.com/
23

34
This software consists of voluntary contributions made by many
45
individuals (AUTHORS.txt, http://jqueryui.com/about) For exact

build/tasks/build.js

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
module.exports = function( grunt ) {
2+
3+
var path = require( "path" );
4+
5+
grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @VERSION with pkg.version", function() {
6+
function replaceVersion( source ) {
7+
return source.replace( /@VERSION/g, grunt.config( "pkg.version" ) );
8+
}
9+
function copyFile( src, dest ) {
10+
if ( /(js|css)$/.test( src ) ) {
11+
grunt.file.copy( src, dest, {
12+
process: replaceVersion
13+
});
14+
} else {
15+
grunt.file.copy( src, dest );
16+
}
17+
}
18+
var files = grunt.file.expandFiles( this.file.src ),
19+
target = this.file.dest + "/",
20+
strip = this.data.strip,
21+
renameCount = 0,
22+
fileName;
23+
if ( typeof strip === "string" ) {
24+
strip = new RegExp( "^" + grunt.template.process( strip, grunt.config() ).replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ) );
25+
}
26+
files.forEach(function( fileName ) {
27+
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
28+
copyFile( fileName, target + targetFile );
29+
});
30+
grunt.log.writeln( "Copied " + files.length + " files." );
31+
for ( fileName in this.data.renames ) {
32+
renameCount += 1;
33+
copyFile( fileName, target + grunt.template.process( this.data.renames[ fileName ], grunt.config() ) );
34+
}
35+
if ( renameCount ) {
36+
grunt.log.writeln( "Renamed " + renameCount + " files." );
37+
}
38+
});
39+
40+
41+
grunt.registerMultiTask( "zip", "Create a zip file for release", function() {
42+
// TODO switch back to adm-zip for better cross-platform compability once it actually works
43+
// 0.1.3 works, but result can't be unzipped
44+
// its also a lot slower then zip program, probably due to how its used...
45+
// var files = grunt.file.expandFiles( "dist/" + this.file.src + "/**/*" );
46+
// grunt.log.writeln( "Creating zip file " + this.file.dest );
47+
48+
//var AdmZip = require( "adm-zip" );
49+
//var zip = new AdmZip();
50+
//files.forEach(function( file ) {
51+
// grunt.verbose.writeln( "Zipping " + file );
52+
// // rewrite file names from dist folder (created by build), drop the /dist part
53+
// zip.addFile(file.replace(/^dist/, "" ), fs.readFileSync( file ) );
54+
//});
55+
//zip.writeZip( "dist/" + this.file.dest );
56+
//grunt.log.writeln( "Wrote " + files.length + " files to " + this.file.dest );
57+
58+
var done = this.async(),
59+
dest = this.file.dest,
60+
src = grunt.template.process( this.file.src, grunt.config() );
61+
grunt.utils.spawn({
62+
cmd: "zip",
63+
args: [ "-r", dest, src ],
64+
opts: {
65+
cwd: 'dist'
66+
}
67+
}, function( err, result ) {
68+
if ( err ) {
69+
grunt.log.error( err );
70+
done();
71+
return;
72+
}
73+
grunt.log.writeln( "Zipped " + dest );
74+
done();
75+
});
76+
});
77+
78+
grunt.registerMultiTask( "md5", "Create list of md5 hashes for CDN uploads", function() {
79+
// remove dest file before creating it, to make sure itself is not included
80+
if ( path.existsSync( this.file.dest ) ) {
81+
fs.unlinkSync( this.file.dest );
82+
}
83+
var crypto = require( "crypto" ),
84+
dir = this.file.src + "/",
85+
hashes = [];
86+
grunt.file.expandFiles( dir + "**/*" ).forEach(function( fileName ) {
87+
var hash = crypto.createHash( "md5" );
88+
hash.update( grunt.file.read( fileName, "ascii" ) );
89+
hashes.push( fileName.replace( dir, "" ) + " " + hash.digest( "hex" ) );
90+
});
91+
grunt.file.write( this.file.dest, hashes.join( "\n" ) + "\n" );
92+
grunt.log.writeln( "Wrote " + this.file.dest + " with " + hashes.length + " hashes" );
93+
});
94+
95+
// only needed for 1.8
96+
grunt.registerTask( "download_docs", function() {
97+
function capitalize(value) {
98+
return value[0].toUpperCase() + value.slice(1);
99+
}
100+
// should be grunt.config("pkg.version")?
101+
var version = "1.8",
102+
docsDir = "dist/docs",
103+
files = "draggable droppable resizable selectable sortable accordion autocomplete button datepicker dialog progressbar slider tabs position"
104+
.split(" ").map(function(widget) {
105+
return {
106+
url: "http://docs.jquery.com/action/render/UI/API/" + version + "/" + capitalize(widget),
107+
dest: docsDir + '/' + widget + '.html'
108+
};
109+
});
110+
files = files.concat("animate addClass effect hide removeClass show switchClass toggle toggleClass".split(" ").map(function(widget) {
111+
return {
112+
url: "http://docs.jquery.com/action/render/UI/Effects/" + widget,
113+
dest: docsDir + '/' + widget + '.html'
114+
};
115+
}));
116+
files = files.concat("Blind Clip Drop Explode Fade Fold Puff Slide Scale Bounce Highlight Pulsate Shake Size Transfer".split(" ").map(function(widget) {
117+
return {
118+
url: "http://docs.jquery.com/action/render/UI/Effects/" + widget,
119+
dest: docsDir + '/effect-' + widget.toLowerCase() + '.html'
120+
};
121+
}));
122+
grunt.file.mkdir( "dist/docs" );
123+
grunt.utils.async.forEach( files, function( file, done ) {
124+
var out = fs.createWriteStream( file.dest );
125+
out.on( "close", done );
126+
request( file.url ).pipe( out );
127+
}, this.async() );
128+
});
129+
130+
grunt.registerTask( "download_themes", function() {
131+
// var AdmZip = require('adm-zip');
132+
var done = this.async(),
133+
themes = grunt.file.read( "build/themes" ).split(","),
134+
requests = 0;
135+
grunt.file.mkdir( "dist/tmp" );
136+
themes.forEach(function( theme, index ) {
137+
requests += 1;
138+
grunt.file.mkdir( "dist/tmp/" + index );
139+
var zipFileName = "dist/tmp/" + index + ".zip",
140+
out = fs.createWriteStream( zipFileName );
141+
out.on( "close", function() {
142+
grunt.log.writeln( "done downloading " + zipFileName );
143+
// TODO AdmZip produces "crc32 checksum failed", need to figure out why
144+
// var zip = new AdmZip(zipFileName);
145+
// zip.extractAllTo('dist/tmp/' + index + '/');
146+
// until then, using cli unzip...
147+
grunt.utils.spawn({
148+
cmd: "unzip",
149+
args: [ "-d", "dist/tmp/" + index, zipFileName ]
150+
}, function( err, result ) {
151+
grunt.log.writeln( "Unzipped " + zipFileName + ", deleting it now" );
152+
fs.unlinkSync( zipFileName );
153+
requests -= 1;
154+
if (requests === 0) {
155+
done();
156+
}
157+
});
158+
});
159+
request( "http://ui-dev.jquery.com/download/?" + theme ).pipe( out );
160+
});
161+
});
162+
163+
grunt.registerTask( "copy_themes", function() {
164+
// each package includes the base theme, ignore that
165+
var filter = /themes\/base/,
166+
files = grunt.file.expandFiles( "dist/tmp/*/development-bundle/themes/**/*" ).filter(function( file ) {
167+
return !filter.test( file );
168+
}),
169+
// TODO the grunt.template.process call shouldn't be necessary
170+
target = "dist/" + grunt.template.process( grunt.config( "files.themes" ), grunt.config() ) + "/",
171+
distFolder = "dist/" + grunt.template.process( grunt.config( "files.dist" ), grunt.config() );
172+
files.forEach(function( fileName ) {
173+
var targetFile = fileName.replace( /dist\/tmp\/\d+\/development-bundle\//, "" ).replace( "jquery-ui-.custom", "jquery-ui" );
174+
grunt.file.copy( fileName, target + targetFile );
175+
});
176+
177+
// copy minified base theme from regular release
178+
files = grunt.file.expandFiles( distFolder + "/themes/base/**/*" );
179+
files.forEach(function( fileName ) {
180+
grunt.file.copy( fileName, target + fileName.replace( distFolder, "" ) );
181+
});
182+
});
183+
184+
grunt.registerTask( "clean", function() {
185+
require( "rimraf" ).sync( "dist" );
186+
});
187+
188+
};

build/tasks/testswarm.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*jshint node: true */
2+
module.exports = function( grunt ) {
3+
4+
var tests = {
5+
"Accordion": "accordion/accordion.html",
6+
"Accordion_deprecated": "accordion/accordion_deprecated.html",
7+
"Autocomplete": "autocomplete/autocomplete.html",
8+
"Button": "button/button.html",
9+
"Core": "core/core.html",
10+
//"datepicker/datepicker.html",
11+
//"dialog/dialog.html",
12+
//"draggable/draggable.html",
13+
//"droppable/droppable.html",
14+
"Effects": "effects/effects.html",
15+
"Menu": "menu/menu.html",
16+
"Position": "position/position.html",
17+
"Position_deprecated": "position/position_deprecated.html",
18+
"Progressbar": "progressbar/progressbar.html",
19+
//"resizable/resizable.html",
20+
//"selectable/selectable.html",
21+
//"slider/slider.html",
22+
//"sortable/sortable.html",
23+
"Spinner": "spinner/spinner.html",
24+
"Tabs": "tabs/tabs.html",
25+
"Tabs_deprecated": "tabs/tabs_deprecated.html",
26+
"Tooltip": "tooltip/tooltip.html",
27+
"Widget": "widget/widget.html"
28+
};
29+
30+
function submit( commit, tests, configFile, done ) {
31+
var test,
32+
testswarm = require( "testswarm" ),
33+
config = grunt.file.readJSON( configFile ).jqueryui,
34+
testBase = config.testUrl + commit + "/tests/unit/",
35+
testUrls = [];
36+
for ( test in tests ) {
37+
testUrls.push( testBase + tests[ test ] );
38+
}
39+
testswarm({
40+
url: config.swarmUrl,
41+
pollInterval: 10000,
42+
timeout: 1000 * 60 * 30,
43+
done: done
44+
}, {
45+
authUsername: config.authUsername,
46+
authToken: config.authToken,
47+
jobName: 'jQuery UI commit #<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
48+
runMax: config.runMax,
49+
"runNames[]": Object.keys(tests),
50+
"runUrls[]": testUrls,
51+
"browserSets[]": ["popular"]
52+
});
53+
}
54+
55+
grunt.registerTask( "testswarm", function( commit, configFile ) {
56+
var test,
57+
latestTests = {};
58+
for ( test in tests ) {
59+
latestTests[ test ] = tests[ test ] + "?nojshint=true";
60+
}
61+
submit( commit, latestTests, configFile, this.async() );
62+
});
63+
64+
grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile ) {
65+
var allTests = {};
66+
"1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.7 1.7.1 1.7.2 git".split(" ").forEach(function( version ) {
67+
for ( var test in tests ) {
68+
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
69+
}
70+
});
71+
submit( commit, allTests, configFile, this.async() );
72+
});
73+
74+
};

demos/addClass/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>jQuery UI Effects - addClass demo</title>
66
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
77
<script src="../../jquery-1.7.2.js"></script>
8-
<script src="../../ui/jquery.effects.core.js"></script>
8+
<script src="../../ui/jquery.ui.effect.js"></script>
99
<link rel="stylesheet" href="../demos.css">
1010
<style>
1111
.toggler { width: 500px; height: 200px; position: relative; }

demos/animate/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>jQuery UI Effects - Animate demo</title>
66
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
77
<script src="../../jquery-1.7.2.js"></script>
8-
<script src="../../ui/jquery.effects.core.js"></script>
8+
<script src="../../ui/jquery.ui.effect.js"></script>
99
<link rel="stylesheet" href="../demos.css">
1010
<style>
1111
.toggler { width: 500px; height: 200px; position: relative; }

demos/datepicker/animation.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<script src="../../jquery-1.7.2.js"></script>
88
<script src="../../ui/jquery.ui.core.js"></script>
99
<script src="../../ui/jquery.ui.widget.js"></script>
10-
<script src="../../ui/jquery.effects.core.js"></script>
11-
<script src="../../ui/jquery.effects.blind.js"></script>
12-
<script src="../../ui/jquery.effects.bounce.js"></script>
13-
<script src="../../ui/jquery.effects.clip.js"></script>
14-
<script src="../../ui/jquery.effects.drop.js"></script>
15-
<script src="../../ui/jquery.effects.fold.js"></script>
16-
<script src="../../ui/jquery.effects.slide.js"></script>
10+
<script src="../../ui/jquery.ui.effect.js"></script>
11+
<script src="../../ui/jquery.ui.effect-blind.js"></script>
12+
<script src="../../ui/jquery.ui.effect-bounce.js"></script>
13+
<script src="../../ui/jquery.ui.effect-clip.js"></script>
14+
<script src="../../ui/jquery.ui.effect-drop.js"></script>
15+
<script src="../../ui/jquery.ui.effect-fold.js"></script>
16+
<script src="../../ui/jquery.ui.effect-slide.js"></script>
1717
<script src="../../ui/jquery.ui.datepicker.js"></script>
1818
<link rel="stylesheet" href="../demos.css">
1919
<script>

demos/dialog/animated.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<script src="../../ui/jquery.ui.position.js"></script>
1414
<script src="../../ui/jquery.ui.resizable.js"></script>
1515
<script src="../../ui/jquery.ui.dialog.js"></script>
16-
<script src="../../ui/jquery.effects.core.js"></script>
17-
<script src="../../ui/jquery.effects.blind.js"></script>
18-
<script src="../../ui/jquery.effects.explode.js"></script>
16+
<script src="../../ui/jquery.ui.effect.js"></script>
17+
<script src="../../ui/jquery.ui.effect-blind.js"></script>
18+
<script src="../../ui/jquery.ui.effect-explode.js"></script>
1919
<link rel="stylesheet" href="../demos.css">
2020
<script>
2121
// increase the default animation speed to exaggerate the effect

demos/dialog/modal-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<script src="../../ui/jquery.ui.position.js"></script>
1515
<script src="../../ui/jquery.ui.resizable.js"></script>
1616
<script src="../../ui/jquery.ui.dialog.js"></script>
17-
<script src="../../ui/jquery.effects.core.js"></script>
17+
<script src="../../ui/jquery.ui.effect.js"></script>
1818
<link rel="stylesheet" href="../demos.css">
1919
<style>
2020
body { font-size: 62.5%; }

0 commit comments

Comments
 (0)