Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jquery/jquery-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
selfthinker committed Nov 27, 2012
2 parents 2fbe3b6 + 22bd9fc commit 1263886
Show file tree
Hide file tree
Showing 49 changed files with 1,064 additions and 587 deletions.
18 changes: 17 additions & 1 deletion AUTHORS.txt
@@ -1,4 +1,4 @@
Authors ordered by first contribution
Authors ordered by first contribution
A list of current team members is available at http://jqueryui.com/about

Paul Bakaus <paul.bakaus@googlemail.com>
Expand Down Expand Up @@ -208,3 +208,19 @@ Sindre Sorhus <sindresorhus@gmail.com>
Bernhard Sirlinger <bernhard.sirlinger@tele2.de>
Jared A. Scheel <jared@jaredscheel.com>
Rafael Xavier de Souza <rxaviers@gmail.com>
John Chen <zhang.z.chen@intel.com>
Dale Kocian <dale.kocian@gmail.com>
Mike Sherov <mike.sherov@gmail.com>
Andrew Couch <andy@couchand.com>
Marc-Andre Lafortune <github@marc-andre.ca>
Nate Eagle <nate.eagle@teamaol.com>
David Souther <davidsouther@gmail.com>
Mathias Stenbom <mathias@stenbom.com>
Avinash R <nashpapa@gmail.com>
Sergey Kartashov <ebishkek@yandex.ru>
Ethan Romba <ethanromba@gmail.com>
Cory Gackenheimer <cory.gack@gmail.com>
Juan Pablo Kaniefsky <jpkaniefsky@gmail.com>
Roman Salnikov <bardt.dz@gmail.com>
Anika Henke <anika@selfthinker.org>
Samuel Bovée <samycookie2000@yahoo.fr>
9 changes: 4 additions & 5 deletions build/release/release.js
Expand Up @@ -262,8 +262,9 @@ function gatherContributors() {

function updateTrac() {
echo( newVersion.cyan + " was tagged at " + tagTime.cyan + "." );
echo( "Close the " + newVersion.cyan + " Milestone with the above date and time." );
echo( "Create the " + newVersion.cyan + " Version with the above date and time." );
echo( "Close the " + newVersion.cyan + " Milestone." );
echo( "Create the " + newVersion.cyan + " Version." );
echo( "When Trac asks for date and time, match the above. Should only change minutes and seconds." );
echo( "Create a Milestone for the next minor release." );
}

Expand Down Expand Up @@ -342,9 +343,7 @@ function bootstrap( fn ) {
fs.mkdirSync( baseDir );

console.log( "Installing dependencies..." );
require( "child_process" ).exec( "npm install shelljs colors", {
cwd: baseDir
}, function( error ) {
require( "child_process" ).exec( "npm install shelljs colors", function( error ) {
if ( error ) {
console.log( error );
return process.exit( 1 );
Expand Down
1 change: 1 addition & 0 deletions build/tasks/testswarm.js
Expand Up @@ -15,6 +15,7 @@ var versions = {
"Core": "core/core.html",
"Datepicker": "datepicker/datepicker.html",
"Dialog": "dialog/dialog.html",
"Dialog_deprecated": "dialog/dialog_deprecated.html",
"Draggable": "draggable/draggable.html",
"Droppable": "droppable/droppable.html",
"Effects": "effects/effects.html",
Expand Down
28 changes: 12 additions & 16 deletions demos/autocomplete/combobox.html
Expand Up @@ -24,7 +24,7 @@
bottom: 0;
margin-left: -1px;
padding: 0;
/* adjust styles for IE 6/7 */
/* support: IE7 */
*height: 1.7em;
*top: 0.1em;
}
Expand All @@ -46,7 +46,7 @@
.addClass( "ui-combobox" )
.insertAfter( select );

function removeIfInvalid(element) {
function removeIfInvalid( element ) {
var value = $( element ).val(),
matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( value ) + "$", "i" ),
valid = false;
Expand All @@ -56,6 +56,7 @@
return false;
}
});

if ( !valid ) {
// remove invalid value, as it didn't match anything
$( element )
Expand All @@ -66,8 +67,7 @@
setTimeout(function() {
input.tooltip( "close" ).attr( "title", "" );
}, 2500 );
input.data( "autocomplete" ).term = "";
return false;
input.data( "ui-autocomplete" ).term = "";
}
}

Expand Down Expand Up @@ -103,13 +103,14 @@
});
},
change: function( event, ui ) {
if ( !ui.item )
return removeIfInvalid( this );
if ( !ui.item ) {
removeIfInvalid( this );
}
}
})
.addClass( "ui-widget ui-widget-content ui-corner-left" );

