Skip to content
Permalink
Browse files

Merge branch 'master' into selectmenu

  • Loading branch information...
fnagel committed Jul 12, 2012
2 parents 39532f0 + e054e28 commit 5092d0296a010280ee9d004f2fe06afbf1c45db5
Showing with 4,128 additions and 2,184 deletions.
  1. +9 −2 AUTHORS.txt
  2. +2 −1 MIT-LICENSE.txt
  3. +188 −0 build/tasks/build.js
  4. +74 −0 build/tasks/testswarm.js
  5. +1 −1 demos/addClass/default.html
  6. +1 −1 demos/animate/default.html
  7. +7 −7 demos/datepicker/animation.html
  8. +3 −3 demos/dialog/animated.html
  9. +1 −1 demos/dialog/modal-form.html
  10. +6 −6 demos/droppable/shopping-cart.html
  11. +14 −14 demos/effect/default.html
  12. +1 −1 demos/effect/easing.html
  13. +12 −12 demos/hide/default.html
  14. +13 −13 demos/index.html
  15. +7 −12 demos/menu/default.html
  16. +3 −3 demos/menu/index.html
  17. +8 −11 demos/menu/navigationmenu.html
  18. +9 −6 demos/menu/topalignmenu.html
  19. +1 −1 demos/removeClass/default.html
  20. +12 −12 demos/show/default.html
  21. +1 −1 demos/spinner/currency.html
  22. +1 −1 demos/spinner/decimal.html
  23. +1 −1 demos/spinner/default.html
  24. +1 −1 demos/spinner/latlong.html
  25. +1 −1 demos/spinner/overflow.html
  26. +1 −1 demos/spinner/time.html
  27. +1 −1 demos/switchClass/default.html
  28. +0 −57 demos/tabs/cookie.html
  29. +0 −1 demos/tabs/index.html
  30. +12 −12 demos/toggle/default.html
  31. +1 −1 demos/toggleClass/default.html
  32. +2 −2 demos/tooltip/custom-animation.html
  33. +1 −18 demos/tooltip/tracking.html
  34. +2 −2 demos/tooltip/video-player.html
  35. +3 −3 demos/widget/default.html
  36. +20 −14 external/{jquery.mousewheel-3.0.4.js → jquery.mousewheel.js}
  37. +18 −23 external/qunit.css
  38. +305 −132 external/qunit.js
  39. +8 −262 grunt.js
  40. +35 −7 package.json
  41. +2 −1 tests/jquery.simulate.js
  42. +17 −17 tests/unit/accordion/accordion_core.js
  43. +6 −0 tests/unit/button/button_core.js
  44. +4 −7 tests/unit/button/button_methods.js
  45. +9 −0 tests/unit/button/button_options.js
  46. +5 −0 tests/unit/button/button_tickets.js
  47. +23 −3 tests/unit/core/core.js
  48. +4 −0 tests/unit/core/selector.js
  49. +6 −0 tests/unit/datepicker/datepicker_core.js
  50. +1 −0 tests/unit/datepicker/datepicker_events.js
  51. +2 −0 tests/unit/datepicker/datepicker_methods.js
  52. +19 −0 tests/unit/datepicker/datepicker_options.js
  53. +4 −0 tests/unit/datepicker/datepicker_tickets.js
  54. +1 −0 tests/unit/dialog/dialog_core.js
  55. +11 −0 tests/unit/dialog/dialog_methods.js
  56. +9 −0 tests/unit/dialog/dialog_options.js
  57. +2 −0 tests/unit/dialog/dialog_tickets.js
  58. +14 −14 tests/unit/effects/effects.html
  59. +8 −7 tests/unit/effects/effects_core.js
  60. +8 −7 tests/unit/effects/effects_scale.js
  61. +1 −7 tests/unit/menu/menu.html
  62. +3 −0 tests/unit/menu/menu_common.js
  63. +21 −20 tests/unit/menu/menu_core.js
  64. +225 −228 tests/unit/menu/menu_events.js
  65. +66 −37 tests/unit/menu/menu_methods.js
  66. +83 −38 tests/unit/menu/menu_options.js
  67. +20 −5 tests/unit/menu/menu_test_helpers.js
  68. +1 −1 tests/unit/position/position_core.js
  69. +1 −0 tests/unit/position/position_deprecated.js
  70. +5 −0 tests/unit/progressbar/progressbar_options.js
  71. +1 −1 tests/unit/spinner/spinner.html
  72. +4 −0 tests/unit/spinner/spinner_common.js
  73. +1 −0 tests/unit/spinner/spinner_events.js
  74. +19 −0 tests/unit/spinner/spinner_options.js
  75. +523 −2 tests/unit/tabs/tabs_core.js
  76. +21 −0 tests/unit/tabs/tabs_methods.js
  77. +51 −1 tests/unit/tabs/tabs_options.js
  78. +27 −4 tests/unit/testsuite.js
  79. +1 −0 tests/unit/tooltip/tooltip_common.js
  80. +4 −1 tests/unit/tooltip/tooltip_core.js
  81. +4 −1 tests/unit/tooltip/tooltip_methods.js
  82. +3 −0 tests/unit/tooltip/tooltip_options.js
  83. +124 −14 tests/unit/widget/widget_core.js
  84. +1 −1 tests/visual/addClass/queue.html
  85. +14 −14 tests/visual/effects/all.html
  86. +2 −2 tests/visual/effects/scale.html
  87. +3 −2 tests/visual/menu/menu.html
  88. +5 −5 tests/visual/tooltip/animations.html
  89. +2 −1 themes/base/jquery.ui.accordion.css
  90. +2 −1 themes/base/jquery.ui.all.css
  91. +2 −1 themes/base/jquery.ui.autocomplete.css
  92. +2 −1 themes/base/jquery.ui.base.css
  93. +4 −2 themes/base/jquery.ui.button.css
  94. +2 −1 themes/base/jquery.ui.core.css
  95. +2 −3 themes/base/jquery.ui.datepicker.css
  96. +2 −1 themes/base/jquery.ui.dialog.css
  97. +2 −1 themes/base/jquery.ui.menu.css
  98. +2 −1 themes/base/jquery.ui.progressbar.css
  99. +2 −1 themes/base/jquery.ui.resizable.css
  100. +2 −1 themes/base/jquery.ui.selectable.css
  101. +2 −1 themes/base/jquery.ui.slider.css
  102. +2 −1 themes/base/jquery.ui.spinner.css
  103. +3 −2 themes/base/jquery.ui.tabs.css
  104. +2 −1 themes/base/jquery.ui.theme.css
  105. +2 −1 themes/base/jquery.ui.tooltip.css
  106. +1 −1 ui/i18n/jquery.ui.datepicker-ar.js
  107. +0 −739 ui/jquery.effects.core.js
  108. +6 −6 ui/jquery.ui.accordion.js
  109. +20 −5 ui/jquery.ui.autocomplete.js
  110. +19 −18 ui/jquery.ui.button.js
  111. +13 −5 ui/jquery.ui.core.js
  112. +48 −27 ui/jquery.ui.datepicker.js
  113. +6 −5 ui/jquery.ui.dialog.js
  114. +6 −5 ui/jquery.ui.draggable.js
  115. +2 −1 ui/jquery.ui.droppable.js
  116. +3 −2 ui/{jquery.effects.blind.js → jquery.ui.effect-blind.js}
  117. +3 −2 ui/{jquery.effects.bounce.js → jquery.ui.effect-bounce.js}
  118. +3 −2 ui/{jquery.effects.clip.js → jquery.ui.effect-clip.js}
  119. +3 −2 ui/{jquery.effects.drop.js → jquery.ui.effect-drop.js}
  120. +3 −2 ui/{jquery.effects.explode.js → jquery.ui.effect-explode.js}
  121. +7 −13 ui/{jquery.effects.fade.js → jquery.ui.effect-fade.js}
  122. +3 −2 ui/{jquery.effects.fold.js → jquery.ui.effect-fold.js}
  123. +3 −2 ui/{jquery.effects.highlight.js → jquery.ui.effect-highlight.js}
  124. +3 −2 ui/{jquery.effects.pulsate.js → jquery.ui.effect-pulsate.js}
  125. +3 −2 ui/{jquery.effects.scale.js → jquery.ui.effect-scale.js}
  126. +3 −2 ui/{jquery.effects.shake.js → jquery.ui.effect-shake.js}
  127. +3 −2 ui/{jquery.effects.slide.js → jquery.ui.effect-slide.js}
  128. +3 −2 ui/{jquery.effects.transfer.js → jquery.ui.effect-transfer.js}
  129. +1,248 −0 ui/jquery.ui.effect.js
  130. +80 −76 ui/jquery.ui.menu.js
  131. +2 −1 ui/jquery.ui.mouse.js
  132. +2 −1 ui/jquery.ui.position.js
  133. +2 −1 ui/jquery.ui.progressbar.js
  134. +2 −4 ui/jquery.ui.resizable.js
  135. +2 −1 ui/jquery.ui.selectable.js
  136. +3 −2 ui/jquery.ui.slider.js
  137. +6 −5 ui/jquery.ui.sortable.js
  138. +10 −5 ui/jquery.ui.spinner.js
  139. +321 −99 ui/jquery.ui.tabs.js
  140. +48 −17 ui/jquery.ui.tooltip.js
  141. +26 −14 ui/jquery.ui.widget.js
