use first view if no view is set to construct span

This commit is contained in:
j 2013-03-02 13:54:07 +00:00
parent fbf02bc0b2
commit 326098c54f

View file

@ -466,9 +466,13 @@ Ox.URL = function(options) {
} }
function constructSpan(span, state) { 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.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.isArray(span) ? span : [span]).map(function(point) {
return Ox.isNumber(point) ? ( return Ox.isNumber(point) ? (
spanType == 'date' ? constructDate(point) spanType == 'date' ? constructDate(point)