annotate src/implab/data/StatefullStoreAdapter.js @ 15:b85df31b7e0e

Разработка кнопки выбора координат с карт
author nickolay
date Mon, 18 Sep 2017 21:59:41 +0300
parents 93fb6c09f2e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
93fb6c09f2e1 minor fixes
cin
parents: 0
diff changeset
1 define(["dojo/_base/declare", "dojo/_base/array", "../safe", "./StoreAdapter"], function(declare, array, safe ,AdapterStore){
0
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
2 return declare([AdapterStore], {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
3 _attrs : null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
4
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
5 constructor : function(opts) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
6 safe.argumentNotEmptyArray(opts.attrs, "opts.attrs");
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
7 this._attrs = opts.attrs;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
8 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
9
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
10 mapItem : function(item) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
11 var result = {};
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
12 array.forEach(this._attrs, function(p) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
13 result[p] = item.get(p);
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
14 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
15 return result;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
16 }
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
17 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
18
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
19 });