Skip to content
Snippets Groups Projects
Commit b810cf1d authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2133871 by Wim Leers: Remove dead code from Edit: Drupal.edit.AppView.enableEditor.

parent cf59aaf8
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -412,36 +412,6 @@ Drupal.edit.AppView = Backbone.View.extend({
}
},
/**
*
*/
enableEditor: function (fieldModel) {
// check if there's an active editor.
var activeEditor = this.model.get('activeEditor');
// Do nothing if the fieldModel is already the active editor.
if (fieldModel === activeEditor) {
return;
}
if (activeEditor) {
// If there is, check if the model is changed.
if (activeEditor.get('state') === 'changed') {
// Attempt to save the field.
activeEditor.set('state', 'saving');
}
// else, set it to a candidate.
else {
activeEditor.set('state', 'candidate');
// Set the new fieldModel to activating.
fieldModel.set('state', 'activating');
}
}
else {
// Set the new fieldModel to activating.
fieldModel.set('state', 'activating');
}
},
/**
* Render an updated field (a field whose 'html' attribute changed).
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment