Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 124... Línea 124...
124
        if (!this.isMenuOpen()) {
124
        if (!this.isMenuOpen()) {
125
            return;
125
            return;
126
        }
126
        }
Línea 127... Línea 127...
127
 
127
 
128
        this.root.addClass('collapsed');
128
        this.root.addClass('collapsed');
129
        this.menuContainer.attr('aria-expanded', 'false');
129
        this.menuToggle.attr('aria-expanded', 'false');
130
        this.menuContainer.attr('aria-hidden', 'true');
130
        this.menuContainer.attr('aria-hidden', 'true');
131
        this.updateButtonAriaLabel();
131
        this.updateButtonAriaLabel();
132
        this.updateFocusItemTabIndex();
132
        this.updateFocusItemTabIndex();
133
        this.root.trigger(this.events().menuClosed);
133
        this.root.trigger(this.events().menuClosed);
Línea 145... Línea 145...
145
        if (this.isMenuOpen()) {
145
        if (this.isMenuOpen()) {
146
            return;
146
            return;
147
        }
147
        }
Línea 148... Línea 148...
148
 
148
 
149
        this.root.removeClass('collapsed');
149
        this.root.removeClass('collapsed');
150
        this.menuContainer.attr('aria-expanded', 'true');
150
        this.menuToggle.attr('aria-expanded', 'true');
151
        this.menuContainer.attr('aria-hidden', 'false');
151
        this.menuContainer.attr('aria-hidden', 'false');
152
        this.updateButtonAriaLabel();
152
        this.updateButtonAriaLabel();
153
        this.updateFocusItemTabIndex();
153
        this.updateFocusItemTabIndex();
154
        // Resolve the promises to allow the handlers to be added
154
        // Resolve the promises to allow the handlers to be added
Línea 324... Línea 324...
324
                this.closeMenu();
324
                this.closeMenu();
325
                this.focusMenuToggle();
325
                this.focusMenuToggle();
326
            }.bind(this));
326
            }.bind(this));
Línea 327... Línea 327...
327
 
327
 
328
            // Close the popover if any other part of the page is clicked.
328
            // Close the popover if any other part of the page is clicked.
329
            $('html').click(function(e) {
329
            document.addEventListener('click', (e) => {
-
 
330
                const target = e.target;
330
                var target = $(e.target);
331
                // Check if the click is outside the root element.
331
                if (!this.root.is(target) && !this.root.has(target).length) {
332
                if (!this.root.is(target) && !this.root.has(target).length) {
332
                    this.closeMenu();
333
                    this.closeMenu();
333
                }
334
                }
Línea 334... Línea 335...
334
            }.bind(this));
335
            }, true); // `true` makes it a capture phase event listener.
335
 
336
 
336
            customEvents.define(this.getContentContainer(), [
337
            customEvents.define(this.getContentContainer(), [
337
                customEvents.events.scrollBottom
338
                customEvents.events.scrollBottom