diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-04 09:44:54 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-04 09:44:54 +0500 |
commit | 44806acd0e4fa1618e66ac61f2cc6e0505dc9c92 (patch) | |
tree | 65d0be5bc4746457727b18c8c9490d018b814483 /web/app/store/CommandTypes.js | |
parent | 6a9bbe6624bf65fafe11378caf485ba5612f407c (diff) | |
download | etbsa-traccar-web-44806acd0e4fa1618e66ac61f2cc6e0505dc9c92.tar.gz etbsa-traccar-web-44806acd0e4fa1618e66ac61f2cc6e0505dc9c92.tar.bz2 etbsa-traccar-web-44806acd0e4fa1618e66ac61f2cc6e0505dc9c92.zip |
Improve commands
Diffstat (limited to 'web/app/store/CommandTypes.js')
-rw-r--r-- | web/app/store/CommandTypes.js | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js index a14dd58..f14cb59 100644 --- a/web/app/store/CommandTypes.js +++ b/web/app/store/CommandTypes.js @@ -18,28 +18,11 @@ Ext.define('Traccar.store.CommandTypes', { extend: 'Ext.data.Store', - fields: ['type', 'name'], + model: 'Traccar.model.KnownCommand', proxy: { type: 'rest', url: 'api/commandtypes', - reader: { - type: 'json', - getData: function (data) { - Ext.each(data, function (entry) { - var nameKey, name; - entry.name = entry.type; - if (typeof entry.type !== 'undefined') { - nameKey = 'command' + entry.type.charAt(0).toUpperCase() + entry.type.slice(1); - name = Strings[nameKey]; - if (typeof name !== 'undefined') { - entry.name = name; - } - } - }); - return data; - } - }, listeners: { 'exception': function (proxy, response) { Traccar.app.showError(response); |