diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-18 14:40:45 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-18 14:40:45 +1200 |
commit | caab56810cd019482ce6055ab942dc07249f48fd (patch) | |
tree | 2bbdf4c212ef2d3a52d8199914a9ddaea0227843 /web/app/view | |
parent | b512fa18b7ff40cacce09aa5db02f9c29b3e9250 (diff) | |
download | traccar-server-caab56810cd019482ce6055ab942dc07249f48fd.tar.gz traccar-server-caab56810cd019482ce6055ab942dc07249f48fd.tar.bz2 traccar-server-caab56810cd019482ce6055ab942dc07249f48fd.zip |
Add report panel toolbar
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/device/Device.js | 3 | ||||
-rw-r--r-- | web/app/view/report/Report.js | 47 | ||||
-rw-r--r-- | web/app/view/report/ReportController.js | 24 |
3 files changed, 69 insertions, 5 deletions
diff --git a/web/app/view/device/Device.js b/web/app/view/device/Device.js index 4dfa13c44..64f53eeb2 100644 --- a/web/app/view/device/Device.js +++ b/web/app/view/device/Device.js @@ -23,6 +23,7 @@ Ext.define('Traccar.view.device.Device', { ], controller: 'device', + store: 'Devices', title: strings.device_title, selType: 'rowmodel', @@ -50,8 +51,6 @@ Ext.define('Traccar.view.device.Device', { handler: 'onLogoutClick' }], - store: 'Devices', - listeners: { selectionchange: 'onSelectionChange' }, diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index 29fa6248a..d39513873 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -18,15 +18,56 @@ Ext.define('Traccar.view.report.Report', { extend: 'Ext.grid.Panel', xtype: 'report-view', + requires: [ + 'Traccar.view.report.ReportController' + ], + + controller: 'report', + store: 'Positions', + title: strings.report_title, tbar: [{ - text:'Do Something' + xtype: 'tbtext', + html: strings.report_device + }, { + xtype: 'combobox', + store: 'Devices', + valueField: 'id', + displayField: 'name', + typeAhead: true, + queryMode: 'local' + }, '-', { + xtype: 'tbtext', + html: strings.report_from + }, { + xtype: 'datefield' + }, { + xtype: 'timefield', + maxWidth: styles.report_time + }, '-', { + xtype: 'tbtext', + html: strings.report_to + }, { + xtype: 'datefield' + }, { + xtype: 'timefield', + maxWidth: styles.report_time + }, '-', { + text: strings.report_show + }, { + text: strings.report_clear }], columns: [ - { text: "Column1", dataIndex: 'c1', flex: 1 }, - { text: "Column2", dataIndex: 'c2', flex: 1 } + { text: strings.report_time, dataIndex: 'fixTime', flex: 1 }, + { text: strings.report_valid, dataIndex: 'valid', flex: 1 }, + { text: strings.report_latitude, dataIndex: 'latitude', flex: 1 }, + { text: strings.report_longitude, dataIndex: 'longitude', flex: 1 }, + { text: strings.report_altitude, dataIndex: 'altitude', flex: 1 }, + { text: strings.report_speed, dataIndex: 'speed', flex: 1 }, + { text: strings.report_course, dataIndex: 'course', flex: 1 }, + { text: strings.report_address, dataIndex: 'address', flex: 1 } ] }); diff --git a/web/app/view/report/ReportController.js b/web/app/view/report/ReportController.js new file mode 100644 index 000000000..92fd1ba7e --- /dev/null +++ b/web/app/view/report/ReportController.js @@ -0,0 +1,24 @@ +/* + * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +Ext.define('Traccar.view.report.ReportController', { + extend: 'Ext.app.ViewController', + alias: 'controller.report', + + onSelectionChange: function(selected) { + } + +}); |