From 49f7f011e9d811d1e7b9100ba65d24608397c5d0 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 27 Feb 2013 16:38:51 +0530 Subject: [PATCH] Ox.URL: fix tests --- source/Ox.UI/js/Core/URL.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index a9e2c3e1..150b64b6 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -10,7 +10,8 @@ Ox.URL URL controller getHash Takes a state object and normalizes its "hash" property (o) -> State object getItem Tests if a string matches an item - (string, callback) -> undefined + (type, string, callback) -> undefined + type type string The string to be tested callback callback function id Matching item id, or empty @@ -52,7 +53,7 @@ Ox.URL URL controller {id: 'name', type: 'string'}, {id: 'population', type: 'integer'} ], - getItem: function(str, callback) { + getItem: function(type, str, callback) { callback(/^\d+$/.test(str) ? str : ''); }, getSpan: function(item, view, str, callback) {