(js) Fix error handling when renaming a mailbox
parent
8f417cb10b
commit
8395a78f6d
6
NEWS
6
NEWS
|
@ -1,3 +1,9 @@
|
||||||
|
3.1.2 (2016-MM-DD)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Bug fixes
|
||||||
|
- [web] fixed error handling when renaming a mailbox
|
||||||
|
|
||||||
3.1.1 (2016-06-02)
|
3.1.1 (2016-06-02)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -726,8 +726,8 @@
|
||||||
_this.$shadowData = _this.$omit();
|
_this.$shadowData = _this.$omit();
|
||||||
Mailbox.$log.debug(JSON.stringify(data, undefined, 2));
|
Mailbox.$log.debug(JSON.stringify(data, undefined, 2));
|
||||||
return data;
|
return data;
|
||||||
}, function(data) {
|
}, function(response) {
|
||||||
Mailbox.$log.error(JSON.stringify(data, undefined, 2));
|
Mailbox.$log.error(JSON.stringify(response.data, undefined, 2));
|
||||||
// Restore previous version
|
// Restore previous version
|
||||||
_this.$reset();
|
_this.$reset();
|
||||||
});
|
});
|
||||||
|
@ -750,15 +750,7 @@
|
||||||
* @return an object literal copy of the Mailbox instance
|
* @return an object literal copy of the Mailbox instance
|
||||||
*/
|
*/
|
||||||
Mailbox.prototype.$omit = function() {
|
Mailbox.prototype.$omit = function() {
|
||||||
var mailbox = {};
|
return { name: this.name };
|
||||||
angular.forEach(this, function(value, key) {
|
|
||||||
if (key != 'constructor' &&
|
|
||||||
key != 'children' &&
|
|
||||||
key[0] != '$') {
|
|
||||||
mailbox[key] = value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return mailbox;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue