aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-04-19 16:52:03 +0500
committerAbyss777 <abyss@fox5.ru>2018-04-19 16:52:03 +0500
commit1a9f482a6a3234e443e2e8d6aff6f09daab85dfe (patch)
tree1e86d6f1be7d73279bd804362ae46c602c345da5 /web/app/view/edit
parent19a9155d988dcee7698a65a45b0558aa0ff279d4 (diff)
downloadtrackermap-web-1a9f482a6a3234e443e2e8d6aff6f09daab85dfe.tar.gz
trackermap-web-1a9f482a6a3234e443e2e8d6aff6f09daab85dfe.tar.bz2
trackermap-web-1a9f482a6a3234e443e2e8d6aff6f09daab85dfe.zip
- Removed code duplication
- Simplified attribute name renderer - Removed unnecessary proxy
Diffstat (limited to 'web/app/view/edit')
-rw-r--r--web/app/view/edit/Attributes.js2
-rw-r--r--web/app/view/edit/Maintenances.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/app/view/edit/Attributes.js b/web/app/view/edit/Attributes.js
index cb0503de..af4f5a90 100644
--- a/web/app/view/edit/Attributes.js
+++ b/web/app/view/edit/Attributes.js
@@ -48,7 +48,7 @@ Ext.define('Traccar.view.edit.Attributes', {
if (this.attributesStore) {
attribute = Ext.getStore(this.attributesStore).getById(value);
}
- return attribute && attribute.get('name') ? attribute.get('name') : value;
+ return attribute && attribute.get('name') || value;
}
}, {
text: Strings.stateValue,
diff --git a/web/app/view/edit/Maintenances.js b/web/app/view/edit/Maintenances.js
index f7b47620..da129154 100644
--- a/web/app/view/edit/Maintenances.js
+++ b/web/app/view/edit/Maintenances.js
@@ -56,7 +56,7 @@ Ext.define('Traccar.view.edit.Maintenances', {
},
renderer: function (value) {
var attribute = Ext.getStore('MaintenanceTypes').getById(value);
- return attribute && attribute.get('name') ? attribute.get('name') : value;
+ return attribute && attribute.get('name') || value;
}
}, {
text: Strings.maintenanceStart,