Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / quickedit / js / views / EditorView.es6.js
index 7eff43e42a48c1e804ff03e4258cfffa34e205dc..1a1a9845d53d9748d7f437ba01707b87bdb2985b 100644 (file)
           // visible yet.
           break;
 
-        case 'activating':
+        case 'activating': {
           // The user has indicated he wants to do in-place editing: if
           // something needs to be loaded (CSS/JavaScript/server data/…), then
           // do so at this stage, and once the in-place editor is ready,
           // set the 'active' state. A "loading" indicator will be shown in the
           // UI for as long as the field remains in this state.
-          var loadDependencies = function (callback) {
+          const loadDependencies = function (callback) {
             // Do the loading here.
             callback();
           };
             fieldModel.set('state', 'active');
           });
           break;
+        }
 
         case 'active':
           // The user can now actually use the in-place editor.
     save() {
       const fieldModel = this.fieldModel;
       const editorModel = this.model;
-      const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[\/\[\]\_\s]/g, '-')}`;
+      const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[/[\]_\s]/g, '-')}`;
 
       function fillAndSubmitForm(value) {
         const $form = $(`#${backstageId}`).find('form');