- .fail(function () {
- var data = $el.data();
- console.error(_.str.sprintf('Could not save %s(%d).%s', data.oeModel, data.oeId, data.oeField));
+ .then(undefined, function (thing, response) {
+ // because ckeditor regenerates all the dom,
+ // we can't just setup the popover here as
+ // everything will be destroyed by the DOM
+ // regeneration. Add markings instead, and
+ // returns a new rejection with all relevant
+ // info
+ var id = _.uniqueId('carlos_danger_');
+ $el.addClass('oe_dirty oe_carlos_danger');
+ $el.addClass(id);
+ return $.Deferred().reject({
+ id: id,
+ error: response.data,
+ });