@@ -42,7 +42,7 @@ Adam Sontag <ajpiano@ajpiano.com>
Carl Fürstenberg <carl@excito.com>
Kevin Dalman <development@allpro.net>
Alberto Fernández Capel <afcapel@gmail.com>
Jacek Jędrzejewski <jacek.jedrzejewski@gmail.com>
Jacek Jędrzejewski (http://jacek.jedrzejewski.name)
Ting Kuei <ting@kuei.com>
Samuel Cormier-Iijima <sam@chide.it>
Jon Palmer <jonspalmer@gmail.com>
@@ -170,7 +170,7 @@ Ian Simpson <spoonlikesham@gmail.com>
Lev Kitsis <spam4lev@gmail.com>
TJ VanToll <tj.vantoll@gmail.com>
Justin Domnitz <jdomnitz@gmail.com>
Douglas Cerna <replaceafill@system76.(none)>
Douglas Cerna <douglascerna@yahoo.com>
Bert ter Heide <bertjh@hotmail.com>
Jasvir Nagra <jasvir@gmail.com>
Petr Hromadko <yuriy@tokyoscale.com>
@@ -187,3 +187,10 @@ Jason Moon <jmoon@socialcast.com>
Martin Frost <martinf55@hotmail.com>
Eneko Illarramendi <eneko@illarra.com>
EungJun Yi <semtlenori@gmail.com>
Courtland Allen <courtlandallen@gmail.com>
Viktar Varvanovich <non4eg@gmail.com>
Danny Trunk <dtrunk90@googlemail.com>
Pavel Stetina <pavel.stetina@nangu.tv>
Mike Stay <metaweta@gmail.com>
Steven Roussey <sroussey@gmail.com>
Mike Hollis <hollis21@gmail.com>
@@ -1,4 +1,5 @@
Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/
Copyright 2012 jQuery Foundation and other contributors,
http://jqueryui.com/

This software consists of voluntary contributions made by many
individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
@@ -0,0 +1,188 @@
module.exports = function( grunt ) {

var path = require( "path" );

grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @VERSION with pkg.version", function() {
function replaceVersion( source ) {
return source.replace( /@VERSION/g, grunt.config( "pkg.version" ) );
}
function copyFile( src, dest ) {
if ( /(js|css)$/.test( src ) ) {
grunt.file.copy( src, dest, {
process: replaceVersion
});
} else {
grunt.file.copy( src, dest );
}
}
var files = grunt.file.expandFiles( this.file.src ),
target = this.file.dest + "/",
strip = this.data.strip,
renameCount = 0,
fileName;
if ( typeof strip === "string" ) {
strip = new RegExp( "^" + grunt.template.process( strip, grunt.config() ).replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ) );
}
files.forEach(function( fileName ) {
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
copyFile( fileName, target + targetFile );
});
grunt.log.writeln( "Copied " + files.length + " files." );
for ( fileName in this.data.renames ) {
renameCount += 1;
copyFile( fileName, target + grunt.template.process( this.data.renames[ fileName ], grunt.config() ) );
}
if ( renameCount ) {
grunt.log.writeln( "Renamed " + renameCount + " files." );
}
});


