aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/view/device/Device.js20
-rw-r--r--web/app/view/device/DeviceController.js6
2 files changed, 22 insertions, 4 deletions
diff --git a/web/app/view/device/Device.js b/web/app/view/device/Device.js
index 0f8cb876e..ef225ff31 100644
--- a/web/app/view/device/Device.js
+++ b/web/app/view/device/Device.js
@@ -29,20 +29,32 @@ Ext.define('Traccar.view.device.Device', {
selType: 'rowmodel',
tbar: [{
- text: strings.shared_add,
handler: 'onAddClick',
reference: 'deviceAddButton',
- glyph: 'xf067@FontAwesome'
+ glyph: 'xf067@FontAwesome',
+ tooltip: strings.shared_add,
+ tooltipType: 'title'
}, {
disabled: true,
handler: 'onEditClick',
reference: 'deviceEditButton',
- glyph: 'xf040@FontAwesome'
+ glyph: 'xf040@FontAwesome',
+ tooltip: strings.shared_edit,
+ tooltipType: 'title'
}, {
disabled: true,
handler: 'onRemoveClick',
reference: 'deviceRemoveButton',
- glyph: 'xf00d@FontAwesome'
+ glyph: 'xf00d@FontAwesome',
+ tooltip: strings.shared_remove,
+ tooltipType: 'title'
+ }, {
+ disabled: true,
+ handler: 'onCommandClick',
+ reference: 'deviceCommandButton',
+ glyph: 'xf093@FontAwesome',
+ tooltip: strings.device_command,
+ tooltipType: 'title'
}, {
xtype: 'tbfill'
}, {
diff --git a/web/app/view/device/DeviceController.js b/web/app/view/device/DeviceController.js
index c85ac731a..794e0f03d 100644
--- a/web/app/view/device/DeviceController.js
+++ b/web/app/view/device/DeviceController.js
@@ -79,11 +79,17 @@ Ext.define('Traccar.view.device.DeviceController', {
}
});
},
+
+ onCommandClick: function() {
+ var device = this.getView().getSelectionModel().getSelection()[0];
+ console.log('send command here');
+ },
onSelectionChange: function(selected) {
var empty = selected.getCount() === 0;
this.lookupReference('deviceEditButton').setDisabled(empty);
this.lookupReference('deviceRemoveButton').setDisabled(empty);
+ this.lookupReference('deviceCommandButton').setDisabled(empty);
if (!empty) {
this.fireEvent("selectDevice", selected.getLastSelected());
}