Commit b810cf1d authored by webchick's avatar webchick

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

parent cf59aaf8
......@@ -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).
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment