From 5119a15173367b35cccdf27f7d96481b6af91c7c Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 17 Jan 2014 12:50:29 +0530 Subject: [PATCH] Ox.URL: format pos,in,out as in,out if pos equals in --- source/Ox.UI/js/Core/URL.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index 013cf8e0..2bc7da38 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -509,8 +509,11 @@ Ox.URL = function(options) { ][0], spanType = self.options.spanType[state.type][ !state.item ? 'list' : 'item' - ][view]; - return (Ox.isArray(span) ? span : [span]).map(function(point) { + ][view], + points = Ox.contains(['date', 'duration'], spanType) + && Ox.isArray(span) && span.length == 3 && span[0] == span[1] + ? span.slice(1) : span; + return Ox.toArray(points).map(function(point) { return Ox.isNumber(point) ? ( spanType == 'date' ? constructDate(point) : spanType == 'duration' ? constructDuration(point)