Skip to content

Commit 0da4bbe

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4034910 + ddf03b3 commit 0da4bbe

28 files changed

+607
-279
lines changed

AUTHORS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,6 @@ Nathanael Silverman <nathanael.silverman@gmail.com>
240240
Christian Wenz <christian@wenz.org>
241241
Steve Urmston <steve@urm.st>
242242
Zaven Muradyan <megalivoithos@gmail.com>
243+
Woody Gilk <shadowhand@deviantart.com>
244+
Zbigniew Motyka <zbigniew.motyka@gmail.com>
245+
Suhail Alkowaileet <xsoh.k7@gmail.com>

build/core.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
],
3131
"category": "effect",
3232
"homepage": "http://jqueryui.com/",
33-
"demo": "http://jqueryui.com/effects/",
33+
"demo": "http://jqueryui.com/effect/",
3434
"docs": "http://api.jqueryui.com/category/effects-core/"
3535
},
3636
"position": {

build/release/release.js

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
// Usage:
55
// stable release: node release.js
66
// pre-release: node release.js --pre-release {version}
7+
// test run: node release.js --remote=user/repo
78

89
"use strict";
910

10-
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, preRelease,
11+
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, preRelease, repo,
1112
fs = require( "fs" ),
1213
rnewline = /\r?\n/,
13-
repo = "git@github.com:jquery/jquery-ui.git",
1414
branch = "master";
1515

1616
walk([
@@ -357,6 +357,44 @@ function writePackage( pkg ) {
357357
}
358358

359359
function bootstrap( fn ) {
360+
getRemote(function( remote ) {
361+
repo = "git@github.com:" + remote + ".git";
362+
_bootstrap( fn );
363+
});
364+
}
365+
366+
function getRemote( fn ) {
367+
var matches, remote;
368+
369+
console.log( "Determining remote repo..." );
370+
process.argv.forEach(function( arg ) {
371+
matches = /--remote=(.+)/.exec( arg );
372+
if ( matches ) {
373+
remote = matches[ 1 ];
374+
}
375+
});
376+
377+
if ( remote ) {
378+
fn( remote );
379+
return;
380+
}
381+
382+
console.log();
383+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
384+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
385+
console.log( " !! !!" );
386+
console.log( " !! Using jquery/jquery-ui !!" );
387+
console.log( " !! !!" );
388+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
389+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
390+
console.log();
391+
console.log( "Press enter to continue, or ctrl+c to cancel." );
392+
prompt(function() {
393+
fn( "jquery/jquery-ui" );
394+
});
395+
}
396+
397+
function _bootstrap( fn ) {
360398
console.log( "Determining release type..." );
361399
preRelease = process.argv.indexOf( "--pre-release" );
362400
if ( preRelease !== -1 ) {

build/tasks/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ grunt.registerTask( "manifest", "Generate jquery.json manifest files", function(
3939
name: "ui.effect-{plugin}",
4040
title: "jQuery UI {Plugin} Effect",
4141
keywords: [ "effect", "show", "hide" ],
42-
homepage: "http://jqueryui.com/{plugin}-effect/",
43-
demo: "http://jqueryui.com/{plugin}-effect/",
42+
homepage: "http://jqueryui.com/effect/",
43+
demo: "http://jqueryui.com/effect/",
4444
docs: "http://api.jqueryui.com/{plugin}-effect/",
4545
dependencies: [ "effect" ]
4646
}

demos/position/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
</select>
9696
<select id="my_vertical">
9797
<option value="top">top</option>
98-
<option value="middle">center</option>
98+
<option value="center">center</option>
9999
<option value="bottom">bottom</option>
100100
</select>
101101
</div>
@@ -108,7 +108,7 @@
108108
</select>
109109
<select id="at_vertical">
110110
<option value="top">top</option>
111-
<option value="middle">center</option>
111+
<option value="center">center</option>
112112
<option value="bottom">bottom</option>
113113
</select>
114114
</div>

demos/progressbar/download.html

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>jQuery UI Progressbar - Download Dialog</title>
6+
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7+
<script src="../../jquery-1.9.1.js"></script>
8+
<script src="../../ui/jquery.ui.core.js"></script>
9+
<script src="../../ui/jquery.ui.widget.js"></script>
10+
<script src="../../ui/jquery.ui.progressbar.js"></script>
11+
<script src="../../ui/jquery.ui.mouse.js"></script>
12+
<script src="../../ui/jquery.ui.draggable.js"></script>
13+
<script src="../../ui/jquery.ui.button.js"></script>
14+
<script src="../../ui/jquery.ui.position.js"></script>
15+
<script src="../../ui/jquery.ui.dialog.js"></script>
16+
<link rel="stylesheet" href="../demos.css">
17+
<script>
18+
$(function() {
19+
var progressTimer,
20+
progressbar = $( "#progressbar" ),
21+
progressLabel = $( ".progress-label" ),
22+
dialogButtons = [{
23+
text: "Cancel Download",
24+
click: closeDownload
25+
}],
26+
dialog = $( "#dialog" ).dialog({
27+
autoOpen: false,
28+
closeOnEscape: false,
29+
resizable: false,
30+
buttons: dialogButtons,
31+
open: function() {
32+
progressTimer = setTimeout( progress, 2000 );
33+
},
34+
beforeClose: function() {
35+
downloadButton.button( "option", {
36+
disabled: false,
37+
label: "Start Download"
38+
});
39+
}
40+
}),
41+
downloadButton = $( "#downloadButton" )
42+
.button()
43+
.on( "click", function() {
44+
$( this ).button( "option", {
45+
disabled: true,
46+
label: "Downloading..."
47+
});
48+
dialog.dialog( "open" );
49+
});
50+
51+
progressbar.progressbar({
52+
value: false,
53+
change: function() {
54+
progressLabel.text( "Current Progress: " + progressbar.progressbar( "value" ) + "%" );
55+
},
56+
complete: function() {
57+
progressLabel.text( "Complete!" );
58+
dialog.dialog( "option", "buttons", [{
59+
text: "Close",
60+
click: closeDownload
61+
}]);
62+
$(".ui-dialog button").last().focus();
63+
}
64+
});
65+
66+
function progress() {
67+
var val = progressbar.progressbar( "value" ) || 0;
68+
69+
progressbar.progressbar( "value", val + Math.floor( Math.random() * 3 ) );
70+
71+
if ( val <= 99 ) {
72+
progressTimer = setTimeout( progress, 100 );
73+
}
74+
}
75+
76+
function closeDownload() {
77+
clearTimeout( progressTimer );
78+
dialog
79+
.dialog( "option", "buttons", dialogButtons )
80+
.dialog( "close" );
81+
progressbar.progressbar( "value", false );
82+
progressLabel
83+
.text( "Starting download..." );
84+
downloadButton.focus();
85+
}
86+
});
87+
</script>
88+
<style>
89+
#progressbar {
90+
margin-top: 20px;
91+
}
92+
93+
.progress-label {
94+
font-weight: bold;
95+
text-shadow: 1px 1px 0 #fff;
96+
}
97+
98+
.ui-dialog-titlebar-close {
99+
display: none;
100+
}
101+
</style>
102+
</head>
103+
<body>
104+
105+
<div id="dialog" title="File Download">
106+
<div class="progress-label">Starting download...</div>
107+
<div id="progressbar"></div>
108+
</div>
109+
<button id="downloadButton">Start Download</button>
110+
111+
<div class="demo-description">
112+
<p>Download dialog progressbar demo.</p>
113+
</div>
114+
</body>
115+
</html>

demos/progressbar/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<li><a href="default.html">Default functionality</a></li>
1111
<li><a href="indeterminate.html">Indeterminate</a></li>
1212
<li><a href="label.html">Custom Labels</a></li>
13+
<li><a href="download.html">Download Dialog</a></li>
1314
</ul>
1415

1516
</body>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "jquery-ui",
33
"title": "jQuery UI",
44
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
5-
"version": "1.10.3pre",
5+
"version": "1.11.0pre",
66
"homepage": "http://jqueryui.com",
77
"author": {
88
"name": "jQuery Foundation and other contributors",

tests/jquery.simulate.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,12 @@ $.extend( $.simulate.prototype, {
316316
this.simulateEvent( document, "mousemove", coord );
317317
}
318318

319-
this.simulateEvent( target, "mouseup", coord );
320-
this.simulateEvent( target, "click", coord );
319+
if ( $.contains( document, target ) ) {
320+
this.simulateEvent( target, "mouseup", coord );
321+
this.simulateEvent( target, "click", coord );
322+
} else {
323+
this.simulateEvent( document, "mouseup", coord );
324+
}
321325
}
322326
});
323327

tests/unit/autocomplete/autocomplete.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ <h2 id="qunit-userAgent"></h2>
3939
<ol id="qunit-tests"></ol>
4040
<div id="qunit-fixture">
4141

42-
<div id="ac-wrap1" class="ac-wrap"></div>
43-
<div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo"></div>
42+
<div id="autocomplete-wrap1" class="autocomplete-wrap"></div>
43+
<div id="autocomplete-wrap2" class="autocomplete-wrap"><input id="autocomplete" class="foo"></div>
4444
<div id="autocomplete-contenteditable" contenteditable="" tabindex=0></div>
4545
<textarea id="autocomplete-textarea"></textarea>
4646

tests/unit/autocomplete/autocomplete_core.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,30 @@ test( "allow form submit on enter when menu is not active", function() {
9090
arrowsMoveFocus( "#autocomplete-contenteditable", false );
9191
});
9292

93+
test( "up arrow moves cursor - input", function() {
94+
arrowsNavigateElement( "#autocomplete", true, false );
95+
});
96+
97+
test( "down arrow moves cursor - input", function() {
98+
arrowsNavigateElement( "#autocomplete", false, false );
99+
});
100+
101+
test( "up arrow moves cursor - textarea", function() {
102+
arrowsNavigateElement( "#autocomplete-textarea", true, true );
103+
});
104+
105+
test( "down arrow moves cursor - textarea", function() {
106+
arrowsNavigateElement( "#autocomplete-textarea", false, true );
107+
});
108+
109+
test( "up arrow moves cursor - contenteditable", function() {
110+
arrowsNavigateElement( "#autocomplete-contenteditable", true, true );
111+
});
112+
113+
test( "down arrow moves cursor - contenteditable", function() {
114+
arrowsNavigateElement( "#autocomplete-contenteditable", false, true );
115+
});
116+
93117
function arrowsInvokeSearch( id, isKeyUp, shouldMove ) {
94118
expect( 1 );
95119

@@ -120,6 +144,23 @@ test( "allow form submit on enter when menu is not active", function() {
120144
element.autocomplete( "search" );
121145
element.simulate( "keydown", { keyCode: ( isKeyUp ? $.ui.keyCode.UP : $.ui.keyCode.DOWN ) } );
122146
}
147+
148+
function arrowsNavigateElement( id, isKeyUp, shouldMove ) {
149+
expect( 1 );
150+
151+
var didMove = false,
152+
element = $( id ).autocomplete({
153+
source: [ "a" ],
154+
delay: 0,
155+
minLength: 0
156+
});
157+
element.on( "keypress", function( e ) {
158+
didMove = !e.isDefaultPrevented();
159+
});
160+
element.simulate( "keydown", { keyCode: ( isKeyUp ? $.ui.keyCode.UP : $.ui.keyCode.DOWN ) } );
161+
element.simulate( "keypress" );
162+
equal( didMove, shouldMove, "respond to arrow" );
163+
}
123164
})();
124165

125166
asyncTest( "handle race condition", function() {

0 commit comments

Comments
 (0)