Mercurial > pub > ImplabJs
annotate src/implab/data/StatefullStoreAdapter.js @ 19:8332e287d552
fix (click on cospas)
| author | nickolay | 
|---|---|
| date | Wed, 04 Oct 2017 21:05:21 +0300 | 
| parents | 93fb6c09f2e1 | 
| children | 
| rev | line source | 
|---|---|
| 1 | 1 define(["dojo/_base/declare", "dojo/_base/array", "../safe", "./StoreAdapter"], function(declare, array, safe ,AdapterStore){ | 
| 0 | 2 return declare([AdapterStore], { | 
| 3 _attrs : null, | |
| 4 | |
| 5 constructor : function(opts) { | |
| 6 safe.argumentNotEmptyArray(opts.attrs, "opts.attrs"); | |
| 7 this._attrs = opts.attrs; | |
| 8 }, | |
| 9 | |
| 10 mapItem : function(item) { | |
| 11 var result = {}; | |
| 12 array.forEach(this._attrs, function(p) { | |
| 13 result[p] = item.get(p); | |
| 14 }); | |
| 15 return result; | |
| 16 } | |
| 17 }); | |
| 18 | |
| 19 }); | 
