annotate core/modules/quickedit/js/models/EditorModel.es6.js @ 15:e200cb7efeb3

Update Drupal core to 8.5.3 via Composer
author Chris Cannam
date Thu, 26 Apr 2018 11:26:54 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
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@0 8 (function (Backbone, Drupal) {
Chris@0 9 /**
Chris@0 10 * @constructor
Chris@0 11 *
Chris@0 12 * @augments Backbone.Model
Chris@0 13 */
Chris@0 14 Drupal.quickedit.EditorModel = Backbone.Model.extend(/** @lends Drupal.quickedit.EditorModel# */{
Chris@0 15
Chris@0 16 /**
Chris@0 17 * @type {object}
Chris@0 18 *
Chris@0 19 * @prop {string} originalValue
Chris@0 20 * @prop {string} currentValue
Chris@0 21 * @prop {Array} validationErrors
Chris@0 22 */
Chris@0 23 defaults: /** @lends Drupal.quickedit.EditorModel# */{
Chris@0 24
Chris@0 25 /**
Chris@0 26 * Not the full HTML representation of this field, but the "actual"
Chris@0 27 * original value of the field, stored by the used in-place editor, and
Chris@0 28 * in a representation that can be chosen by the in-place editor.
Chris@0 29 *
Chris@0 30 * @type {string}
Chris@0 31 */
Chris@0 32 originalValue: null,
Chris@0 33
Chris@0 34 /**
Chris@0 35 * Analogous to originalValue, but the current value.
Chris@0 36 *
Chris@0 37 * @type {string}
Chris@0 38 */
Chris@0 39 currentValue: null,
Chris@0 40
Chris@0 41 /**
Chris@0 42 * Stores any validation errors to be rendered.
Chris@0 43 *
Chris@0 44 * @type {Array}
Chris@0 45 */
Chris@0 46 validationErrors: null,
Chris@0 47 },
Chris@0 48
Chris@0 49 });
Chris@0 50 }(Backbone, Drupal));