From 7f1a29d1f6606cd7d6469f769fd0e303badcd591 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 23 May 2017 15:23:07 +0500 Subject: - Revert showError function - Fix strings --- web/app/view/dialog/SelectDevice.js | 2 +- web/app/view/dialog/SelectDeviceController.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'web/app/view') diff --git a/web/app/view/dialog/SelectDevice.js b/web/app/view/dialog/SelectDevice.js index 8037453e..5b11c03f 100644 --- a/web/app/view/dialog/SelectDevice.js +++ b/web/app/view/dialog/SelectDevice.js @@ -23,7 +23,7 @@ Ext.define('Traccar.view.dialog.SelectDevice', { ], controller: 'selectDevice', - title: Strings.sharedSelectDevice, + title: Strings.sharedDevice, items: { xtype: 'form', diff --git a/web/app/view/dialog/SelectDeviceController.js b/web/app/view/dialog/SelectDeviceController.js index 4336c48b..d8cd5d3a 100644 --- a/web/app/view/dialog/SelectDeviceController.js +++ b/web/app/view/dialog/SelectDeviceController.js @@ -29,7 +29,17 @@ Ext.define('Traccar.view.dialog.SelectDeviceController', { method: 'POST', jsonData: Ext.util.JSON.encode(record), callback: function (options, success, response) { - Traccar.app.showError(response, success); + if (success) { + if (response.responseText) { + Ext.Msg.alert(Strings.sharedInfoTitle, Strings.sharedInfoGeneral + + '

'); + } else if (response.statusText) { + Ext.Msg.alert(Strings.sharedInfoTitle, response.statusText); + } + } else { + Traccar.app.showError(response); + } } }); button.up('window').close(); -- cgit v1.2.3