aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'web/app')
-rw-r--r--web/app/store/CommandTypes.js12
-rw-r--r--web/app/view/CommandDialog.js2
2 files changed, 7 insertions, 7 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;
}
- },
+ }
}
});
diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js
index 66cd190ea..d23b50d4c 100644
--- a/web/app/view/CommandDialog.js
+++ b/web/app/view/CommandDialog.js
@@ -32,7 +32,7 @@ Ext.define('Traccar.view.CommandDialog', {
fieldLabel: Strings.commandType,
store: 'CommandTypes',
displayField: 'name',
- valueField: 'key',
+ valueField: 'type',
listeners: {
select: 'onSelect'
}