src/js/model.js
branchnew-model
changeset 930 165f236e42f2
parent 925 28efc97b5d78
child 937 eb3c442cec50
equal deleted inserted replaced
929:a39ff507b050 930:165f236e42f2
    92     }
    92     }
    93 }
    93 }
    94 
    94 
    95 IriSP.Model.List.prototype = new Array();
    95 IriSP.Model.List.prototype = new Array();
    96 
    96 
    97 IriSP.Model.List.prototype.getElement = function(_id) {
       
    98     return this[_id];
       
    99 }
       
   100 
       
   101 IriSP.Model.List.prototype.hasId = function(_id) {
    97 IriSP.Model.List.prototype.hasId = function(_id) {
   102     return (IriSP._(this.idIndex).indexOf(_id) !== -1);
    98     return IriSP._(this.idIndex).include(_id);
   103 }
    99 }
   104 
   100 
   105 /* On recent browsers, forEach and map are defined and do what we want.
   101 /* On recent browsers, forEach and map are defined and do what we want.
   106  * Otherwise, we'll use the Underscore.js functions
   102  * Otherwise, we'll use the Underscore.js functions
   107  */
   103  */