From 44806acd0e4fa1618e66ac61f2cc6e0505dc9c92 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 4 Sep 2017 09:44:54 +0500 Subject: Improve commands --- web/app/store/CommandTypes.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'web/app/store/CommandTypes.js') 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); -- cgit v1.2.3