Hello there,

I'm using ng_lightbox with colorbox and colorbox_load
in order to create an experience where all 3 user form (login / register / reset pass) are shown in a popup

initial setup works fine, to open the 3 links from any page in a popup

the problem I have is when I wish to cross-link between the 3 forms
for example, login form has a link to register, and vice-versa
the link in the popup has all the attributes necessary, but it won't open in a popup

the

// Bind Ajax behaviors to all items showing the class.
$('.use-ajax').once('ajax').each(function () {

from core/misc/ajax.js is not triggered for the content loaded via ajax

I'm not sure where to look for the problem
suspecting something might be missing from src/OpenCommand.php
any help will be much appreciated

thanks,
Reszli

Comments

reszli created an issue. See original summary.

mariancalinro’s picture

Status: Active » Needs review
StatusFileSize
new245 bytes

It just needed a call to Drupal.attachBehaviors() on the loaded content.
Patch attached.

mariancalinro’s picture

StatusFileSize
new268 bytes

Patch from #2 was wrong.

sam152’s picture

#3 makes sense to me.

sam152’s picture

Status: Needs review » Fixed

  • Sam152 committed 087bdf0 on 8.x-1.x authored by mariancalinro
    Issue #2747721 by mariancalinro, reszli: Links in Ajax loaded content
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.