From c83cd82f605e93d17666ce5fd165552e56e21a31 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 16 Sep 2015 19:45:57 +1200 Subject: Add attribute formatter class --- web/app/view/report/Report.js | 10 +++++----- web/app/view/state/StateController.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'web/app/view') diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index 67547e536..25f3b244a 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -87,27 +87,27 @@ Ext.define('Traccar.view.report.Report', { dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', - //renderer: Traccar.app.getRenderer() + renderer: Traccar.AttributeFormatter.getFormatter('fixTime') }, { text: strings.positionLatitude, dataIndex: 'latitude', flex: 1, - //renderer: Traccar.app.getRenderer('latitude') + renderer: Traccar.AttributeFormatter.getFormatter('latitude') }, { text: strings.positionLongitude, dataIndex: 'longitude', flex: 1, - //renderer: Traccar.app.getRenderer('latitude') + renderer: Traccar.AttributeFormatter.getFormatter('latitude') }, { text: strings.positionAltitude, dataIndex: 'altitude', flex: 1, - //renderer: Traccar.app.getRenderer('altitude') + renderer: Traccar.AttributeFormatter.getFormatter('altitude') }, { text: strings.positionSpeed, dataIndex: 'speed', flex: 1, - //renderer: Traccar.app.getRenderer('speed') + renderer: Traccar.AttributeFormatter.getFormatter('speed') }, { text: strings.positionAddress, dataIndex: 'address', diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js index 91fa7714f..9019d996e 100644 --- a/web/app/view/state/StateController.js +++ b/web/app/view/state/StateController.js @@ -94,7 +94,7 @@ Ext.define('Traccar.view.state.StateController', { store.add(Ext.create('Traccar.model.Attribute', { priority: this.keys[key].priority, name: this.keys[key].name, - value: Traccar.getApplication().getRenderer(key)(position.get(key)) + value: Traccar.AttributeFormatter.getFormatter(key)(position.get(key)) })); } } @@ -112,7 +112,7 @@ Ext.define('Traccar.view.state.StateController', { name: key.replace(/^./, function (match) { return match.toUpperCase(); }), - value: Traccar.getApplication().getRenderer(key)(attributes[key]) + value: Traccar.AttributeFormatter.getFormatter(key)(attributes[key]) })); } } -- cgit v1.2.3