aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/LoginManager.js3
-rw-r--r--web/app/view/LoginController.js3
-rw-r--r--web/app/view/StateController.js2
-rw-r--r--web/app/view/UserController.js10
-rw-r--r--web/app/view/UserDialogController.js7
-rw-r--r--web/release.html4
6 files changed, 18 insertions, 11 deletions
diff --git a/web/app/LoginManager.js b/web/app/LoginManager.js
index 02e6e835b..c18d6cb44 100644
--- a/web/app/LoginManager.js
+++ b/web/app/LoginManager.js
@@ -29,9 +29,10 @@
},
onServerReturn: function (options, success, response) {
+ var result;
options = options.original;
if (Traccar.ErrorManager.check(success, response)) {
- var result = Ext.decode(response.responseText);
+ result = Ext.decode(response.responseText);
if (result.success) {
Traccar.app.setServer(result.data);
}
diff --git a/web/app/view/LoginController.js b/web/app/view/LoginController.js
index dfff6b253..141905da8 100644
--- a/web/app/view/LoginController.js
+++ b/web/app/view/LoginController.js
@@ -39,9 +39,10 @@
url: '/api/login',
params: form.getValues(),
callback: function (options, success, response) {
+ var result;
Ext.getBody().unmask();
if (Traccar.ErrorManager.check(success, response)) {
- var result = Ext.decode(response.responseText);
+ result = Ext.decode(response.responseText);
if (result.success) {
Traccar.app.setUser(result.data);
this.fireViewEvent('login');
diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js
index ad44d7ac7..9aa23de64 100644
--- a/web/app/view/StateController.js
+++ b/web/app/view/StateController.js
@@ -76,7 +76,7 @@
},
formatValue: function (value) {
- if (typeof(id) === 'number') {
+ if (typeof (id) === 'number') {
return value.toFixed(2);
} else {
return value;
diff --git a/web/app/view/UserController.js b/web/app/view/UserController.js
index d5535bce3..0a6e4f553 100644
--- a/web/app/view/UserController.js
+++ b/web/app/view/UserController.js
@@ -29,15 +29,17 @@
},
onAddClick: function () {
- var user = Ext.create('Traccar.model.User');
- var dialog = Ext.create('Traccar.view.UserDialog');
+ var user, dialog;
+ user = Ext.create('Traccar.model.User'),
+ dialog = Ext.create('Traccar.view.UserDialog');
dialog.down('form').loadRecord(user);
dialog.show();
},
onEditClick: function () {
- var user = this.getView().getSelectionModel().getSelection()[0];
- var dialog = Ext.create('Traccar.view.UserDialog');
+ var user, dialog;
+ user = this.getView().getSelectionModel().getSelection()[0];
+ dialog = Ext.create('Traccar.view.UserDialog');
dialog.down('form').loadRecord(user);
dialog.show();
},
diff --git a/web/app/view/UserDialogController.js b/web/app/view/UserDialogController.js
index 6dbd44fa7..40c88a8b4 100644
--- a/web/app/view/UserDialogController.js
+++ b/web/app/view/UserDialogController.js
@@ -27,13 +27,14 @@
},
onSaveClick: function (button) {
- var dialog = button.up('window').down('form');
+ var dialog, record, store;
+ dialog = button.up('window').down('form');
dialog.updateRecord();
- var record = dialog.getRecord();
+ record = dialog.getRecord();
if (record === Traccar.app.getUser()) {
record.save();
} else {
- var store = Ext.getStore('Users');
+ store = Ext.getStore('Users');
if (record.phantom) {
store.add(record);
}
diff --git a/web/release.html b/web/release.html
index f5ffeb97f..8acf44445 100644
--- a/web/release.html
+++ b/web/release.html
@@ -12,7 +12,9 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/theme-neptune.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.min.js"></script>
<script src="locale.js"></script>
-<script type="text/javascript">Ext.Loader.loadScript('app.min.js');</script>
+<script type="text/javascript">
+Ext.Loader.loadScript('app.min.js');
+</script>
</head>
<body>
<div class="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div>