aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-05-23 14:45:18 +0500
committerAbyss777 <abyss@fox5.ru>2017-05-23 14:45:18 +0500
commitd243caa095ece5c130250d02e4f3ae7632a9db36 (patch)
tree3d71c15b5780b3f80c2ba135b7a8426ddb952bd7 /web/app/Application.js
parentf4b6d4d46dd8378c2d50d82a6a6c2293fcb796ec (diff)
downloadtrackermap-web-d243caa095ece5c130250d02e4f3ae7632a9db36.tar.gz
trackermap-web-d243caa095ece5c130250d02e4f3ae7632a9db36.tar.bz2
trackermap-web-d243caa095ece5c130250d02e4f3ae7632a9db36.zip
Implement testing computedAttribute
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index d73378c5..0125cd0f 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -164,15 +164,24 @@ Ext.define('Traccar.Application', {
}
},
- showError: function (error) {
+ showError: function (error, success) {
+ var title, general;
+ if (success) {
+ title = Strings.infoTitle;
+ general = Strings.infoGeneral;
+ } else {
+ title = Strings.errorTitle;
+ general = Strings.errorGeneral;
+ }
+
if (Ext.isString(error)) {
- Ext.Msg.alert(Strings.errorTitle, error);
+ Ext.Msg.alert(title, error);
} else if (error.responseText) {
- Ext.Msg.alert(Strings.errorTitle, Strings.errorGeneral +
+ Ext.Msg.alert(title, general +
'<br><br><textarea readonly rows="5" style="resize: none; width: 100%;">' +
error.responseText + '</textarea>');
} else if (error.statusText) {
- Ext.Msg.alert(Strings.errorTitle, error.statusText);
+ Ext.Msg.alert(title, error.statusText);
} else {
Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection);
}