aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-05-23 15:23:07 +0500
committerAbyss777 <abyss@fox5.ru>2017-05-23 15:23:07 +0500
commit7f1a29d1f6606cd7d6469f769fd0e303badcd591 (patch)
tree93cc074eae61fe2b20ac2fa247ca61e2744daeaa /web/app/Application.js
parentd243caa095ece5c130250d02e4f3ae7632a9db36 (diff)
downloadetbsa-traccar-web-7f1a29d1f6606cd7d6469f769fd0e303badcd591.tar.gz
etbsa-traccar-web-7f1a29d1f6606cd7d6469f769fd0e303badcd591.tar.bz2
etbsa-traccar-web-7f1a29d1f6606cd7d6469f769fd0e303badcd591.zip
- Revert showError function
- Fix strings
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index 0125cd0..d73378c 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -164,24 +164,15 @@ Ext.define('Traccar.Application', {
}
},
- showError: function (error, success) {
- var title, general;
- if (success) {
- title = Strings.infoTitle;
- general = Strings.infoGeneral;
- } else {
- title = Strings.errorTitle;
- general = Strings.errorGeneral;
- }
-
+ showError: function (error) {
if (Ext.isString(error)) {
- Ext.Msg.alert(title, error);
+ Ext.Msg.alert(Strings.errorTitle, error);
} else if (error.responseText) {
- Ext.Msg.alert(title, general +
+ Ext.Msg.alert(Strings.errorTitle, Strings.errorGeneral +
'<br><br><textarea readonly rows="5" style="resize: none; width: 100%;">' +
error.responseText + '</textarea>');
} else if (error.statusText) {
- Ext.Msg.alert(title, error.statusText);
+ Ext.Msg.alert(Strings.errorTitle, error.statusText);
} else {
Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection);
}