grunt.registerMultiTask( "zip", "Create a zip file for release", function() {
// TODO switch back to adm-zip for better cross-platform compability once it actually works
// 0.1.3 works, but result can't be unzipped
// its also a lot slower then zip program, probably due to how its used...
// var files = grunt.file.expandFiles( "dist/" + this.file.src + "/**/*" );
// grunt.log.writeln( "Creating zip file " + this.file.dest );

//var AdmZip = require( "adm-zip" );
//var zip = new AdmZip();
//files.forEach(function( file ) {
// grunt.verbose.writeln( "Zipping " + file );
// // rewrite file names from dist folder (created by build), drop the /dist part
// zip.addFile(file.replace(/^dist/, "" ), fs.readFileSync( file ) );
//});
//zip.writeZip( "dist/" + this.file.dest );
//grunt.log.writeln( "Wrote " + files.length + " files to " + this.file.dest );

var done = this.async(),
dest = this.file.dest,
src = grunt.template.process( this.file.src, grunt.config() );
grunt.utils.spawn({
cmd: "zip",
args: [ "-r", dest, src ],
opts: {
cwd: 'dist'
}
}, function( err, result ) {
if ( err ) {
grunt.log.error( err );
done();
return;
}
grunt.log.writeln( "Zipped " + dest );
done();
});
});

