add a method to wrap a depth-only record (just depth and guid, nothing else)

This commit is contained in:
Dan Mills 2008-12-23 11:22:29 -08:00
parent 9c44454330
commit 7d1322c001

View File

@ -130,6 +130,18 @@ Store.prototype = {
throw "override wrapItem in a subclass";
},
wrapDepth: function BStore_wrapDepth(guid, items) {
if (typeof(items) == "undefined")
items = {};
for (let childguid in this._itemCache) {
if (this._itemCache[childguid].parentid == guid) {
items[childguid] = this._itemCache[childguid].depth;
this.wrapDepth(childguid, items);
}
}
return items;
},
changeItemID: function Store_changeItemID(oldID, newID) {
throw "override changeItemID in a subclass";
},