aboutsummaryrefslogtreecommitdiff
path: root/web/app/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 11:22:48 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 11:22:48 +1200
commit3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e (patch)
tree74f6b995121b615fe39f3d7a23864c37a8db89a8 /web/app/store
parent1e10dfb3c9f93998c6060297b8458f2a3c3df485 (diff)
downloadtrackermap-web-3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e.tar.gz
trackermap-web-3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e.tar.bz2
trackermap-web-3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e.zip
Fix various style issues
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 f25aebc4..61aa75ab 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 e5a861b6..2a7fa371 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 445f937d..a14dd58e 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 d79702fc..a672fd43 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 c3d6d180..e457dafc 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;
}
},