Skip to content
Permalink
Browse files

Merge branch 'master' into selectmenu

  • Loading branch information
fnagel committed May 15, 2013
2 parents ddf1347 + ce73a26 commit cb5f9bb9a28f6be3089c84e0c19c825e9ef76b92
@@ -1,9 +1,2 @@
dist
node_modules
docs
.project
*~
*.diff
*.patch
.DS_Store
.settings
@@ -240,3 +240,6 @@ Nathanael Silverman <nathanael.silverman@gmail.com>
Christian Wenz <christian@wenz.org>
Steve Urmston <steve@urm.st>
Zaven Muradyan <megalivoithos@gmail.com>
Woody Gilk <shadowhand@deviantart.com>
Zbigniew Motyka <zbigniew.motyka@gmail.com>
Suhail Alkowaileet <xsoh.k7@gmail.com>
@@ -30,7 +30,7 @@
],
"category": "effect",
"homepage": "http://jqueryui.com/",
"demo": "http://jqueryui.com/effects/",
"demo": "http://jqueryui.com/effect/",
"docs": "http://api.jqueryui.com/category/effects-core/"
},
"position": {
@@ -4,13 +4,13 @@
// Usage:
// stable release: node release.js
// pre-release: node release.js --pre-release {version}
// test run: node release.js --remote=user/repo

"use strict";

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

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

function bootstrap( fn ) {
getRemote(function( remote ) {
repo = "git@github.com:" + remote + ".git";
_bootstrap( fn );
});
}

function getRemote( fn ) {
var matches, remote;

console.log( "Determining remote repo..." );
process.argv.forEach(function( arg ) {
matches = /--remote=(.+)/.exec( arg );
if ( matches ) {
remote = matches[ 1 ];
}
});

if ( remote ) {
fn( remote );
return;
}

console.log();
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
console.log( " !! !!" );
console.log( " !! Using jquery/jquery-ui !!" );
console.log( " !! !!" );
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
console.log();
console.log( "Press enter to continue, or ctrl+c to cancel." );
prompt(function() {
fn( "jquery/jquery-ui" );
});
}

function _bootstrap( fn ) {
console.log( "Determining release type..." );
preRelease = process.argv.indexOf( "--pre-release" );
if ( preRelease !== -1 ) {
@@ -0,0 +1,115 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Progressbar - Download Dialog</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.9.1.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>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.draggable.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.dialog.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
var progressTimer,
progressbar = $( "#progressbar" ),
progressLabel = $( ".progress-label" ),
dialogButtons = [{
text: "Cancel Download",
click: closeDownload
}],
dialog = $( "#dialog" ).dialog({
autoOpen: false,
closeOnEscape: false,
resizable: false,
buttons: dialogButtons,
open: function() {
progressTimer = setTimeout( progress, 2000 );
},
beforeClose: function() {
downloadButton.button( "option", {
disabled: false,
label: "Start Download"
});
}
}),
downloadButton = $( "#downloadButton" )
.button()
.on( "click", function() {
$( this ).button( "option", {
disabled: true,
label: "Downloading..."
});
dialog.dialog( "open" );
});

progressbar.progressbar({
value: false,
change: function() {
progressLabel.text( "Current Progress: " + progressbar.progressbar( "value" ) + "%" );
},
complete: function() {
progressLabel.text( "Complete!" );
dialog.dialog( "option", "buttons", [{
text: "Close",
click: closeDownload
}]);
$(".ui-dialog button").last().focus();
}
});

function progress() {
var val = progressbar.progressbar( "value" ) || 0;

progressbar.progressbar( "value", val + Math.floor( Math.random() * 3 ) );

if ( val <= 99 ) {
progressTimer = setTimeout( progress, 100 );
}
}

function closeDownload() {
clearTimeout( progressTimer );
dialog
.dialog( "option", "buttons", dialogButtons )
.dialog( "close" );
progressbar.progressbar( "value", false );
progressLabel
.text( "Starting download..." );
downloadButton.focus();
}
});
</script>
<style>
#progressbar {
margin-top: 20px;
}

.progress-label {
font-weight: bold;
text-shadow: 1px 1px 0 #fff;
}

.ui-dialog-titlebar-close {
display: none;
}
</style>
</head>
<body>

<div id="dialog" title="File Download">
<div class="progress-label">Starting download...</div>
<div id="progressbar"></div>
</div>
<button id="downloadButton">Start Download</button>

<div class="demo-description">
<p>Download dialog progressbar demo.</p>
</div>
</body>
</html>
@@ -10,6 +10,7 @@
<li><a href="default.html">Default functionality</a></li>
<li><a href="indeterminate.html">Indeterminate</a></li>
<li><a href="label.html">Custom Labels</a></li>
<li><a href="download.html">Download Dialog</a></li>
</ul>

</body>
@@ -39,8 +39,8 @@ <h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">

<div id="ac-wrap1" class="ac-wrap"></div>
<div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo"></div>
<div id="autocomplete-wrap1" class="autocomplete-wrap"></div>
<div id="autocomplete-wrap2" class="autocomplete-wrap"><input id="autocomplete" class="foo"></div>
<div id="autocomplete-contenteditable" contenteditable="" tabindex=0></div>
<textarea id="autocomplete-textarea"></textarea>

