mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
Fix #1267 List is not renumbered after delete & Fix #1264 Can not add field, if there is no field in database
This commit is contained in:
@@ -183,23 +183,10 @@ define([
|
||||
|
||||
modalView.render();
|
||||
modalView.on("modal:confirm", function() {
|
||||
self.model.destroy({
|
||||
success: function(model, response) {
|
||||
AdminFieldApp.fieldListView.collection.remove(self.model);
|
||||
self._selectModelView(index);
|
||||
|
||||
new AlertView({alert: "info", message: i18n.t("deleted_success", {
|
||||
postProcess: "sprintf",
|
||||
sprintf: [model.get("name")]
|
||||
})
|
||||
}).render();
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
new AlertView({
|
||||
alert: "error", message: '' !== xhr.responseText ? xhr.responseText : i18n.t("something_wrong")
|
||||
}).render();
|
||||
}
|
||||
});
|
||||
AdminFieldApp.fieldsToDelete.push(self.model);
|
||||
AdminFieldApp.fieldListView.collection.remove(self.model);
|
||||
self._selectModelView(index);
|
||||
AdminFieldApp.saveView.updateStateButton();
|
||||
});
|
||||
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user