Chris@0: /** Chris@0: * @file Chris@0: * A Backbone Model for the state of an in-place editor. Chris@0: * Chris@0: * @see Drupal.quickedit.EditorView Chris@0: */ Chris@0: Chris@0: (function (Backbone, Drupal) { Chris@0: /** Chris@0: * @constructor Chris@0: * Chris@0: * @augments Backbone.Model Chris@0: */ Chris@0: Drupal.quickedit.EditorModel = Backbone.Model.extend(/** @lends Drupal.quickedit.EditorModel# */{ Chris@0: Chris@0: /** Chris@0: * @type {object} Chris@0: * Chris@0: * @prop {string} originalValue Chris@0: * @prop {string} currentValue Chris@0: * @prop {Array} validationErrors Chris@0: */ Chris@0: defaults: /** @lends Drupal.quickedit.EditorModel# */{ Chris@0: Chris@0: /** Chris@0: * Not the full HTML representation of this field, but the "actual" Chris@0: * original value of the field, stored by the used in-place editor, and Chris@0: * in a representation that can be chosen by the in-place editor. Chris@0: * Chris@0: * @type {string} Chris@0: */ Chris@0: originalValue: null, Chris@0: Chris@0: /** Chris@0: * Analogous to originalValue, but the current value. Chris@0: * Chris@0: * @type {string} Chris@0: */ Chris@0: currentValue: null, Chris@0: Chris@0: /** Chris@0: * Stores any validation errors to be rendered. Chris@0: * Chris@0: * @type {Array} Chris@0: */ Chris@0: validationErrors: null, Chris@0: }, Chris@0: Chris@0: }); Chris@0: }(Backbone, Drupal));