Version 1
[yaffs-website] / web / core / modules / quickedit / js / models / AppModel.js
1 /**
2  * @file
3  * A Backbone Model for the state of the in-place editing application.
4  *
5  * @see Drupal.quickedit.AppView
6  */
7
8 (function (Backbone, Drupal) {
9
10   'use strict';
11
12   /**
13    * @constructor
14    *
15    * @augments Backbone.Model
16    */
17   Drupal.quickedit.AppModel = Backbone.Model.extend(/** @lends Drupal.quickedit.AppModel# */{
18
19     /**
20      * @type {object}
21      *
22      * @prop {Drupal.quickedit.FieldModel} highlightedField
23      * @prop {Drupal.quickedit.FieldModel} activeField
24      * @prop {Drupal.dialog~dialogDefinition} activeModal
25      */
26     defaults: /** @lends Drupal.quickedit.AppModel# */{
27
28       /**
29        * The currently state='highlighted' Drupal.quickedit.FieldModel, if any.
30        *
31        * @type {Drupal.quickedit.FieldModel}
32        *
33        * @see Drupal.quickedit.FieldModel.states
34        */
35       highlightedField: null,
36
37       /**
38        * The currently state = 'active' Drupal.quickedit.FieldModel, if any.
39        *
40        * @type {Drupal.quickedit.FieldModel}
41        *
42        * @see Drupal.quickedit.FieldModel.states
43        */
44       activeField: null,
45
46       /**
47        * Reference to a {@link Drupal.dialog} instance if a state change
48        * requires confirmation.
49        *
50        * @type {Drupal.dialog~dialogDefinition}
51        */
52       activeModal: null
53     }
54
55   });
56
57 }(Backbone, Drupal));