Mercurial > hg > isophonics-drupal-site
comparison core/modules/quickedit/js/views/EditorView.es6.js @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
116 case 'highlighted': | 116 case 'highlighted': |
117 // Nothing to do for the typical in-place editor: it should not be | 117 // Nothing to do for the typical in-place editor: it should not be |
118 // visible yet. | 118 // visible yet. |
119 break; | 119 break; |
120 | 120 |
121 case 'activating': | 121 case 'activating': { |
122 // The user has indicated he wants to do in-place editing: if | 122 // The user has indicated he wants to do in-place editing: if |
123 // something needs to be loaded (CSS/JavaScript/server data/…), then | 123 // something needs to be loaded (CSS/JavaScript/server data/…), then |
124 // do so at this stage, and once the in-place editor is ready, | 124 // do so at this stage, and once the in-place editor is ready, |
125 // set the 'active' state. A "loading" indicator will be shown in the | 125 // set the 'active' state. A "loading" indicator will be shown in the |
126 // UI for as long as the field remains in this state. | 126 // UI for as long as the field remains in this state. |
127 var loadDependencies = function (callback) { | 127 const loadDependencies = function (callback) { |
128 // Do the loading here. | 128 // Do the loading here. |
129 callback(); | 129 callback(); |
130 }; | 130 }; |
131 loadDependencies(() => { | 131 loadDependencies(() => { |
132 fieldModel.set('state', 'active'); | 132 fieldModel.set('state', 'active'); |
133 }); | 133 }); |
134 break; | 134 break; |
135 } | |
135 | 136 |
136 case 'active': | 137 case 'active': |
137 // The user can now actually use the in-place editor. | 138 // The user can now actually use the in-place editor. |
138 break; | 139 break; |
139 | 140 |
182 * Saves the modified value in the in-place editor for this field. | 183 * Saves the modified value in the in-place editor for this field. |
183 */ | 184 */ |
184 save() { | 185 save() { |
185 const fieldModel = this.fieldModel; | 186 const fieldModel = this.fieldModel; |
186 const editorModel = this.model; | 187 const editorModel = this.model; |
187 const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[\/\[\]\_\s]/g, '-')}`; | 188 const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[/[\]_\s]/g, '-')}`; |
188 | 189 |
189 function fillAndSubmitForm(value) { | 190 function fillAndSubmitForm(value) { |
190 const $form = $(`#${backstageId}`).find('form'); | 191 const $form = $(`#${backstageId}`).find('form'); |
191 // Fill in the value in any <input> that isn't hidden or a submit | 192 // Fill in the value in any <input> that isn't hidden or a submit |
192 // button. | 193 // button. |