diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-12 17:39:43 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-13 13:51:35 +0500 |
commit | a5d36c62facad98c409b9fcd4f8b92c3d47601ab (patch) | |
tree | 368a2ed169c1457a1cc2dd69a811f2dccc59ce04 /web/app/model | |
parent | 31a6fed66b4f077d2b6443fdd34229befe8777c3 (diff) | |
download | trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.tar.gz trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.tar.bz2 trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.zip |
Implement Saved Commands
Diffstat (limited to 'web/app/model')
-rw-r--r-- | web/app/model/Command.js | 14 | ||||
-rw-r--r-- | web/app/model/Server.js | 3 | ||||
-rw-r--r-- | web/app/model/User.js | 3 |
3 files changed, 20 insertions, 0 deletions
diff --git a/web/app/model/Command.js b/web/app/model/Command.js index 789c3647..aa3dad14 100644 --- a/web/app/model/Command.js +++ b/web/app/model/Command.js @@ -20,12 +20,26 @@ Ext.define('Traccar.model.Command', { identifier: 'negative', fields: [{ + name: 'id', + type: 'int' + }, { + name: 'description', + type: 'string' + }, { name: 'deviceId', type: 'int' }, { name: 'type', type: 'string' }, { + name: 'name', + convert: function (v, rec) { + var name = Strings['command' + rec.get('type').charAt(0).toUpperCase() + rec.get('type').slice(1)]; + return name ? name : rec.get('type'); + }, + depends: ['type'], + persist: false + }, { name: 'textChannel', type: 'boolean' }, { diff --git a/web/app/model/Server.js b/web/app/model/Server.js index b8a88756..da1618bf 100644 --- a/web/app/model/Server.js +++ b/web/app/model/Server.js @@ -32,6 +32,9 @@ Ext.define('Traccar.model.Server', { name: 'deviceReadonly', type: 'boolean' }, { + name: 'limitCommands', + type: 'boolean' + }, { name: 'map', type: 'string' }, { diff --git a/web/app/model/User.js b/web/app/model/User.js index c47a8d16..e8771b9b 100644 --- a/web/app/model/User.js +++ b/web/app/model/User.js @@ -75,6 +75,9 @@ Ext.define('Traccar.model.User', { name: 'deviceReadonly', type: 'boolean' }, { + name: 'limitCommands', + type: 'boolean' + }, { name: 'token', type: 'string' }, { |