Skip to content

Instantly share code, notes, and snippets.

// adding a remote validation customization, that allows us to submit the form even if the backend validation failed
function remoteFailsafe(url) {
return function(input) {
return {
url: url,
timeout: 10000,
error: function(request, status) {
request.abort();
// if request failed, try to submit anyway
if (status === "timeout" && validator.formSubmitted) {
Index: tests/visual/menu/default.html
===================================================================
--- tests/visual/menu/default.html (revision 3488)
+++ tests/visual/menu/default.html (working copy)
@@ -21,33 +21,6 @@
selected: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
- }).keydown(function(event) {
- var menu = $(this).data("menu");
@jzaefferer
jzaefferer / rhino suitejs
Created November 30, 2010 20:53
QUnit-CLI with both Rhino and Node.js;
if (typeof require != "undefined") {
// should change export to module.exports = QUnit
QUnit = require("../qunit/qunit.js").QUnit;
print = console.log;
} else {
load("../qunit/qunit.js");
}
var stop_watch = {
Zombie: GET http://jsbin.com/onomi4
Zombie: GET http://jsbin.com/onomi4 => 200
Zombie: Running script from http://jsbin.com/onomi4:undefined:undefined<script>
Zombie: Running script from http://jsbin.com/onomi4:undefined:undefined<script>
Zombie: Running script from http://jsbin.com/onomi4
this is called in the HEAD tag
Zombie: GET http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js
Zombie: GET /js/render/edit.js
Zombie: GET http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js => 200
Zombie: Running script from /ajax/libs/jquery/1.4.4/jquery.min.js
Zombie: GET http://jquery.bassistance.de/qunit/test/
Zombie: GET http://jquery.bassistance.de/qunit/test/ => 200
Zombie: GET ../qunit/qunit.js
Zombie: GET test.js
Zombie: GET same.js
Zombie: GET ../qunit/qunit.js => 200
Zombie: Running script from /qunit/qunit/qunit.js
Zombie: GET test.js => 200
Zombie: Running script from /qunit/test/test.js
Zombie: GET same.js => 200
// Backbone.history with HTML5 support
(function() {
var loc = window.location,
pushSupport = !!(window.history && window.history.pushState),
hashStrip = /^#*/;
// add HTML5 support to Backbone.history, drop the old IE stuff
_.extend(Backbone.History.prototype, {
getFragment : function(l) {
function extend( target ) {
var input = slice.call( arguments, 1 ),
inputIndex = 0,
inputLength = input.length
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[inputIndex] ) {
value = input[inputIndex];
if (value !== undefined ) {
table track {
id pk
artist string
title string
}
table rating {
track fk
name string
value int (1-10)
embed
module("user", {
"/users/183/tracks": "/fixtures/forss-tracks.json",
"/users/183/playlists": "/fixtures/forss-playlists.json",
"/users/183/favorites": "/fixtures/forss-favorites.json",
"/users/183/groups": "/fixtures/forss-groups.json",
});