diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index 1f327497..126df534 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -25,11 +25,11 @@ Ox.URL URL controller state State object string The string to be tested callback callback function - getSpan Tests if a string matches a span + getSpan Tests if a value matches a span May modify the state's view and span properties (state, string, callback) -> undefined state State object - string The string to be tested + value <[n]|s> The value to be tested callback Callback function pages <[s]> List of pages sortKeys Sort keys for list and item views for all types @@ -773,7 +773,7 @@ Ox.URL = function(options) { parts.shift(); if (parts.length) { // may modify state.part - self.options.getPart(state, parts[0], getHash); + self.options.getPart(state, decodeValue(parts[0]), getHash); } else { getHash(); } @@ -796,7 +796,7 @@ Ox.URL = function(options) { parseBeyondItem(); } else { // test for item id or name - self.options.getItem(state, parts[0].replace(/%20/g, ' '), function() { + self.options.getItem(state, decodeValue(parts[0]), function() { // may have modified state.item if (state.item) { parts.shift(); @@ -857,7 +857,10 @@ Ox.URL = function(options) { } } } - if (!state.span && /^[A-Z@]/.test(parts[0])) { + if (state.span && spanType == 'duration') { + // test duration, may modify state.span + self.options.getSpan(state, state.span, parseBeyondSpan); + } else if (!state.span && /^[A-Z@]/.test(parts[0])) { // test for span id or name self.options.getSpan(state, decodeValue(parts[0]), function() { // may have modified state.view and state.span