|
|
@ -21,6 +21,18 @@ CategoryIndex.prototype.open = function () { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this._loadChildrenCategories() |
|
|
|
} |
|
|
|
|
|
|
|
CategoryIndex.prototype.recalc = function () { |
|
|
|
for (var k in this.childrenCategories) { |
|
|
|
if (this.childrenCategories[k]) { |
|
|
|
this.childrenCategories[k].recalc() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CategoryIndex.prototype._loadChildrenCategories = function () { |
|
|
|
this.childrenCategories = {} |
|
|
|
|
|
|
|
for (var i = 0; i < this.data.subCategories.length; i++) { |
|
|
@ -40,14 +52,6 @@ CategoryIndex.prototype.open = function () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CategoryIndex.prototype.recalc = function () { |
|
|
|
for (var k in this.childrenCategories) { |
|
|
|
if (this.childrenCategories[k]) { |
|
|
|
this.childrenCategories[k].recalc() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CategoryIndex.prototype._loadChildCategory = function (err, category) { |
|
|
|
if (err) { |
|
|
|
return |
|
|
|