|
|
@@ -143,8 +143,10 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
|
|
|
if (this.options.dutyUnitLevelBy === "duty") {
|
|
|
this.level1Container = [];
|
|
|
if (this.options.units && this.options.units.length) {
|
|
|
- var div = new Element("div").inject(this.itemAreaNode);
|
|
|
- this.level1Container.push(div);
|
|
|
+ this.options.units.each( function (unit ,i) {
|
|
|
+ var div = new Element("div").inject(this.itemAreaNode);
|
|
|
+ this.level1Container.push(div);
|
|
|
+ }.bind(this))
|
|
|
}
|
|
|
this._loadSelectItemsByDutyUnit(unitTree);
|
|
|
} else {
|
|
|
@@ -198,7 +200,7 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
|
|
|
var container = this.itemAreaNode;
|
|
|
if (this.level1Container && this.level1Container.length) {
|
|
|
var index = this.getIndexFromUnitOption(unit);
|
|
|
- if (index > -1 && (this.level1Container.length > index) && this.level1Container[i]) container = this.level1Container[i];
|
|
|
+ if (index > -1 && (this.level1Container.length > index) && this.level1Container[index]) container = this.level1Container[index];
|
|
|
}
|
|
|
var category = this._newItemCategory("ItemCategory", unit, this, container);
|
|
|
this.subCategorys.push(category);
|