Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/survey_client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-12-17 14:38:03 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-12-17 14:39:26 +0300
commit7e318e635258711df27fd19144c564d0deb1168a (patch)
treec5e95b206b70a2037eff5aeb54d2a75b32e50682 /js/admin.js
parent93cfd6c1a1ac35d77b9293e34b5cf58b05078724 (diff)
Deal with errors
Diffstat (limited to 'js/admin.js')
-rw-r--r--js/admin.js7
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));
}
});
});