aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/CommandTypes.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/store/CommandTypes.js')
-rw-r--r--web/app/store/CommandTypes.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js
index 2ef190edc..d3825fb95 100644
--- a/web/app/store/CommandTypes.js
+++ b/web/app/store/CommandTypes.js
@@ -19,7 +19,7 @@ Ext.define('Traccar.store.CommandTypes', {
fields: ['type', 'name'],
listeners: {
- 'beforeload' : function(store) {
+ 'beforeload' : function (store) {
var proxy;
proxy = store.getProxy();
proxy.setUrl('/api/commandtypes?deviceId' + proxy.extraParams.deviceId);
@@ -31,13 +31,14 @@ Ext.define('Traccar.store.CommandTypes', {
url: '',
reader: {
type: 'json',
- getData: function(data) {
- Ext.each(data, function(entry) {
+ getData: function (data) {
+ Ext.each(data, function (entry) {
+ var nameKey, name;
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") {
+ 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;
}
}