Mercurial > hg > isophonics-drupal-site
annotate core/modules/quickedit/js/models/EditorModel.es6.js @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@0 | 1 /** |
Chris@0 | 2 * @file |
Chris@0 | 3 * A Backbone Model for the state of an in-place editor. |
Chris@0 | 4 * |
Chris@0 | 5 * @see Drupal.quickedit.EditorView |
Chris@0 | 6 */ |
Chris@0 | 7 |
Chris@17 | 8 (function(Backbone, Drupal) { |
Chris@0 | 9 /** |
Chris@0 | 10 * @constructor |
Chris@0 | 11 * |
Chris@0 | 12 * @augments Backbone.Model |
Chris@0 | 13 */ |
Chris@17 | 14 Drupal.quickedit.EditorModel = Backbone.Model.extend( |
Chris@17 | 15 /** @lends Drupal.quickedit.EditorModel# */ { |
Chris@17 | 16 /** |
Chris@17 | 17 * @type {object} |
Chris@17 | 18 * |
Chris@17 | 19 * @prop {string} originalValue |
Chris@17 | 20 * @prop {string} currentValue |
Chris@17 | 21 * @prop {Array} validationErrors |
Chris@17 | 22 */ |
Chris@17 | 23 defaults: /** @lends Drupal.quickedit.EditorModel# */ { |
Chris@17 | 24 /** |
Chris@17 | 25 * Not the full HTML representation of this field, but the "actual" |
Chris@17 | 26 * original value of the field, stored by the used in-place editor, and |
Chris@17 | 27 * in a representation that can be chosen by the in-place editor. |
Chris@17 | 28 * |
Chris@17 | 29 * @type {string} |
Chris@17 | 30 */ |
Chris@17 | 31 originalValue: null, |
Chris@0 | 32 |
Chris@17 | 33 /** |
Chris@17 | 34 * Analogous to originalValue, but the current value. |
Chris@17 | 35 * |
Chris@17 | 36 * @type {string} |
Chris@17 | 37 */ |
Chris@17 | 38 currentValue: null, |
Chris@0 | 39 |
Chris@17 | 40 /** |
Chris@17 | 41 * Stores any validation errors to be rendered. |
Chris@17 | 42 * |
Chris@17 | 43 * @type {Array} |
Chris@17 | 44 */ |
Chris@17 | 45 validationErrors: null, |
Chris@17 | 46 }, |
Chris@0 | 47 }, |
Chris@17 | 48 ); |
Chris@17 | 49 })(Backbone, Drupal); |