(js) Error handling when renaming a mailbox
parent
2040706432
commit
6dc2078c38
1
NEWS
1
NEWS
|
@ -14,6 +14,7 @@ Bug fixes
|
|||
- [eas] properly escape all email and address fields
|
||||
- [web] restored functionality to save unknown recipient emails to address book on send
|
||||
- [web] fixed ripple blocking the form when submitting no values (#3808)
|
||||
- [web] fixed error handling when renaming a mailbox
|
||||
- [core] strip protocol value from proxyAddresses attribute (#3182)
|
||||
|
||||
3.1.5 (2016-08-10)
|
||||
|
|
|
@ -732,10 +732,8 @@
|
|||
*/
|
||||
Mailbox.prototype.$reset = function() {
|
||||
var _this = this;
|
||||
angular.forEach(this, function(value, key) {
|
||||
if (key != 'constructor' && key != 'children' && key[0] != '$') {
|
||||
angular.forEach(this.$shadowData, function(value, key) {
|
||||
delete _this[key];
|
||||
}
|
||||
});
|
||||
angular.extend(this, this.$shadowData);
|
||||
this.$shadowData = this.$omit();
|
||||
|
@ -759,6 +757,7 @@
|
|||
Mailbox.$log.error(JSON.stringify(response.data, undefined, 2));
|
||||
// Restore previous version
|
||||
_this.$reset();
|
||||
return response.data;
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -779,7 +778,18 @@
|
|||
* @return an object literal copy of the Mailbox instance
|
||||
*/
|
||||
Mailbox.prototype.$omit = function() {
|
||||
return { name: this.name };
|
||||
var mailbox = {};
|
||||
angular.forEach(this, function(value, key) {
|
||||
if (key != 'constructor' &&
|
||||
key != 'children' &&
|
||||
key != 'headers' &&
|
||||
key != 'uids' &&
|
||||
key != 'uidsMap' &&
|
||||
key[0] != '$') {
|
||||
mailbox[key] = value;
|
||||
}
|
||||
});
|
||||
return mailbox;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue