diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-17 14:38:03 +0300 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-17 14:39:26 +0300 |
commit | 7e318e635258711df27fd19144c564d0deb1168a (patch) | |
tree | c5e95b206b70a2037eff5aeb54d2a75b32e50682 /js/admin.js | |
parent | 93cfd6c1a1ac35d77b9293e34b5cf58b05078724 (diff) |
Deal with errors
Diffstat (limited to 'js/admin.js')
-rw-r--r-- | js/admin.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/admin.js b/js/admin.js index 10a7862..e60e103 100644 --- a/js/admin.js +++ b/js/admin.js @@ -19,6 +19,13 @@ $(document).ready(function() { $button.attr('disabled', false); $section.find('.last_report').text(JSON.stringify(response.ocs.data, undefined, 4)); + }, + error: function(xhr) { + $button.attr('disabled', false); + OC.Notification.showTemporary(t('popularitycontestclient', 'An error occurred while sending your report.')); + + var response = xhr.responseJSON; + $section.find('.last_report').text(JSON.stringify(response.ocs.data, undefined, 4)); } }); }); |