aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'web/app')
-rw-r--r--web/app/view/dialog/ComputedAttribute.js7
-rw-r--r--web/app/view/dialog/Server.js7
-rw-r--r--web/app/view/map/BaseMap.js3
3 files changed, 15 insertions, 2 deletions
diff --git a/web/app/view/dialog/ComputedAttribute.js b/web/app/view/dialog/ComputedAttribute.js
index ef6269b..22cfb82 100644
--- a/web/app/view/dialog/ComputedAttribute.js
+++ b/web/app/view/dialog/ComputedAttribute.js
@@ -28,6 +28,12 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', {
items: {
xtype: 'form',
+ listeners: {
+ afterrender: function (view) {
+ var field = view.up('panel').lookupReference('expressionField');
+ field.setValue(Ext.String.htmlDecode(field.getValue()));
+ }
+ },
items: [{
xtype: 'textfield',
name: 'description',
@@ -44,6 +50,7 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', {
}
}, {
xtype: 'textareafield',
+ reference: 'expressionField',
name: 'expression',
fieldLabel: Strings.sharedExpression,
allowBlank: false
diff --git a/web/app/view/dialog/Server.js b/web/app/view/dialog/Server.js
index fbfb3c6..8ff8399 100644
--- a/web/app/view/dialog/Server.js
+++ b/web/app/view/dialog/Server.js
@@ -28,6 +28,12 @@ Ext.define('Traccar.view.dialog.Server', {
items: {
xtype: 'form',
+ listeners: {
+ afterrender: function (view) {
+ var field = view.up('panel').lookupReference('mapUrlField');
+ field.setValue(Ext.String.htmlDecode(field.getValue()));
+ }
+ },
items: [{
xtype: 'fieldset',
title: Strings.sharedPreferences,
@@ -44,6 +50,7 @@ Ext.define('Traccar.view.dialog.Server', {
fieldLabel: Strings.mapBingKey
}, {
xtype: 'textfield',
+ reference: 'mapUrlField',
name: 'mapUrl',
fieldLabel: Strings.mapCustom
}, {
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index 26b9f7c..67e08f6 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -41,8 +41,7 @@ Ext.define('Traccar.view.map.BaseMap', {
case 'custom':
layer = new ol.layer.Tile({
source: new ol.source.XYZ({
- url: new DOMParser()
- .parseFromString(server.get('mapUrl'), 'text/html').documentElement.textContent,
+ url: Ext.String.htmlDecode(server.get('mapUrl')),
attributions: ''
})
});