grunt.registerMultiTask( "md5", "Create list of md5 hashes for CDN uploads", function() {
// remove dest file before creating it, to make sure itself is not included
if ( path.existsSync( this.file.dest ) ) {
fs.unlinkSync( this.file.dest );
}
var crypto = require( "crypto" ),
dir = this.file.src + "/",
hashes = [];
grunt.file.expandFiles( dir + "**/*" ).forEach(function( fileName ) {
var hash = crypto.createHash( "md5" );
hash.update( grunt.file.read( fileName, "ascii" ) );
hashes.push( fileName.replace( dir, "" ) + " " + hash.digest( "hex" ) );
});
grunt.file.write( this.file.dest, hashes.join( "\n" ) + "\n" );
grunt.log.writeln( "Wrote " + this.file.dest + " with " + hashes.length + " hashes" );
});

// only needed for 1.8
grunt.registerTask( "download_docs", function() {
function capitalize(value) {
return value[0].toUpperCase() + value.slice(1);
}
// should be grunt.config("pkg.version")?
var version = "1.8",
docsDir = "dist/docs",
files = "draggable droppable resizable selectable sortable accordion autocomplete button datepicker dialog progressbar slider tabs position"
.split(" ").map(function(widget) {
return {
url: "http://docs.jquery.com/action/render/UI/API/" + version + "/" + capitalize(widget),
dest: docsDir + '/' + widget + '.html'
};
});
files = files.concat("animate addClass effect hide removeClass show switchClass toggle toggleClass".split(" ").map(function(widget) {
return {
url: "http://docs.jquery.com/action/render/UI/Effects/" + widget,
dest: docsDir + '/' + widget + '.html'
};
}));
files = files.concat("Blind Clip Drop Explode Fade Fold Puff Slide Scale Bounce Highlight Pulsate Shake Size Transfer".split(" ").map(function(widget) {
return {
url: "http://docs.jquery.com/action/render/UI/Effects/" + widget,
dest: docsDir + '/effect-' + widget.toLowerCase() + '.html'
};
}));
grunt.file.mkdir( "dist/docs" );
grunt.utils.async.forEach( files, function( file, done ) {
var out = fs.createWriteStream( file.dest );
out.on( "close", done );
request( file.url ).pipe( out );
}, this.async() );
});

grunt.registerTask( "download_themes", function() {
// var AdmZip = require('adm-zip');
var done = this.async(),
themes = grunt.file.read( "build/themes" ).split(","),
requests = 0;
grunt.file.mkdir( "dist/tmp" );
themes.forEach(function( theme, index ) {
requests += 1;
grunt.file.mkdir( "dist/tmp/" + index );
var zipFileName = "dist/tmp/" + index + ".zip",
out = fs.createWriteStream( zipFileName );
out.on( "close", function() {
grunt.log.writeln( "done downloading " + zipFileName );
// TODO AdmZip produces "crc32 checksum failed", need to figure out why
// var zip = new AdmZip(zipFileName);
// zip.extractAllTo('dist/tmp/' + index + '/');
// until then, using cli unzip...
grunt.utils.spawn({
cmd: "unzip",
args: [ "-d", "dist/tmp/" + index, zipFileName ]
}, function( err, result ) {
grunt.log.writeln( "Unzipped " + zipFileName + ", deleting it now" );
fs.unlinkSync( zipFileName );
requests -= 1;
if (requests === 0) {
done();
}
});
});
request( "http://ui-dev.jquery.com/download/?" + theme ).pipe( out );
});
});

