mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-02 14:24:10 +01:00
Catch-all ajax errors.
This commit is contained in:
parent
66b2d0c42a
commit
62ebef32cc
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user