diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-03 11:03:05 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-03 11:03:05 +1200 |
commit | a265f39cef279d84bbeee5be68c17d22896bb685 (patch) | |
tree | 0f5b1e9f6e2db005dcda388c160f63c92fef236a | |
parent | e301d477ee95c0ae7f3d06f0950368cb5d8fe226 (diff) | |
download | trackermap-server-a265f39cef279d84bbeee5be68c17d22896bb685.tar.gz trackermap-server-a265f39cef279d84bbeee5be68c17d22896bb685.tar.bz2 trackermap-server-a265f39cef279d84bbeee5be68c17d22896bb685.zip |
Rename style properties
-rw-r--r-- | web/app/Resources.js | 42 | ||||
-rw-r--r-- | web/app/view/admin/ServerDialog.js | 2 | ||||
-rw-r--r-- | web/app/view/command/CommandDialog.js | 2 | ||||
-rw-r--r-- | web/app/view/device/DeviceController.js | 4 | ||||
-rw-r--r-- | web/app/view/device/DeviceDialog.js | 2 | ||||
-rw-r--r-- | web/app/view/login/Login.js | 2 | ||||
-rw-r--r-- | web/app/view/login/Register.js | 2 | ||||
-rw-r--r-- | web/app/view/main/Main.js | 4 | ||||
-rw-r--r-- | web/app/view/map/Map.js | 8 | ||||
-rw-r--r-- | web/app/view/map/MapController.js | 16 | ||||
-rw-r--r-- | web/app/view/report/Report.js | 6 | ||||
-rw-r--r-- | web/app/view/user/UserDialog.js | 2 |
12 files changed, 46 insertions, 46 deletions
diff --git a/web/app/Resources.js b/web/app/Resources.js index 65c1e485f..e14792711 100644 --- a/web/app/Resources.js +++ b/web/app/Resources.js @@ -15,32 +15,32 @@ */ var styles = { - panel_padding: 10, + panelPadding: 10, - window_width: 640, - window_height: 480, + windowWidth: 640, + windowHeight: 480, - device_width: 350, + deviceWidth: 350, - report_height: 250, - report_time: 100, - report_format: 'Y-m-d H:i:s', + reportHeight: 250, + reportTime: 100, + reportFormat: 'Y-m-d H:i:s', - map_default_lat: -0.1275, - map_default_lon: 51.507222, - map_default_zoom: 6, + mapDefaultLat: -0.1275, + mapDefaultLon: 51.507222, + mapDefaultZoom: 6, - map_max_zoom: 16, - map_select_color: 'rgba(0, 255, 0, 1.0)', - map_select_radius: 10, - map_report_color: 'rgba(0, 0, 255, 1.0)', - map_report_radius: 5, - map_live_color: 'rgba(255, 0, 0, 1.0)', - map_live_radius: 7, - map_stroke_color: 'rgba(50, 50, 50, 1.0)', - map_route_width: 5, - map_marker_stroke: 2, - map_delay: 500 + mapMaxZoom: 16, + mapSelectColor: 'rgba(0, 255, 0, 1.0)', + mapSelectRadius: 10, + mapReportColor: 'rgba(0, 0, 255, 1.0)', + mapReportRadius: 5, + mapLiveColor: 'rgba(255, 0, 0, 1.0)', + mapLiveRadius: 7, + mapStrokeColor: 'rgba(50, 50, 50, 1.0)', + mapRouteWidth: 5, + mapMarkerStroke: 2, + mapDelay: 500 }; Ext.define('Traccar.Resources', { diff --git a/web/app/view/admin/ServerDialog.js b/web/app/view/admin/ServerDialog.js index 9357f8874..0e2dad995 100644 --- a/web/app/view/admin/ServerDialog.js +++ b/web/app/view/admin/ServerDialog.js @@ -24,7 +24,7 @@ Ext.define('Traccar.view.admin.ServerDialog', { controller: 'serverdialog', - bodyPadding: styles.panel_padding, + bodyPadding: styles.panelPadding, title: strings.serverTitle, resizable: false, modal: true, diff --git a/web/app/view/command/CommandDialog.js b/web/app/view/command/CommandDialog.js index ae88add21..8a4be93cb 100644 --- a/web/app/view/command/CommandDialog.js +++ b/web/app/view/command/CommandDialog.js @@ -24,7 +24,7 @@ Ext.define('Traccar.view.command.CommandDialog', { controller: 'commanddialog', - bodyPadding: styles.panel_padding, + bodyPadding: styles.panelPadding, title: strings.commandTitle, resizable: false, modal: true, diff --git a/web/app/view/device/DeviceController.js b/web/app/view/device/DeviceController.js index ae4abf4a7..e9cda9bbe 100644 --- a/web/app/view/device/DeviceController.js +++ b/web/app/view/device/DeviceController.js @@ -117,8 +117,8 @@ Ext.define('Traccar.view.device.DeviceController', { onUsersClick: function() { Ext.create('Ext.window.Window', { title: strings.settingsUsers, - width: styles.window_width, - height: styles.window_height, + width: styles.windowWidth, + height: styles.windowHeight, layout: 'fit', modal: true, items: { diff --git a/web/app/view/device/DeviceDialog.js b/web/app/view/device/DeviceDialog.js index b5f29782b..84a975c6a 100644 --- a/web/app/view/device/DeviceDialog.js +++ b/web/app/view/device/DeviceDialog.js @@ -24,7 +24,7 @@ Ext.define('Traccar.view.device.DeviceDialog', { controller: 'devicedialog', - bodyPadding: styles.panel_padding, + bodyPadding: styles.panelPadding, title: strings.deviceDialog, resizable: false, modal: true, diff --git a/web/app/view/login/Login.js b/web/app/view/login/Login.js index f468edaa0..bfb657b96 100644 --- a/web/app/view/login/Login.js +++ b/web/app/view/login/Login.js @@ -23,7 +23,7 @@ Ext.define('Traccar.view.login.Login', { controller: 'login', - bodyPadding: styles.panel_padding, + bodyPadding: styles.panelPadding, title: strings.loginTitle, closable: false, resizable: false, diff --git a/web/app/view/login/Register.js b/web/app/view/login/Register.js index 9be588be1..91a5775a1 100644 --- a/web/app/view/login/Register.js +++ b/web/app/view/login/Register.js @@ -23,7 +23,7 @@ Ext.define('Traccar.view.login.Register', { controller: 'register', - bodyPadding: styles.panel_padding, + bodyPadding: styles.panelPadding, title: strings.loginRegister, resizable: false, modal: true, diff --git a/web/app/view/main/Main.js b/web/app/view/main/Main.js index e7dc5f83c..75414cd41 100644 --- a/web/app/view/main/Main.js +++ b/web/app/view/main/Main.js @@ -34,7 +34,7 @@ Ext.define('Traccar.view.main.Main', { items: [{ region:'west', layout: 'border', - width: styles.device_width, + width: styles.deviceWidth, header: false, defaults: { split: true @@ -53,7 +53,7 @@ Ext.define('Traccar.view.main.Main', { region: 'south', xtype: 'report-view', header: false, - height: styles.report_height + height: styles.reportHeight }, { region: 'center', xtype: 'map-view', diff --git a/web/app/view/map/Map.js b/web/app/view/map/Map.js index 00daa774c..5702ff7b5 100644 --- a/web/app/view/map/Map.js +++ b/web/app/view/map/Map.js @@ -58,14 +58,14 @@ Ext.define('Traccar.view.map.Map', { source: this.vectorSource }); - var lat = user.get('latitude') || server.get('latitude') || styles.map_default_lat; - var lon = user.get('longitude') || server.get('longitude') || styles.map_default_lon; - var zoom = user.get('zoom') || server.get('zoom') || styles.map_default_zoom; + var lat = user.get('latitude') || server.get('latitude') || styles.mapDefaultLat; + var lon = user.get('longitude') || server.get('longitude') || styles.mapDefaultLon; + var zoom = user.get('zoom') || server.get('zoom') || styles.mapDefaultZoom; this.mapView = new ol.View({ center: ol.proj.fromLonLat([lat, lon]), zoom: zoom, - maxZoom: styles.map_max_zoom + maxZoom: styles.mapMaxZoom }); this.map = new ol.Map({ diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js index 27a42a2ce..98922a307 100644 --- a/web/app/view/map/MapController.js +++ b/web/app/view/map/MapController.js @@ -66,7 +66,7 @@ Ext.define('Traccar.view.map.MapController', { if (data[i].deviceId in this.liveData) { this.liveData[data[i].deviceId].setGeometry(geometry); } else { - var style = this.getMarkerStyle(styles.map_live_radius, styles.map_live_color); + var style = this.getMarkerStyle(styles.mapLiveRadius, styles.mapLiveColor); var marker = new ol.Feature({ geometry: geometry, originalStyle: style @@ -88,8 +88,8 @@ Ext.define('Traccar.view.map.MapController', { getLineStyle: function() { return new ol.style.Style({ stroke: new ol.style.Stroke({ - color: styles.map_stroke_color, - width: styles.map_route_width + color: styles.mapStrokeColor, + width: styles.mapRouteWidth }) }); }, @@ -116,8 +116,8 @@ Ext.define('Traccar.view.map.MapController', { color: color }), stroke: new ol.style.Stroke({ - color: styles.map_stroke_color, - width: styles.map_marker_stroke + color: styles.mapStrokeColor, + width: styles.mapMarkerStroke }) }) }); @@ -142,7 +142,7 @@ Ext.define('Traccar.view.map.MapController', { ]); positions.push(point); - var style = this.getMarkerStyle(styles.map_report_radius, styles.map_report_color); + var style = this.getMarkerStyle(styles.mapReportRadius, styles.mapReportColor); var feature = new ol.Feature({ geometry: new ol.geom.Point(positions[index]), originalStyle: style @@ -189,10 +189,10 @@ Ext.define('Traccar.view.map.MapController', { } if (feature !== undefined) { - feature.setStyle(this.getMarkerStyle(styles.map_select_radius, styles.map_select_color)); + feature.setStyle(this.getMarkerStyle(styles.mapSelectRadius, styles.mapSelectColor)); var pan = ol.animation.pan({ - duration: styles.map_delay, + duration: styles.mapDelay, source: this.getView().mapView.getCenter() }); this.getView().map.beforeRender(pan); diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index 8e6fe0397..562f13c09 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -48,7 +48,7 @@ Ext.define('Traccar.view.report.Report', { }, { xtype: 'timefield', reference: 'fromTimeField', - maxWidth: styles.report_time, + maxWidth: styles.reportTime, value: new Date() }, '-', { xtype: 'tbtext', @@ -60,7 +60,7 @@ Ext.define('Traccar.view.report.Report', { }, { xtype: 'timefield', reference: 'toTimeField', - maxWidth: styles.report_time, + maxWidth: styles.reportTime, value: new Date() }, '-', { text: strings.reportShow, @@ -76,7 +76,7 @@ Ext.define('Traccar.view.report.Report', { columns: [ { text: strings.positionValid, dataIndex: 'valid', flex: 1 }, - { text: strings.positionTime, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.report_format }, + { text: strings.positionTime, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.reportFormat }, { text: strings.positionLatitude, dataIndex: 'latitude', flex: 1 }, { text: strings.positionLongitude, dataIndex: 'longitude', flex: 1 }, { text: strings.positionAltitude, dataIndex: 'altitude', flex: 1 }, diff --git a/web/app/view/user/UserDialog.js b/web/app/view/user/UserDialog.js index ff624f9bb..5d92cf04b 100644 --- a/web/app/view/user/UserDialog.js +++ b/web/app/view/user/UserDialog.js @@ -24,7 +24,7 @@ Ext.define('Traccar.view.user.UserDialog', { controller: 'userdialog', - bodyPadding: styles.panel_padding, + bodyPadding: styles.panelPadding, title: strings.settingsUser, resizable: false, modal: true, |