Skip to content
Permalink
Browse files

Merge branch 'master' into tooltip

  • Loading branch information
jzaefferer committed Mar 26, 2010
2 parents e8f397b + 6d9caf1 commit f1933142e485ceaaef9ef52e56abb9f43eaaad2d
@@ -1,8 +1,8 @@
jQuery UI Authors (http://ui.jquery.com/about)
jQuery UI Authors (http://jqueryui.com/about)

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
and logs, available at http://jquery-ui.googlecode.com/svn/
and logs, available at http://github.com/jquery/jquery-ui

Brandon Aaron
Paul Bakaus (paulbakaus.com)
@@ -33,7 +33,7 @@
if (!request.term || matcher.test(text))
return {
id: $(this).val(),
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
value: text
};
}));
@@ -18,7 +18,6 @@
}

$("#birds").autocomplete({
// TODO doesn't work when loaded from /demos/#autocomplete|remote
source: "search.php",
minLength: 2,
select: function(event, ui) {
@@ -18,6 +18,7 @@ var QUnit = {
stats: { all: 0, bad: 0 },
moduleStats: { all: 0, bad: 0 },
started: +new Date,
updateRate: 1000,
blocking: false,
autorun: false,
assertions: [],
@@ -590,8 +591,16 @@ function synchronize( callback ) {
}

function process() {
var start = (new Date()).getTime();

while ( config.queue.length && !config.blocking ) {
config.queue.shift()();
if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) {
config.queue.shift()();

} else {
setTimeout( process, 13 );
break;
}
}
}

@@ -679,6 +688,7 @@ QUnit.equiv = function () {

var innerEquiv; // the real equiv function
var callers = []; // stack to decide between skip/abort functions
var parents = []; // stack to avoiding loops from circular referencing


// Determine what is o.
@@ -788,28 +798,39 @@ QUnit.equiv = function () {
},

"array": function (b, a) {
var i;
var i, j, loop;
var len;

// b could be an object literal here
if ( ! (hoozit(b) === "array")) {
return false;
}

}
len = a.length;
if (len !== b.length) { // safe and faster
return false;
}

//track reference to avoid circular references
parents.push(a);
for (i = 0; i < len; i++) {
if ( ! innerEquiv(a[i], b[i])) {
loop = false;
for(j=0;j<parents.length;j++){
if(parents[j] === a[i]){
loop = true;//dont rewalk array
}
}
if (!loop && ! innerEquiv(a[i], b[i])) {
parents.pop();
return false;
}
}
parents.pop();
return true;
},

"object": function (b, a) {
var i;
var i, j, loop;
var eq = true; // unless we can proove it
var aProperties = [], bProperties = []; // collection of strings

@@ -820,18 +841,25 @@ QUnit.equiv = function () {

// stack constructor before traversing properties
callers.push(a.constructor);

//track reference to avoid circular references
parents.push(a);

for (i in a) { // be strict: don't ensures hasOwnProperty and go deep

loop = false;
for(j=0;j<parents.length;j++){
if(parents[j] === a[i])
loop = true; //don't go down the same path twice
}
aProperties.push(i); // collect a's properties

if ( ! innerEquiv(a[i], b[i])) {
if (!loop && ! innerEquiv(a[i], b[i])) {
eq = false;
break;
}
}

callers.pop(); // unstack, we are done
parents.pop();

for (i in b) {
bProperties.push(i); // collect b's properties
@@ -11,6 +11,7 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>

<script type="text/javascript" src="core.js"></script>
<script type="text/javascript" src="selector.js"></script>
@@ -45,5 +45,5 @@ function commonWidgetTests(widget, settings) {
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
})();
@@ -14,7 +14,7 @@
$.widget("ui.drilldown", {
_init: function() {
var self = this;
this.active = this.element;
this.active = this.element.find(">ul").attr("tabindex", 0);

// hide submenus and create indicator icons
this.element.find("ul").hide().prev("a").prepend('<span class="ui-icon ui-icon-carat-1-e"></span>').end().filter(":first").show();
@@ -84,17 +84,21 @@
parent.parent().removeData("submenu");
submenu = submenu.data("submenu");
};
},

widget: function() {
return this.element.find(">ul");
}
});

var nestedmenu = $("#drilldown").drilldown({
var drilldown = $("#drilldown").drilldown({
selected: function(event, ui) {
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
}
});

$().keydown(function(event) {
var menu = nestedmenu.data("drilldown").active.data("menu");
drilldown.drilldown("widget").keydown(function(event) {
var menu = drilldown.data("drilldown").active.data("menu");
if (menu.widget().is(":hidden"))
return;
event.stopPropagation();
@@ -109,10 +113,10 @@
menu.previous();
break;
case $.ui.keyCode.LEFT:
nestedmenu.nestedmenu("up");
drilldown.drilldown("up");
break;
case $.ui.keyCode.RIGHT:
nestedmenu.nestedmenu("down");
drilldown.drilldown("down");
break;
case $.ui.keyCode.DOWN:
menu.next();
@@ -121,11 +125,11 @@
case $.ui.keyCode.ENTER:
case $.ui.keyCode.TAB:
menu.select();
nestedmenu.nestedmenu("hide");
drilldown.drilldown("hide");
event.preventDefault();
break;
case $.ui.keyCode.ESCAPE:
nestedmenu.nestedmenu("hide");
drilldown.drilldown("hide");
break;
default:
clearTimeout(menu.filterTimer);

0 comments on commit f193314

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