diff options
author | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2017-04-03 14:02:59 +0300 |
---|---|---|
committer | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2017-04-03 15:04:12 +0300 |
commit | b19d022f6c4f533efa1f30270e04a47dba3cb6db (patch) | |
tree | b2f7cbc2c35c381a86030a24a6fe193e3cf8498c /js/settings.js | |
parent | 3a43c15848abfa039471a78cbc318262fc95b6a7 (diff) |
checking document service address on save (CommandRequest)
Diffstat (limited to 'js/settings.js')
-rw-r--r-- | js/settings.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/settings.js b/js/settings.js index 47c8bf1..40312b7 100644 --- a/js/settings.js +++ b/js/settings.js @@ -43,7 +43,12 @@ success: function onSuccess(response) { if (response && response.documentserver != null) { $("#docServiceUrlApi").val(response.documentserver); - var row = OC.Notification.show(t(OCA.Onlyoffice.AppName, "Settings have been successfully updated")); + + var message = + response.error + ? (t(OCA.Onlyoffice.AppName, "Error when trying to connect") + " (" + response.error + ")") + : t(OCA.Onlyoffice.AppName, "Settings have been successfully updated"); + var row = OC.Notification.show(message); setTimeout(function () { OC.Notification.hide(row); }, 3000); |