|
|
@ -109,33 +109,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
innerVGap: 5 |
|
|
|
innerVGap: 5 |
|
|
|
}; |
|
|
|
}; |
|
|
|
item.el.childValues = []; |
|
|
|
self._createChildren(item); |
|
|
|
BI.each(item.children, function (i, child) { |
|
|
|
|
|
|
|
child = child.el ? BI.extend(child.el, {children: child.children}) : child; |
|
|
|
|
|
|
|
var fatherValue = BI.deepClone(item.el.value); |
|
|
|
|
|
|
|
var childValue = BI.deepClone(child.value); |
|
|
|
|
|
|
|
self.singleValues.push(child.value); |
|
|
|
|
|
|
|
child.type = "bi.down_list_item"; |
|
|
|
|
|
|
|
child.extraCls = " child-down-list-item"; |
|
|
|
|
|
|
|
child.title = child.title || child.text; |
|
|
|
|
|
|
|
child.textRgap = 10; |
|
|
|
|
|
|
|
child.isNeedAdjustWidth = false; |
|
|
|
|
|
|
|
child.logic = { |
|
|
|
|
|
|
|
dynamic: true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
child.father = fatherValue; |
|
|
|
|
|
|
|
self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue; |
|
|
|
|
|
|
|
self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue; |
|
|
|
|
|
|
|
child.value = self._createChildValue(fatherValue, childValue); |
|
|
|
|
|
|
|
item.el.childValues.push(child.value); |
|
|
|
|
|
|
|
if (BI.isNotEmptyArray(child.children)) { |
|
|
|
|
|
|
|
child.type = "bi.down_list_group_item"; |
|
|
|
|
|
|
|
self._createChildren(child); |
|
|
|
|
|
|
|
child.height = self.constants.height; |
|
|
|
|
|
|
|
child.iconCls2 = self.constants.nextIcon; |
|
|
|
|
|
|
|
item.el.childValues = BI.concat(item.el.childValues, child.childValues); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
item.type = "bi.down_list_item"; |
|
|
|
item.type = "bi.down_list_item"; |
|
|
|
item.title = item.title || item.text; |
|
|
|
item.title = item.title || item.text; |
|
|
@ -177,27 +151,46 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, { |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_createChildren: function (child) { |
|
|
|
_createChildren: function (item) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
child.childValues = []; |
|
|
|
this._formatEL(item).el.childValues = []; |
|
|
|
BI.each(child.children, function (i, c) { |
|
|
|
BI.each(item.children, function (i, child) { |
|
|
|
var fatherValue = BI.deepClone(child.value); |
|
|
|
child = child.el ? BI.extend(child.el, {children: child.children}) : child; |
|
|
|
var childValue = BI.deepClone(c.value); |
|
|
|
var fatherValue = BI.deepClone(self._formatEL(item).el.value); |
|
|
|
c.type = "bi.down_list_item"; |
|
|
|
var childValue = BI.deepClone(child.value); |
|
|
|
c.title = c.title || c.text; |
|
|
|
self.singleValues.push(child.value); |
|
|
|
c.textRgap = 10; |
|
|
|
child.type = "bi.down_list_item"; |
|
|
|
c.isNeedAdjustWidth = false; |
|
|
|
child.extraCls = " child-down-list-item"; |
|
|
|
c.logic = { |
|
|
|
child.title = child.title || child.text; |
|
|
|
|
|
|
|
child.textRgap = 10; |
|
|
|
|
|
|
|
child.isNeedAdjustWidth = false; |
|
|
|
|
|
|
|
child.logic = { |
|
|
|
dynamic: true |
|
|
|
dynamic: true |
|
|
|
}; |
|
|
|
}; |
|
|
|
c.father = fatherValue; |
|
|
|
child.father = fatherValue; |
|
|
|
self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue; |
|
|
|
self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue; |
|
|
|
self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue; |
|
|
|
self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue; |
|
|
|
c.value = self._createChildValue(fatherValue, childValue); |
|
|
|
child.value = self._createChildValue(fatherValue, childValue); |
|
|
|
child.childValues.push(c.value); |
|
|
|
self._formatEL(item).el.childValues.push(child.value); |
|
|
|
|
|
|
|
if (BI.isNotEmptyArray(child.children)) { |
|
|
|
|
|
|
|
child.type = "bi.down_list_group_item"; |
|
|
|
|
|
|
|
child.iconCls2 = self.constants.nextIcon; |
|
|
|
|
|
|
|
child.height = self.constants.height; |
|
|
|
|
|
|
|
self._createChildren(child); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_formatEL: function(obj) { |
|
|
|
|
|
|
|
if (obj && obj.el) { |
|
|
|
|
|
|
|
return obj; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
el: obj |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_isGroup: function (i) { |
|
|
|
_isGroup: function (i) { |
|
|
|
return i.length > 1; |
|
|
|
return i.length > 1; |
|
|
|
}, |
|
|
|
}, |
|
|
|