From b810cf1dbd0c5b67ea12815195e846bba1984392 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Wed, 13 Nov 2013 07:24:27 -0800 Subject: [PATCH] Issue #2133871 by Wim Leers: Remove dead code from Edit: Drupal.edit.AppView.enableEditor. --- core/modules/edit/js/views/AppView.js | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/core/modules/edit/js/views/AppView.js b/core/modules/edit/js/views/AppView.js index d38f5025c6ec..3bce3ed28646 100644 --- a/core/modules/edit/js/views/AppView.js +++ b/core/modules/edit/js/views/AppView.js @@ -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). * -- GitLab