(js) Fix error handling when renaming a mailbox

pull/212/head
Francis Lachapelle 2016-06-02 15:34:58 -04:00
parent 8f417cb10b
commit 8395a78f6d
2 changed files with 9 additions and 11 deletions

6
NEWS
View File

@ -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)
------------------

View File

@ -726,8 +726,8 @@
_this.$shadowData = _this.$omit();
Mailbox.$log.debug(JSON.stringify(data, undefined, 2));
return data;
}, function(data) {
Mailbox.$log.error(JSON.stringify(data, undefined, 2));
}, function(response) {
Mailbox.$log.error(JSON.stringify(response.data, undefined, 2));
// Restore previous version
_this.$reset();
});
@ -750,15 +750,7 @@
* @return an object literal copy of the Mailbox instance
*/
Mailbox.prototype.$omit = function() {
var mailbox = {};
angular.forEach(this, function(value, key) {
if (key != 'constructor' &&
key != 'children' &&
key[0] != '$') {
mailbox[key] = value;
}
});
return mailbox;
return { name: this.name };
};
/**