grunt.registerTask( "copy_themes", function() {
// each package includes the base theme, ignore that
var filter = /themes\/base/,
files = grunt.file.expandFiles( "dist/tmp/*/development-bundle/themes/**/*" ).filter(function( file ) {
return !filter.test( file );
}),
// TODO the grunt.template.process call shouldn't be necessary
target = "dist/" + grunt.template.process( grunt.config( "files.themes" ), grunt.config() ) + "/",
distFolder = "dist/" + grunt.template.process( grunt.config( "files.dist" ), grunt.config() );
files.forEach(function( fileName ) {
var targetFile = fileName.replace( /dist\/tmp\/\d+\/development-bundle\//, "" ).replace( "jquery-ui-.custom", "jquery-ui" );
grunt.file.copy( fileName, target + targetFile );
});

// copy minified base theme from regular release
files = grunt.file.expandFiles( distFolder + "/themes/base/**/*" );
files.forEach(function( fileName ) {
grunt.file.copy( fileName, target + fileName.replace( distFolder, "" ) );
});
});

grunt.registerTask( "clean", function() {
require( "rimraf" ).sync( "dist" );
});

};
@@ -0,0 +1,74 @@
/*jshint node: true */
module.exports = function( grunt ) {

var tests = {
"Accordion": "accordion/accordion.html",
"Accordion_deprecated": "accordion/accordion_deprecated.html",
"Autocomplete": "autocomplete/autocomplete.html",
"Button": "button/button.html",
"Core": "core/core.html",
//"datepicker/datepicker.html",
//"dialog/dialog.html",
//"draggable/draggable.html",
//"droppable/droppable.html",
"Effects": "effects/effects.html",
"Menu": "menu/menu.html",
"Position": "position/position.html",
"Position_deprecated": "position/position_deprecated.html",
"Progressbar": "progressbar/progressbar.html",
//"resizable/resizable.html",
//"selectable/selectable.html",
//"slider/slider.html",
//"sortable/sortable.html",
"Spinner": "spinner/spinner.html",
"Tabs": "tabs/tabs.html",
"Tabs_deprecated": "tabs/tabs_deprecated.html",
"Tooltip": "tooltip/tooltip.html",
"Widget": "widget/widget.html"
};

function submit( commit, tests, configFile, done ) {
var test,
testswarm = require( "testswarm" ),
config = grunt.file.readJSON( configFile ).jqueryui,
testBase = config.testUrl + commit + "/tests/unit/",
testUrls = [];
for ( test in tests ) {
testUrls.push( testBase + tests[ test ] );
}
testswarm({
url: config.swarmUrl,
pollInterval: 10000,
timeout: 1000 * 60 * 30,
done: done
}, {
authUsername: config.authUsername,
authToken: config.authToken,
jobName: 'jQuery UI commit #<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
runMax: config.runMax,
"runNames[]": Object.keys(tests),
"runUrls[]": testUrls,
"browserSets[]": ["popular"]
});
}

grunt.registerTask( "testswarm", function( commit, configFile ) {
var test,
latestTests = {};
for ( test in tests ) {
latestTests[ test ] = tests[ test ] + "?nojshint=true";
}
submit( commit, latestTests, configFile, this.async() );
});

grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile ) {
var allTests = {};
"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 ) {
for ( var test in tests ) {
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
}
});
submit( commit, allTests, configFile, this.async() );
});

};
@@ -5,7 +5,7 @@
<title>jQuery UI Effects - addClass demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.7.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; position: relative; }
@@ -5,7 +5,7 @@
<title>jQuery UI Effects - Animate demo</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.7.2.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.toggler { width: 500px; height: 200px; position: relative; }
@@ -7,13 +7,13 @@
<script src="../../jquery-1.7.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.effects.blind.js"></script>
<script src="../../ui/jquery.effects.bounce.js"></script>
<script src="../../ui/jquery.effects.clip.js"></script>
<script src="../../ui/jquery.effects.drop.js"></script>
<script src="../../ui/jquery.effects.fold.js"></script>
<script src="../../ui/jquery.effects.slide.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<script src="../../ui/jquery.ui.effect-blind.js"></script>
<script src="../../ui/jquery.ui.effect-bounce.js"></script>
<script src="../../ui/jquery.ui.effect-clip.js"></script>
<script src="../../ui/jquery.ui.effect-drop.js"></script>
<script src="../../ui/jquery.ui.effect-fold.js"></script>
<script src="../../ui/jquery.ui.effect-slide.js"></script>
<script src="../../ui/jquery.ui.datepicker.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
@@ -13,9 +13,9 @@
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.effects.blind.js"></script>
<script src="../../ui/jquery.effects.explode.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<script src="../../ui/jquery.ui.effect-blind.js"></script>
<script src="../../ui/jquery.ui.effect-explode.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
// increase the default animation speed to exaggerate the effect
@@ -14,7 +14,7 @@
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<script src="../../ui/jquery.effects.core.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
body { font-size: 62.5%; }

0 comments on commit 5092d02

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