1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-10 21:24:33 +01:00

Catch-all ajax errors.

This commit is contained in:
Thomas Tanghus 2012-10-25 23:15:47 +02:00
parent 66b2d0c42a
commit 62ebef32cc

View File

@ -410,6 +410,12 @@ GroupList.prototype.loadGroups = function(numcontacts, cb) {
OC.Contacts = OC.Contacts || { OC.Contacts = OC.Contacts || {
init:function(id) { init:function(id) {
$(document).ajaxError(function(e, xhr, settings, exception) {
// Don't try to get translation because it's likely a network error.
OC.notify({
message: 'error in: ' + settings.url + ', '+'error: ' + xhr.responseText,
});
});
if(id) { if(id) {
this.currentid = parseInt(id); this.currentid = parseInt(id);
console.log('init, id:', id); console.log('init, id:', id);