diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-15 11:51:45 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-15 11:51:45 +1200 |
commit | 5cf1061cfcc5baf214bce145961512fd4f672621 (patch) | |
tree | 32efac22ba11abddec21656685c3e0ba730b1e47 /web/app | |
parent | 34a70e81ecb613c3216fcdd581a9724216137b41 (diff) | |
download | trackermap-server-5cf1061cfcc5baf214bce145961512fd4f672621.tar.gz trackermap-server-5cf1061cfcc5baf214bce145961512fd4f672621.tar.bz2 trackermap-server-5cf1061cfcc5baf214bce145961512fd4f672621.zip |
Rename other field to attributes
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/model/Command.js | 2 | ||||
-rw-r--r-- | web/app/model/Position.js | 2 | ||||
-rw-r--r-- | web/app/view/command/CommandDialog.js | 2 | ||||
-rw-r--r-- | web/app/view/command/CommandDialogController.js | 10 | ||||
-rw-r--r-- | web/app/view/state/StateController.js | 14 |
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') || ''; |