From 49c0907a74cb1dc7dd0351dfbb1c16e7822e696f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 30 Apr 2015 17:02:31 +1200 Subject: Add dummy report panel --- web/DeviceView.js | 2 +- web/MainView.js | 8 +++++++- web/ReportView.js | 31 +++++++++++++++++++++++++++++++ web/Strings.js | 3 +++ web/Styles.js | 2 ++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 web/ReportView.js diff --git a/web/DeviceView.js b/web/DeviceView.js index 06cec7779..c64a6031f 100644 --- a/web/DeviceView.js +++ b/web/DeviceView.js @@ -78,7 +78,7 @@ Ext.define('DeviceView', { }, columns: [ - { text: Strings.device_name, dataIndex: 'name', flex: 1 }, + { text: Strings.device_name, dataIndex: 'name', flex: 1 }, { text: Strings.device_identifier, dataIndex: 'uniqueId', flex: 1 } ] }); diff --git a/web/MainView.js b/web/MainView.js index e736b82b8..f6c9a5842 100644 --- a/web/MainView.js +++ b/web/MainView.js @@ -19,7 +19,8 @@ Ext.define('MainView', { requires: [ 'DeviceView', - 'MapView' + 'MapView', + 'ReportView' ], layout: 'border', @@ -33,6 +34,11 @@ Ext.define('MainView', { region:'west', xtype: 'device-view', width: Styles.device_width + }, { + region: 'south', + xtype: 'report-view', + header: false, + height: Styles.report_height }, { region: 'center', xtype: 'map-view', diff --git a/web/ReportView.js b/web/ReportView.js new file mode 100644 index 000000000..fbaedf175 --- /dev/null +++ b/web/ReportView.js @@ -0,0 +1,31 @@ +/* + * 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('ReportView', { + extend: 'Ext.grid.Panel', + xtype: 'report-view', + + title: Strings.report_title, + + tbar: [{ + text:'Do Something' + }], + + columns: [ + { text: "Column1", dataIndex: 'c1', flex: 1 }, + { text: "Column2", dataIndex: 'c2', flex: 1 } + ] +}); diff --git a/web/Strings.js b/web/Strings.js index fcf86ef65..b46c162a9 100644 --- a/web/Strings.js +++ b/web/Strings.js @@ -28,5 +28,8 @@ Ext.define('Strings', { device_name: 'Name', device_identifier: 'Identifier', + report_title: 'Reports', + + map_title: 'Map' }); diff --git a/web/Styles.js b/web/Styles.js index 5cf05adf1..bbfd099c6 100644 --- a/web/Styles.js +++ b/web/Styles.js @@ -21,6 +21,8 @@ Ext.define('Styles', { device_width: 350, + report_height: 250, + map_center: [ -0.1275, 51.507222 ], map_zoom: 6, map_max_zoom: 16 -- cgit v1.2.3