aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/model/Command.js2
-rw-r--r--web/app/model/Position.js2
-rw-r--r--web/app/view/command/CommandDialog.js2
-rw-r--r--web/app/view/command/CommandDialogController.js10
-rw-r--r--web/app/view/state/StateController.js14
5 files changed, 15 insertions, 15 deletions
diff --git a/web/app/model/Command.js b/web/app/model/Command.js
index 45e0a6b96..3e848b57d 100644
--- a/web/app/model/Command.js
+++ b/web/app/model/Command.js
@@ -25,6 +25,6 @@ Ext.define('Traccar.model.Command', {
name: 'type',
type: 'string'
}, {
- name: 'other'
+ name: 'attributes'
}]
});
diff --git a/web/app/model/Position.js b/web/app/model/Position.js
index f070eb710..365b06115 100644
--- a/web/app/model/Position.js
+++ b/web/app/model/Position.js
@@ -58,6 +58,6 @@ Ext.define('Traccar.model.Position', {
name: 'address',
type: 'string'
}, {
- name: 'other'
+ name: 'attributes'
}]
});
diff --git a/web/app/view/command/CommandDialog.js b/web/app/view/command/CommandDialog.js
index dbde458e3..e862b9076 100644
--- a/web/app/view/command/CommandDialog.js
+++ b/web/app/view/command/CommandDialog.js
@@ -43,7 +43,7 @@ Ext.define('Traccar.view.command.CommandDialog', {
}, {
xtype: 'fieldcontainer',
reference: 'paramPositionPeriodic',
- name: 'other',
+ name: 'attributes',
hidden: true,
items: [{
diff --git a/web/app/view/command/CommandDialogController.js b/web/app/view/command/CommandDialogController.js
index 84ab8ede5..6dfb322f5 100644
--- a/web/app/view/command/CommandDialogController.js
+++ b/web/app/view/command/CommandDialogController.js
@@ -24,17 +24,17 @@ Ext.define('Traccar.view.command.CommandDialogController', {
},
onSendClick: function(button) {
- var other;
+ var attributes;
var form = button.up('window').down('form');
form.updateRecord();
var record = form.getRecord();
if (record.get('type') === 'positionPeriodic') {
- other = this.lookupReference('paramPositionPeriodic');
- var value = other.down('numberfield[name="frequency"]').getValue();
- value *= other.down('combobox[name="unit"]').getValue();
+ attributes = this.lookupReference('paramPositionPeriodic');
+ var value = attributes.down('numberfield[name="frequency"]').getValue();
+ value *= attributes.down('combobox[name="unit"]').getValue();
- record.set('other', {
+ record.set('attributes', {
frequency: value
});
}
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 8141b93a3..36978c3d0 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -83,7 +83,7 @@ Ext.define('Traccar.view.state.StateController', {
updatePosition: function(position) {
- var other;
+ var attributes;
var value;
var unit;
var store = Ext.getStore('Attributes');
@@ -108,16 +108,16 @@ Ext.define('Traccar.view.state.StateController', {
}
}
- var xml = position.get('other');
+ var xml = position.get('attributes');
if (typeof xml === 'string' || xml instanceof String) {
- other = this.parseXml(xml);
+ attributes = this.parseXml(xml);
} else {
- other = xml;
+ attributes = xml;
}
- for (var key in other) {
- if (other.hasOwnProperty(key)) {
+ for (var key in attributes) {
+ if (attributes.hasOwnProperty(key)) {
- value = other[key];
+ value = attributes[key];
if (key === 'distance' || key === 'odometer') {
var distanceUnits = Ext.getStore('DistanceUnits');
unit = Traccar.getApplication().getUser().get('distanceUnit') || Traccar.getApplication().getServer().get('distanceUnit') || '';