Update vendors.

Former-commit-id: baf89d2c3bd7077462995bffa7f8bff1e1cf28f9
This commit is contained in:
John-David Dalton
2012-12-28 19:47:44 -06:00
parent 8ec7b84a78
commit 87f880ca52
12 changed files with 499 additions and 381 deletions

View File

@@ -70,6 +70,7 @@ $(document).ready(function() {
"contacts/new": "newContact",
"contacts/:id": "loadContact",
"optional(/:item)": "optionalItem",
"named/optional/(y:z)": "namedOptional",
"splat/*args/end": "splat",
"*first/complex-:part/*rest": "complex",
":entity?*args": "query",
@@ -110,23 +111,27 @@ $(document).ready(function() {
this.arg = arg != void 0 ? arg : null;
},
splat : function(args) {
splat: function(args) {
this.args = args;
},
complex : function(first, part, rest) {
complex: function(first, part, rest) {
this.first = first;
this.part = part;
this.rest = rest;
},
query : function(entity, args) {
query: function(entity, args) {
this.entity = entity;
this.queryArgs = args;
},
anything : function(whatever) {
anything: function(whatever) {
this.anything = whatever;
},
namedOptional: function(z) {
this.z = z;
}
});
@@ -502,4 +507,13 @@ $(document).ready(function() {
strictEqual(history.getFragment('/fragment '), 'fragment');
});
test("#1980 - Optional parameters.", 2, function() {
location.replace('http://example.com#named/optional/y');
Backbone.history.checkUrl();
strictEqual(router.z, undefined);
location.replace('http://example.com#named/optional/y123');
Backbone.history.checkUrl();
strictEqual(router.z, '123');
});
});