src/js/model.js
changeset 1002 a86208b60c91
parent 998 9521347ede1d
child 1010 5566738cb829
equal deleted inserted replaced
1001:3210bf928a11 1002:a86208b60c91
  1007     if (_global) {
  1007     if (_global) {
  1008         return this.directory.getGlobalList().filter(function(_e) {
  1008         return this.directory.getGlobalList().filter(function(_e) {
  1009             return (_e.elementType === _listId);
  1009             return (_e.elementType === _listId);
  1010         });
  1010         });
  1011     } else {
  1011     } else {
  1012         return this.contents[_listId] || new IriSP.List(this.directory);
  1012         if (typeof this.contents[_listId] === "undefined") {
       
  1013             this.contents[_listId] = new IriSP.List(this.directory);
       
  1014         }
       
  1015         return this.contents[_listId];
  1013     }
  1016     }
  1014 };
  1017 };
  1015 
  1018 
  1016 Source.prototype.forEach = function(_callback) {
  1019 Source.prototype.forEach = function(_callback) {
  1017     var _this = this;
  1020     var _this = this;