input.data( "autocomplete" )._renderItem = function( ul, item ) {
input.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
.append( "<a>" + item.label + "</a>" )
.appendTo( ul );
Expand Down Expand Up @@ -144,19 +145,14 @@
input.focus();
});

input
.tooltip({
position: {
of: this.button
},
tooltipClass: "ui-state-highlight"
});
input.tooltip({
tooltipClass: "ui-state-highlight"
});
},

destroy: function() {
_destroy: function() {
this.wrapper.remove();
this.element.show();
$.Widget.prototype.destroy.call( this );
}
});
})( jQuery );
Expand Down
1 change: 1 addition & 0 deletions demos/dialog/animated.html
Expand Up @@ -11,6 +11,7 @@
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<script src="../../ui/jquery.ui.effect-blind.js"></script>
Expand Down
1 change: 1 addition & 0 deletions demos/dialog/default.html
Expand Up @@ -11,6 +11,7 @@
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
Expand Down
1 change: 1 addition & 0 deletions demos/dialog/modal-confirmation.html
Expand Up @@ -11,6 +11,7 @@
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
Expand Down
7 changes: 4 additions & 3 deletions demos/dialog/modal-form.html
Expand Up @@ -12,6 +12,7 @@
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<script src="../../ui/jquery.ui.effect.js"></script>
<link rel="stylesheet" href="../demos.css">
Expand Down Expand Up @@ -86,10 +87,10 @@

if ( bValid ) {
$( "#users tbody" ).append( "<tr>" +
"<td>" + name.val() + "</td>" +
"<td>" + email.val() + "</td>" +
"<td>" + name.val() + "</td>" +
"<td>" + email.val() + "</td>" +
"<td>" + password.val() + "</td>" +
"</tr>" );
"</tr>" );
$( this ).dialog( "close" );
}
},
Expand Down
1 change: 1 addition & 0 deletions demos/dialog/modal-message.html
Expand Up @@ -12,6 +12,7 @@
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
Expand Down
1 change: 1 addition & 0 deletions demos/dialog/modal.html
Expand Up @@ -11,6 +11,7 @@
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.resizable.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
Expand Down
9 changes: 3 additions & 6 deletions demos/progressbar/animated.html
Expand Up @@ -9,14 +9,11 @@
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.progressbar.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.ui-progressbar .ui-progressbar-value { background-image: url(images/pbar-ani.gif); }
</style>
<script>
$(function() {
$( "#progressbar" ).progressbar({
value: 59
});
}).find( ".ui-progressbar-value div" ).addClass( "ui-progressbar-overlay" );
});
</script>
</head>
Expand All @@ -27,10 +24,10 @@
<div class="demo-description">
<p>
This progressbar has an animated fill by setting the
<code>background-image</code>
<code>ui-progressbar-overlay</code> class
on the
<code>.ui-progressbar-value</code>
element, using css.
element's overlay div.
</p>
</div>
</body>
Expand Down
53 changes: 53 additions & 0 deletions demos/progressbar/indeterminate.html
@@ -0,0 +1,53 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar - Indeterminate Value</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.8.3.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.progressbar.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "#progressbar" ).progressbar({
value: false
});
$( "button" ).on( "click", function( event ) {
var target = $( event.target ),
pbar = $( "#progressbar" ),
pbarValue = pbar.find( ".ui-progressbar-value" );

if ( target.is( "#numButton" ) ) {
pbar.progressbar( "option", {
value: Math.floor( Math.random() * 100 )
});
} else if ( target.is( "#colorButton" ) ) {
pbarValue.css({
"background": '#' + Math.floor( Math.random() * 16777215 ).toString( 16 )
});
} else if ( target.is( "#falseButton" ) ) {
pbar.progressbar( "option", "value", false );
}
});
});
</script>
<style>
#progressbar .ui-progressbar-value {
background-color: #CCCCCC;
}
</style>
</head>
<body>

