There is a lot of code in the Overlay module (mainly the JavaScript, I think) that is very specifically targeted at the Shortcut module - grabbing the "+" icon from the child window and sticking it in the parent window next to the overlay title, etc. This is wrong. Especially because it prevents other modules' markup from being similarly treated.

We need to make it so that the overlay properly grabs the entire rendered title from the child window (including $title_prefix and $title_suffix, the latter being where the Shortcut module link lives) and does not special-case anything for the Shortcut module specifically.

Getting #725734: Overlay doesn't escape any page titles (residual cleanup) in first would probably make this possible.

Comments

casey’s picture

#668640: Overlay shouldn't be based on jQuery UI Dialog landed; only shortcut code left is Drupal.overlayChild.behaviors.shortcutAddLink() in overlay-child.js and its styling in overlay-child.css

It moves the shortcut link to the top of the overlay. I think this can be considered overlay specific code.

kika’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs work
MyXelf’s picture

I'm trying to add another button/link to the Overlay (almost there). And after some struggling the only way was to reuse the so-hackish way that Overlay uses to bubble up the Shortcut container after the title. Agreed with David_Rothstein that this shouldn't be the way.

I'm wondering if a more Drupal-way of doing this would be to ressemble the 'title_suffix' (which btw isn't supported by the Overlay, as it is not included in the template). I would create another variable (e.g. overlay_links_container) for a renderable array, rendered at the template level, and every module could preprocess this var for their own purposes. The admin theme would be responsible for properly placing every "links" in the correct area. The Shortcut module would follow this pattern. Another module that could benefit from this would be 'Overlay Expand' which right now duplicates the template to include another link/button.

I guess the '+' icon is not grabbed from the child window, is from the same page displayed inside the Overlay. If not bubbled up it would show next to the H1 tag inside the overlay (and not as a suffix of the H1 of the Overlay itself). BTW, 2 H1 on the same page looks weird to me.

I think this is pretty important in D7, also checking D8 code about this, remains the same.

nod_’s picture

Version: 8.x-dev » 7.x-dev
Issue summary: View changes

Overlay is dead to D8 #2088121: Remove Overlay.