diff options
author | Gábor Somogyi <gabor.g.somogyi@gmail.com> | 2016-05-08 13:06:25 +0200 |
---|---|---|
committer | Gábor Somogyi <gabor.g.somogyi@gmail.com> | 2016-05-08 13:29:18 +0200 |
commit | 301f2d314f446410da78615ac76ce0c07571d445 (patch) | |
tree | 71c96669b970bb8315388cc01db21e00b743796d /web/app/store | |
parent | 37bc675580c640d4fa7968fee575544fb3a550e3 (diff) | |
download | trackermap-server-301f2d314f446410da78615ac76ce0c07571d445.tar.gz trackermap-server-301f2d314f446410da78615ac76ce0c07571d445.tar.bz2 trackermap-server-301f2d314f446410da78615ac76ce0c07571d445.zip |
Review fixes
Diffstat (limited to 'web/app/store')
-rw-r--r-- | web/app/store/CommandTypes.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js index b8cb03668..2ef190edc 100644 --- a/web/app/store/CommandTypes.js +++ b/web/app/store/CommandTypes.js @@ -16,7 +16,7 @@ Ext.define('Traccar.store.CommandTypes', { extend: 'Ext.data.Store', - fields: ['key', 'name'], + fields: ['type', 'name'], listeners: { 'beforeload' : function(store) { @@ -33,10 +33,10 @@ Ext.define('Traccar.store.CommandTypes', { type: 'json', getData: function(data) { Ext.each(data, function(entry) { - entry.name = entry.key; - if (typeof entry.key !== "undefined") { - var key = 'command' + entry.key.charAt(0).toUpperCase() + entry.key.slice(1); - var name = Strings[key]; + entry.name = entry.type; + if (typeof entry.type !== "undefined") { + var nameKey = 'command' + entry.type.charAt(0).toUpperCase() + entry.type.slice(1); + var name = Strings[nameKey]; if (typeof name !== "undefined") { entry.name = name; } @@ -44,6 +44,6 @@ Ext.define('Traccar.store.CommandTypes', { }); return data; } - }, + } } }); |