<div id="progressbar"></div>
<button id="numButton">Random Value - Determinate</button>
<button id="falseButton">Indeterminate</button>
<button id="colorButton">Random Color</button>

<div class="demo-description">
<p>Indeterminate progress bar and switching between determinate and indeterminate styles.</p>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions demos/progressbar/index.html
Expand Up @@ -10,6 +10,7 @@
<li><a href="default.html">Default functionality</a></li>
<li><a href="animated.html">Animated</a></li>
<li><a href="resize.html">Resizable progressbar</a></li>
<li><a href="indeterminate.html">Indeterminate</a></li>
</ul>

</body>
Expand Down
4 changes: 2 additions & 2 deletions grunt.js
Expand Up @@ -281,7 +281,7 @@ grunt.initConfig({
files: grunt.file.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|dialog_deprecated|tabs|tooltip)\.html$/ ).test( file );
})
},
lint: {
Expand All @@ -299,8 +299,8 @@ grunt.initConfig({
}),
// TODO consider reenabling some of these rules
rules: {
"adjoining-classes": false,
"import": false,
"important": false,
"outline-none": false,
// especially this one
"overqualified-elements": false,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/all.html
Expand Up @@ -22,6 +22,7 @@
"core/core.html",
"datepicker/datepicker.html",
"dialog/dialog.html",
"dialog/dialog_deprecated.html",
"draggable/draggable.html",
"droppable/droppable.html",
"effects/effects.html",
Expand Down
13 changes: 7 additions & 6 deletions tests/unit/button/button.html
Expand Up @@ -60,14 +60,15 @@ <h2 id="qunit-userAgent"></h2>
</div>
</form>
<form>
<div id="radio3">
<input type="radio" id="radio31" name="data['Page']['parse']"><label for="radio31">Choice 1</label>
<input type="radio" id="radio32" name="data['Page']['parse']" checked="checked"><label for="radio32">Choice 2</label>
<input type="radio" id="radio33" name="data['Page']['parse']"><label for="radio33">Choice 3</label>
</div>
</form>
<div id="radio3">
<input type="radio" id="radio31" name="data['Page']['parse']"><label for="radio31">Choice 1</label>
<input type="radio" id="radio32" name="data['Page']['parse']" checked="checked"><label for="radio32">Choice 2</label>
<input type="radio" id="radio33" name="data['Page']['parse']"><label for="radio33">Choice 3</label>
</div>
</form>

<input type="checkbox" id="check"><label for="check">Toggle</label>
<input type="checkbox" id="check2"><label for="check2">Checkbox</label>

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

Expand Down
11 changes: 11 additions & 0 deletions tests/unit/button/button_core.js
Expand Up @@ -88,4 +88,15 @@ test("buttonset (rtl)", function() {
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
});

test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
expect( 3 );

$("#check2").button().change( function() {
var lbl = $( this ).button("widget");
ok( this.checked, "checked ok" );
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
}).button("widget").simulate("click");
});

})(jQuery);
10 changes: 10 additions & 0 deletions tests/unit/button/button_events.js
Expand Up @@ -13,4 +13,14 @@ test("buttonset works with single-quote named elements (#7505)", function() {
}).click();
});

test( "when button loses focus, ensure active state is removed (#8559)", function() {
expect( 1 );

$("#button").button().keypress( function() {
$("#button").one( "blur", function() {
ok( !$("#button").is(".ui-state-active"), "button loses active state appropriately" );
}).blur();
}).focus().simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } ).simulate( "keypress", { keyCode: $.ui.keyCode.ENTER } );
});

})(jQuery);

0 comments on commit 1263886

Please sign in to comment.