Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 53... Línea 53...
53
        if (delay) {
53
        if (delay) {
54
            this._hideTimeout = setTimeout(function() {
54
            this._hideTimeout = setTimeout(function() {
55
                self.hide();
55
                self.hide();
56
            }, delay);
56
            }, delay);
57
        }
57
        }
58
        this.after('visibleChange', this.visibilityChanged, this);
58
        this.after('visibleChange', this.errorVisibilityChanged, this);
59
        this._keypress = Y.on('key', this.hide, window, 'down:13, 27', this);
59
        this._keypress = Y.on('key', this.hide, window, 'down:13, 27', this);
60
        this.centerDialogue();
60
        this.centerDialogue();
61
    },
61
    },
62
    visibilityChanged: function(e) {
62
    errorVisibilityChanged: function(e) {
63
        if (e.attrName === 'visible' && e.prevVal && !e.newVal) {
63
        if (e.attrName === 'visible' && e.prevVal && !e.newVal) {
64
            var self = this;
64
            var self = this;
65
            this._keypress.detach();
65
            this._keypress.detach();
66
            setTimeout(function() {
66
            setTimeout(function() {
67
                self.destroy();
67
                self.destroy();