aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
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 0125cd0f..d73378c5 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);
}