Skip to content
Permalink
Browse files

Merge branch 'master' into selectmenu

  • Loading branch information
fnagel committed Apr 21, 2013
2 parents 73c7342 + 71a332e commit 4efd006e26a6cdc3bf78832c0a0832e7301c841b
@@ -1,12 +1,17 @@
{
"boss": true,
"curly": true,
"eqnull": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"immed": true,
"noarg": true,
"node": true,
"onevar": true,
"quotmark": "double",
"smarttabs": true,
"trailing": true,
"undef": true,
"unused": true
"unused": true,

"node": true
}
@@ -11,7 +11,7 @@ Ben Hollis <bhollis@amazon.com> <ben@benhollis.net>
Benjamin Scott Boyle <benjamins.boyle@gmail.com>
Bert ter Heide <bertjh@hotmail.com>
Chairat Sunthornwiphat <pipo@sixhead.com>
Corey Frang <gnarf@gnarf.net>
Corey Frang <gnarf37@gmail.com> <gnarf@gnarf.net>
Courtland Allen <courtlandallen@gmail.com>
Dan Streetman <ddstreet@ieee.org>
Diego Tres <diegotres@gmail.com>
@@ -74,7 +74,7 @@ var
},
main: {
options: {
keepSpecialComments: '*'
keepSpecialComments: "*"
},
src: "dist/jquery-ui.css",
dest: "dist/jquery-ui.min.css"
@@ -319,7 +319,7 @@ grunt.initConfig({
files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
// disabling everything that doesn't (quite) work with PhantomJS for now
// TODO except for all|index|test, try to include more as we go
return !( /(all|index|test|dialog|tabs|tooltip)\.html$/ ).test( file );
return !( /(all|index|test|dialog|tooltip)\.html$/ ).test( file );
})
},
jshint: {
@@ -1,5 +1,5 @@
#!/usr/bin/env node
/*global cat:true cd:true echo:true exec:true exit:true*/
/* global cat:true, cd:true, echo:true, exec:true, exit:true */

// Usage:
// stable release: node release.js
@@ -140,7 +140,7 @@ grunt.registerMultiTask( "zip", "Create a zip file for release", function() {
cmd: "zip",
args: [ "-r", dest, this.data.src ],
opts: {
cwd: 'dist'
cwd: "dist"
}
}, function( err ) {
if ( err ) {
@@ -34,37 +34,40 @@ var versions = {
"Widget": "widget/widget.html"
};

function submit( commit, runs, configFile, version, done ) {
function submit( commit, runs, configFile, extra, done ) {
var testName,
testswarm = require( "testswarm" ),
config = grunt.file.readJSON( configFile ).jqueryui;
version = version ? ( version + " " ) : "";
config = grunt.file.readJSON( configFile ).jqueryui,
commitUrl = "https://github.com/jquery/jquery-ui/commit/" + commit;

if ( extra ) {
extra = " " + extra;
}

for ( testName in runs ) {
runs[ testName] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
}
testswarm.createClient( {
testswarm.createClient({
url: config.swarmUrl,
pollInterval: 10000,
timeout: 1000 * 60 * 45
} )
})
.addReporter( testswarm.reporters.cli )
.auth( {
.auth({
id: config.authUsername,
token: config.authToken
} )
.addjob(
{
name: 'jQuery UI ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
runs: runs,
runMax: config.runMax,
browserSets: config.browserSets
}, function( err, passed ) {
if ( err ) {
grunt.log.error( err );
}
done( passed );
})
.addjob({
name: "jQuery UI #<a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
runs: runs,
runMax: config.runMax,
browserSets: config.browserSets
}, function( error, passed ) {
if ( error ) {
grunt.log.error( error );
}
);
done( passed );
});
}

grunt.registerTask( "testswarm", function( commit, configFile ) {
@@ -83,7 +86,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
}
});
submit( commit, allTests, configFile, minor + " core", this.async() );
submit( commit, allTests, configFile, "core " + minor, this.async() );
});

};
@@ -14,11 +14,11 @@
<script src="../../ui/jquery.ui.tooltip.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.ui-combobox {
.custom-combobox {
position: relative;
display: inline-block;
}
.ui-combobox-toggle {
.custom-combobox-toggle {
position: absolute;
top: 0;
bottom: 0;
@@ -28,17 +28,17 @@
*height: 1.7em;
*top: 0.1em;
}
.ui-combobox-input {
.custom-combobox-input {
margin: 0;
padding: 0.3em;
}
</style>
<script>
(function( $ ) {
$.widget( "ui.combobox", {
$.widget( "custom.combobox", {
_create: function() {
this.wrapper = $( "<span>" )
.addClass( "ui-combobox" )
.addClass( "custom-combobox" )
.insertAfter( this.element );

this.element.hide();
@@ -54,7 +54,7 @@
.appendTo( this.wrapper )
.val( value )
.attr( "title", "" )
.addClass( "ui-state-default ui-combobox-input ui-widget ui-widget-content ui-corner-left" )
.addClass( "custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left" )
.autocomplete({
delay: 0,
minLength: 0,
@@ -92,7 +92,7 @@
text: false
})
.removeClass( "ui-corner-all" )
.addClass( "ui-corner-right ui-combobox-toggle" )
.addClass( "custom-combobox-toggle ui-corner-right" )
.mousedown(function() {
wasOpen = input.autocomplete( "widget" ).is( ":visible" );
})
@@ -54,7 +54,7 @@
"dependencies": {},
"devDependencies": {
"grunt": "0.4.1",
"grunt-contrib-jshint": "0.1.1",
"grunt-contrib-jshint": "0.4.1",
"grunt-contrib-uglify": "0.1.1",
"grunt-contrib-concat": "0.1.3",
"grunt-contrib-qunit": "0.2.0",
@@ -1,18 +1,22 @@
{
"browser": true,
"boss": true,
"curly": true,
"eqnull": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"evil": true,
"jquery": true,
"latedef": true,
"immed": true,
"noarg": true,
"onevar": true,
"quotmark": "double",
"smarttabs": true,
"trailing": true,
"undef": true,
"unused": true,

"browser": true,
"evil": true,
"jquery": true,

"globals": {
"asyncTest": false,
"closeEnough": false,
@@ -34,4 +38,4 @@
"TestHelpers": true,
"JSHINT": false
}
}
}
@@ -316,8 +316,12 @@ $.extend( $.simulate.prototype, {
this.simulateEvent( document, "mousemove", coord );
}

this.simulateEvent( target, "mouseup", coord );
this.simulateEvent( target, "click", coord );
if ( $.contains( document, target ) ) {
this.simulateEvent( target, "mouseup", coord );
this.simulateEvent( target, "click", coord );
} else {
this.simulateEvent( document, "mouseup", coord );
}
}
});

@@ -71,6 +71,8 @@ <h2 id="qunit-userAgent"></h2>

<div><input id="submit" type="submit" value="Label"></div>

<button id="button1">Button</button>

</div>
</body>
</html>
@@ -153,6 +153,30 @@ test( "#6262 - buttonset not applying ui-corner to invisible elements", function
ok( set.find( "label:eq(2)" ).is( ".ui-button.ui-corner-right" ) );
});

asyncTest( "Resetting a button's form should refresh the visual state of the button widget to match.", function() {
expect( 2 );
var form = $( "<form>" +
"<button></button>" +
"<label for='c1'></label><input id='c1' type='checkbox' checked>" +
"</form>" ),
button = form.find( "button" ).button(),
checkbox = form.find( "input[type=checkbox]" ).button();

checkbox.prop( "checked", false ).button( "refresh" );
ok( !checkbox.button( "widget" ).hasClass( "ui-state-active" ) );

form.get( 0 ).reset();

// #9213: If a button has been removed, refresh should not be called on it when
// its corresponding form is reset.
button.remove();

setTimeout(function() {
ok( checkbox.button( "widget" ).hasClass( "ui-state-active" ));
start();
});
});

asyncTest( "#6711 Checkbox/Radiobutton do not Show Focused State when using Keyboard Navigation", function() {
expect( 2 );
var check = $( "#check" ).button(),
@@ -172,4 +196,17 @@ test( "#7534 - Button label selector works for ids with \":\"", function() {
ok( group.find( "label" ).is( ".ui-button" ), "Found an id with a :" );
});

asyncTest( "#9169 - Disabled button maintains ui-state-focus", function() {
expect( 2 );
var element = $( "#button1" ).button();
element[ 0 ].focus();
setTimeout(function() {
ok( element.hasClass( "ui-state-focus" ), "button has ui-state-focus" );
element.button( "disable" );
ok( !element.hasClass( "ui-state-focus" ),
"button does not have ui-state-focus when disabled" );
start();
});
});

})(jQuery);

0 comments on commit 4efd006

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