Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

FIXED: Lightbox popup for front end ComplexTableField - possible?


Reply

4 Posts   2327 Views

Avatar
zalzadore

27 September 2008 at 11:20pm (Last edited: 2 October 2008 2:32am), Community Member, 20 Posts

Hi Ladies / Gents,
I have a front end ComplexTableField as per the example on [url]http://doc.silverstripe.com/doku.php?id=complextablefield[/url], but the show and edit buttons simply fill out the current browser tab or open a new one rather than use a LightBox.

I've noticed a few people asking questions about getting LightBox working, but have seen no answers relevant to ComplexTableField.

Any ideas how I can pop up a lightBox in the front end?

Ta,
Z.

Avatar
zalzadore

30 September 2008 at 9:23pm (Last edited: 30 September 2008 9:29pm), Community Member, 20 Posts

Ah, tricky one eh?

Can anyone point me in the right direction? (Using SS 2.2.2)

Thanks.

Avatar
zalzadore

2 October 2008 at 2:27am Community Member, 20 Posts

Turns out that there was a dependancy problem.

In SS 2.2.2:
sapphire/forms/ComplexTableField.php has the line:

Requirements::javascript("sapphire/javascript/ComplexTableField.js");

This depends on the prototype extension, but it has not been made a requirement for ComplexTableField (it has for TableListField)

So, I just added the following 3 lines before the Requirements line above:

Requirements::javascript('jsparty/prototype.js');
Requirements::javascript('jsparty/behaviour.js');
Requirements::javascript('jsparty/prototype_improvements.js');

Now it works

Avatar
zalzadore

2 October 2008 at 2:32am Community Member, 20 Posts

P.S.
How do I enter this as a bug in the ticket system? I've registered, but apparently I don't have the privileges.