Commit 1ebedc9a by Peter Fogg

Don't show update in the DOM on AJAX error.

parent d2194b22
...@@ -101,9 +101,13 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ ...@@ -101,9 +101,13 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
title: gettext('Saving') + '…' title: gettext('Saving') + '…'
}); });
saving.show(); saving.show();
var ele = this.modelDom(event);
targetModel.save({}, { targetModel.save({}, {
success: function() { success: function() {
saving.hide(); saving.hide();
},
error: function() {
ele.remove();
} }
}); });
this.closeEditor(this); this.closeEditor(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment