mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Fix #1600 Can not save a deleted field in admin field app
This commit is contained in:
@@ -195,7 +195,8 @@ define([
|
|||||||
AdminFieldApp.fieldsToDelete.push(self.model);
|
AdminFieldApp.fieldsToDelete.push(self.model);
|
||||||
AdminFieldApp.fieldListView.collection.remove(self.model);
|
AdminFieldApp.fieldListView.collection.remove(self.model);
|
||||||
self._selectModelView(index);
|
self._selectModelView(index);
|
||||||
AdminFieldApp.saveView.updateStateButton();
|
// Enable state button, models is out of sync
|
||||||
|
AdminFieldApp.saveView.updateStateButton(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@@ -84,8 +84,9 @@ define([
|
|||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
updateStateButton: function () {
|
updateStateButton: function (disable) {
|
||||||
this._disableSaveButton(!this._isModelDesync());
|
var toDisable = disable || !this._isModelDesync();
|
||||||
|
this._disableSaveButton(toDisable);
|
||||||
},
|
},
|
||||||
// check whether model has changed or not
|
// check whether model has changed or not
|
||||||
_isModelDesync: function () {
|
_isModelDesync: function () {
|
||||||
|
Reference in New Issue
Block a user