core/modules/edit/js/models/EntityModel.js | 8 -------- core/modules/edit/js/views/AppView.js | 5 ++--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/core/modules/edit/js/models/EntityModel.js b/core/modules/edit/js/models/EntityModel.js index 52b4d22..294e89c 100644 --- a/core/modules/edit/js/models/EntityModel.js +++ b/core/modules/edit/js/models/EntityModel.js @@ -39,14 +39,6 @@ Drupal.edit.EntityModel = Backbone.Model.extend({ initialize: function () { this.set('fields', new Drupal.edit.FieldCollection()); - // Instantiate configuration for state handling. - // @see Drupal.edit.FieldModel.states - // @todo, these shouldn't be defined here. currently the position method - // is using them to find an active field. The FieldCollection should have a - // method that returns this. - this.activeEditorStates = ['activating', 'active', 'changed']; - this.singleEditorStates = _.union(['highlighted'], this.activeEditorStates); - // Respond to field view changes. this.on('viewChanged', this.viewChange, this); diff --git a/core/modules/edit/js/views/AppView.js b/core/modules/edit/js/views/AppView.js index 92ee704..61dd2e7 100644 --- a/core/modules/edit/js/views/AppView.js +++ b/core/modules/edit/js/views/AppView.js @@ -196,7 +196,6 @@ Drupal.edit.AppView = Backbone.View.extend({ */ setupEditor: function (fieldModel) { // Get the corresponding entity toolbar. - var editID = fieldModel.get('editID'); var entityModel = fieldModel.get('entity'); var entityToolbar = entityModel.get('entityToolbar'); // Get the field toolbar DOM root from the entity toolbar. @@ -453,7 +452,7 @@ Drupal.edit.AppView = Backbone.View.extend({ if (activeEditor.get('state') === 'changed') { // Save a reference to the changed field so it can be marked as // as changed until the tempStore is pushed to permanent storage. - this.changedFieldsInTempstore.push(activeEditor.get('editID')); + this.changedFieldsInTempstore.push(activeEditor.id); // Attempt to save the field. activeEditor.set({'state': 'saving'}, { // This callback will be invoked if the activeEditor field is @@ -538,7 +537,7 @@ Drupal.edit.AppView = Backbone.View.extend({ // Drupal.edit.app.AppView.prototype.save() method is called. for (var i = 0, fields = this.changedFieldsInTempstore; i < fields.length; i++) { var changedFieldModel = fields[i]; - if (changedFieldModel === fieldModel.get('editID')) { + if (changedFieldModel === fieldModel.id) { var $field = $(fieldModel.get('el')); if ($field.is('.edit-editable')) { $field.addClass('edit-changed');