aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/SupportedCommands.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/store/SupportedCommands.js')
-rw-r--r--web/app/store/SupportedCommands.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/web/app/store/SupportedCommands.js b/web/app/store/SupportedCommands.js
index 64e4af88d..612909180 100644
--- a/web/app/store/SupportedCommands.js
+++ b/web/app/store/SupportedCommands.js
@@ -16,25 +16,15 @@
Ext.define('Traccar.store.SupportedCommands', {
extend: 'Ext.data.Store',
- model: 'Traccar.model.SupportedCommand',
+ fields: [
+ { type: 'string', name: 'key'}
+ ],
listeners: {
'beforeload' : function(store, eOpts) {
var proxy;
proxy = store.getProxy();
proxy.setUrl('/api/supportedcommands?deviceId' + proxy.extraParams.deviceId);
- },
- 'load' : function(store, records, successful, eOpts) {
- if (typeof records !== "undefined") {
- records.forEach(function(entry) {
- if (typeof entry !== "undefined" && typeof entry.data.name !== "undefined") {
- var translatedName = Strings[entry.data.name];
- if (typeof translatedName !== "undefined") {
- entry.data.name = translatedName;
- }
- }
- }, this);
- }
}
},