aboutsummaryrefslogtreecommitdiff
path: root/web/app/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-08 19:21:24 +1300
committerGitHub <noreply@github.com>2017-03-08 19:21:24 +1300
commit2e76f6cb4487a1efd3fbe168e6168f9ed5c2df47 (patch)
treee8649620a02d050b1c2e907212ae2a0ef2cfd041 /web/app/store
parent50a2616002602c379f408d5ecc404a59d317b0ca (diff)
parentf30f6961890371e026cd548874a31292e2de3c21 (diff)
downloadetbsa-traccar-web-2e76f6cb4487a1efd3fbe168e6168f9ed5c2df47.tar.gz
etbsa-traccar-web-2e76f6cb4487a1efd3fbe168e6168f9ed5c2df47.tar.bz2
etbsa-traccar-web-2e76f6cb4487a1efd3fbe168e6168f9ed5c2df47.zip
Merge pull request #422 from Abyss777/sms_commands
Implement SMS commands
Diffstat (limited to 'web/app/store')
-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);
+ }
}
}
});