@@ -89,7 +89,7 @@ test( "allow form submit on enter when menu is not active", function() {
test( "down arrow moves focus - contenteditable", function() {
arrowsMoveFocus( "#autocomplete-contenteditable", false );
});

test( "up arrow moves cursor - input", function() {
arrowsNavigateElement( "#autocomplete", true, false );
});
@@ -144,7 +144,7 @@ test( "allow form submit on enter when menu is not active", function() {
element.autocomplete( "search" );
element.simulate( "keydown", { keyCode: ( isKeyUp ? $.ui.keyCode.UP : $.ui.keyCode.DOWN ) } );
}

function arrowsNavigateElement( id, isKeyUp, shouldMove ) {
expect( 1 );

@@ -2,46 +2,55 @@

module( "autocomplete: options" );

var data = [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl" ];
var data = [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby",
"python", "c", "scala", "groovy", "haskell", "perl" ];

test( "appendTo", function() {
expect( 8 );
var detached = $( "<div>" ),
element = $( "#autocomplete" ).autocomplete();
equal( element.autocomplete( "widget" ).parent()[0], document.body, "defaults to body" );
equal( element.autocomplete( "widget" ).parent()[ 0 ], document.body,
"defaults to body" );
element.autocomplete( "destroy" );

element.autocomplete({
appendTo: ".ac-wrap"
appendTo: ".autocomplete-wrap"
});
equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap1" )[0], "first found element" );
equal( $( "#ac-wrap2 .ui-autocomplete" ).length, 0, "only appends to one element" );
equal( element.autocomplete( "widget" ).parent()[ 0 ],
$( "#autocomplete-wrap1" )[ 0 ], "first found element" );
equal( $( "#autocomplete-wrap2 .ui-autocomplete" ).length, 0,
"only appends to one element" );
element.autocomplete( "destroy" );

$( "#ac-wrap2" ).addClass( "ui-front" );
$( "#autocomplete-wrap2" ).addClass( "ui-front" );
element.autocomplete();
equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap2" )[0], "null, inside .ui-front" );
equal( element.autocomplete( "widget" ).parent()[ 0 ],
$( "#autocomplete-wrap2" )[ 0 ], "null, inside .ui-front" );
element.autocomplete( "destroy" );
$( "#ac-wrap2" ).removeClass( "ui-front" );
$( "#autocomlete-wrap2" ).removeClass( "ui-front" );

element.autocomplete().autocomplete( "option", "appendTo", "#ac-wrap1" );
equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap1" )[0], "modified after init" );
element.autocomplete().autocomplete( "option", "appendTo", "#autocomplete-wrap1" );
equal( element.autocomplete( "widget" ).parent()[ 0 ],
$( "#autocomplete-wrap1" )[ 0 ], "modified after init" );
element.autocomplete( "destroy" );

element.autocomplete({
appendTo: detached
});
equal( element.autocomplete( "widget" ).parent()[0], detached[0], "detached jQuery object" );
equal( element.autocomplete( "widget" ).parent()[ 0 ], detached[ 0 ],
"detached jQuery object" );
element.autocomplete( "destroy" );

element.autocomplete({
appendTo: detached[0]
appendTo: detached[ 0 ]
});
equal( element.autocomplete( "widget" ).parent()[0], detached[0], "detached DOM element" );
equal( element.autocomplete( "widget" ).parent()[ 0 ], detached[ 0 ],
"detached DOM element" );
element.autocomplete( "destroy" );

element.autocomplete().autocomplete( "option", "appendTo", detached );
equal( element.autocomplete( "widget" ).parent()[0], detached[0], "detached DOM element via option()" );
equal( element.autocomplete( "widget" ).parent()[ 0 ], detached[ 0 ],
"detached DOM element via option()" );
element.autocomplete( "destroy" );
});

@@ -51,8 +60,13 @@ function autoFocusTest( afValue, focusedLength ) {
delay: 0,
source: data,
open: function() {
equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first" ).find( ".ui-state-focus" ).length,
focusedLength, "first item is " + (afValue ? "" : "not") + " auto focused" );
equal(
element.autocomplete( "widget" )
.children( ".ui-menu-item:first" )
.find( ".ui-state-focus" )
.length,
focusedLength,
"first item is " + (afValue ? "" : "not") + " auto focused" );
start();
}
});
@@ -13,11 +13,11 @@ jQuery(function($){
dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
weekHeader: 'Wk',
weekHeader: 'SAV',
dateFormat: 'yy-mm-dd',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
showMonthAfterYear: true,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['lt']);
});
@@ -103,7 +103,6 @@ $.widget( "ui.autocomplete", {
this._keyEvent( "next", event );
break;
case keyCode.ENTER:
case keyCode.NUMPAD_ENTER:
// when menu is open and has focus
if ( this.menu.active ) {
// #6055 - Opera still allows the keypress to occur
@@ -29,12 +29,6 @@ $.extend( $.ui, {
ESCAPE: 27,
HOME: 36,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,

0 comments on commit cb5f9bb

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