diff options
author | Abyss777 <abyss@fox5.ru> | 2017-03-07 15:32:22 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-03-07 15:39:21 +0500 |
commit | 7db1c1cdcf617e146e927c4aadde239959a9d3de (patch) | |
tree | 6caf2497b4d217557e8f00887ec6442e2bfd0c73 /web/app/store | |
parent | 50a2616002602c379f408d5ecc404a59d317b0ca (diff) | |
download | trackermap-web-7db1c1cdcf617e146e927c4aadde239959a9d3de.tar.gz trackermap-web-7db1c1cdcf617e146e927c4aadde239959a9d3de.tar.bz2 trackermap-web-7db1c1cdcf617e146e927c4aadde239959a9d3de.zip |
Implement SMS commands
Diffstat (limited to 'web/app/store')
-rw-r--r-- | web/app/store/CommandTypes.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js index ad5faba2..445f937d 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); + } } } }); |