Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/**
2
 * A dialogue type designed to display informative messages to users.
3
 *
4
 * @module moodle-core-notification
5
 */
6
 
7
/**
8
 * Extends core Dialogue to provide a type of dialogue which can be used
9
 * for informative message which are modal, and centered.
10
 *
11
 * @param {Object} config Object literal specifying the dialogue configuration properties.
12
 * @constructor
13
 * @class M.core.notification.info
14
 * @extends M.core.dialogue
15
 */
16
var INFO = function() {
17
    INFO.superclass.constructor.apply(this, arguments);
18
};
19
 
20
Y.extend(INFO, M.core.dialogue, {
21
    initializer: function() {
22
        this.show();
23
    }
24
}, {
25
    NAME: 'Moodle information dialogue',
26
    CSS_PREFIX: DIALOGUE_PREFIX
27
});
28
 
29
Y.Base.modifyAttrs(INFO, {
30
   /**
31
    * Whether the widget should be modal or not.
32
    *
33
    * We override this to change the default from false to true for a subset of dialogues.
34
    *
35
    * @attribute modal
36
    * @type Boolean
37
    * @default true
38
    */
39
    modal: {
40
        validator: Y.Lang.isBoolean,
41
        value: true
42
    }
43
});
44
 
45
M.core.notification = M.core.notification || {};
46
M.core.notification.info = INFO;