aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/CommandDialogController.js
diff options
context:
space:
mode:
authorAlexander Menk <menk@mestrona.net>2016-12-20 08:41:59 +0100
committerAlexander Menk <menk@mestrona.net>2016-12-20 08:41:59 +0100
commitc14eda96bc3d7ebbd36f325d648087fdf4ae6572 (patch)
tree884db6f5f3f3206410ef81e60f6938a94db811c8 /web/app/view/CommandDialogController.js
parenteea8e3cde73b7fe2640c6fe187ffb4d899381a60 (diff)
downloadtrackermap-web-c14eda96bc3d7ebbd36f325d648087fdf4ae6572.tar.gz
trackermap-web-c14eda96bc3d7ebbd36f325d648087fdf4ae6572.tar.bz2
trackermap-web-c14eda96bc3d7ebbd36f325d648087fdf4ae6572.zip
#2702Implement setHearts for watch Protocol
Using this function you can display a certain amount of hearts on the watch. Nothing more, nothing less.
Diffstat (limited to 'web/app/view/CommandDialogController.js')
-rw-r--r--web/app/view/CommandDialogController.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js
index ca503613..c719b5ee 100644
--- a/web/app/view/CommandDialogController.js
+++ b/web/app/view/CommandDialogController.js
@@ -30,6 +30,8 @@ Ext.define('Traccar.view.CommandDialogController', {
selected.getValue() !== 'sendSms');
this.lookupReference('paramSetTimezone').setHidden(
selected.getValue() !== 'setTimezone');
+ this.lookupReference('paramSetHearts').setHidden(
+ selected.getValue() !== 'setHearts');
this.lookupReference('paramCustom').setHidden(
selected.getValue() !== 'custom');
},
@@ -88,6 +90,14 @@ Ext.define('Traccar.view.CommandDialogController', {
});
}
+ if (record.get('type') === 'setHearts') {
+ attributes = this.lookupReference('paramSetHearts');
+ value = attributes.down('numberfield[name="hearts"]').getValue();
+ record.set('attributes', {
+ hearts: value
+ });
+ }
+
if (record.get('type') === 'custom') {
value = this.lookupReference('paramCustom').getValue();
record.set('attributes', {