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

This commit is contained in:
Peter Fogg
2013-08-01 17:17:36 -04:00
parent d2194b2211
commit 1ebedc9a4b

View File

@@ -101,9 +101,13 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
title: gettext('Saving') + '…'
});
saving.show();
var ele = this.modelDom(event);
targetModel.save({}, {
success: function() {
saving.hide();
},
error: function() {
ele.remove();
}
});
this.closeEditor(this);