aboutsummaryrefslogtreecommitdiff
path: root/web/app/store
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-18 11:52:06 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-18 11:52:06 +0500
commit65116928b2b7a8e5e2b70bf490b3225896cf2c71 (patch)
treeaf24b231822fb045a7ae4d03e533775285d41e47 /web/app/store
parent01af5f520e24a33d7e22523d8ed11e9f14a19516 (diff)
parentb3d3c720f34e12e7af83e6be3bd87e304931bbe1 (diff)
downloadetbsa-traccar-web-65116928b2b7a8e5e2b70bf490b3225896cf2c71.tar.gz
etbsa-traccar-web-65116928b2b7a8e5e2b70bf490b3225896cf2c71.tar.bz2
etbsa-traccar-web-65116928b2b7a8e5e2b70bf490b3225896cf2c71.zip
Merge branch 'master' into disable_vehicle_features
Diffstat (limited to 'web/app/store')
-rw-r--r--web/app/store/AllNotifications.js5
-rw-r--r--web/app/store/AllTimezones.js2
-rw-r--r--web/app/store/CommandTypes.js2
-rw-r--r--web/app/store/Notifications.js5
-rw-r--r--web/app/store/PositionAttributes.js12
5 files changed, 15 insertions, 11 deletions
diff --git a/web/app/store/AllNotifications.js b/web/app/store/AllNotifications.js
index f25aebc..61aa75a 100644
--- a/web/app/store/AllNotifications.js
+++ b/web/app/store/AllNotifications.js
@@ -27,5 +27,8 @@ Ext.define('Traccar.store.AllNotifications', {
}
},
sortOnLoad: true,
- sorters: { property: 'type', direction : 'ASC' }
+ sorters: {
+ property: 'type',
+ direction: 'ASC'
+ }
});
diff --git a/web/app/store/AllTimezones.js b/web/app/store/AllTimezones.js
index e5a861b..2a7fa37 100644
--- a/web/app/store/AllTimezones.js
+++ b/web/app/store/AllTimezones.js
@@ -21,7 +21,7 @@ Ext.define('Traccar.store.AllTimezones', {
sorters: {
property: 'key',
- direction : 'ASC'
+ direction: 'ASC'
},
data: [{
diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js
index 445f937..a14dd58 100644
--- a/web/app/store/CommandTypes.js
+++ b/web/app/store/CommandTypes.js
@@ -41,7 +41,7 @@ Ext.define('Traccar.store.CommandTypes', {
}
},
listeners: {
- 'exception' : function (proxy, response) {
+ 'exception': function (proxy, response) {
Traccar.app.showError(response);
}
}
diff --git a/web/app/store/Notifications.js b/web/app/store/Notifications.js
index d79702f..a672fd4 100644
--- a/web/app/store/Notifications.js
+++ b/web/app/store/Notifications.js
@@ -24,5 +24,8 @@ Ext.define('Traccar.store.Notifications', {
url: 'api/users/notifications'
},
sortOnLoad: true,
- sorters: { property: 'type', direction : 'ASC' }
+ sorters: {
+ property: 'type',
+ direction: 'ASC'
+ }
});
diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js
index c3d6d18..e457daf 100644
--- a/web/app/store/PositionAttributes.js
+++ b/web/app/store/PositionAttributes.js
@@ -240,14 +240,12 @@ Ext.define('Traccar.store.PositionAttributes', {
var model = this.getById(key);
if (model) {
return model.get('name');
+ } else if (capitalize) {
+ return key.replace(/^./, function (match) {
+ return match.toUpperCase();
+ });
} else {
- if (capitalize) {
- return key.replace(/^./, function (match) {
- return match.toUpperCase();
- });
- } else {
- return key;
- }
+ return key;
}
},