Lines Matching full:overlay
11 * You can turn any div into an overlay. Note that while an
12 * overlay element is shown, its parent is changed. Hiding the overlay
16 base.requireStylesheet('ui.overlay');
35 this.classList.add('overlay-root');
72 this.exitButton_.title = 'Close Overlay (esc)';
77 * Adds an overlay, attaching it to the contentHost so that it is visible.
79 showOverlay: function(overlay) {
80 // Reparent this to the overlay content host.
81 overlay.oldParent_ = overlay.parentNode;
82 this.contentHost.appendChild(overlay);
85 // Show the overlay root.
86 this.ownerDocument.body.classList.add('disabled-by-overlay');
88 // Bring overlay into focus.
89 overlay.tabIndex = 0;
91 overlay.querySelector('button, input, list, select, a');
93 focusElement = overlay;
98 // leaving the overlay.
100 overlay.addEventListener('keydown', this.onKeydown_);
104 * Clicking outside of the overlay will de-focus the overlay. The
107 * the overlay.
116 * Prevents forward-tabbing out of the overlay
129 * Prevent the user from shift-tabbing backwards out of the overlay.
140 * Hides an overlay, attaching it to its original parent if needed.
142 hideOverlay: function(overlay) {
143 // hide the overlay root
145 this.ownerDocument.body.classList.remove('disabled-by-overlay');
148 // put the overlay back on its previous parent
149 overlay.parentNode.removeChild(this.tabCatcher);
150 if (overlay.oldParent_) {
151 overlay.oldParent_.appendChild(overlay);
152 delete overlay.oldParent_;
154 this.contentHost.removeChild(overlay);
158 overlay.removeEventListener('keydown', this.onKeydown_);
164 * Creates a new overlay element. It will not be visible until shown.
169 var Overlay = ui.define('div');
171 Overlay.prototype = {
175 * Initializes the overlay element.
178 // create the overlay root on this document if its not present
179 if (!this.ownerDocument.querySelector('.overlay-root')) {
185 this.classList.add('overlay');
193 Overlay.prototype.onVisibleChange_.bind(this), true);
211 var overlayRoot = this.ownerDocument.querySelector('.overlay-root');
217 return this.ownerDocument.querySelector('.overlay-root .tool-bar');
221 var overlayRoot = this.ownerDocument.querySelector('.overlay-root');
278 Overlay: Overlay