From 326098c54f35e27e2ca834d815e29275a08d33a0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 2 Mar 2013 13:54:07 +0000 Subject: [PATCH] use first view if no view is set to construct span --- source/Ox.UI/js/Core/URL.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index f3f7fb1c..45ca4518 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -466,9 +466,13 @@ Ox.URL = function(options) { } function constructSpan(span, state) { - var spanType = self.options.spanType[state.type][ + var view = state.view || self.options.views[state.type][ !state.item ? 'list' : 'item' - ][state.view]; + ][0], + spanType = self.options.spanType[state.type][ + !state.item ? 'list' : 'item' + ][view]; + console.log('constructSpan', spanType, self.options.views[state.type]); return (Ox.isArray(span) ? span : [span]).map(function(point) { return Ox.isNumber(point) ? ( spanType == 'date' ? constructDate(point)