aboutsummaryrefslogtreecommitdiff
path: root/web/app/store/CommandTypes.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-07 15:32:22 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-07 15:39:21 +0500
commit7db1c1cdcf617e146e927c4aadde239959a9d3de (patch)
tree6caf2497b4d217557e8f00887ec6442e2bfd0c73 /web/app/store/CommandTypes.js
parent50a2616002602c379f408d5ecc404a59d317b0ca (diff)
downloadetbsa-traccar-web-7db1c1cdcf617e146e927c4aadde239959a9d3de.tar.gz
etbsa-traccar-web-7db1c1cdcf617e146e927c4aadde239959a9d3de.tar.bz2
etbsa-traccar-web-7db1c1cdcf617e146e927c4aadde239959a9d3de.zip
Implement SMS commands
Diffstat (limited to 'web/app/store/CommandTypes.js')
-rw-r--r--web/app/store/CommandTypes.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js
index ad5faba..445f937 100644
--- a/web/app/store/CommandTypes.js
+++ b/web/app/store/CommandTypes.js
@@ -1,5 +1,6 @@
/*
* Copyright 2016 Gabor Somogyi (gabor.g.somogyi@gmail.com)
+ * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,17 +20,9 @@ Ext.define('Traccar.store.CommandTypes', {
extend: 'Ext.data.Store',
fields: ['type', 'name'],
- listeners: {
- 'beforeload' : function (store) {
- var proxy;
- proxy = store.getProxy();
- proxy.setUrl('api/commandtypes?deviceId' + proxy.extraParams.deviceId);
- }
- },
-
proxy: {
type: 'rest',
- url: '',
+ url: 'api/commandtypes',
reader: {
type: 'json',
getData: function (data) {
@@ -46,6 +39,11 @@ Ext.define('Traccar.store.CommandTypes', {
});
return data;
}
+ },
+ listeners: {
+ 'exception' : function (proxy, response) {
+ Traccar.app.showError(response);
+ }
}
}
});